3 ms·
> What does HN suggest for configuration files (to be written by a human essentially)? JSON. YAML confuses many people by being whitespace-sensitive; ini file
by lucb1e 10y ago
> What does HN suggest for configuration files (to be written by a human essentially)?
JSON.
YAML confuses many people by being whitespace-sensitive; ini files I find too limited.
- DonHopkins 10y agoA general rule of thumb: Never use yet another non-markup language designed by people who claimed to be designing yet another markup language from the very outset, then after somebody awkwardly pointed out that what they'd designed wasn't actually a markup language, they invent a backronym to contradict that embarrassing historical fact. It just makes me wonder what the hell they thought they were doing all that time... It's like designing something called YACC, and ending up with an interpreter interpreter! https://en.wikipedia.org/wiki/YAML https://en.wikipedia.org/wiki/YAML >Originally YAML was said to mean Yet Another Markup Language, referencing its purpose as a markup language with the yet another construct, but it was then repurposed as YAML Ain't Markup Language, a recursive acronym, to distinguish its purpose as data-oriented, rather than document markup.
- inimino 10y agoJSON is great for data exchange but config files should be human readable and amply commented. Even rolling your own simple format is probably better than using JSON.
- sankyo 10y agoin Clojure we use EDN (Extensible Data Notation) for config files and a data transfer format. https://github.com/edn-format/edn https://github.com/edn-format/edn It is really a pleasure to use compared to JSON and XML. While it may not be as compact as ProtoBuffers, Thrift, or Avro, it is human readable and also valid Clojure code. Libraries are ready available to convert it to JSON.