I wish there was something better than Lua and just as "obvious" a choice. Static types, real arrays, zero-based indexing, etc. Closest thing I've seen so far is Roto: https://roto.docs.nlnetlabs.nl/en/stable/index.html Basically everything about this looks great - Rust-style syntax, static type checking, sane type system, easily embedded. The only slightly odd things are that it has built in types for IP addresses,…
The language is primarily used by Rotonda, the composable, programmable BGP routing engine. Not odd to have those data types at all…
Hyprland 0.55 announced the switch to Lua for its config files
101–110 of 146 posts
Re: Hyprland 0.55 announced the switch to Lua for its config files
#102Earlier quoted context omitted.
Lua was specifically designed to be a configuration language https://www.lua.org/history.html Lots of people start out with a non-programmable config format. But, as their situation becomes more complicated, they end up shoehorning in programmable-ish features until they realize they are running straight into https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule and decide to do it properly.
I mean, fair enough I guess. I've accidentally more-or-less reinvented interpreters on two separate occasions (both times using JSON as a quasi-AST), so I understand it. I guess I just feel like if you feel like you need programming constructs in your configuration, its approaching it from the wrong angle, and it should instead be handled via plugins. I feel like configuration itself should be a "dumb" format like JS…
Like comments? ;)
Re: Hyprland 0.55 announced the switch to Lua for its config files
#103I might be a good change but I left hyprland because,y configuration kept breaking. It's a good window manager so I'll change back once it gets stable. By now i3
it gives "rewrite it in rust" vibes in the way they rush in to re-do everything without understanding why things were the way they were or if, in fact, anyone was using that obscure feature. maybe they'll sort it all out in time; maybe not. wish they could at least take less of a "we don't care if we break your shit" attitude in the meantime.
/rant
Re: Hyprland 0.55 announced the switch to Lua for its config files
#104Earlier quoted context omitted.
I haven't really seen program go back from "a programming language" to a simple config format.
Python setup.py -> pyproject.toml? Make -> ninja. eBPF kernel modules from C to a custom language. Helm Go templates -> Kustomize. I am sure there are other projects picking up json from a previous xml + xpath + other ...xml junk.
Granted, it's a "simpler" config syntax, but the total system complexity has not decreased.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#105It's neat that Hyprland lets you define layouts in its config but I like niri's approach. It uses KDL (an established document / config language) and slightly extends it to add useful things like being able to include files. For example, here's mine: https://github.com/nickjj/dotfriedrice/blob/master/.config/n... What you end up with is a config file that's natural to read with no prior knowledge about anything and i…
In this same space, https://codeberg.org/emersion/scfg/ is pretty widely used. The curious thing about scfg is that it's not really a "new" format: the syntax described has been in use by different tools for decades. They just didn't call it scfg, and it's mostly the name itself that's new.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#106I have grown pretty negative opinions of “using a programming language as a config language” after semi-recently having to spend a lot of time screwing around with someone’s Gradle Groovy abomination. Not even to mention how quickly Nix can get annoying. I have to ask…why do people want a Turing complete language to configure stuff? I use Sway personally, which is very configurable but for any even remotely complicat…
> I have to ask…why do people want a Turing complete language to configure stuff? I don't understand this either. IMO, the current SOTA tool for configuration is CUE, because it is the only one that lets you write schemas for arbitrary refinements. I haven't used it myself, but my understanding is that everybody should be writing configurations in something like this instead of YAML, TOML, HCL, or a custom DSL with n…
I CANNOT imagine what horrors it would be to do it all with helm or templating.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#107I might be a good change but I left hyprland because,y configuration kept breaking. It's a good window manager so I'll change back once it gets stable. By now i3
Re: Hyprland 0.55 announced the switch to Lua for its config files
#108Huh? This is from May. You guys should read the more recent notes. https://hypr.land/news/update56/
Re: Hyprland 0.55 announced the switch to Lua for its config files
#109I have grown pretty negative opinions of “using a programming language as a config language” after semi-recently having to spend a lot of time screwing around with someone’s Gradle Groovy abomination. Not even to mention how quickly Nix can get annoying. I have to ask…why do people want a Turing complete language to configure stuff? I use Sway personally, which is very configurable but for any even remotely complicat…
So you don't like using programming languages as config languages, so you: 1. Use a declarative-style format for config, which is fine, I guess; 2. ... and when that inevitably fails, you... use a programming language? Some people -- not all, but some -- may prefer to skip the first step and go straight for the second option. Particularly if it's a complex thing indeed like a build system and not, y'know, configuring…
Now it's all a single simple lua function and 3x as fast... I think this change is great.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#110Earlier quoted context omitted.
I think INI-style config is one of the few good things that came out of the Microsoft/Windows ecosystem. Shame that it is so underspecified. We have TOML, of course, but I think for stupid config even that is too much. The intersection of INI and TOML would be perfect.
Isn't that called TOML?
data = [ ["delta", "phi"], [3.14] ]
temp_tagets = { cpu = 79.5, case = 72.0 }