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
131–140 of 146 posts
Re: Hyprland 0.55 announced the switch to Lua for its config files
#132I 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…
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…
Re: Hyprland 0.55 announced the switch to Lua for its config files
#133Earlier quoted context omitted.
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
#134Earlier quoted context omitted.
If you look at hyprland config, you can see why they went with it. Much like vim/neovim config, people want to do things like register a callback that fires to determine the window title and things that are much more advanced than that, like layout management. When I was using sway, I was using its IPC or worse ( https://github.com/johnae/persway ) to do advanced things, and Lua scripting in the first class config wo…
I did run Awesome for awhile and I liked it, but I never used the Lua config for the most trivial things so it never got in the way of anything. I never found that Sway too annoying to just use the shell commands to grab/modify the current state of Sway ( https://github.com/tombert/rs-swanbar ) and just use a "real" programming language to actually do any kind of programming logic. To each their own!
Re: Hyprland 0.55 announced the switch to Lua for its config files
#135I 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…
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…
It also means your plugin system doesn't have to choose an "easy" or "simple" language. You could use wasm if you wanted to and allow just about everything under the sun. Although, Lua is used for Roblox games so, maybe it's complex enough.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#136It'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
#137It'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.…
This is why I like to keep the concepts of "config" and "plugin" separate.
Re: Hyprland 0.55 announced the switch to Lua for its config files
#138It'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
#139It'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?
That's usually done in anger by people who have to read and update someone else's pages long "config" file, possibly outside version control, with lots of loops and external resource fetches and so on tearing their hair out "why isn't this a just a toml/json/yaml file".
Re: Hyprland 0.55 announced the switch to Lua for its config files
#140It'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's clever insight. If it was lisp from the beginning, maybe would be more straightforward. It's as simple as code can get, according to Uncle Bob, while still being expressive. It's no wonder Emacs still reigns supreme. Well, I am happy with Niri's kdl approach for the time being.