Earlier quoted context omitted.
Interestingly I find SGML-esque to be quite unpalatable. I get the feeling doing code reviews would be nightmarish.
Why? It's no worse than S-expressions.
YAML: Probably not so great after all
71–80 of 457 posts
Re: YAML: Probably not so great after all
#72Earlier quoted context omitted.
I hate yaml but I have yet to find a better option for deeply nested confog files. Toml is the closest thing I have seen. Toml support is also not that great. Yaml despite its flaws works pretty well for Ansible playbooks and for storing localizations.
Would you say actual YAML does a better job in Ansible over just writing JSON and letting it be parsed as YAML?
Re: YAML: Probably not so great after all
#73So what's the HN consensus on the best format for config files? Is it TOML as the author seems to prefer at the end?
Re: YAML: Probably not so great after all
#74The superior replacement for XML, JSON and YAML is the SQLite .db file. Easy to “parse”, easy to manipulate programmatically, what more could you want?
- Editable in vim/emacs - Meaningful version control
- dump it to SQL and version control that, if you must use Git
Re: YAML: Probably not so great after all
#75Earlier quoted context omitted.
Verbosity certainly is an issue with XML, but far from the only one. IMO the main problem of XML is that it was designed as a markup language, but then misused as a data structure serialization language. When used as a markup language, the distinction between attributes and children is meaningful. When serializing data structures, the dichotomy breaks down. For most subfields of a larger data structure, it's not obvi…
This difficulty is of your owm making. An attribute is 'metadata' about the element. A child element is precisely that: another element.
Re: YAML: Probably not so great after all
#76So what's the HN consensus on the best format for config files? Is it TOML as the author seems to prefer at the end?
In the scale world, HOCON is very nice. It’s a format designed explicitly for config files, and has a lot of niceties (like you can append files together and they merge correctly, so you don’t have to end up with giant config files)
Re: YAML: Probably not so great after all
#77So what's the HN consensus on the best format for config files? Is it TOML as the author seems to prefer at the end?
Re: YAML: Probably not so great after all
#78Earlier quoted context omitted.
Umm, no. You can find cases where JSON sucks, but you have to look for them. You can find cases where XML doesn't suck, but you have to look for them.
Other than looking ugly and being a pain to type does xml actually suck?
or
pete
yet?Re: YAML: Probably not so great after all
#79Earlier quoted context omitted.
You say that like you’ve never really used XML... (Mostly /s. Come at me:))
I've used it quite a bit. I even like the namespacing bits. I find that XML composes elegantly in a way that the JSON and friends don't. My one request would be to bring back to SGML-like closing tag abbreviation: That is, instead of qux we should be able to write qux I think this one change would make XML more "palatable" for the JSON/YAML/TOML crowd.
Re: YAML: Probably not so great after all
#80S-Expression or TOML! I personally use TOML for all my projects' configuration file.