3 ms·
> Yeah, it's not like JSON parsers have never had bugs, but on average they'll be MUCH better than everyone and their mother hand rolling a C based bespoke par
by rdtsc 4y ago
> Yeah, it's not like JSON parsers have never had bugs, but on average they'll be MUCH better than everyone and their mother hand rolling a C based bespoke parser.
Currently, but if this idea started when Linux was become popular the real data format would have been XML. It might have been nice at the time, but today we would have laughed at it and said how outdated and silly it looks probably.
- woodruffw 4y agoPeople make fun of the excesses of the XML era, but that would still be an improvement in the state of affairs! Realistically, however, a reasonable format here would be CSV/TSV with a bit of escaping, or even something like netstrings[1]. Either would be unambiguous, while retaining the shell-tool-friendly nature of these pseudofiles. [1]: https://cr.yp.to/proto/netstrings.txt https://cr.yp.to/proto/netstrings.txt
- fathyb 4y agoThis is pretty much what happened with Darwin from Apple. The kernel and even the bootloader uses .plist files [0] extensively, which are XML-based. I like it. To change the PCI IDs for a driver for example, change the IOKitPersonalities property in the <Driver>.kext/Info.plist file. [0]: https://en.wikipedia.org/wiki/Property_list https://en.wikipedia.org/wiki/Property_list