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? ;)
Hyprland 0.55 announced the switch to Lua for its config files
111–120 of 146 posts
Re: Hyprland 0.55 announced the switch to Lua for its config files
#112Earlier 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.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#113I 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
#114This 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
#115Earlier 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…
Re: Hyprland 0.55 announced the switch to Lua for its config files
#116I 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…
Re: Hyprland 0.55 announced the switch to Lua for its config files
#117Earlier 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
Re: Hyprland 0.55 announced the switch to Lua for its config files
#118Earlier 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.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#119It'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.…
Re: Hyprland 0.55 announced the switch to Lua for its config files
#120It'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.…