Wow, this is great. I recently spent a bunch of time integrating Lua and ObjC for a project; I'll have to see if I can replace all that glue with this library, or if I have something I can contribute to it.
EDIT: What's the license on this? There's no indication at the top of the source, or anywhere that I can see. It turns out not to be the same as what I'm doing -- I'm calling from ObjC into Lua and back -- but there are still bits I'd love to reuse, if I could.
If someone with more knowledge than me would answer this I'd appreciate it: Does this mean I can write a full-blown iOS app in Lua? Or will there be technical and TOS limitations?
I can't respond on technical, as I haven't used TLC.
As to Apple's TOS (I can't seem to find TLC's), I'm pretty sure you can write a full-blown iOS app in Lua. You can already write a complete iOS game in Lua: http://www.anscamobile.com/corona/ . Around summer 2010 they changed their terms so that embedded, non-JIT languages are allowed, as long as all executed code is bundled in your application (not downloaded). Many apps already embedded lua. I don't think using TLC would affect an app's chances of being approved.
LuaJIT requires mprotect which was disabled in version of iOS pre 5.0. It has been secretly activated in 5.0+, but it's unclear if apple will allow anyone to use it. Feel free to try and let us know the results.
7 comments
[ 3.2 ms ] story [ 28.1 ms ] threadEDIT: What's the license on this? There's no indication at the top of the source, or anywhere that I can see. It turns out not to be the same as what I'm doing -- I'm calling from ObjC into Lua and back -- but there are still bits I'd love to reuse, if I could.
in order to call back into lua you can either use the standard C api. (This file from another project of mine might be a useful starting point: https://github.com/aptiva/Tranquil/blob/master/Tranquil/Core...)
Or use addMethod to add a lua function as a method to a class (You can use createClass to create a new class)
I'll add a subclassing demo to the readme later today
As to Apple's TOS (I can't seem to find TLC's), I'm pretty sure you can write a full-blown iOS app in Lua. You can already write a complete iOS game in Lua: http://www.anscamobile.com/corona/ . Around summer 2010 they changed their terms so that embedded, non-JIT languages are allowed, as long as all executed code is bundled in your application (not downloaded). Many apps already embedded lua. I don't think using TLC would affect an app's chances of being approved.