http://codesolvent.com/config-node/
it is however difficult to pull off and requires productization, in other words not low-level tooling in a text file.
41–50 of 412 posts
http://codesolvent.com/config-node/
it is however difficult to pull off and requires productization, in other words not low-level tooling in a text file.
Semirandom question: what's the proper file extension for a YAML file? I've done informal polls on it and every time it's an even split between .yaml and .yml
- .jpg / .jpeg
- .tif / .tiff
- .htm / .html
- .cpp / .cxx
It's frustrating at times, but not all file formats have One True Extension.
I never understood what it is that people like about YAML. I keep configuration in EDN, which avoids all of the problems described in the article and has other advantages, too.
EDN is fantastic. It wasn't super portable last I looked though.
With YAML I can never remember what's an object versus a list, string, or number, nor am I ever able to add new stuff to a YAML file and get it to parse correctly without first looking up the spec. And it's impossible to see where large objects start and end. In contrast, JSON is super intuitive and basically self documenting. The only real quirks are that you need to use double quotes, and objects can't have a trail…
You use JavaScript a lot more than python, right? Intuitive usually means "close to what I'm used to".
With YAML I can never remember what's an object versus a list, string, or number, nor am I ever able to add new stuff to a YAML file and get it to parse correctly without first looking up the spec. And it's impossible to see where large objects start and end. In contrast, JSON is super intuitive and basically self documenting. The only real quirks are that you need to use double quotes, and objects can't have a trail…
https://json5.org/
With YAML I can never remember what's an object versus a list, string, or number, nor am I ever able to add new stuff to a YAML file and get it to parse correctly without first looking up the spec. And it's impossible to see where large objects start and end. In contrast, JSON is super intuitive and basically self documenting. The only real quirks are that you need to use double quotes, and objects can't have a trail…
> In contrast, JSON is super intuitive and basically self documenting. The only real quirks are that you need to use double quotes, and objects can't have a trailing comma. I'd expand the list of quirks... JSON lacks comments (both line-level and block level). Fine for data transport but super super bad for configuration files.
If there was some deficiency with JSON5, just simply use JSON with comments. It's that simple.
JSON is one of the best things to ever come out of the CS disciplines.
For those that whine about comments in JSON, Douglas Crockford, the creator of JSON, himself said to do it.
>Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser.
Object graphs are the answer to the endless iteration on the right config format: http://codesolvent.com/config-node/ it is however difficult to pull off and requires productization, in other words not low-level tooling in a text file.