Hi!
This is a companion post to some in-development plugins I discussed during the first half or so of today’s Corona Geek ( EDIT : link):
* luaffifb
* luaproc
We looked over some material related to the luaffifb and showed some quick examples of luaproc and FreeImage. It was really a spur-of-the-moment decision to bring up the idea of going over them, so I hope it was coherent.
Anyhow, at least a couple of these are fairly niche, so I’m hoping to draw some users by putting them out there. In the first couple cases, I’ve basically got the plugin running on at least one system and would really just like to throw it at a few real-world cases. In the latter two, the project is still in the works but could also benefit from a little bit of direction.
A little about each:
* Lua FFI is a port of a key component in Mike Pall’s amazing LuaJIT, allowing for fairly seamless interop (the eponymous Foreign Function Interface) between Lua code and binary libraries. At some point an intrepid developer used some of the building blocks to port it to stock Lua. He seemed to be making decent headway, then got tied up in day-to-day things. The library seemed to be in limbo.
The above-linked Facebook fork came to my attention just recently. If I’m following some of their discussions correctly, they use it as an alternative for Torch. (Some related comments on this thread. Speaking of Torch, I just discovered this today too.)
As we discuss on the show, I certainly don’t see this as a replacement for Enterprise. Neither is it meant to displace plugins; indeed, I hope it encourages new uses of them!
At the moment this is Mac-only, as per what the project itself reports, though I certainly intend to update if and when that changes. Coincidentally, it looks like the project has just added a wiki, so more docs should be forthcoming.
The initial idea is to open up some already-available libraries, for instance those in Luapower, perhaps some of William Adams’s and Dimiter Stanev’s bindings, and plenty more. Almost unavoidably, this library isn’t 100% LuaJIT-compatible, but it would be good to get some real-world test cases. So, if any FFI code in the wild looks inviting, I’d love you to give this a whirl and report back!
* luaproc is a multithreading library. It allows you to create bits of code that run independently (basically, in different Lua universes) along with a means of communicating among them.
I’ve been using this on Windows to run and interact with a second process, to make some 32- and 64-bit code talk to each other. Another obvious use case is that of heavy loading tasks that you can’t break up, say by streaming in the texture or using coroutines.
I’d be interested in applications that might benefit from this. This should be portable.
Note that this is NOT intended for casual use, say for updating game state.
* FreeImage is a library that supports a huge list of image formats, as well as lots of operations on the images once loaded. Recently, some features have been added to Corona opening up the ability to load custom textures. So, putting the two together, this allows opening up all kinds of files.
This is a rather huge library, so I have limited hope of testing it well on my own. Anybody out there doing anything interesting with images? :) This one also ought to be portable.
I’ve followed the FreeImagePlus library, though I’ll be glad to add any stragglers from the more basic API as I come across them.
* ArrayFire is a library for doing (extremely) large numeric tasks, in the same vein as the earlier-mentioned Torch, that can take advantage of OpenCL and / or CUDA when available. A few of its APIs even use FreeImage, which was the motivation for choosing that versus a few other contenders.
I have this at least functional on OS X. This is 64-bit only, thus Windows is a bit iffy (it’s the reason behind the 32-bit / 64-bit stuff above). Actually, I still need to augment the Lua side of the API quite a lot, so this would probably be awkward to try now, but all the same like to know of anybody out there who could put something like this to use.
*Pauses for breath*
Anyhow, if any of this sounds interesting, let me know, either in this thread or mailing steve at xibalbastudios dot com.