Live data from Hacker News

Taskfile: A Modern Alternative to Makefile

cloudnativeengineer.substack.com

111–120 of 223 posts

Re: Taskfile: A Modern Alternative to Makefile

#112
post #58

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 try…

I am thinking there must be a doit kind of tool but using bash shell instead. Anyone aware of one?

No guarantees, but I use https://github.com/svandragt/Taskfile

Unfortunately it’s named the same.

Re: Taskfile: A Modern Alternative to Makefile

#113
post #87

Earlier quoted context omitted.

What is the "Norway problem"?

“The Norway Problem” YAML has: when you abbreviate Norway to its ISO 3166-1 ALPHA-2 form NO, YAML will return false when parsing list of countries f.e ‘[GB, IN, NO,…]’

It's a good example of how you can overengineer a relatively simple format.

The reason is that they specify a boolean value as either "true/false" or "yes/no".

The last alternative causes problems not only for the Norwegian country code (no), but also in cases where you need to specify the actual word "yes"

You could of course end up with the same problem if you need to specify the literal "true" and "false", but by overengineering the acceptable boolean values, they increase the potential problem areas.

Re: Taskfile: A Modern Alternative to Makefile

#114
post #27

Earlier quoted context omitted.

I remember how I promoted Git over a decade ago, and I heard from the lead guy that “SVN does the same” and “there are no benefits of using branches” (he never used them). Please listen to your coworkers and don’t be that guy. Technology moves forward, make it great, but it’s time to move on.

This is a poor take. MAKE files have existed for decades.

Every makefile I've used in the last decade has had every target marked as phony. When you're disabling one of the primary features of a tool to continue using it because you know how to use it, it's time to find a new tool.

Re: Taskfile: A Modern Alternative to Makefile

#115
post #99

One day after writing a complex Makefile and getting frustrated because 1) it was hard to read and reason about because of make weird syntax, 2) it didn't run on CI because it uses GNU Make instead of BSD Make on my MacBook, I thought of writing a "modern" alternative: I wanted it easy to read, write, parse and use, so I'd use YAML. You guys all shit on YAML because it's extremely badly used by, say, Helm charts, but…

I'm the creator of StrictYAML and honestly, I would love to see something like this built with it.

I hate make and I dont like the idea of using non-typesafe YAML to build this (which presumably this tool does, since it's done in golang).

I've been using a "standardized" bash script with a huge case statement as a justfile/this/makefile replacement but it's not ideal.

Re: Taskfile: A Modern Alternative to Makefile

#117
post #76

Earlier quoted context omitted.

Can you use spaces in filenames with GNU make yet? Seems like a 47yo vestige when spaces in filenames weren’t really a thing…

Or just don't use spaces in filenames. It just causes trouble for no benefit.

rather fond of leading hyphens and nonprint ascii myself

Re: Taskfile: A Modern Alternative to Makefile

#119

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 try…

> templated YAML based DSL are just insanity The truest statement of all of HN It started off with configuration files, but then we needed logic, control flow, or variables; and for some reason nobody goes "ok, maybe we need an actual progamming language now" and instead we've created horrors beyond our comprehension. Azure Pipelines is the worst I've used: three types of variables, conditional statements return stri…

Templated YAML just means that something somebody thought was configuration either wasn't or wasnt under every circumstance. It's not really a problem with YAML.

In most cases I think it's the fault of the creators of the YAML DSL (e.g. ansible) but with CI pipelines people really just should be writing scripts 100% in other languages and wiring them up to events with YAML. I dont have any sympathy for people using them as programming languages.

I'm sure Microsoft is happy to indulge it though because hey, vendor lock-in.

Re: Taskfile: A Modern Alternative to Makefile

#120
post #21

I don't understand this argument: "it's 47 years old" as a bad thing. If something has been around that long, does it not mean it is proof tested? The syntax of Taskfile looks more verbose to me than Makefile, which is basically a shell script in disguise. To note also is that you praise Devenv because of it being based on Guix (Guile scheme), while you ditch Makefile which also embeds Guile scheme as the extension l…

It’s proof tested yes. But it still falls over if you put in a space versus a tab, and the error message is cryptic and frustrating to beginners. Make is such a huge impediment to C adoption, long time users have no idea. Even the fact makefiles have no extension is confusing to beginners. Everything about it screams outdated, idiosyncratic computing artifact and students pick up on that.

Having hurdles to jump over is perhaps a good thing? After all Torvalds built git to have a hierarchy of trust in the development of Linux.

If someone can't understand how to use make perhaps they shouldn't be fiddling with C.

Post reply on HN