Hacker News new | ask | show | jobs
by jonbro 5352 days ago
yes yes, a thousand times yes. There is some serious misinformation in this thread though. Apple has allow interpreters on the phone for a while, and the remaining restriction is that you can't download code or bring code in through the app document directory. This app breaks neither of these restrictions. In fact, there have been other lua interpreters running on the ios for a while now, see: http://www.mobileappsystems.com/products/iluabox

The difference with this app is that the ide is really a labor of love, and it is super fun to code in. Not that iLuaBox isn't, but all of the little features for tweaking colors and editing sprites are brilliant. The graphics and audio engine don't hurt either.

For those complaining that there isn't a companion engine that you can take the code out of codify and release actual games, you should take a look a corona. The api in codify is not so big that you wouldn't be able to clone anything that you made in it to another platform relatively easily. I do agree that there should be more lua based gl engines for iphone though. I am working on one, but as of yet it is totally for my own use, but only by virtue of the fact that it doesn't come with nice build scripts.

The other thing that some commenters miss is that you can use copy and paste in this app. That will open the gates to sharing code, it is as easy as: select all, copy, switch to safari, go to pastebin, send link to someone else. I suspect that some of the time the app spent in approval was them thinking about that.

-- edit for not being a jerk to iluabox

5 comments

"3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store."

There NO EXCEPTIONS for scripts typed in by users period.

Both iLuaBox and Codify are breaking this rule. Of course Apple has a history of ambiguously enforcing their rules.

For those thinking that Apple relaxed the rules the rule above is the current license dated 10/4/2011. Apple had a more strict rule at one point that said that apps themselves could only be written in C/C++/ObjC/JavaScript. That rule was relaxed.

The last sentence makes it clear that the intent behind this rule is to prevent circumvention of the App Store approval process, not to ban executable code itself.

The rule can be read as ambiguous when it comes to executable content that is not part of an app, just the document type that an app edits and displays. For example - you could think of calculating a formula in a spreadsheet as an example of interpreted code. Apple has no reasonable interest in preventing such apps.

When the documents that an app handles become more app-like, such as games, then Apple might decide to step in. They have left themselves enough slack in the wording of the rule to allow that.

I hope that they make the rule more explicit in a future version of the agreement.

I am not sure if I got what you are suggesting here. Codify is in no way breaking this rule, the author had to modify and resubmit the binaries a couple of time as Apple refused sharing the code using iTunes Sharing. So we have the sandbox in codify, however one can always copy paste the code from emails, web sites, etc (inputs) but there is no way to compile or use it further (outputs) at this stage.
I wonder if someone could get around this distribution problem by making a Codify-like app that uses HTML5 tech instead of Lua. There are a bunch of rapidly-maturing JS game frameworks that seem like they'd be up to the task, especially given the ever-improving Nitro performance in iOS.
Minor sidenote: The Corona SDK [1] is quite expensive: $350 per year to create both Android and iOS apps. There is a free, open-source alternative which is trying to do the same: Moai [2]. Also using Lua to write the game, then using wrappers for various platforms (iOS, Android, OSX, Windows).

[1] http://www.anscamobile.com/corona/

[2] http://getmoai.com/

For anyone approaching iOS development as more than a hobby $350 is a bargain considering how much time it would take you to develop something similar on your own.

That is, of course, assuming that Corona is a good fit for the kinds of apps you want to write.

Wow, Crimson Steam Pirates is an INCREDIBLE game, that is quite the poster child for Moai, which I also had never heard of before.
I've been evaluating moai for a few weeks now and I have to say that it is a bloody brilliant bit of software engineering .. not only does it run smoothly, but its just such a pleasant set of paradigms to learn to build games - no longer do I need to sort my objects or do other things for performance, the moai runtime and object model is designed from the get-go to make it easier for the engine itself to do the optimization while the programmer fills in the content pipeline. I'm very impressed personally, and will be using it for my next game projects to release on Android, Chrome, and iOS simultaneously ..
yeah, thanks for the response. I was not aware of moai, but it looks brilliant. I also love the fact that it is open source. That is the main reason that I am rolling my own rather that using corona. Corona's lack of support for extending through c code is really a pain.
> That will open the gates to sharing code, it is as easy as: select all, copy, switch to safari, go to pastebin, send link to someone else.

I don't know why but this reminds me of my Amstrad CPC days where you mostly shared code by retyping it (notably from magazines and books).

I find it interesting also in that it makes the code as the thing shared, not the resulting blob.

I like that comparison, yes it is like the old Z80 computer programs, where if you did not save the code on to a cassette you lost it. So the other way was typing lines of code from magazines with checksums to make sure that the code was perfectly fine and one did not miss any thing.

Codify is at this moment similar to those 8-bit computers... I had a ZX Spectrum 48K

yeah, it is quite a bit roundabout, and it gets tricky when you start organizing your code into separate files. But it is way easier than retyping. That might be a downside for eduction, but I don't think it is a terrible tradeoff compared to the retyping that you point out.

I am so pumped that it reminds you of homecomputers though, that is the way the ipad should be, not a closed box that you can only play games on.

Does the iOS agreement spell out the "Documents" vector ? It only appears to mention that all code should be included with the application and not downloaded.

It seems that a word processor that allows macros in the documents would be a litmus test for this policy.

this would be great stuff indeed, but the restrictions you mention seem like a killer to me: you basically can't share any program that was written on this app. so how can this ever be more than a toy?
I think it's great if it remains just a "toy". Kids could use it to get started with programming.

The previous generation had Amigas or whatever that was (sorry) they used to hack on. My generation had the early days of the web. This (and others like it) could be the next generation's hacking toy.

My thoughts exactly. This is perfect to get little ones excited about coding.
I feel like you didn't read my comment. You can share by copying and pasting your code to a pastebin. Does that not apply?
yes, but you have to agree this is really awkward, beyond sharing with fellow hackers. most casual users would never go to the trouble just to try your app.

my point was that the technology exists to make sharing apps easier, but apps like this are artificially crippled by apple's app store policies, because they want to control everything.