Live data from Hacker News

Hyprland 0.55 announced the switch to Lua for its config files

hypr.land

121–130 of 146 posts

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

#121
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 you are less limited by all the mistakes the designers encoded in the static files

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

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

> 2. ... and when that inevitably fails, you... use a programming language? Maybe it fails because you are trying to solve a problem with a configuration when it should be solved by a function implemented in the program you are trying to use.

And what do you suggest users do if that function isn't in the program and is unlikely to appear there?

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

#124
post #81

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

I wouldn't call KDL "established"; it's honestly pretty niche. It looks _similar_ to pre-existing configuration formats, but KDL is very picky about syntax. I.e.: single word string MUST be quoted. In this same space, https://codeberg.org/emersion/scfg/ is pretty widely used. The curious thing about scfg is that it's not really a "new" format: the syntax described has been in use by different tools for decades. They…

> picky about syntax. I.e.: single word string MUST be quoted.

Seems like the opposite:

Example from kdl website without quotes

package { name my-pkg

Example from scfg with quotes

train "Shinkansen" {

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

#125

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?

What's your best alternative for this use case?

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

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

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.

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

#127
post #124

Earlier quoted context omitted.

I wouldn't call KDL "established"; it's honestly pretty niche. It looks _similar_ to pre-existing configuration formats, but KDL is very picky about syntax. I.e.: single word string MUST be quoted. In this same space, https://codeberg.org/emersion/scfg/ is pretty widely used. The curious thing about scfg is that it's not really a "new" format: the syntax described has been in use by different tools for decades. They…

> picky about syntax. I.e.: single word string MUST be quoted. Seems like the opposite: Example from kdl website without quotes package { name my-pkg Example from scfg with quotes train "Shinkansen" {

Perhaps it was a niri-specific thing (although they claim it's KDL), but it rejected simple strings without quotes.

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

#128
post #124

Earlier quoted context omitted.

> picky about syntax. I.e.: single word string MUST be quoted. Seems like the opposite: Example from kdl website without quotes package { name my-pkg Example from scfg with quotes train "Shinkansen" {

Perhaps it was a niri-specific thing (although they claim it's KDL), but it rejected simple strings without quotes.

Ah, it was the legacy version of KDL, the current one got rid of this quotation noise

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

#129
post #81

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

I wouldn't call KDL "established"; it's honestly pretty niche. It looks _similar_ to pre-existing configuration formats, but KDL is very picky about syntax. I.e.: single word string MUST be quoted. In this same space, https://codeberg.org/emersion/scfg/ is pretty widely used. The curious thing about scfg is that it's not really a "new" format: the syntax described has been in use by different tools for decades. They…

It is picky, but picky is good. It's explicit which creates uniformity.

For example with niri, if you forget quotes on a string value, you get this error.

    $ niri validate
    Error:   × error loading config
      ├─▶ error parsing
      ╰─▶ error parsing KDL

    Error:   × identifiers cannot be used as arguments
        ╭─[config.kdl:42:1]
     42 │         // Disable acceleration.
     43 │         accel-profile flat
        ·                       ──┬─
        ·                         ╰── unexpected identifier
     44 │     }
        ╰────
      help: consider enclosing in double quotes ".."

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

#130
post #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?”)…

You're like a smarter more articulate version of me.

I used to use Sway - switched to hyperland very briefly and it was so busy and a pain to work with.

Niri on the other hand is as complicated as I want it to be.

Post reply on HN