3 ms·
Waiting for someone to write a love letter to the infamous Windows INI file format I actually miss that. It was nice when settings were stored right alongside
by rkagerer 2y ago
Waiting for someone to write a love letter to the infamous Windows INI file format
I actually miss that. It was nice when settings were stored right alongside your software, instead of being left behind all over a bloated registry. And the format was elegant, if crude.
I wrote my own library for encoding/writing/reading various datatypes and structure into ini's, in a couple different languages, and it served me well for years.
- xp84 2y agoI feel like YAML is a spiritual successor to the .ini, since it shares a notable ideal of simple human readability/writability.
- estebank 2y agoWhenever I ask myself "should I use YAML?" I answer myself "Norway".
- Ygg2 2y agoTo be fair to YAML that's been solved in 1.2. https://yaml.org/spec/1.2.2/#10212-boolean https://yaml.org/spec/1.2.2/#10212-boolean
- ElectricalUnion 2y agoGiven how YAML does magic and sometimes accidental type conversions of potentially nested objects, I think TOML is the well-defined sucessor to .ini
- lelanthran 2y ago> I feel like YAML is a spiritual successor to the .ini, since it shares a notable ideal of simple human readability/writability. It doesn't feel that way to me: it's neither simple to read nor to write. I suppose that that's a builtin problem due to tree representation, which is something that INI files were never expected to represent. TBH, I actually prefer the various tree representation workarounds used by INI files: using whitespace to indicate child nodes stops being readable once you have more than a screenful of children in a node.
- consp 2y agoYAML is readable? No way as there are too many ways to do the same thing and nested structures are unclear to the non trained eye (what is a list? What is nested?), let alone indentation in large files is an issue especially with the default 2 space unreadable standard so many people adhere to. YAML simple? It's sepc is larger than XML... Parsing of numbers and strings is ambiguous, leading zeros are not strings but octal (implicit conversion...). List as keys? Oh ffs, and you said readable. And do not get me started about "Yes" being a boolean, reminds me of the MS Access localizations which had other decimal values for true and [local variant of true] (1 vs -1). Writable? Even worse. I think I have never been able to write a YAML file without errors. But that might just be me, XML is fine though while unreadable.
- HelloNurse 2y agoSay "no" to YAML. As a string, if you can.
- Ygg2 2y agoYou can. YAML 1.2 is only 16 years old. Just old enough to drive. Norway problem has been solved for only 16 years.
- HelloNurse 2y agoYAML 1.2 leaves data types ambiguous, merely making the "Norway problem" optional and at the mercy of the application rather than, in the words of https://yaml.org/type/ https://yaml.org/type/ (which has not been marked as deprecated), "strongly recommended".
- Ygg2 2y agoThose schemas aren't part of the core schema, and you may interpret them if you are aiming for full 1.1 compatibility. If you're aiming for 1.1 compatibility, then you accept the Norway problem. I've been looking in the specs and I can't find the link to the https://yaml.org/type/ https://yaml.org/type/
- afiori 2y agoI think GRON[1] would fit the bill better [1] https://github.com/tomnomnom/gron https://github.com/tomnomnom/gron
- isoprophlex 2y agoTOML is nice like that... elegant like INI, only with lists.
- eddythompson80 2y ago> instead of being left behind all over a bloated registry Really? I think the idea of a central, generic, key-value pair database for all the setting on a system is probably the most elegant reasonable implementation there could be. The initial implementation of Windows Registry wasn't good. It was overly simplistic and pretty slow. Though the "bloat" (what ever that means) of registry hasn't been an actual issue in over 20 years. The only people invested in convincing you "it's an issue" are CCleaner type software that promise to "speed up your computer" if you just pay $6.99. How many rows do you need in a sqlite database for it to be "bloated"?