[ANN] Luam: A minimalist, procedural Lua dialect for CAD (Luametry)‏

126 views
Skip to first unread message

Ben Sivan

unread,
Feb 14, 2026, 8:57:39 AM (6 days ago) Feb 14
to lu...@googlegroups.com

Hello everyone,

I’ve been working on a project called Luam, a dialect of Lua designed for high-performance procedural workflows. To demonstrate its utility, I’ve built Luametry, a parametric CAD tool that leverages the Manifold library for 3D geometry generation.

As a long-time admirer of Lua’s minimalism, my goal with Luam was to further constrain the language for a specific domain. In many ways, Luam is a "subtractive" dialect; I found that by removing certain features and standardizing others, I could create a more predictable environment for 3D modeling.

Key design choices in Luam include:

  • Strict Procedural API: I have removed standard OOP features and metatable-based "classes" to enforce a consistent, flat procedural style that maps cleanly to the underlying C++ geometry engine.

  • Boolean Strictness: To eliminate ambiguity in complex CAD logic, I’ve removed nil as a truthy/falsy value in conditionals, requiring explicit boolean evaluations.

  • Syntactic Simplification: I’ve removed multiline comments to keep the lexer and scripts as simple as possible, while adding modern multiline string support for data embedding.

  • Local by Default: To prevent accidental global state leakage in large-scale procedural assemblies, variables are scoped locally by default.

  • Enhanced REPL: Improved the interactive experience with native cursor navigation and line editing, moving away from the standard ^D character echoes.

The intent is to provide a "safety-first" environment for users focused on generating 3D data, where the side effects of global variables or complex object hierarchies can lead to unexpected geometry errors.

I would be very interested to hear the community’s thoughts on this approach to domain-specific simplification.

Luam Core: https://github.com/BenSiv/luam

Luametry (CAD implementation): https://github.com/BenSiv/luametry

Thank you to the Lua team and this community for providing such an elegant foundation.

Best regards,

Ben Sivan

Martin Eden

unread,
Feb 14, 2026, 3:02:27 PM (6 days ago) Feb 14
to lu...@googlegroups.com
On 2026-02-14 15:49, Ben Sivan wrote:
> Hello everyone,
>
> [...]
>
> As a long-time admirer of Lua’s minimalism, my goal with Luam was to
> further constrain the language for a specific domain. In many ways, Luam is
> a "subtractive" dialect; I found that by removing certain features and
> standardizing others, I could create a more predictable environment for 3D
> modeling.
Hello Ben, I think it's nice project

Points where I agree (and don't use in my code anyway):

* No metatables
* nil is not boolean
* Local by default

I have no opinion about "enhanced REPL", don't use it much.

But decision to remove multiline comments looks strange to me.

If you allow multiline strings why forbid multiline comments?
They are actually fine, in last ten years I'm moving to block comments
describing what following block of code does.

-- Martin

Ben Sivan

unread,
Feb 14, 2026, 7:22:29 PM (6 days ago) Feb 14
to lu...@googlegroups.com
Hi Martin,

Thanks for the feedback. I'm glad the "Local by default" and "Boolean strictness" resonate with you.

Regarding multiline comments, it is not a hill to die on. Removing them was mostly an exercise in seeing how far I could minimize the syntax. Since the lexer handles triple-quoted strings anyway, I can easily reconsider, if it becomes a nuisance.

Best regards,
Ben

--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lua-l/643fd217-6c1a-4eb0-9dbd-7eaa4dd4a97e%40disroot.org.

Rett Berg

unread,
Feb 17, 2026, 10:38:59 AM (3 days ago) Feb 17
to lua-l
This is a really cool project. I have plans to try and build something similar for civboot.org - albeit with a simpler kernel (likely 2D only with extrude), which I think you could do quite a lot with in terms of manufacturing. I'd love to chat about it (off the list) if that is something which would interest you.

Are you compiling luam to lua (either bytecode or syntax)? If you are (or could), you could consider implementing it as a library which adds itself to the package.searchers, documented under require. This would allow lua modules to import luam and vice-versa.

Best,
Rett

Ben Sivan

unread,
Feb 17, 2026, 1:07:14 PM (3 days ago) Feb 17
to lu...@googlegroups.com
Hi Rett,

Thanks for reaching out! The Civboot project sounds fascinating. A simpler 2D-to-extrude kernel is a very pragmatic approach for manufacturing, and I think you could do a lot with it.

Regarding the implementation: I modified the Lua source code directly to introduce those breaking changes, like local-by-default and boolean strictness. Because of those fundamental shifts, I suspect a direct package.searchers integration wouldn't work seamlessly right now.

While backward compatibility wasn't a primary goal for Luam, the delta isn't massive, so it would be pretty easy to translate the luametry logic back to standard Lua for importability. I’m definitely open to discussing how that could work.

I’d love to dive deeper into this with you. Feel free to reach out at bens...@gmail.com and we can chat more!

Best,
Ben

Andrey Dobrovolsky

unread,
Feb 17, 2026, 5:25:52 PM (3 days ago) Feb 17
to lu...@googlegroups.com
Hi Ben,

Lua without closures and metatables is like Lisp without parentheses.

Just a joke, I don't want to say anything bad about Your project :-) Good luck!

@Rett Berg
Thanks for the link to civboot.

Best regards,
-- Andrew

вт, 17 лют. 2026 р. о 20:07 Ben Sivan <bens...@gmail.com> пише:
> To view this discussion visit https://groups.google.com/d/msgid/lua-l/CAC1hj9DO0XdOMu6DKYTWmP6U0jNwELqUsD3s40qw9WJq_dSOEg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages