Live data from Hacker News

Taskfile: A Modern Alternative to Makefile

cloudnativeengineer.substack.com

11–20 of 223 posts

Re: Taskfile: A Modern Alternative to Makefile

#11
post #6

Just from reading the title i figured their idea of 'modern' was using something like yaml or json.

How Yaml of all things became so popular is a mystery to me.

I am guessing the primary selling point is that it's sort of human readable similar to Markdown but even that (in fact, especially that) falls short when a configuration is more than just 5 lines, in my opinion. Trying to figure out which bullet this sub-bullet belongs to by holding my finger on the screen while scrolling is not an improved experience. And don't even get me started on the clever type system.

Re: Taskfile: A Modern Alternative to Makefile

#12
So what does make (the took is not called Makefile, btw) "wrong". Where could one improve on it?

1. Syntax. Makefiles aren't parseable and have some at least unexpected syntactic properties.

2. Dependency detection: AFAIK any make will always use a timestamp and the precision varies a lot. A checksum or at least guaranteed resolution would be great. Also, you can't depend on directories.

3. Dynamics (this is going to be contested): Changing dependencies and tasks at runtime is possible with GNU make, but not ideal.

Taskfile improves on problem 1 but probably worsens everything else.

Re: Taskfile: A Modern Alternative to Makefile

#14
It's a shame, IMO, that make hasn't really evolved.

I've been at a few places that insist on still using them. They mostly work fine, but having PHONY littered everywhere gets a bit annoying.

I don't think a successor can exist. Makefiles seem like the last of a dying breed - not because make is bad, but because there are better ways to accomplish this already.

The market for people who've outgrown Makefiles but haven't embraced the alternatives has to be pretty small...

Re: Taskfile: A Modern Alternative to Makefile

#15
Ok cool, let's see what this is about

> Taskfile is just a dialect of YAML format with a specific syntax

I imagined that. Ok bye

Just write a js or python script. Or even a shell script

Makefile syntax is bad but frankly YAML was a bad idea. (slightly less than XML sure)

Re: Taskfile: A Modern Alternative to Makefile

#16
Sorry for the plug, but I can't help myself everytime I read about task managers to notice you have to learn yet another DSL.

DSL are the plague of our field, for one that is useful like SQL, you have a hundred that turn your life into hell. Make's DSL is already full of gotchas, but templated YAML based DSL are just insanity. They have so many footguns, and so little flexibility and ability to be debugged.

After trying a lot of task runners and builders, I finally settled on doit:

https://www.bitecode.dev/p/doit-the-goodest-python-task-runn...

- It makes the simple things simple, and the hard things possible.

- It scales up (you get targets, dependencies, manual scripting, etc), but it also scales down (you can define a simple list of shell commands to run and that's it).

- Instead of a DSL, you have regular Python. Which for all it's faults, is an excellent scripting language. It has great tooling support, and comes with a debugger.

- To avoid people abusing the expressiveness of Python, the default syntax to create tasks encourages a declarative style.

I've been using doit for years, and every single project I introduced it to was improved by it.

Of course, it comes with it's own problems (non python dev can dislike having to install that, and it doesn't yet provide a stand alone executable), but the ROI is way better than the alternatives I tried.

Re: Taskfile: A Modern Alternative to Makefile

#17
post #6

Just from reading the title i figured their idea of 'modern' was using something like yaml or json.

How Yaml of all things became so popular is a mystery to me. I am guessing the primary selling point is that it's sort of human readable similar to Markdown but even that (in fact, especially that) falls short when a configuration is more than just 5 lines, in my opinion. Trying to figure out which bullet this sub-bullet belongs to by holding my finger on the screen while scrolling is not an improved experience. And…

> Trying to figure out which bullet this sub-bullet belongs to by holding my finger on the screen while scrolling is not an improved experience

I don't see this as any worse than figuring out where nested parentheses are closed: tooling helps. I'm almost certain there's a whitespace plugin equivalent of Rainbow Parentheses for your IDE/editor of choice

Re: Taskfile: A Modern Alternative to Makefile

#18
post #6

Just from reading the title i figured their idea of 'modern' was using something like yaml or json.

I found it amusing how the main features advertised for Task were the programming language used to write it, how it's distributed as a single executable, and how it's easy to install.

None of them are relevant, or made any case for using it instead of just using the thing described in an international standard that is shipped by default in UNIX and Unix-like OSes for decades.

It's like their selling point is to talk crap about other tools without making any case for their own offering.

Post reply on HN