Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

21–30 of 146 posts

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

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

Half of me agrees with you. As someone who used to tinker with neovim all day I've had to learn just because you can program the problem doesn't mean you should and stick to a relatively minimal config.

Still, its a valid design choice with different design decisions compared to sway. But that's the point you get to choose.

Hyprland is much more "build your workspace with legos" so having a full lang like lua makes sense to properly integrate the various pieces.

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

#22
post #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 n…

> the current SOTA tool for configuration is CUE

the current state of the art tool for configuration is CUE (https://cuelang.org/). FTFY. Gotta love these acronyms.

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

#23
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 like the ability to introspect the system. I have a lua LSP, when I edit lua config files, I know all of the fields of the config I am editing, and I know how they behave (without randomly trying things)

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

#24
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 fully agree with that.

Past experience has shown what while Turing complete config is powerful, it is also a double edged sword and I would be wary of using it.

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

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

In fact, that's how Lua itself came to be. They started with a simple configuration language and added more and more features until at some point they decided to rip the bandaid and turn it into a proper programming language.

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

#26
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 fully agree with that. Past experience has shown what while Turing complete config is powerful, it is also a double edged sword and I would be wary of using it.

The thing is that if your config language isn't Turing complete, the community will create N softwares to generate dynamic configs.

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

#27
post #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…

The theoretical difference in power between a non-Turing complete declarative language and a turing complete one is irrelevant in practice. Datalog is a decidable, declarative subset of Turing-complete Prolog. It's also EXPTIME complete. I don't think we exclude any real use cases by prohibiting super-exponential algorithms.

The problem is shitty config languages. I wouldn't group xaml in the same category as dhall for example.

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

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

If you look at hyprland config, you can see why they went with it.

Much like vim/neovim config, people want to do things like register a callback that fires to determine the window title and things that are much more advanced than that, like layout management.

When I was using sway, I was using its IPC or worse (https://github.com/johnae/persway) to do advanced things, and Lua scripting in the first class config would have been a much better UX.

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

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

If you look at hyprland config, you can see why they went with it. Much like vim/neovim config, people want to do things like register a callback that fires to determine the window title and things that are much more advanced than that, like layout management. When I was using sway, I was using its IPC or worse ( https://github.com/johnae/persway ) to do advanced things, and Lua scripting in the first class config wo…

I have to agree. There are things that I want to do with my sway scratchpad that are just not possible because the config vocab is so limited. I might port my config to hyprland and give it a shot.

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

#30

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

Hyprland config break is usually syntax changes or reallocated features. Never had an instance where hyprland broke beyond repair or was hard to fix, even before LLMs were a thing. But yeah, its a 0.x software so if you aren't keen on fixing small stuff it's better to wait indeed. My point is that hyprland is easy to fix.
Post reply on HN