News for hackers. Stuff that matters.
Re:Learn Makefiles with the Tastiest Examples by antipaul on Monday May 15, 2023 @07:19PM (#35955854)
That's a fine opinion, but I haven't found a more widely available tool to describe a project "recipe", where project is written in one or more, of many possible languages

* Snakefile -> requires installation

* bash -> macOS is now ZSH. (Is bash a better choice than Make?)

* python -> what if I'm not using python?

What else is as "accessible" as Makefile?

EDIT: formatting

Re:Learn Makefiles with the Tastiest Examples by Izkata on Monday May 15, 2023 @07:39PM (#35956013)
> * bash -> macOS is now ZSH. (Is bash a better choice than Make?)

Makefiles don't run code themselves, the recipe is written to a file and executed using "sh" (at least by default, the shell to use is changeable).

Re:Learn Makefiles with the Tastiest Examples by jjnoakes on Monday May 15, 2023 @07:22PM (#35955885)
The Makefile is going to be running external commands, no? So you still have the same problem (what are those external commands written in?) - whatever the answer to that question is, your task runner could be written in as well, probably.

At least, that's how I prefer to do it. A project that's heavy JS? Use a JS task runner. Heavy python? Python task runner. Heavy shell? And so on.

Re:Learn Makefiles with the Tastiest Examples by taeric on Monday May 15, 2023 @09:10PM (#35956644)
I have seen few hells as bad as "just use the target runtime for build."
Re:Learn Makefiles with the Tastiest Examples by jjnoakes on Thursday May 25, 2023 @07:14PM (#36077665)
It can be done well though, and when it is, it removes friction from the development process.
Re:Learn Makefiles with the Tastiest Examples by paulddraper on Monday May 15, 2023 @10:32PM (#35957183)
Step 0: Ensure your project only uses one thing.
Re:Learn Makefiles with the Tastiest Examples by alwillis on Tuesday May 16, 2023 @12:42AM (#35957820)
> A project that's heavy JS? Use a JS task runner.

Trying to keep up with JS task runners for web projects is why I started using Make and haven’t looked back.

Re:Learn Makefiles with the Tastiest Examples by jjnoakes on Thursday May 25, 2023 @07:13PM (#36077656)
Sure but if a developer already has a JS runtime and they don't have Make installed, you've added unnecessary friction to the development process.

I hate JS as much as the next guy, but if I'm developing in JS, I use a JS task runner. Even a simple one. There's not much to "keep up with" IMO - they are quite easy to create and use, if the common/popular ones are missing features or move too fast for you.

Re:Learn Makefiles with the Tastiest Examples by pasc1878 on Tuesday May 16, 2023 @07:12AM (#35960164)
The issue for bash is also the issue for Makefiles.

make is not part of the default macOS install - You need to install developer tools - which I suppose if you are a developer is OK.

As for bash as it is an old verion on macOS you need to stick to a simpler subset - better write as sh.

So sh seems to be the most general.

Then consider Windows - ah ... You are going to have to install something. Shells don't run natively and how do you get snakefile or just.

So python or make are the cross platform tools you have