News for hackers. Stuff that matters.
Re:Taskfile: A Modern Alternative to Makefile by taspeotis on Sunday July 16, 2023 @04:46AM (#36744864)
Can you use spaces in filenames with GNU make yet? Seems like a 47yo vestige when spaces in filenames weren’t really a thing…
Re:Taskfile: A Modern Alternative to Makefile by rwmj on Sunday July 16, 2023 @05:09AM (#36744990)
Does this suffer from all the common problems with yaml (like the "Norway problem", but many others)?
Re:Taskfile: A Modern Alternative to Makefile by R0flcopt3r on Sunday July 16, 2023 @05:56AM (#36745212)
What is the "Norway problem"?
Re:Taskfile: A Modern Alternative to Makefile by signa11 on Sunday July 16, 2023 @06:03AM (#36745247)
“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,…]’
Re:Taskfile: A Modern Alternative to Makefile by throwaway83i3r on Sunday July 16, 2023 @07:18AM (#36745703)
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 by Brian_K_White on Sunday July 16, 2023 @09:19AM (#36746694)
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 by SAI_Peregrinus on Monday July 17, 2023 @12:22PM (#36760119)
Eh, it's fine if they're keywords as long as not everything is a string. If `"NO"` and `NO` are distinct types, then they're not equal and there's no Norway problem. YAML treats strings, numbers, null, and booleans as all the same type (scalars). The problem isn't keywords clashing with common words, it's not having distinct types!
Re:Taskfile: A Modern Alternative to Makefile by izoow on Sunday July 16, 2023 @10:22AM (#36747336)
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 by Fire-Dragon-DoL on Saturday July 22, 2023 @11:31AM (#36827072)
To be fair, yaml has a form of inheritance, I wouldn't define it a relatively simple format
Re:Taskfile: A Modern Alternative to Makefile by unscaled on Sunday July 16, 2023 @10:28AM (#36747392)
To be fair, YAML 1.2 does not suffer from the "Norway Problem", but YAML is still a rather complex format.
Re:Taskfile: A Modern Alternative to Makefile by gjvc on Sunday July 16, 2023 @11:21AM (#36748019)
I use make for (among other things) transforming files; batch compression being the simplest example, so all one requires is a rule saying %.log.xz : %.log and all is well.

But if people have colons in filenames, for example for timestamps, all bets are off, and make chokes spectacularly.

Re:Taskfile: A Modern Alternative to Makefile by lolcatnip on Sunday July 16, 2023 @05:03PM (#36751366)
And that really sucks in Windows because every absolute path contains a colon. Not that absolute paths are common in makefiles, but it's not something that should break on a major platform.
Re:Taskfile: A Modern Alternative to Makefile by colonwqbang on Sunday July 16, 2023 @05:05AM (#36744965)
Do we know that taskfile does any better than make on this front? It isn't mentioned in the article. Sounds like taskfile is runs on raw "command line string interpolation" just like good old make.
Re:Taskfile: A Modern Alternative to Makefile by cjfd on Sunday July 16, 2023 @05:17AM (#36745027)
Or just don't use spaces in filenames. It just causes trouble for no benefit.
Re:Taskfile: A Modern Alternative to Makefile by meling on Sunday July 16, 2023 @05:54AM (#36745204)
Oh yeah, tell that to Dropbox.
Re:Taskfile: A Modern Alternative to Makefile by rakoo on Sunday July 16, 2023 @05:57AM (#36745214)
Don't use dropbox. That's not even just a thing to say, reclaim your autonomy and stop using a proprietary tool.
Re:Taskfile: A Modern Alternative to Makefile by Novosell on Sunday July 16, 2023 @11:39AM (#36748217)
No doubt sent from a device with fully open-source hardware stack, right?
Re:Taskfile: A Modern Alternative to Makefile by rakoo on Sunday July 16, 2023 @11:48AM (#36748326)
Is it conceivable to you that steps are possible, and getting rid of dropbox is a step in a direction ? That perfect is the enemy of good ? That you can't wait to find a perfectly pure plan before starting moving ?
Re:Taskfile: A Modern Alternative to Makefile by inopinatus on Sunday July 16, 2023 @07:32AM (#36745814)
rather fond of leading hyphens and nonprint ascii myself
Re:Taskfile: A Modern Alternative to Makefile by jen20 on Sunday July 16, 2023 @10:38AM (#36747505)
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 by Kamq on Sunday July 16, 2023 @12:18PM (#36748633)
It's more that doing the 80% solution lets us spend time developing other things. And then we can have a bunch of other really cool stuff as long as the users are willing to work with it.

Which seems like a pretty reasonable trade-off for something that's free.

Re:Taskfile: A Modern Alternative to Makefile by t-3 on Sunday July 16, 2023 @02:05PM (#36749862)
It's the user serving themselves by naming files in a way that makes them easy to handle everywhere. There is also sorting and completion to consider in commonly-traversed directories.
Re:Taskfile: A Modern Alternative to Makefile by SAI_Peregrinus on Monday July 17, 2023 @12:24PM (#36760152)
/Τĥιs ñåmè įß ą váĺîδ POSIX /paτĥ
Re:Taskfile: A Modern Alternative to Makefile by EuAndreh on Sunday July 16, 2023 @11:02AM (#36747763)
In GNU make? Actually, yes:

    $ cat Makefile
    a\ file: ; echo 123 > '$@'
    $ make
    echo 123 > 'a file'
    $ cat a\ file
    123
Re:Taskfile: A Modern Alternative to Makefile by booi on Monday July 17, 2023 @04:09AM (#36755410)
AFAIK this does work but it’s a limited workaround. Make in general just does not support file names with spaces well.

http://savannah.gnu.org/bugs/?712

That being said… In projects I just avoid filenames with spaces in general