Ask HN: What is our history on trying to standardize configuration languages?
I mean, the problem I want to solve is real. Configuring containerized applications is always annoying. Currently I either end up baking the configuration into the image, or using a pre-script to convert environment variables into the configuration I actually need before the app starts. Usually via bash scripts... (Or I have to decipher which method the official image uses. If they have one.)
My idea was to just have a little rust tool in my containers that would take the contents of environment variables and turn them into whatever format (toml, yaml, ini, etc.) the app needs. The problem was how do I represent all the different kinds of values you can have in a language? Lists, key/value lists, associative arrays, maps, etc...
Figuring out how to do that, well, isn't that just yet another configuration language?
And that is why I'm posting this question. Has any real effort ever been put into standardizing configuration languages/syntaxes?
If so, why'd they fail? If not, why not?
Augeas [1] does a decent job of translating various formats into a common AST which you can edit and write back out, but setting this up is often more trouble than just editing/templating whatever config and moving on with your life.
Many new projects go straight for YAML/TOML/JSON/INI as they're widely understood and relatively easy to parse. I think this is as close to standardization as you'll get.
OpenBSD's developers have gone in the other direction, defining domain specific configuration languages for each of their daemons. They're all different, but they look similar enough that it feels like a cohesive system. You can look at the yacc grammar and see how httpd's config [2] got started as a fork of relayd [3].
[1] http://augeas.net/
[2] https://github.com/openbsd/src/blob/master/usr.sbin/httpd/pa...
[3] https://github.com/openbsd/src/blob/master/usr.sbin/relayd/p...
Augeas seems interesting. I'll have to look into it a bit more than my cursory glance at the github issue queue. :)
Thanks!
https://github.com/ron-rs/ron
Works great, even with my laptop, desktop and server sharing the same config. Versioned rollback + nixpkgs has kept me happy for about 4 years with this setup.
That said, someday I need to give NixOS a try.