7 ms·
Lux: A luxurious package manager for Lua
- ModernMech 1y agoThis is interesting but I feel like a lot of these Rust-inspired package managers are a little... too inspired by Rust. This project for instance uses .toml as a config file format, presumably because that's what Cargo does. But I think for this project in particular, Lua for the config files would have been a better choice! I think that Lua tries to be a good configuration language (it started as a configuration language called SOL (sun), which configured reports for lithology profiles), and in fact Luarocks uses "rockspec" for their config, which is syntactically Lua. Lux claims to be inspired by Luarocks, and yet they chose to use toml over lua for config. I'm wondering why? What was wrong with lua that made toml a better choice? edit: Okay, I've found more information where they say they support both formats... which, I don't know if that's the right call? Seems like going with one or the other is better from a project management standpoint, although I can see why they want to give users the option. > Not everyone may want to migrate (nor use) the TOML system for describing a project. For this reason, I’d had liked Lux to support a rockspec file alongside the TOML file (similar to the old project.rockspec format). This has finally been implemented! By creating a file called extra.rockspec in the project root, you will instruct Lux to merge the TOML and the rockspec together when performing any sort of operation.
- pepperfritz 1y ago[flagged]
- deleted 1y ago[deleted]
- arccy 1y agoTOML is seriously ugly... nested configs are less clear in toml compared to even YAML.
- BugsJustFindMe 1y ago> I can see why they want to give users the option I completely dislike the practice of giving options for no reason other than to give options. Don't make me learn different ways of doing the same thing to succeed in an ecosystem. Don't make me learn differences and similarities. If one way works properly and doesn't have obvious downsides, stick with having one way. If it has obvious downsides, stick with having a different one way. Subjective format taste isn't a real downside. Pick one format and stick with it. The line from the zen of Python about how "there should be one-- and preferably only one --obvious way to do it" is something that people all too often forget the value of.
- giancarlostoro 1y ago> The line from the zen of Python about how "there should be one-- and preferably only one --obvious way to do it" is something that people all too often forget. The zen of Python should be the zen of all languages.
- BugsJustFindMe 1y agoYes, it should be. Sadly it's not even unambiguously the zen of Python these days.
- fullstop 1y agoYes, one way to do it. Sync or async!
- giancarlostoro 1y agoAll I'm hearing is that Erlang is the true Zen.
- dirtbag__dad 1y agoUnfortunately in practice you see snowflake implementations left and right in python. It’s still unclear to me if python is too expressive for its own good, or if it’s so widely used, that it’s impossible to avoid nonsense
- mrcjkb 1y ago> presumably because that's what Cargo does. Nope. We chose TOML as the default for various reasons: - Simplicity. There are use cases for a turing complete configuration language. Lux is not one of them. - Ergonomics. The ability to edit it using the CLI (technically, that could be possible with Lua too, but it would be a lot more complex and not a very pleasant UX). > which, I don't know if that's the right call? The reason we currently support importing a Lua extra.rockspec is ease of migration for complex projects, e.g. with platform-specific overrides (not yet supported by the TOML spec).
- ModernMech 1y agoThanks that does answer my question! Had you considered parsing a subset of lua to get the properties you want? That way users don't have to learn a whole other syntax. I'm thinking in particular of my students whom I teach lua. They struggle enough learning one language, having to teach a second with all its quirks seems like a lot to throw at them.
- NuclearPM 1y agoDo you think that is more difficult than explaining to the students why they can’t use loops in their lua config files?
- ModernMech 1y agoI wouldn't present it to them as "these config files are the same thing as Lua but without loops", but instead "these are config files and they have the same syntax as the Lua records we just learned about". And I would prefer that over "these are config files and they have a different syntax as the Lua records we just learned about." Although I can see merits on discussing that syntax differences exist between languages, that tends to overwhelm people learning their first language.
- mrcjkb 1y agoThat's a neat idea, but it would mean we'd have to maintain our own library. When editing with the CLI, you have to make sure you preserve comments, which the toml-edit crate does quite well.
- leptons 1y ago"beautiful", "elegant", and "tasteful" have all been used to puff up various libraries, frameworks, etc, and now we have "luxurious" to add to the long list of ridiculous adjectives used to puff up tech. Lovely.
- mmcromp 1y agoHonestly it makes me roll my eyes, "let's describe our software utility as if we're trapped in a perfume commercial". But on the other hand, I think when creating something it does help to have underlying vision, even if it's abstract or doesn't quite make sense.
- dinkleberg 1y agoI think that is why despite it being eye roll inducing, there is still value to these descriptors as it explains what they are going for. In this case it tells us they are prioritizing the feel over everything else and for a package manager that is pretty solid focus.
- MomsAVoxell 1y agoAs a Lua dev, I’m pro “anything that makes Lua easier to use/deploy”, and while do I see “lux” from the perspective of precocious naming attempts, I can also immediately overlook it by treating “LUX” as more of an acronym for “Lua User Experience”, so if it is actually able to deliver that promise, the eyes are gonna stop rolling and start focusing on using it ..
- otikik 1y agoI have always thought that those qualities should be shown, not said. Both in software and in life.
- mrcjkb 1y agoIt's just a silly pun. Search for "moon illuminance" and perhaps you'll get it :)
- 1y ago
- NuclearPM 1y agoI don’t understand why a package manager needs lint support.
- lucsky 1y agoBecause despite what the tagline says it's not a package manager, but a project manager.
- mrcjkb 1y agoLux helps you install and create/maintain packages. Linting is a useful step in the creation of packages. Pip lets you create virtual environments. Does that mean it's an environment manager, not a package manager? (╭ರ_•́)
- Crestwave 1y agoIt doesn't, no? You create virtual environments using Python's venv module, not pip. The newer alternatives like uv do handle it, though.
- mrcjkb 1y agoRight, my bad. Still, being able to do more to aid the creation and maintenance of packages than just install packages doesn't make something "not a package manager".
- Lyngbakr 1y agoIt's like a package manager on steroids! When I tried using Gleam, I loved that it came with all the basic tooling I needed and that's what I think is so wonderful about Lux. I don't want to spend my time fiddling around with setting up all the individual tools — I just want to write code. For me, Lux makes the broader experience around building Lua projects a lot more enjoyable.
- 1y ago
- acephal 1y agoI've been awaiting the rocks.nvim team to migrate to this
- MomsAVoxell 1y agoOkay, sounds good, let’s see: >+ Create and manage Lua projects Yay! >- Easily manage dependencies, build steps and more through the lux.toml file. Boo! Ermm .. .toml? You lost me at .toml. Why is .toml being used to configure Lua? (Disclaimer: I am a long term Lua user/developer and have a strong opinion about all things Lua.)
- deleted 1y ago[deleted]
- mrcjkb 1y agohttps://news.ycombinator.com/item?id=45626961#45630063 https://news.ycombinator.com/item?id=45626961#45630063