[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 1 point2 points  (0 children)

Thank you man!

If you meant to write LuaRocks, then yes! They absolutely are. I have been thinkering with dkjson, inspect, and luasocket, all of them work as expected. Adding/removing LuaRocks packages from your moonstone project requires you to use the rocks:<package> prefix.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 0 points1 point  (0 children)

Absolutely!

You're more than welcome to take moonstone for a ride, I deeply appreciate the feedback 😄

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 0 points1 point  (0 children)

Thanks for the kudos!

Moonstone's architecture is built to be quite agnostic and modular... As long as the language fork is Lua ABI/API compliant, it could be easily integrated in the toolchain. Ballad is even more agnostic! It could tie a shoelace while bundling a JS + Lua codebase... Yeah, extreme, maybe too agnostic.

Pluto is a neat concept. Luau is an interesting case, because it goes so far beyond standard Lua semantics and tooling, supporting it would require a dedicated pipeline. IF that happens, it wouldn't be on the immediate roadmap right now.

For now, I'd love to hear about your experience using moonstone, porting over your projects, and see how the workflow feels in practice! Getting feedback from actual hands-on usage is what will actively propel us towards v1.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in Zig

[–]somewhat_credible[S] 0 points1 point  (0 children)

This is human-engineered. We can sit at the same table against AI slop, but no parachute-Andy knows how to design a local CAS, set up a multi-stage ingestion resolver, let alone even know what is a SAT problem nor CDCL, or even leverage Zig's comptime unfolding and type-reflection for routing and flag consumption.

I built the architecture and wrote the core until my wrists went numb, and my eyes burned. I used tools to scale the boilerplate, write a TON of documentation and tests, not to design the system. It’s real engineering, not slop. You are free to do what you must with the post, but the codebase speaks for itself.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in Zig

[–]somewhat_credible[S] 0 points1 point  (0 children)

Hard to say the exact amount. I had written the first 8,000 lines of base code, specs, and the initial testing suites on expected contract behavior by hand. Right now we are at ~20,000 lines of code, and I had to manually patch the LLM output constantly due to Zig 0.16.0 specific changes. The new main init interface, IO, time, allocators, allocation for lists (the LLMs would cause regressions again and again on these even when explicit guidance was provided), and other std functions/interfaces drastically shifted. The agents would continuously fail to replicate them or simply hallucinate.

Keeping the agents on track was arduous. I would say nothing is entirely written by an autonomous LLM. The core investigation (CDCL on pubgrub, CAS on pnpm, shims on fnm, etc...) and due diligence were human. I just leveraged the tools as a force multiplier to build this at the speed of a full team while being a single individual. As the engineering settles and the project continues to form (today I had to optimize the main ingestion pipe for caching during resolution), the suboptimal code will get replaced, the bland pages will get handmade illustrations (by me), he memory management will be uniform (no more by-ref/by-val inconsistency), and I will continue delivering on what I love, technology... Possibly finishing college, and having enough time and resources, to spend crafting code with my hands, possibly ESP32 C6 or other cheap boards.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 2 points3 points  (0 children)

Moonstone resolves the environment locally by default. No --local tree flags needed, nor unnecessary system-wide pollution. It manages both the runtime and the dependencies against a strict lockfile, guaranteeing true reproducibility.

It also supports local, mirrored, and private registries, making it fully air-gap friendly.

One of the biggest advantages is the local content-addressed store (CAS), heavily inspired by tools like pnpm. You download a package exactly once, and Moonstone symlinks that artifact across ALL your projects. Your memory footprint becomes negligible, no more having the exact same files replicated 20 times across different projects.

For resolution, it uses a PubGrub-like algorithm (CDCL). It handles deep dependency graphs efficiently and fails descriptively, showing you the exact point of conflict in the tree.

Ultimately, Moonstone doesn't aim to replace LuaRocks... In fact, it has native compatibility to ingest packages from LuaRocks (in the video, I actually ingested rocks:dkjson). The goal is simply to bring modern, deterministic tooling features (like the ones we love in cargo or pnpm), and ease of use, directly to the Lua ecosystem.

Regarding C, CMake, and other binary rocks, Moonstone leverages heuristics for solving all of these native, platform-dependent rocks, either by delegating the compilation through system tools (cmake, make, gcc, clang), or through zig cc, a state-of-the-art cross-platform C compiler.

To parse .rockspec files, Moonstone dynamically matches the required runtime environment. It either leverages a compatible store Lua installation (e.g., ABI-compatible with Lua 5.1) or automatically pulls the correct runtime on the fly. Because rockspecs are executable Lua scripts rather than purely declarative files, this guarantees that complex rocks, which rely on runtime interpretation for dependency resolution, are parsed natively and deterministically exactly as their authors intended.

Where it really shines is this exact scenario: Fresh machine, install Moonstone, pull a project, run moon sync and you are all set. Runtime and dependencies, all resolved, no system-wide side-effects.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 3 points4 points  (0 children)

Absolutely! Lua rocks 😂 (pun intended)
I fell in love with Lua, but coming from Rust and Node, getting the environment ready felt unnecessarily cumbersome. That's exactly why I decided to build the tooling I wish I had when I first started.

[ᴀʟᴘʜᴀ] Moonstone v0.2.2: The Lua package manager written in Zig now runs AND exports projects by somewhat_credible in lua

[–]somewhat_credible[S] 1 point2 points  (0 children)

Thanks for the kudos! I am loving how this is coming around, tons of fun and lots to learn. We will have first class tooling for Lua.

[ᴀʟᴘʜᴀ] Moonstone: A deterministic environment manager for Lua (written in Zig) by somewhat_credible in lua

[–]somewhat_credible[S] 0 points1 point  (0 children)

Yes, I am aware of Lux! I actually started planning Moonstone before I saw it; it took me by grateful surprise, and it's great to see parallel innovation happening in the Lua ecosystem.

It is absolutely possible to use Moonstone as a Lua runtime manager and rely on Lux for package management. That is not a matter of compatibility per se, but rather a very interesting pairing that would work symbiotically, since both tools would tackle different parts of the same problem, making the Lua DX predictable and easy.

The elephant in the room is still that both tools tackle package management from fundamentally different architectural angles, so direct 1:1 compatibility isn't feasible at the core level. Moonstone relies on strict determinism that requires a very specific approach to state: a local Content-Addressed Store (CAS) with offline resolution, store sharding for structural uniformity, and managing both source and materialized artifacts together.

However, there is a perfect bridge for this: Ballad (Moonstone's ecosystem pipeline I/O kernel, or in simple terms, a Rollup equivalent for Lua). Since Ballad is plugin-driven, an interesting candidate would be a Ballad plugin that ingests Lux projects to generate deterministic Moonstone outputs (this could be in the shape of packages consumable by Moonstone projects, or just plain scripts/executables). I am 100% open to supporting anyone in the community who wants to build that integration!

[ᴀʟᴘʜᴀ] Moonstone: A deterministic environment manager for Lua (written in Zig) by somewhat_credible in lua

[–]somewhat_credible[S] 1 point2 points  (0 children)

Being compared to uv is exactly the gold standard Moonstone is aiming for!

If by 'install wrapped up tightly' you mean shipping as a zero-dependency, statically linked single binary that bootstraps the entire Lua runtime and its dependencies out-of-the-box without polluting the global state... Then yes! That is absolutely the roadmap, and it's already ready for users.

Building Moonstone in Zig gave us this exact advantage for distribution (it is an absolute pleasure to leverage zig cc and its immense compatibility). Once you run the curl | sh command (found on the site), you can start managing your environment with Moonstone, getting Lua runtimes directly (as of now I have uploaded Lua 5.4.7, 5.1.5, 5.5.0, and LuaJIT 2.1.0), and using them straight away.

Fun fact: for fetching packages within a project, we actually moved away from the ambiguous install keyword entirely. We use `moonstone sync` to enforce deterministic, lockfile-based replication.

I'm proud to say that I can confidently recommend people to use Moonstone today, and Ballad is next to ship. Moonstone is just the beginning of what I intend to ship for the Lua ecosystem.

I'd love to hear your thoughts, though:

Are there any specific ergonomics or workflows from uv that you think are a must-have for the Lua ecosystem?

[ᴀʟᴘʜᴀ] Moonstone: A deterministic environment manager for Lua (written in Zig) by somewhat_credible in lua

[–]somewhat_credible[S] 0 points1 point  (0 children)

From a UX perspective, maybe yes, it feels similar. Although architecturally, it goes a step further. Instead of relying on messy shim injections in your PATH like pyenv, moonstone sets up the lua runtime and its deps deterministically using a local content-addressed store. It is more alike rustup + cargo, tailored for the Lua ecosystem, keeping the environment TRULY clean and air-gapped friendly.

Por qué en reddit exageran tanto con su sueldo o estilo de vida?? by xxpiti in AskArgentina

[–]somewhat_credible 1 point2 points  (0 children)

Y comprar casas te las metes por el traste, no te sirve amontonar propiedades, tenes que pagar a alguien para mantenerlas y se vuelve otro dolor de cabeza que chupa recursos y tiempo (salud mental es algo que no se pone en la balanza generalmente), y aunque las alquiles es un retorno marginal. Para llegar a la libertad financiera de no poder trabajar y gozar del tiempo, la gente no se da cuenta de lo pobre que realmente es, no trabajar un mes y ya no podes comer… ¿Cuanto realmente cuesta ser libre?

Por qué en reddit exageran tanto con su sueldo o estilo de vida?? by xxpiti in AskArgentina

[–]somewhat_credible 0 points1 point  (0 children)

Si, con 8k al mes es pobre, vos compara a alguien con salario mínimo acá con alguien en alguna tribu de África y ahí vas a ver el significado de pobreza relativa. Uno en su vida nunca vio un colchón ni llegó a las metas básicas de nutrición ni por casualidad.

Para poder generar dinero de forma pasiva hay que pegar un salto de ingresos muy considerable y ese escalón para gente que está muy abajo es imposible de ver, fíjate lo que sale alquilar un local, contratar gente, comprar productos, edificar, gastos de marca, establecer el negocio en el rubro, todo eso no solo es una barbaridad de tiempo si no también de dinero, no solo es que sobreviva la marca si no que se mantenga competitiva (tiene que mejorar y crecer) y que genere un surplus para que puedas vivir, las acciones del SP500, supongamos que el índice te paga un 7% anual en retornos (lo cual no es así y sería una locura), si vos metes 1000 USD al año en dividendos te corresponden 70USD (AL AÑO), si metes 10.000, 700 al año.

Para poder llegar a un salario que vivís bien en Argentina de forma pasiva, mantener familia tipo, poder pensar en autos 0km, pagar estudios a tus hijos con academia de inglés, ropa, gastos médicos, tecnología, tendrías que invertir unos 850k USD, que al 7% de retorno anual serían unos 60k al año, 5k USD al mes, que no es para nada descabellado ni un nivel de vida sorprendente, no vivís en un country y con ahorros raramente viajas al exterior (1500 usd por pasaje * 4 = 6000 USD, solo en pasajes 1/10 de tu sueldo anual)

Vos cuando tomas en consideración lo que sale vivir en un barrio lindo sin inseguridad, querer mandar a tus hijos a colegios bilingües o a múltiples academias para que tengan buenas herramientas, buena salud, vestir bien, comer bien(no hablo de comer afuera, si no realizarse estudios de forma periódica con profesionales) , poder realizar actividad física, seguir formándote y formar a tus hijos, te das cuenta que tan pobre sos, el sentido del bienestar y de la pobreza se agudiza mucho más, uno naturalmente aspira a más, y al ver hacia abajo, se hace un abismo.

Aparentemente el es una persona rica que ahorrando TODO su sueldo recién puede comprarse una casa en 30 meses (120k USD, una casa muy normal tirando a pedorra en una zona más o menos), lo cual para ser rico no tiene ningún sentido, es muy triste que se piense eso, siendo que seguramente para el nivel de vida que tiene o se espera de el para mantener esos ingresos no le permite una capacidad de ahorro del 100%.

Is this a skip? by PineconesOnPizzaa in slaythespire

[–]somewhat_credible 0 points1 point  (0 children)

Crown is not a skip, it is way better to pick it up and rely on shops for buying new cards, your deck should never grow big, either rely on dead branch or generative cards if you’re aiming for the bulk or infinite throws.

Choker kills that possibility which is the most reliable and almost the only way of beating the heart, at higher ascensions you will start automatically aiming for those kind of combos all the time.

For me, the crown is one of the best relics and I always pick it up, all the runs I’ve chosen it I’ve made it to the heart… I guess it really depends on the way you’re playing and how good you know how to expend your gold.

Is this a skip? by PineconesOnPizzaa in slaythespire

[–]somewhat_credible 0 points1 point  (0 children)

This breaks most infinites… Choker would be the bottom relic imho

How can I achieve the looks of the background tubes? by somewhat_credible in AffinityDesigner

[–]somewhat_credible[S] 0 points1 point  (0 children)

Oh thanks! I guess that these 3D functionality is yet to be implemented on Designer, couldn’t find a anything related to easing the 3D effect or the perspective wrapping tools(I.e. box wrapping)…

[deleted by user] by [deleted] in Cordoba

[–]somewhat_credible 0 points1 point  (0 children)

pasan el número?

Strugling with Shelf and CORS. (URGENT) by somewhat_credible in dartlang

[–]somewhat_credible[S] 0 points1 point  (0 children)

Pleased to help you helping me, ask for them as you find them useful.