Live data from Hacker News

Taskfile: A Modern Alternative to Makefile

cloudnativeengineer.substack.com

161–170 of 223 posts

Re: Taskfile: A Modern Alternative to Makefile

#161
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…

There's even more options apparently :)

A Boolean represents a true/false value. Booleans are formatted as English words (“true”/“false”, “yes”/“no” or “on”/“off”) for readability and may be abbreviated as a single character “y”/“n” or “Y”/“N”.

Regexp: y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF

(https://yaml.org/type/bool.html)

Re: Taskfile: A Modern Alternative to Makefile

#162
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,…]’

To be fair, YAML 1.2 does not suffer from the "Norway Problem", but YAML is still a rather complex format.

I feel like the Makefile syntax has some pesky warts, like not breaking when there are spaces in filenames, requiring tabs[1], the ceremony around PHONY targets... If you take the legacy stuff out of make,

[1] Apparently it can be fixed with a complex .RECIPEPREFIX incantation which behaves differently in different versions of GNU make, and was conveniently added just one minor version after Apple has graciously decided to stop updating all their GNU software versions.

Redo, ninja and tup seems like trying to do that, with their own twists, but none of them really managed to nudge make out;

Re: Taskfile: A Modern Alternative to Makefile

#163

Earlier quoted context omitted.

And it breaks over time. Absolutely terrible choice for makefile. It would be far better to just use bash, even though it would mean coding your own dependecy and update-detecting logic. I wouldn't write anything in python that I still wanted to work a month later or on even one other system.

Could you elaborate on what you mean by it breaks over time?

Python has no standard and the language implemented by the reference compiler is a moving target. (E.g. every script in Python 2 that used print without () broke in Python 3. There were other breaking changes. Some software still depends on installing Python 2.). The ecosystem in general is similarly dynamic. It's common to install a set of specific versioned packages and Python interpreter to get a package running.

It's not really a language where you can write something and be confident it'll still work in ten years with the latest release of Python that'll be shipping with distros.

Re: Taskfile: A Modern Alternative to Makefile

#164
post #159

Earlier quoted context omitted.

So, the 'easy on ramp guided path' to being allowed to pilot a plane or practice medecine, is as easy or even in the same universe with writing a makefile? Do you hear yourself? Talk about invalid arguments holy shit! The easy on ramp was it was totally free and permissionless to learn how to write a Makefile, or read a bunch of existing ones, or countless howtos, and that a basic makefile is basic and you don't need…

Is anger and derision your default state of discourse? Both your responses so far have been just completely over the top in both regards. But putting that aside, you don’t think Make has a ton of footguns for someone starting out? Spaces vs tabs for different bits because of decades of legacy? Oh but most editors default to tabs as spaces and suddenly no matter what you do, following tutorials will still fail. Or you…

Would anyone allow people without a drivers license onto the streets in a car? Is that gatekeeping or learning the rules of how a societal form of cooperation is practiced?

Now whether learning how make works is the same as driving a car is left to the reader to decide. Either way make is also a societal form of cooperation with its rules and traditions.

Where does gatekeeping start and where does societal norms and cooperation begin?

Re: Taskfile: A Modern Alternative to Makefile

#165
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.

Ah yes - the user should serve the computer, not vice versa, clearly.

/s, in case it's necessary.

Re: Taskfile: A Modern Alternative to Makefile

#166

Earlier quoted context omitted.

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?

It's not about being explicit it's about using an abstraction that doesn't fit what you're abstracting. Make operates on the abstraction of targets are files. If you don't confirm to that abstraction, make is the wrong tool. To use the hammer analogy, just because you're good at hammering something, doesn't mean you should use it for a screw. Tools like docker and terraform don't use conventional files for state. Run…

To be pedantic: in the default mode, Terraform _does_ use a normal file for state, and for locks, and Make dependency tracking works fine with it.

Re: Taskfile: A Modern Alternative to Makefile

#167

Earlier quoted context omitted.

Make doesn’t have any builtin —help for the list of user defined targets, and has a slightly wonky bespoke syntax of it’s own. So it’s quite natural to look for something that has those properties.

Targets can be conditionally defined, so a built-in help may be inaccurate.

Given that targets may be conditionally defined, having built-in documentation of existing targets is _more_ critical - and it should take into account such conditions.

Re: Taskfile: A Modern Alternative to Makefile

#168

Earlier quoted context omitted.

Taskfile looks heavily inspired by terraform and other "cloud native tooling (read: lots of yaml)

Terraforms native language is HCL, in most terraform setups I see very little yaml. Maybe you're thinking of k8s and all of its related tooling?

Indeed it doesn't even support YAML, except by the bad faith argument that it supports the subset of YAML which is JSON.

Re: Taskfile: A Modern Alternative to Makefile

#169
post #128

Earlier quoted context omitted.

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.

Whingy babies, freshmen students… tomato tomato.

Problem is if you care about the future, someone has to help the whingy babies become competent adults. Not everyone is a polymath autodidact that can absorb everything about computers like the HN crowd. Some rockstars start as whingy babies. If you don’t help them at that crucial time, the stay whingy babies, or worse, go on to become project managers. You don’t want the whingy babies managing your project.

Re: Taskfile: A Modern Alternative to Makefile

#170
post #159

Earlier quoted context omitted.

So, the 'easy on ramp guided path' to being allowed to pilot a plane or practice medecine, is as easy or even in the same universe with writing a makefile? Do you hear yourself? Talk about invalid arguments holy shit! The easy on ramp was it was totally free and permissionless to learn how to write a Makefile, or read a bunch of existing ones, or countless howtos, and that a basic makefile is basic and you don't need…

Is anger and derision your default state of discourse? Both your responses so far have been just completely over the top in both regards. But putting that aside, you don’t think Make has a ton of footguns for someone starting out? Spaces vs tabs for different bits because of decades of legacy? Oh but most editors default to tabs as spaces and suddenly no matter what you do, following tutorials will still fail. Or you…

> If people consider Make easy to learn, imho they haven’t really reflected on how much more streamlined the rest of the software engineering ecosystem is

This right here. It goes back to my other comment about how those who are proficient with Make don’t understand how esoteric and arcane it is to beginners.

The attitude of “well it should be hard, the shouldn’t even learn C if they can’t handle make” is explains why my students love Rust so much. Rust has a sane and standardized build system they prefer to use. Make is the Stone Age to them.

And don’t get me wrong, they learn Make. They learn how to use it proficiently and we get through it. But at the end of the class, they will throw Make away and use another language like Rust. They simply do not want to deal with it.

Post reply on HN