Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

141–146 of 146 posts

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

#141

Earlier quoted context omitted.

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…

> 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 That’s where you add a plugin system or an ipc mechanism, not a whole programming language.

Plugins and IPC do not replace configuration, though configuration may invoke or enable plugins.

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

#142

Earlier quoted context omitted.

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.

It doesn't need embedding. But if it did, cpython is trivial to embed, and beats starlark in that it already has all the features your users (and Claude) know about.

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

#143
post #126

Earlier quoted context omitted.

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

OT, but seeing "alot" always sends me here: https://hyperboleandahalf.blogspot.com/2010/04/alot-is-bette... Language is what people use, and "alot" is close to critical mass, so you'll outlive this species of pedantry. I just like the cartoon.

That was half the meaning of the username back when I started using it. And I also like reading.

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

#144

Earlier quoted context omitted.

Nix is awesome and has not been part of any pendulum (or clock). It's complex enough that it allows you to build programs with it, but on such a simple core that for all intents and purposes it is a config language.

yeah i honestly like it a lot too, but i wish it was typed and that the tooling around it was better. though it's getting there...

There's a language called "Nickel" which grew (eventually! it took a long time) out of efforts to add a type system to Nix. It's still early days in that it's under very active development and evaluation performance still lags behind Nix, it it's feature-complete enough to be useful for some things.

The core work is driven by programming languages people, and chiefly one in particular. But its initial outline and subsequent design decisions have all been informed both by a survey of existing configuration languages (and I mean interesting ones, like CUE, Jsonnet and Starklark) and input from Nix people. I think it's fair to call it "state-of-the-art". (Whether that last point is good or bad depends on your perspective, I guess!)

Besides the type system, better error messages, and integrating something like the Nix module system as a first-class language feature, there's been more emphasis on tooling than Nix had at comparable stages of its own development (including LSP support).

I think it's a really interesting language. If its bet pans out, it'll stand out among configuration languages for offering a nice gradient of simplicity and sophistication, like Nix does: simple configs feel plainly readable, inert, and unceremonious, but you have enough power to offer clean interfaces if you're writing something that adds new features. But it promises to do it without the sharp edges Nix has. Time will tell!

https://nickel-lang.org/

https://github.com/nickel-lang/nickel

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

#145
post #126

Earlier quoted context omitted.

OT, but seeing "alot" always sends me here: https://hyperboleandahalf.blogspot.com/2010/04/alot-is-bette... Language is what people use, and "alot" is close to critical mass, so you'll outlive this species of pedantry. I just like the cartoon.

That was half the meaning of the username back when I started using it. And I also like reading.

Then: well played, you got me

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

#146

Earlier quoted context omitted.

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

imo the downsides to this are so minimal to a user? you can configure neovim without defining any functions or w/e and it's not like awkward or anything

[dead]
Post reply on HN