News for hackers. Stuff that matters.
Re:Native UIKit iPhone Apps Written In Lua by daeken on Thursday October 01, 2009 @12:19AM (#854319)
This seems to violate clause 3.3.2 in the iPhone SDK agreement, since it embeds an interpreter. That said, Apple's already accepted one app using it, so it was either ignored or in line with their intentions (even if not the wording).

Regardless, very cool. Saves me writing my own faux-VM for a project I'm working on. I'd intended to compile code to Obj-C and build everything on that, but this will save me a whole lot of time.

Re:Native UIKit iPhone Apps Written In Lua by mbrubeck on Thursday October 01, 2009 @12:40AM (#854334)
EDIT: This is wrong now; see below.

The SDK agreement seems (both in letter and intention) to be forbidding apps from downloading code that is run by a custom interpreter. It does not prevent an app from interpreting code that is part of the app itself.

"No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s)."

Re:Native UIKit iPhone Apps Written In Lua by daeken on Thursday October 01, 2009 @12:41AM (#854335)
That was my understanding as well, but the very latest iPhone SDK document says "downloaded or used" instead of 'and'.
Re:Native UIKit iPhone Apps Written In Lua by mbrubeck on Thursday October 01, 2009 @12:51AM (#854349)
Interesting. I didn't know that.
Re:Native UIKit iPhone Apps Written In Lua by yason on Thursday October 01, 2009 @02:08AM (#854415)
I wonder if iPhone's browser does XML and XSLT, like all modern browsers do?

It happens that XSLT is Turing complete, and the browser can certainly download stuff from teh internet. This could mean that merely embedding the browser into your iPhone app effectively turns it into an interpreter for programs downloaded from anywhere. Sure it's sandboxed but technically that shouldn't matter. And I'm sure you could introduce hooks to the browser from native side, to make something interesting out of it.

Re:Native UIKit iPhone Apps Written In Lua by ptomato on Thursday October 01, 2009 @03:01AM (#854464)
Or, you know, javascript. Which the iPhone's browser definitely supports. And which isn't governed by the terms of the SDK anyway.
Re:Native UIKit iPhone Apps Written In Lua by blasdel on Thursday October 01, 2009 @03:14AM (#854482)
Why the fuck would you bother with XML wankery when you're given a top-of-the-line JIT-compiling javascript engine?
Re:Native UIKit iPhone Apps Written In Lua by tedunangst on Thursday October 01, 2009 @08:31AM (#854795)
Would code downloaded and run by the browser be code that is run by Apple's builtin interpreter?
Re:Native UIKit iPhone Apps Written In Lua by jawngee on Thursday October 01, 2009 @12:37AM (#854332)
Wouldn't it save you a whole lot of time to do it in Obj-C in the first place?
Re:Native UIKit iPhone Apps Written In Lua by daeken on Thursday October 01, 2009 @12:43AM (#854339)
The code is being compiled from Actionscript bytecode as part of a larger project. Although I'd planned to compile it to straight Obj-C, I'd still need garbage collection and AS-type (ECMAScript) objects.