by marksamman on 5/1/17, 8:33 PM with 67 comments
by leafo on 5/2/17, 12:03 AM
Anyway, it's a stack I'm really happy to be using. Asynchronous IO without any code nesting. I wrote more about the benefits here: http://leafo.net/posts/itchio-and-coroutines.html
[3] https://itch.io/
I also made web server infrastructure for the Lua package manager LuaRocks in the same stack: https://luarocks.org Source is on github: https://github.com/luarocks/luarocks-site
Lua (especially with LuaJIT) is a great choice for web development.
by fosk on 5/1/17, 11:58 PM
Kong[2] uses it extensively, by leveraging the underlying OpenResty[3] framework.
[1] http://luajit.org/ext_ffi.html
by bakery2k on 5/2/17, 2:27 AM
Compare this with PUC Lua [2], which seems to have very few bugs: only 4 in 5.3.3 and 3 in 5.3.2.
LuaJIT and PUC Lua appear to be very similar superficially ("LuaJIT is Lua, but fast"). The relative bug counts reinforce the fact that in the details, the two implementations are very different - for example, LuaJIT uses a lot of assembly language while PUC Lua is pure C89.
The advantages of LuaJIT over PUC Lua seem to be performance and its FFI. I thought PUC Lua's only advantage was portability, but perhaps PUC Lua is also a generally more "correct" implementation?
by vvanders on 5/1/17, 10:12 PM
We used to run Lua on a 300MHz MIPS processor and it was impressive in how well it worked on that constrained platform(only 8mb is system ram, of that Lua ran in a fixed 400kb block).
by doomrobo on 5/1/17, 9:40 PM
by shalabhc on 5/1/17, 11:44 PM
[/plug]
by diegobernardes on 5/2/17, 12:44 AM
by rweichler on 5/2/17, 7:25 AM
3DS port: https://github.com/rweichler/luajit-3DS
iOS runtime inspector: https://github.com/rweichler/lucy
Cydia alternative: https://github.com/rweichler/jjjj
And this is just stuff by me, some schlep. LuaJIT is so underrated it's kind of sad.
by i_feel_great on 5/2/17, 12:13 AM
Edit: By the way, can someone explain why ipairs() is implemented, but not pairs()?
by rkeene2 on 5/2/17, 11:47 PM
It is one of very few packages broken this way, along with basically only XFree86 4.8.0
:-(
by sillysaurus3 on 5/1/17, 10:10 PM
Getting LuaJIT to work on 64-bit OS X required building a custom emacs with linker flags -pagezero_size 10000 -image_base 100000000. This is unfortunate since obviously users will not take the time to build an emacs with custom linker flags. But more generally, this is an issue any time you want to embed LuaJIT in an application plugin rather than the application itself.
There's a bunch of scattered info about the issue:
https://gist.github.com/nddrylliog/8722197
http://hacksoflife.blogspot.fr/2012/12/integrating-luajit-wi...
https://en.blog.nic.cz/2015/08/12/embedding-luajit-in-30-min...
http://luajit.org/install.html
I was hoping there might be a way of sidestepping the issue somehow. If anyone has any ideas, it would be appreciated. LuaJIT has some nice speed improvements compared to standard Lua, but more importantly it has a pretty amazing FFI library. The C declaration parser in particular is valuable.
(Yes, I know it's pointless to hook LuaJIT to emacs. It's mostly a "just because" project.)