Lux: a Luxurious Package Manager for Lua
Posted3 months agoActive3 months ago
github.comTechstory
calmmixed
Debate
60/100
LuaPackage ManagerConfiguration FilesProgramming Languages
Key topics
Lua
Package Manager
Configuration Files
Programming Languages
The Lux package manager for Lua is introduced, sparking discussion about its design choices, such as using .toml for configuration files, and its potential impact on the Lua community.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
3h
Peak period
6
4-6h
Avg / period
3.5
Comment distribution39 data points
Loading chart...
Based on 39 loaded comments
Key moments
- 01Story posted
Oct 18, 2025 at 8:53 AM EDT
3 months ago
Step 01 - 02First comment
Oct 18, 2025 at 12:05 PM EDT
3h after posting
Step 02 - 03Peak activity
6 comments in 4-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 19, 2025 at 10:49 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45626961Type: storyLast synced: 11/20/2025, 4:38:28 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
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.
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.
The zen of Python should be the zen of all languages.
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
What if you're in the real world with tradeoffs? So you have both obvious downsides and obvious upsides mixed in each option, and what's more important, those depend on the user, not you, so you can't pick one best option?
That's the reason you give options, and you don't need to learn different ways, learn one you like better or just flip a coin
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).
This perplexes me. Lua was conceived as a configuration language and the whole point of a configuration language is you edit a config file. Trying to abstract this away behind a CLI seems like it misses the ethos of Lua.
It’s also a tad strange that a package manager designed for Lua isn’t written in Lua. Presumably Lua developers already have Lua installed, know Lua, and would more likely contribute to a project written in Lua.
That alone is a pretty weak argument.
> Trying to abstract this away behind a CLI seems like it misses the ethos of Lua.
With `lx add <package>`, you can install the package and add it to und config file in one step. And do things like fail if the package or version doesn't exist or isn't compatible with your system.
You can provide editor plugins or use LSP to give users hints if there's an update available, and use code actions to update them, etc.
> It’s also a tad strange that a package manager designed for Lua isn’t written in Lua.
Again, the fact that Lux relates to Lua is a pretty weak argument for choosing Lua as a language to write or configure it in.
Lots of Lua libraries and packages aren't written in Lua, but are built with Lua bindings. Lua (which as you yourself just mentioned was conceived as a configuration language) is a pretty poor choice for something with the scope of Lux. In fact, luarocks was recently rewritten in Teal. Lux has a Lua API (lux-lua) which means it can be embedded or used as a Lua library.
> Presumably Lua developers already have Lua installed, know Lua, and would more likely contribute to a project written in Lua.
We're not worried about finding contributors. If anything, what we need are high quality contributions. Lua developers who only know Lua are not what we're looking for.
Lua developers do, indeed, deserve a bit of lugubriousity with regards to describing luxurious things.
I’m all for ‘lux’ as a tool, if it can be used as the tip of the knife that delivers the pearly oyster.
For a lot of Lua projects, there are other extremes, by the way. There are helaciously discomfiting situations with regards Lua package management in certain environments.
If Lua gets something that makes it far, far easier to deploy, that pearl gets fatter.
Pip lets you create virtual environments. Does that mean it's an environment manager, not a package manager?
(╭ರ_•́)
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.
https://turbo.readthedocs.io/en/latest/
If I can get lux to deal with the package management scenarios around a few turboLua projects, I’m pretty sure I’m going to ship much more Lua code next year.
>+ 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.)
1 more comments available on Hacker News