Lua Playground
Write Lua, run it on the BEAM, and watch the register-based bytecode this VM actually executes. No JavaScript Lua — every byte is Elixir.
Your first Lua program on the BEAM.
Output
idle
Hit Run
or press ⌘ ↵
to execute.
Bytecode · Lua.Compiler.Prototype
1 proto
params
0
vararg
yes
registers
4
upvalues
0
| 000 | load_env r0 | |
| 001 | get_open_upvalue r1, r0 | |
| 002 | get_field r2, r1.print | |
| 003 | move r1, r2 | |
| 004 | load_constant r3, "Hello, Lua on the BEAM!" | |
| 005 | move r2, r3 | |
| 006 | call r1, args=1, results=0 | |
| 007 | L2 | source_line line 2 |
| 008 | L2 | load_constant r1, 42 |
| 009 | L2 | return r1, count=1 |
Run
⌘ + ↵
Indent
Tab / Shift
+ Tab
Heads-up
Snippets run in a sandboxed VM with a 1.5s timeout.