3 ms·
For plain config, I mostly use JSONY now. For executable declarationish things, I like Tcl (usually embedded in perl so I can use Moo(se) for OO rather than th
by mst 11y ago
For plain config, I mostly use JSONY now.
For executable declarationish things, I like Tcl (usually embedded in perl so I can use Moo(se) for OO rather than the inferior crap in other languages).
Hashicorp's HCL is an interesting middle ground.
- eropple 11y agoI can respect Tcl. I'm not super familiar with it aside from hacking on eggdrop, but it's in the same ballpark. For configuration, I just source a shell script and grab env vars wherever I can. It's the most portable (between applications, not necessarily between platforms) option available to me and plays nicely with stuff like jails. At a glance, I don't quite understand the value prop of JSONY over YAML, which (as you see used in something like Rails) allows for a good bit of flexibility with references to more tersely communicate intent. I think HCL is one of the worse decisions made by a somewhat influential software company in quite some time. It's harder to use than YAML (which is funny because the stated reason for its existence is "YAML is harder", and it makes me really, really curious what sort of users they're polling) while being less expressive and they're very careful to not really care about anybody's interop "because you can just use JSON instead", except that, as trying to work with Terraform amply proved, no, you can't use JSON, because that path isn't tested because nobody cares and unit tests are hard. =( HCL is a regular problem in my life. I needed to vent a little.
- crdoconnor 11y ago>for configuration, I just source a shell script and grab env vars wherever I can. That can cause you headaches when you want to store lists or associative data in your config.