r/lua • u/ViewsOfTheSunny • Jul 22 '26
Project LuaJIT Playground
There's websites for running Lua, but I couldn't find any that let's you run LuaJIT!!
I made this website (me, not AI) so if you haven't tried LuaJIT before, or you don't have access to your dev environment, or you just want to quickly experiment...now you can run it online, and share the script + output with others as either a link or markdown.
Pre-compiled binaries for Windows/Linux are also provided. The static library, dynamic library, and executable, are all bundled in a single convenient .zip file for each platform. I'm hoping to automate this process at some point, but for now I just publish them whenever I see there's been new commits...
Limits: no internet connection, maximum execution duration of 3 seconds.
The backported extensions for LuaJIT 3.0 are available now, by the way.
- Bit Operators: unary ~, binary & | ~ << >> ~>>
- Customary Operators: ! && || !=
- Ternary ?: conditional operator
- Safe Navigation Operator ?.
- nil-Coalescing Operator ??
- Compound Assignment Operators: += -= *= /= %= &= |= ~= <<= >>= ~>>= ..=
- continue Statement
- const Declaration
- Short Function Expression
- Underscores in Number Literals
4
u/VidaOnce Jul 23 '26
Taking the luajit.dev domain is certainly a bold choice, maybe make it clear it's not affiliated with the project on the website?
2
u/xoner2 Jul 23 '26
Source
Output
https://luajit.dev/?e=N5StcBPJ4bWHMBCLi6hmF
Ok. Nice.
It uses triple backticks. Since the markdown is generated why not use the old 4 spaces instead? For compat with old.reddit.com
2
u/fsfod Jul 23 '26
https://luajit.me/ has been around for while, as well as running your code its shows JIT traces created and dumps IR and machine code output for them.
1
u/HeavyCaffeinate Jul 23 '26
Pretty cool
no posix module though, shame
-2
u/Cootshk Jul 22 '26
Just curious, aside from speed is there any reason to use LuaJIT over Lua? (Especially when you can use Lua 5.5 in place of 5.1)