4 ms·
Could have been worse. Could have been YAML. Could have been XML.
by WesolyKubeczek 5mo ago
Could have been worse.
Could have been YAML.
Could have been XML.
- silvestrov 5mo agoXML would have the advantage of having a grammar so we could validate the config files. It would also make it much simpler to make good GUI editors for the files instead of the Notepad approach most unix config files take.
- Juliate 5mo agoThere are good GUI editors for XML?
- WesolyKubeczek 5mo agoSince systemd is successfully parsing its INI files, and barks at you when you put weird shit into them, a grammar for them does exist as well. XML is that wonderful format that gave us vulnerabilities like death by million laughs, up to a certain moment, you could MitM DTDs, and a whole slew of everything-XML stuff back when XML was like AI is today, none of which I miss today. Oh, and remember times when programmers would argue whether argument order in XML files should be significant or not? But XML books with their idealized XML future description did give me the same warm fuzzies as some intricate clockwork mechanism to a Victorian geek.
- deleted 5mo ago[deleted]
- pwdisswordfishq 5mo agoThe systemd dialect of INI is actually pretty well-defined though. https://www.freedesktop.org/software/systemd/man/latest/systemd.syntax.html https://www.freedesktop.org/software/systemd/man/latest/syst...
- silvestrov 5mo agoI'd really like a collection of unit tests for parsers. There is a lot of details that can differ between parsers. E.g. in "Section C" the resulting KeyThree is "value 3▵▵▵▵▵▵▵value 3 continued" where each "▵" symbol is a space. I think most people would expect a single (or no) space here. I would guess that most software would strip the comments in SectionC or rearrange the output so that it will result in a diff even when nothing in SectionC changed. So if you edit the file by hand in the same style as shown in the examples, then most editors would not be able to make a minor edit without making a large diff as many sections would be formatted differently.
- jjgreen 5mo agoTo be honest, I think either of those would have been better ...
- WesolyKubeczek 5mo ago/me cowers in fear
- wpm 5mo agoCould have been better. Could have been XML Property Lists. ducks
- Tsiklon 5mo agoXML - I see you’ve used macOS’ LaunchD, the system that inspired Systemd
- WesolyKubeczek 5mo agoYeah, I'm a man of culture like this. However, systemd with its service dependencies runs circles around launchd in pretty much every aspect.
- Tsiklon 5mo agoService dependency resolution and parallel startup is super in systemd. Big fan of what I can do with it.