3 ms·
I was battling GCC… until the new guy (a smart business major) pointed out I could just compile from Lua to ASM directly. Claude was happy to write a compiler o
by clbrmbr 2mo ago
I was battling GCC… until the new guy (a smart business major) pointed out I could just compile from Lua to ASM directly. Claude was happy to write a compiler over night. :facepalm:
- fragmede 2mo agothat sounds like a fascinating use case. why were you writing Lua in the first place?
- clbrmbr 2mo agoCreating on-demand automations for an ESP32-based product, that includes driving a display up to 1000px.
- Dylan16807 2mo agoDoes this relate to the article? Does it follow the lua spec? How are tables implemented? How fast is it compared to normal Lua, luajit interpreter, and luajit jit?
- clbrmbr 2mo agoOh just that it made me confront ABIs. I have a special purpose use case (home automation), so I wasn’t worried about general purpose compilation, just the subset of lua that fable tends to write for the prompt we use. I have no idea how it’s implemented. Lua goes in, position-independent dependency-free xTensa LX7 code comes out the other. Maybe I should read the code? It’s extremely fast. 3kB of lua becomes 1kB of machine code. I’ll have to get a blog post together on it.