lua-users home
lua-l archive

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

On 8/13/11, Peter Drahoš <> wrote:
> Great work Eric, I'm impressed.
> Would it be possible to provide support for a standalone Lua module
> instead of bundling LuaCocoa with lua, lpeg and olua? I'm not to keen
> on using module specific interpreters and would welcome being able to
> simply require LuaCocoa from the standard Lua interpreter.
> pd

Thanks for looking!

Yes, I would like to see/do this. I think it is possible, but there
may be caveats…

The big obstacle I foresee is that LuaCocoa uses Lua patched with
LNUM, particularly for 64-bit. This is because all present day Macs
(i.e. Lion) have moved to Intel 64-bit architectures for apps and
32-bit is now effectively deprecated. For completely full/correct
Cocoa bridging, I need to handle 64-bit integers crossing the bridge.
(I think I recall some long double APIs too.) I'm unclear what all the
ramifications are when not using or mixing Lua builds without LNUM,
particularly in 64-bit.

What I have currently is a bit of a stop gap because I needed an
interpreter up and running quickly which also seems to work well since
I avoid most collision issues. Most of my efforts have been focused on
the self-contained, embeddable library side of things (hence the
framework bundle design) so LuaCocoa can be shipped in Mac
applications. There is irony that I just posted a lengthy 5 part
article on Automated Testing and Continuous Integration on iOS (and
also Android) devices which makes heavy use of the LuaCocoa command
line interpreter.

Anyway, I welcome help/feedback with this.

* Note: lpeg and olua are me jumping the gun hoping to get
Objective-Lua integrated. It doesn't work yet, so the components are
technically unused. But I expect that the olua that eventually emerges
from LuaCocoa will likely be slightly modified and incompatible with
the official olua because the invented Objective-Lua object model is
sufficiently different than NSObject.

Beginning iPhone Games Development