Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mrcjkb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
Lux – Sandboxing Lua for Safer Package Management
(vhyrro.neorg.org)
3 points
by
mrcjkb
7mo ago
|
0 comments
2.
▲
by
mrcjkb
11mo ago
https://news.ycombinator.com/item?id=45626961#45630063
3.
▲
by
mrcjkb
11mo ago
> Lua was conceived as a configuration language 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 ad
4.
▲
by
mrcjkb
11mo ago
Right, 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".
5.
▲
by
mrcjkb
1y ago
It's just a silly pun. Search for "moon illuminance" and perhaps you'll get it :)
6.
▲
by
mrcjkb
1y ago
Lux 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? (╭ರ_•́)
7.
▲
by
mrcjkb
1y ago
That'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.
8.
▲
by
mrcjkb
1y ago
Good thing we're not giving options for no reason other than to give options ;)
9.
▲
by
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 abi
10.
▲
Why Haskell is the perfect fit for renewable energy tech
(mrcjkb.dev)
8 points
by
mrcjkb
1y ago
|
0 comments
11.
▲
Luanox – a modern, snappy module host for Lua
(mrcjkb.dev)
2 points
by
mrcjkb
1y ago
|
0 comments
12.
▲
by
mrcjkb
1y ago
- It's not at the top level namespace, it's usually in the `vim.g` or `vim.b` namespace. There's no more namespacing than with a Lua module + function. - global configuration variables don't have to be tables. They can b
13.
▲
by
mrcjkb
1y ago
His use case is mini.nvim, a huge bundle of plugins where you most likely don't want each plugin initialising automatically. He and I are on very opposite ends of the "setup spectrum", but we have found common ground, which i
14.
▲
by
mrcjkb
1y ago
You don"t have to use a separate variable prefix for each config option. A plugin's config variable can just be a table/dictionary.
15.
▲
by
mrcjkb
1y ago
Neovim provides the same mechanisms as Vim for Lua plugins. The problem (and part of my motivation for writing the nvim-best-practices document) is that not enough plugins use them. Edit: The Neovim setup antipattern is the Lua equivalent o
16.
▲
by
mrcjkb
1y ago
> Load the table If it comes from an impure function, you don't know if you'll get the same result each time you evaluate it. > Modify. Serialize to file. And potentially lose information.
17.
▲
by
mrcjkb
1y ago
You mean my Hakyll site? It's mot meant to be :)
18.
▲
by
mrcjkb
1y ago
That doesn't seem very ergonomic - especially for the use cases we have in mind.
19.
▲
by
mrcjkb
1y ago
Lua has evolved and is used for a lot more today than it was initially created for.
20.
▲
by
mrcjkb
1y ago
You might be surprised how well that works :)
21.
▲
by
mrcjkb
1y ago
One of the motivations for Lux is to improve the nixpkgs Lua and Neovim ecosystems.
22.
▲
by
mrcjkb
1y ago
Only the `lx --help` and man pages.
23.
▲
by
mrcjkb
1y ago
We want to be able to write updated dependency specs to the manifest.
24.
▲
by
mrcjkb
1y ago
That sounds like a great idea! I've opened [an issue]( https://github.com/nvim-neorocks/lux/issues/550 ) in our repo. Feel free to ping us there :)
25.
▲
by
mrcjkb
1y ago
The usefulness of a local Lua bundle depends on whether you're packaging a library or an application. pkg-config can search by version, so you're not going to end up trying to build a Lua 5.4 package with Lua 5.2 with Lux. If you
26.
▲
by
mrcjkb
1y ago
Yes, we have a `lux-lua` library (which we will need to bundle with `lux-cli`) that exposes a `lux.loader` module. It uses the lockfile to resolve dependencies.
27.
▲
by
mrcjkb
1y ago
With Lua, it becomes near impossible for a program like lux to edit the manifest. For example, how would I `lx add <dependency@version>` if the `dependencies` table might be generated by a Lua function? Lux defaults to TOML, but if yo
28.
▲
by
mrcjkb
1y ago
- There's an equivalent `lx path bin` command, but there's also a `lx run` that lets you run installed packages. - We're still quite early on in development, so documentation and things like error messages will need fleshing
29.
▲
by
mrcjkb
1y ago
That's a neat suggestion, thanks. Lux will need some time to become mature, but building a large multi-platform project like koreader would definitely be a nice goal.
30.
▲
by
mrcjkb
1y ago
With Lua, it becomes near impossible for a program like lux to edit the manifest. For example, how would I `lx add <dependency@version>` if the `dependencies` table might be generated by a Lua function?
More ›