LuaJIT FFI

A category for whatever! Can be Mudlet-related or offtopic.
Post Reply
User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

LuaJIT FFI

Post by Vadi »

"The FFI library allows calling external C functions and using C data structures from pure Lua code." [http://luajit.org/ext_ffi.html]

I built a LuaJIT2 version of Mudlet before, but the perfomance improvements (on my poor benchmarks) weren't awesome so I didn't push the idea too much. The FFI however changes things, and besides, possibly, making binding Qt stuff in Mudlet easier, will help experienced coders play around with even more powerful structures and exotic algorithms for curing systems :roll:

I'll see about finding the stuff and publishing my changes this weekend if nobody else gets to it sooner.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaJIT FFI

Post by tsuujin »

Huh. I wonder if I could figure out a way to call custom qt interfaces (windows!) not shipped with mudlet...

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT FFI

Post by Vadi »

Yeah, that'll be nice to do. Threading will need to be solved though (but you could import a threading lib in Mudlet).

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaJIT FFI

Post by tsuujin »

I'm wondering, though, how much other than playing directly with QT the JIT library will do for us. I've never had a problem getting my system to do what I want in Lua, and I'm trying to think of where I'd actually add in C structs.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT FFI

Post by Vadi »

I haven't either, but there were people who liked bitwise operations for their curing stuffs... (which will be available because a bit library comes with LuaJIT anyway, but ...). Who knows. Maybe someone will want to implement efficient Markov chains and automate their character! (what am I talking about? but only time can tell.)

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaJIT FFI

Post by tsuujin »

hmm, I didn't see that the LuaJIT comes with a bitwise library. That's absolutely awesome. I might actually go back and rewrite some of my stuff to use bitwise comparison!

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: LuaJIT FFI

Post by Vadi »


Post Reply