RaptorJIT 1.0: Lua implementation for high-perf low-level system programming
github.com
github.com
Luke Gorrie, one of the main contributes has been live streaming its progress.[4]
Erlang, Common Lisp, Forth and now Lua and Smalltalk, it takes a certain kind of thinking to go against the grain like that. Besides following his output for years and being inspired by him, I've always admired Luke for blazing his own path in the programming wilderness.
If you haven't tried Lua, do. You can be up and running in about 3-4 hours, writing useful things. Try writing your next utility script or command line tool in Lua.
1) this is the wrong optimization (more below)
2) Rio's runtime is very good (enough for now, at least)
3) the next big step like this is to make an interpreter in Rust, not necessarily a parser/ast generator, but just a runtime, and I'm not in a rush for this
the right optimization is to do low-level work in a systems language.. in my case Rust, where rLua has a great wrapper for puc Lua. only use Lua as a scripting language to call those lower level functions.
right now on github, you can see my Lua bindings to Rust's libraries for web server, web client, libsodium functions, jinja rendering, string transforms, set operations, and more. all of that work is done in Rust, and controlled by Lua. it's faster than any Lua you've ever seen.
Systems language doesn't really mean anything by itself, so you sound very dogmatic when you talk about "right" here. The Lisp machines were implemented in Lisp. Is Lisp a systems language?
I hope you're wrong about this one. I guess I might have some trouble gaining stake holders from even Lua supporters who view it as a best language for every layer. But Rust has an incredible amount to offer Lua, especially when used primarily as a higher-level scripting language, for glue code.
As for PUC Lua, yes, it's perfectly ok for most things when you're mostly scripting and using C for the heavy lifting anyway, like when you're building a scripting language into an already existing game engine or program.
LuaJIT was always meant to fill the in-between role (which is, arguably, the broadest one) where you can't be bothered to write a full C application to host your Lua code but still need more speed than you get by just running a whole program in PUC Lua.
This Rust code I linked to is an application framework. It makes several of Rust's most powerful libraries available to Lua, which should greatly improve development speed. I'm using it to build an event-based Lua web framework on top of it. (also there) Development of other network applications should also be very smooth, afaics.
(https://stackoverflow.com/questions/35155444/why-is-luajits-...)
That’s why it’s a low-level system programming language that prioritizes working very well on x86-64 over supporting other platforms like 32-bit heap, MIPS, Xbox, no FPU, etc. Just got bigger fish to fry right now.
How much of a hit does floating point math take? I have a desire to build some realtime audio tools.
LuaJIT uses NaN-tagging to represent Lua values in memory to save space.
Float64 numbers can be left alone, and other types are represented as NaN with the pointer bits stashed in the mantissa part of the float. Only one, canonical NaN value is recognized as such by the language, the others are disguised 32 bit pointers.
This varies by microcontroller obviously.. this comes from reimplementing GLSL shadertoy samples for a neopixel grid.
And the readme: `Reduced code maintenance footprint ~50% by removing #ifdef features that are not required for Linux/x86-64 e.g. Windows support, 32-bit heap support, and non-x86 backends. This is a necessary short-term expedient to make the code maintainable while we bootstrap the project.`
I wonder how that 50,000 lines was broken down by feature...