Live data from Hacker News

Taskfile: A Modern Alternative to Makefile

cloudnativeengineer.substack.com

131–140 of 223 posts

Re: Taskfile: A Modern Alternative to Makefile

#131
post #27
post #9

I have coworkers who use this. They tried to make me use this too. I failed to see the point. It offers no benefits of a build system, no benefits of existing automation tools, comes with "bespoke" syntax and requires installing an extra program to run it. I have never tested it enough to discover things it does wrong, but given how new and not exactly popular this tool is, I bet there are lots of things it doesn't d…

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 the sort of logic that replaced make with cmake. New can definitely be worse than old. For example, cmake is terrible.

Re: Taskfile: A Modern Alternative to Makefile

#132

Earlier quoted context omitted.

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

That's pretty much my strat: put everything in doit, and call doit from the yml file.

Anything else is shenanigans.

Re: Taskfile: A Modern Alternative to Makefile

#134
post #57

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…

Python is such a massive dependency though, people who code in python rarely realize how big of a barrier it is for people not in that ecosystem. Package management is insane and every project has its own way of dealing with it. Installing python by itself is a chore on many operating systems.

You can't run linux without python these days, and it's not hard to stick to packages available in the repositories.

Re: Taskfile: A Modern Alternative to Makefile

#135
Instead of a DSL backed by some external tool, it's possible to write build scripts in a normal programming language. You only really need to implement "spawn process and give it these arguments" and "this depends on that" to reproduce most of C++ build scripts.

I've gone with lua and libuv because the concurrency model is so trivial. Each process spawn goes in a coroutine, stderr and stdout go into lua strings, use yield when the process is still running. However that comes with pretty minimal linting or error detection on the input, so maybe use some other language if you want that.

Or rephrasing, instead of a DSL for describing a graph and transforms to apply to the nodes, you can use a library in your favourite language instead. You might like that more than debugging cmake.

Re: Taskfile: A Modern Alternative to Makefile

#136

Earlier quoted context omitted.

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

That's pretty much my strat: put everything in doit, and call doit from the yml file. Anything else is shenanigans.

And yet you are here complaining about Taskfile and YAML overall. Nobody forces you to write full scripts in the YAML file. Just call scripts places somewhere next to it from it

Re: Taskfile: A Modern Alternative to Makefile

#137

Earlier quoted context omitted.

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.

Explicit is better than implicit? If everything was implicitly PHONY then of course people would complain about that as well. This is a bit like typing in function-signatures. But what's the proposal here, acknowledgement that your use-case is the best / most normal for default behaviour? Should function sigs that are missing type-hints always default to strings because that works well with your project code?

Make is not a task runner. Let me quote from it's manpage:

The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them.

Re: Taskfile: A Modern Alternative to Makefile

#138
I use Makefiles and native Bash in 2023 because both come on just about any system that will build and package my software.

Also, I disagree with Make being a bad task runner. In fact, I find it quite versatile. The fact that it is not a DSL with a meta programming language or, in the case of Taskfile, a YAML document that gets convoluted quickly (see also: Ansible) is a feature IMO.

Re: Taskfile: A Modern Alternative to Makefile

#139
post #87

Earlier quoted context omitted.

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

Claiming more common words as keywords basically. It's just not well considered. true and false are ordinary words, and it would probably be better if sometime way back someone had come up with special keywords that didn't conflict with ordinary words, but for good or bad, at least by now it's practically universal in most languages that true & false are keywords and everyone knows it. Claiming yes and no as keywords also was just thoughtless and inconsiderate (ok that was redundant), doubly so when they don't even do a new job but simply double the consumed namespace to do the same job that was already done by true & false.

Re: Taskfile: A Modern Alternative to Makefile

#140
post #128

Earlier quoted context omitted.

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.

Gatekeeping the entry to learn something is never good. There’s a big difference in developing trust to contribute to a project and developing knowledge to start with a new language. And I’ve worked with tons and tons of very amazing developers who aren’t comfortable with Make or even git because their careers have been with Visual Studio and other VCS. Therefore I don’t think it’s an adequate judge of skill.

I'm pretty glad they gatekeep pilots and surgeons and all kinds of other occupations.

Reading a manual, or failing to, is not gatekeeping. I learned how to write a Makefile in a few minutes, for free, with no one telling me I wasn't allowed to.

There is no "gatekeeping" argument here, just whingy babies that no one should waste 10 seconds caring about.

Post reply on HN