5 ms·
I always thought Lua would be great for config files. Better than YAML even, since it's an actual language. Imagine if Kubernetes config files are actually Lua
by didip 6y ago
I always thought Lua would be great for config files. Better than YAML even, since it's an actual language.
Imagine if Kubernetes config files are actually Lua files.
- seany 6y agoYou can do that with nginx https://docs.nginx.com/nginx/admin-guide/dynamic-modules/lua/ https://docs.nginx.com/nginx/admin-guide/dynamic-modules/lua... . IIRC Cloudflare uses this extensively.
- lioeters 6y ago> Cloudflare uses this extensively Thanks for this mention - I found: CloudFlare repos on GitHub using Lua: https://github.com/cloudflare?q=lua https://github.com/cloudflare?q=lua Blog posts with "Lua" tag: https://blog.cloudflare.com/tag/lua/ https://blog.cloudflare.com/tag/lua/ Pushing Nginx to its limit with Lua - https://blog.cloudflare.com/pushing-nginx-to-its-limit-with-lua/ https://blog.cloudflare.com/pushing-nginx-to-its-limit-with-...
- jgrahamc 6y agoWe make use of OpenResty and LuaJIT although we are moving away from them and more and more towards code written in Rust and other languages.
- davidgould 6y agoLua was originally invented as a way to describe complex data. At some point it was enhanced with executable data and from there it’s a small step to become a programming language.
- xud 6y agoI don't think it's a good idea to make config files complicate. I don't want to run a debugger to know how my configuration file works.
- krapp 6y agoUsing Lua tables alone would be anything but complicated. The syntax is almost the same as JSON. You just have to practice self-discipline and not let Turing creep take over.
- bewo001 6y agoStill beats a yaml file format that has evolved so far that is effectively describing a program and has no tooling at all.
- Jaxan 6y agoAgreed. Last thing you want is a Turing complete language for config. Imagine your config to be non terminating! (And no way to check that.)
- stephenr 6y agoYaml is already too complex to be reliable.
- pjmlp 6y agoI was already doing it in 1999 with Tcl, nothing new really. :)