ASCII protocol buffers as config files
rachelbythebay.com
rachelbythebay.com
If HCL was more standardised across languages, maybe without the interpolation bits, it would be a nice common configuration format IMHO [0].
[0]: https://www.linode.com/docs/guides/introduction-to-hcl/
And an implementation for python which is at least widely used, not sure on quality: https://pypi.org/project/python-hcl2/
It's also a one-liner to convert JSON5 to normal json or yaml for things that want it that way.
[Drake turning away
with his hand up] Protobuf as config file format
[Drake smiling] SQLite3 as config file formatAs someone who wrote a protobuf parser, Please don't use protobuf for anything, ever.
I've never tried it - and I don't plan to any time soon - but it doesn't sound like a terrible idea. At least it's typed and you get a parser for free.
‘’’ But, hey, if you're already paying the price of using protobuf in your projects for some other reason, then why not use it for config storage, too? ‘’’
seems, imo, to be the most important point. otherwise, using it as a config replacement seems suspect.
Your comment just reminds me of perfect being the enemy of good.
Used this for a large, semi-generated config file (think large device trees). File was generated once and then there was some light manual editing after. JSON + pb worked great.