[ANN] lua-Atmos v0.1 - Structured Event-Driven Concurrency for Lua

22 views
Skip to first unread message

Francisco Sant'anna

unread,
Jul 5, 2025, 8:51:36 AMJul 5
to ceu-...@googlegroups.com
Hello,

lua-Atmos is a programming library for Lua that reconciles Structured Concurrency with Event-Driven Programming:


lua-Atmos is inspired by Céu.

All feedback is welcome.

Francisco

Job van der Zwan

unread,
Jul 7, 2025, 7:20:46 AMJul 7
to The Programming Language Ceu
This looks really nice!

I don't program in Lua much, but I'll study the source to see if I can copy anything for my own JS work. Is it pure Lua or does it require anything "external" to work?

Also, have you tried getting it to work on any of the popular "fantasy consoles" that use Lua? PICO-8, Picotron and TIC-80 are the three big ones as far as I know.

Job

Francisco Sant'anna

unread,
Jul 7, 2025, 7:40:16 AMJul 7
to ceu-...@googlegroups.com
On Mon, Jul 7, 2025 at 8:20 AM Job van der Zwan <j.l.van...@gmail.com> wrote:
I don't program in Lua much, but I'll study the source to see if I can copy anything for my own JS work.
 
Is it pure Lua or does it require anything "external" to work?

It is pure Lua, but relies on "stackful" coroutines (I believe JS' are "stackless"), and the "close" mechanisms of Lua5.4 (no idea about JS).

Also, have you tried getting it to work on any of the popular "fantasy consoles" that use Lua? PICO-8, Picotron and TIC-80 are the three big ones as far as I know.

I did some research, but I think they do not support Lua5.4.
Not even Love2D is compatible with Lua5.4. :(

Johnicholas Hines

unread,
Jul 7, 2025, 12:10:33 PMJul 7
to ceu-...@googlegroups.com
Awesome! I love the "language-to-library" pipeline. 

--

---
You received this message because you are subscribed to the Google Groups "The Programming Language Ceu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceu-lang+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ceu-lang/CAD4QiZtWLnRt-r6R_QOz-baVfCLkk-T8Kn%2BzL%2B49VzFZwx0WLA%40mail.gmail.com.

Job van der Zwan

unread,
Jul 9, 2025, 3:32:45 AMJul 9
to The Programming Language Ceu
On Monday, 7 July 2025 at 13:40:16 UTC+2 Francisco Sant'Anna wrote: 
It is pure Lua, but relies on "stackful" coroutines (I believe JS' are "stackless"), and the "close" mechanisms of Lua5.4 (no idea about JS).
Hmm, yeah I suppose that will make it practically impossible to port, sadly. But at least I can study the source :). Maybe for a compiles-to-JS language that handles this under the hood.

I did some research, but I think they do not support Lua5.4.
Oh, right, they all prefer LuaJIT for performance of course...
 
Not even Love2D is compatible with Lua5.4. :(
This is true for the default build, but you can build it with Lua5.4 as its interpreter:

And they do seem to support the required features. When I looked up what the "close" mechanism of Lua5.4 does, one of the first hits was this merged pull request which implies 5.4 support:

So you could make your own Love2D + Atmos build

BTW, how important is this close mechanism to make the library work? Because the request to backport it for LuaJIT was closed by Mike Pall insisting that it would be a noop anyway: https://github.com/LuaJIT/LuaJIT/issues/926.

On Monday, 7 July 2025 at 18:10:33 UTC+2 johnicho...@gmail.com wrote:
Awesome! I love the "language-to-library" pipeline. 

Yeah, the part where https://github.com/lua-atmos/sdl-rocks/ just forked the pico-ceu build and required only 19 commits to port over is impressive! (also, hello John! Guess we're officially the two main groupies of Céu now, hahaha)

Francisco Sant'anna

unread,
Jul 9, 2025, 8:16:17 AMJul 9
to ceu-...@googlegroups.com
On Wed, Jul 9, 2025 at 4:32 AM Job van der Zwan <j.l.van...@gmail.com> wrote: 
Not even Love2D is compatible with Lua5.4. :(
 
This is true for the default build, but you can build it with Lua5.4 as its interpreter:
https://www.love2d.org/forums/viewtopic.php?p=245770#p245770
And they do seem to support the required features. When I looked up what the "close" mechanism of Lua5.4 does, one of the first hits was this merged pull request which implies 5.4 support:

I went through this path but there are no instructions to change the interpreter.
I tried the Discord, but no one really knew how to do it.
I gave up, but did not try hard.
 
BTW, how important is this close mechanism to make the library work? Because the request to backport it for LuaJIT was closed by Mike Pall insisting that it would be a noop anyway: https://github.com/LuaJIT/LuaJIT/issues/926.

Task abortion due to lexical hierarchy:
Not only do we want to execute deferred statements, but also to abort nested tasks, which should not awake from upcoming events.

Garbage collector is not enough here for two reasons:
- lack of determinism: we want the defers/abortions to be synchronous with the events that caused it
- pending references: sometimes a task reference escapes to an outer scope. it is not a problem, but we want the task to abort anyway
 
On Monday, 7 July 2025 at 18:10:33 UTC+2 johnicho...@gmail.com wrote:
Awesome! I love the "language-to-library" pipeline. 

Yeah, the part where https://github.com/lua-atmos/sdl-rocks/ just forked the pico-ceu build and required only 19 commits to port over is impressive! (also, hello John! Guess we're officially the two main groupies of Céu now, hahaha)

:) 

Reply all
Reply to author
Forward
0 new messages