Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

111–120 of 146 posts

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

#111
post #71

Earlier quoted context omitted.

I mean, fair enough I guess. I've accidentally more-or-less reinvented interpreters on two separate occasions (both times using JSON as a quasi-AST), so I understand it. I guess I just feel like if you feel like you need programming constructs in your configuration, its approaching it from the wrong angle, and it should instead be handled via plugins. I feel like configuration itself should be a "dumb" format like JS…

>and when you want to do anything that can't be accomplished by plain JSON Like comments? ;)

YAML then, or something like it. I guess I just like dumb formats for this stuff.

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

#112
post #48

Earlier quoted context omitted.

All scalar types other than strings (especially nonsense like datetimes). I'm already ingesting the configuration file as a string and parsing it into a language with actual types, e.g. Rust, and the act of parsing it into my defined configuration type will itself identify any problems with the config; having half-assed types like "int" in the config file format itself is not only useless, it's counterproductive beca…

The problem is that you end up with multiple dialects, just like INI. For example, I’ve seen booleans being represented with “enable”/“disable”, “yes”/“no”, “t”/“f”, “1”/“0”. Sometimes a mix in the same program. It’s nice that every TOML config requires “true”/“false” across any application.

You won't end up with a mix in the same program unless the code that you're using to parse the config is deliberately written to allow a mix, which no sane code owner would allow. And even if it did, that still wouldn't be enough to outweigh the aforementioned downside of the impedance mismatch between the """types""" in your config file format (how many bits wide is this integer? how much precision is this float? how is nullable data represented?) and the types in your actual language where it matters.

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

#113
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?

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

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

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

#115
post #11

Earlier quoted context omitted.

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

That's lovely. I look forward to seeing your autoconf and GNU Make replacement in MAUDE SYSTEM.

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

#116
post #88

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

The language is primarily used by Rotonda, the composable, programmable BGP routing engine. Not odd to have those data types at all…

Yeah it makes sense for their use case. I meant it was an odd thing to have if you were using it as a general purpose language like Lua.

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

#117
post #36

Earlier quoted context omitted.

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…

Nix isn't a scripting language in the sense you seem to have in mind. The snippets you saw that looked like Bash most likely were literally Bash, embedded as multiline strings in Nix. Nix doesn't have much in common with Haskell. Nix is a really small language, and you can learn pretty much all of it in a few minutes: https://nixcloud.io/tour/?id=introduction/nix

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.

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

#118
post #92
post #89

Earlier quoted context omitted.

> I have to ask…why do people want a Turing complete language to configure stuff? What's the alternative? Petition the maintainer to add every little feature any random user might want? Or just do it yourself in a few lines of code? Case in point, when I was still using BSPWM I did no like how if there was only one window on the desktop it would still get an outline. So I wrote 14 lines of Awk (BSPWM lets you use any…

I think having good plugin support is a better way to do it. Keep the most obvious configuration options behind a "dumb" config language like JSON or something, but create a framework to add functionality via a plugin API.

there is a point where maintaining zillions^H^Hmany plugins and keep them updated between version gets nightmarish (see gnome extensions for example)

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

#119
post #58

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

I've tended to find a lot of value in systems that have both, especially when there is automatic translation from the simple config to the Turing complete language. Lean 4's lakefiles are a good example of this, with a TOML format that is a subset of the Lean DSL format.

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

#120
post #58

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

That seems like a huge waste of time for anything slightly complicated to convert code to simple configs and lose a lot of functionality in the process. Do you have an indication of how prevalent the cycle is in reality?
Post reply on HN