In case anyone is wondering how highly performant / scalable LuaJIT is - Cloudflare was built on top of LuaJIT for the first ~10 years of it's existence and it's only been in the last couples of years they have begun to use Rust.
I don't know about you but a 3x performance increase going from a scripting language with fast iteration times to a programming language that has long compilation times plus a borrow checker is hardly worth the risk of a rewrite to the average company.
Add on top the fact that one of the performance problems was interfacing nginx with luajit, aka there are two unnecessary memory copies.
When I think about these things, I'm thinking cloudflare was lucky enough to outgrow lua rather than being lucky to have gotten away with luajit.
I haven't looked at LuaJIT, but Lua is written in this weird bastard language using the C preprocessor. All of the terseness of Lisp, with no type system (since it's the C preprocessor), and the added fun of pointer arithmetic.
I have no complaints about the language (other than arrays starting at 1). I'm just salty because other people have said the implementation was really clean C, so I decided to spend a week porting it to C#, and I gave up. I could not figure out how closures were actually implemented, and I spent a day trying to understand it.
That weird bastard language is called C. It's really easy to hack on the lua codebase, either adding stuff to it or using it as the base for other languages. Provided you can read C, anyway.
Luajit has a really complicated build process. I'm more nervous about changing that codebase.
In case anyone is wondering how highly performant / scalable LuaJIT is - Cloudflare was built on top of LuaJIT for the first ~10 years of it's existence and it's only been in the last couples of years they have begun to use Rust.
https://blog.cloudflare.com/tag/lua/