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…
Hyprland 0.55 announced the switch to Lua for its config files
121–130 of 146 posts
Re: Hyprland 0.55 announced the switch to Lua for its config files
#122Re: Hyprland 0.55 announced the switch to Lua for its config files
#123Earlier 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.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#124It'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…
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
#125Uggghhh, 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
#126Earlier 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…
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
#127Earlier 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" {
Re: Hyprland 0.55 announced the switch to Lua for its config files
#128Earlier 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.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#129It'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…
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
#130I 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?”)…
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.