6 ms·
RaptorJIT 1.0: Lua implementation for high-perf low-level system programming
- posnet 8y agoAn interesting part of this project, other than improving the already excellent LuaJIT is the Studio[1] tooling (made with Pharo smalltalk[2] and nix[3]) that has been built around debugging JIT performance issues. Luke Gorrie, one of the main contributes has been live streaming its progress.[4] [1] https://github.com/studio/studio/ https://github.com/studio/studio/ [2] https://pharo.org/ https://pharo.org/ [3] https://nixos.org/nix/ https://nixos.org/nix/ [4] https://www.youtube.com/watch?v=MQyxXSPXcwg https://www.youtube.com/watch?v=MQyxXSPXcwg
- deleted 8y ago[deleted]
- placebo 8y agoThe level of experience, talent and expertise required to dive into LuaJIT development and following Mike Pall's stepping down from active development of it was cause for concern that this would be the end of the road (some even decided to abandon Lua as a result). My optimism grew when I saw this project (and the quotes at the end of it's github page, which capture the issue perfectly) - very glad to see this release and hope the momentum just gets bigger.
- DarkWiiPlayer 8y agoThat's pretty much how I felt as well. I've come across this some weeks ago, and I'm still not sure if this will be a worthy LuaJIT successor.
- lowry 8y agoMost of the changes are removals of architectures other than x86_64. What a joke.
- LeifCarrotson 8y agoTo be fair, when I was using Lua a decade ago, LuaJIT mostly only supported Linux and x86-64. Mike was adding new architectures and variants on request and when people would pay him to do so, while the core was both mostly sufficient and still improving. Those 50,000 lines did come after x86-64, if you wanted to move the project in a different direction it seems sensible to strip them out, make your changes. As long as your changes a rent too drastic, it should be comparatively easy to put them back in.
- justincormack 8y agoEach architecture had a hand coded interpreter. The plan is to write a portable interpreter in C.
- timClicks 8y agoAre you willing to contribute to the port? Don't rubbish other peoples' work unless you've got something better to replace it with.
- moocowtruck 8y agogood point, but i think we can admit the title is weird if the only support is x86-64
- lukego 8y agoRaptorJIT is good for writing applications like Snabb. Snabb is a networking framework that’s very low level: cycle-counting loops, device drivers, DMA, etc, in Lua. In this domain of high performance software networking the advantages of supporting other architectures don’t currently outweigh the costs. 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.
- 8y ago
- mitchtbaum 8y agoI've looked at luajit, terra, and now raptorjit; and I always come to the same conclusions. 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. https://github.com/foundpatterns/torchbear https://github.com/foundpatterns/torchbear
- armitron 8y agoI don't agree with this at all. First of all, something feels off when you talk about right and wrong optimization without taking context into account. RaptorJIT grew out of the Snabb switch community. With that in mind, Rust+Lua isn't anywhere near pure Lua in terms of development speed, minimalism, simplicity and flexibility. Luke Gorrie has come out of the Lisp community so I have to imagine that these criteria are very important to him. 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?
- mitchtbaum 8y ago> Rust+Lua isn't anywhere near pure Lua in terms of development speed, minimalism, simplicity and flexibility 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.
- andrewmcwatters 8y ago
- armitron 8y agoI'm very happy to see this. For those who are not familiar with Luke Gorrie, he has done many interesting things whilst tightly orbiting around languages that lack popular appeal. 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.
- otabdeveloper1 8y agoDoes this still only support 2 Gb of RAM? (https://stackoverflow.com/questions/35155444/why-is-luajits-memory-limited-to-1-2-gb-on-64-bit-platforms https://stackoverflow.com/questions/35155444/why-is-luajits-...)
- lukego 8y agoNo, that restriction is gone. Peter Cawley did the hard work and added optional support for 64-bit heaps to LuaJIT upstream [1] and RaptorJIT adopted that exclusively i.e. dropped the 32-bit heap option which involved a LOT of #ifdef'ery in thousands of lines of assembler code. [1] https://www.youtube.com/watch?v=ZeaDk9ElKws https://www.youtube.com/watch?v=ZeaDk9ElKws
- otabdeveloper1 8y agoLast I checked (which was a year or more ago), 64-bit GC for LuaJIT is an experimental and buggy feature. Do people actually use it in production? Since which version of LuaJIT?
- lukego 8y agoThe bugs have been shaken out now and it works fine in production. That's true at least on x86-64 with common build options and the latest LuaJIT prerelease.
- usgroup 8y agoSo great to see this ... The slow roll of LuaJIT, made me despair a bit that Lua would ever see a thriving JIT project. Hopefully this will be it... 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.