|
|
|
|
|
by jarym
8 days ago
|
|
I love seeing stuff like this that would probably not exist if not for LLMs making exploring these kinds of ideas relatively cheap and quick to do. My takeaway from this though is that nginx is pretty impressive on its own. Also this stuck out: It's meant to be an alternative to nginx and Caddy, and the design bet is about configuration. Those servers give you a declarative config language - location blocks, rewrite rules, map directives, try_files - and then, once the declarative language hits its limits, an optional scripting runtime bolted on the side (Lua, or Caddy's plugins). Behavior ends up split across two layers: directives that quietly grow their own control flow, plus scripts that run somewhere in the request lifecycle you have to keep in your head. I think the bet is misplaced - people prefer configuration over code and long have. The built-ins meet enough peoples needs entirely and they don't need to write C code. |
|
Seems like every configuration file format starts off simple. Look at YAML - the basics started off pretty sensibly.
And then people decided they wanted to get fancier with anchors and aliases. Even GitLab has its own form of conditionals and variables, which is all a bit of a hack (only works in certain places).
Even Apache fell into this with its XML based config format.
So we end up with numerous “bespoke” programming languages for configuration management. Of course enterprise people don’t edit these directly - they script Ansible workflows to remotely perform the surgery.
Sadly, could have skipped all that and just have embedded a Lua/Python/etc. interpreter into servers to do the configuration management. Would be simpler than trying to programmatically edit bespoke config files.
Sure, one will say all the bespoke attempts are optimized for a specific use the way a general language isn’t. Except that only fits a narrow class of toy examples which wouldn’t have needed their machinery in the first place!
Remember Windows INI files? Back in the good ol’ days when code was code and data was data….