Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

11–20 of 146 posts

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

#11
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…

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 your blog.

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

#12
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…

Because it almost always devolves into that anyway. Every yaml system I have ever worked in winds up with some layer on top to “generate the yaml” or some other such madness.

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

#13
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…

[deleted]

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

#14
post #7

I 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

I think the problem is with people downloading perfect configs from other people, I put the time to make my own, not overly complicated, basic window rules, nothing fancy. And it just werks, haven't changed it for 4 months (outside of rewriting it in lua, which took 30min and was quite fun). My first hyprland experience was with ML4W (nothing against the guy) but as soon as you download it you get 10 config errors an…

It was my own config, I just felt annoying because a fundamental part of my system didn't work. I end upf fixing it later but it was veryannoying

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

#15
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 some sort of for-loop macro with another key referencing the loop variable, when you can just have a for loop.

I find TOML, in addition to being very readable, to be great at automatically restricting config complexity by making nested lists of tables miserable. If your config sucks at being TOML, it should be JS or Python. (Not a fan of Lua.)

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

#16
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 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 no tooling. And yes, definitely not in a Turing complete programing language.

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

#17
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 grown pretty negative opinions of “using a programming language as a config language”

Same here. I like the openbsd approach of small DSL (pf, doas) or just simple ini-like key-value config (sysctl, rc.conf). If you want more, just patch the software and be done with it.

A programming language is OK if the intent is to build a platform (Emacs, Vim) but for something that is purely an application software, it's very much not necessary.

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

#18
Related to Lua - I've been maintaining this project that has Lua 5.1-5.5 in one Rust project [1]. The main reason to use it over mlua or the normal C Lua is for something that plays nicely with WASM/ general cross compilation or wants to support several different versions of Lua.

Seems like hyprland is on C++ so maybe not a direct use case but thought Lua people in general might be interested.

[1] https://github.com/ianm199/omnilua

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

#19
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.

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

#20
That's why I love qtile, written in python, modify everything in python, can import any module of it and can install anything, extend existing layout without forking to support very interesting and customized WM layouts, all entirely in python, call any python code in WM.
Post reply on HN