lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


(This is directed at Mike Pall, but I thought the subject might be of
interest to other people as well.)

I'll get to the point: How far away do you think you are from
finalizing the API for the FFI/struct extension for LuaJIT? What is
its priority relative to the other things you've got going on, now
that the x64 port is complete?

By "finalizing the API", I mean just a provisional description of all
the functions it will include, not the actual implementation. Late
last year, you posted an example of the kind of thing you had in mind,
that involved ffi.def(), ffi.bindlib() and ffi.new() [1] - but
cautioned that, at that point, you hadn't yet given it much thought.
Have you had a chance to, since then?

The reason I think it's important is this: Unlike other planned
improvements to LuaJIT, this is an area where you cannot confidently
write code today that will take advantage of the feature once it's
implemented. If this extension will take a while to do (and possibly
need another round of sponsorship?) I think it would be good if the
API was known first, so people can start to get used to it, and maybe
an unoptimised/imperfect placeholder implementation could be created
(by somebody else) in the meantime. It would then be possible to write
code for it immediately, make sure it's correct, and hit the ground
running once the true JIT implementation is complete.

(I'm also just really excited by the prospect! I like the idea of
defining bindings in Lua itself, and being able to do that without
sacrificing speed would be amazing.)

[1] http://lua-users.org/lists/lua-l/2009-12/msg01089.html

-Duncan