logoalt Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

135 pointsby mateszyesterday at 5:31 PM114 commentsview on HN

Comments

rdtscyesterday at 7:55 PM

It's just part of what I call the config pendulum.

Simple config -> (Need to do more complicated things) -> Add override levels -> (Need even more flexibility) -> Add a Turing complete language -> (Things get ridiculous, lots of spaghetti code outside of version control. Time for a reset) -> goto "Simple config"

It's fine. I am not saying it's wrong or right. I've gone through the cycle a few times in some projects. On the other hand, think of it as your project is lucky to be used long enough to have these problems. To feel better about it think of it as a spiral. The next "Simple config" is a slightly better version of the first.

show 5 replies
tombertyesterday at 5:57 PM

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 complicated logic I shell out to a set of Rust programs.

show 31 replies
dietr1chyesterday at 5:45 PM

Old news? 0.56 is out now https://hypr.land/news/update56/

sphtoday at 5:34 AM

I want to like Hyprland, but it truly is the embodiment of Jamie Zawinski’s “cascade of attention deficit teenagers”

This is what happens when software is created by too-smart teenagers, that change their mind as fast as they improve at programming, and expect that everyone is spending 12 hours a day configuring their desktop environment while hanging out in ‘ricing’ discords (“what do you mean you have a day job?”)

Worse, if you dare criticize it, the fanboys come out of the woodwork saying you should really just use an LLM to convert to Lua and that you are dumb trying to do it manually. The hubris is untenable.

After 3 or 4 breaking changes over the years, I decided I’d rather use some other desktop environment honestly, until the core team literally grows up. Niri is great, and its author is much more… mature.

kelvinjps10yesterday at 5:44 PM

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

show 4 replies
v3ss0nyesterday at 6:20 PM

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.

nickjjyesterday at 9:39 PM

It'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 if you want to look something specific up, you know it's officially documented and not some home grown pattern someone created. There's a certain amount of comfort and stability you get with a "what you see is what you get" approach.

I never felt like I needed variables, conditions, functions or loops with niri's config.

show 1 reply
PessimalDecimalyesterday at 8:30 PM

Lisp is the perfect family of languages for a config. Homoiconic for seamless config generation. S-expressions for shared human and machine readability.

show 1 reply
ianm218yesterday at 6:17 PM

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

Havocyesterday at 5:44 PM

TIL I'm on 0.56 and hadn't realized there is a change.

Thinking I'll wait as long as I can and then just get an LLM to translate current config to lua once the internet has been seeded a bit with examples

show 2 replies
JCattheATMyesterday at 11:18 PM

I wonder how this would make Hyprland compare to Pinnacle or Awesome? So far I haven't found anything better than Awesome for crafting a bespoke desktop experience.

retrochameleontoday at 3:56 AM

Uggghhh, I hate Lua. I hate the syntax, everything being tables, and.... dun dun dun 1-indexed arrays.

I wish we wouldn't keep going back to it. I understand the appeal for some use cases, but pleeeeeeease can we just move on to a new language that fulfills the same use cases but with more typical conventions?

IshKebabyesterday at 7:54 PM

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, AS numbers, and `filtermap`. But I guess you can just ignore those if you don't need them.

show 1 reply
cbarnes99yesterday at 5:43 PM

This is kinda really old news at this point. 0.56 just came out.

leephillipsyesterday at 7:52 PM

I think dwm has the best approach to configuration: change the program and recompile.

This works for dwm because it compiles in two seconds and has minimal dependencies. I don’t know about hyprland.

https://dwm.suckless.org/customisation/

show 1 reply
trolliedyesterday at 10:15 PM

Auto play video when you scroll? Behave

JacobAsmuthyesterday at 5:57 PM

Huh? This is from May. You guys should read the more recent notes. https://hypr.land/news/update56/

show 1 reply
qiineyesterday at 7:02 PM

lua is love