Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

31–40 of 146 posts

Re: Hyprland 0.55 announced the switch to Lua for its config files

#31
post #6

I 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 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?

Re: Hyprland 0.55 announced the switch to Lua for its config files

#33
post #6

I 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…

Yeah I think there are two basic routes that work. Either you have a declarative configuration, or you go the route of Emacs and make the entire thing programmable.

Turing complete configuration languages suck and makes everything slow, janky and difficult to reason about.

Re: Hyprland 0.55 announced the switch to Lua for its config files

#34
post #6

I 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…

It is good to keep a configuration simple enough that it doesn't need to be a programming language. The absolute moment you find yourself thinking of putting conditional logic, or string substitution, or anything like that, in your pure config format, switch to a real programming language, before you end up managing several times the complexity of one with only some of the benefits. No need to end up contemplating so…

python is terrible for embedding, starlark is the way to go. Very easy to embed.

Re: Hyprland 0.55 announced the switch to Lua for its config files

#35
post #6

I 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…

It depends a lot on the config language. Gradle has the uncanny ability to be a "worst of both worlds" option, where there are not many upsides to its using a full language for its configuration. Build configuration is also a space where people and even some tooling seem to forget about good engineering practices, giving birth to fragile builds that people are afraid to modify and improve.

Re: Hyprland 0.55 announced the switch to Lua for its config files

#36
post #6

I 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 want a programming language as soon as the program benefits from conditional clauses or subsystems. So if the will and know-how is there, would be great to have it from the start.

I was pretty happy the day I could move some Jenkins jobs to a Groovy script. I've worked with HCL significantly, but once I learned the idiosyncrasies of Pulumi, scripting infrastructure via a programming language was a better experience (good IDE autocomplete simplified things), though it requires more discipline.

Even without working with the Nix scripting language I'll dismiss it. When I looked at it was some kind of bastardisation of Bash with Haskell ideas. A hobby project idea at best, yet forced upon all Nix users. Guile Scheme is a nice small language, and Guix uses that, and I think that is a better approach.

Re: Hyprland 0.55 announced the switch to Lua for its config files

#37
post #6

I 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 don't dislike it but I do think it's interesting that a number of minimalist WMs seem to have converged on the idea of code as config. I have used AwesomeWM for years and love its Lua configuration for providing infinite flexibility. When I was recently looking for something like AwesomeWM but in Wayland I toyed with the idea of moving to something with a simpler config format (and Hyprland was one of the options I considered). I can see the benefit of the simplicity but I guess for the kinds of users that use these WMs, maximum configurability probably trumps everything else. (Currently I am using SomeWM which is just an attempt to get something as close as possible to AwesomeWM in Wayland.)

Personally I have grown a bit frustrated with Lua as a language, but at the same time can see why it would be a good choice for this use case.

Re: Hyprland 0.55 announced the switch to Lua for its config files

#38
post #6

I 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 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.

What would you remove from TOML to make it perfect?

Re: Hyprland 0.55 announced the switch to Lua for its config files

#39
post #6

I 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 think the progession is like 1) Oh, I can break stuff by changing a config value - it doesn't protect me. 2) Oh, I didn't think X would need to be configurable. 3) With code I can colocate the values with the code that uses them - easier to understand, and I can "configure" anything I want. 4) Why are we using configs?

Re: Hyprland 0.55 announced the switch to Lua for its config files

#40
post #6

I 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 switched from FVWM to awesome because of Lua. Many years later, I have switched to i3 because it's not using a programming language for configuration. It's fine to have a configuration language if you have time to maintain, but your configuration can become quite complex and difficult to evolve. And it is also far more subject to breakage when upgrading.

I think I've found balance by using a Python daemon as a "companion" for my i3 configuration. It listens and react to event. It enhances the configuration, so when it's broken, it's not a big deal. And the interface exposed by i3 is smaller, so less risk of breakage. https://vincent.bernat.ch/en/blog/2021-i3-window-manager#i3-...

Post reply on HN