3 ms·
https://github.com/LuaDist/lua https://github.com/LuaDist/lua The repository size is exactly the same as the submission, but you get a fully-fledged language -
by ay 13y ago
https://github.com/LuaDist/lua https://github.com/LuaDist/lua
The repository size is exactly the same as the submission, but you get a fully-fledged language - which allows you to make parametrized configs, etc, etc, etc.
And the syntax is quite convenient. Look at it for your next project.
- mercurial 13y agoTuring-complete, non-easily parseable by external tools configuration? No thanks.
- andrewflnr 13y agoWhat would make it easier to parse by external tools than a portable library that's insanely easy to embed? I mean, there's not that many now, but that's how every idea starts, good or bad. Whether Turing-completeness is a good idea depends on how much you trust the configurers. In cases where they're writing code anyway, you may as well have configuration be code too, among other cases.
- mercurial 13y ago> What would make it easier to parse by external tools than a portable library that's insanely easy to embed? A small, documented spec? Something you can easily validate, even if it doesn't feature a schema? > Whether Turing-completeness is a good idea depends on how much you trust the configurers. In cases where they're writing code anyway, you may as well have configuration be code too, among other cases. It makes it much easier to misconfigure the application and, depending on how much api surface you're going to expose, can prove to be an absolutely terrible idea in terms of maintenance (I'm looking at you, Awesome window manager). I'll take a "dumb", predictable configuration language for which I'm extremely likely to already have bindings in whatever language I'm working with than having to embed a Lua parser. Look at Ansible for how you can make a DSL with YAML for a good example of how it can be done.
- andrewflnr 13y agoI actually find YAML the most annoying part of Ansible, but that's probably specific to YAML. The syntax drives me crazy.
- mercurial 13y agoReally? I find YAML pretty nifty myself, though it has a few gotchas. Many softwares can get away with nothing more than INI-style configuration, but for more complex cases, YAML is much nicer to edit than, say, XML or JSON.