Per Ars: Sun is talking about porting Java to the iPhone (and an idea for python)

March 8th, 2008 § 4 comments § permalink

coffee poster.pngOk. So Sun has come out stat­ing they’re start­ing work based on the SDK released by Apple for the iPhone ear­lier this week to port the JDK over to the iPhone.

Quot­ing the sun rep:

Now, the iPhone is open” as a tar­get plat­form, Klein said. The free JVM would be made avail­able via Apple’s App­Store mar­ket­place for third-party applications.

Now, as com­ments there and else­where have pointed out — there’s a clause in the Agree­ment that comes with the SDK for­bid­ding appli­ca­tions from being placed on the App­Store that can execute/interpret “other appli­ca­tions” — to whit:

3.3.2) An Appli­ca­tion may not itself install or launch other exe­cutable code by any means, includ­ing with­out lim­i­ta­tion through the use of a plug-in archi­tec­ture, call­ing other frame­works, other APIs or oth­er­wise. No inter­preted code may be down­loaded and used in an Appli­ca­tion except for code that is inter­preted and run by Apple’s Pub­lished APIs and builtin interpreter(s).

So — unless Sun plans on mak­ing a JDK that a) doesn’t run any­thing or b) can be com­piled into an appli­ca­tion that is to be sold on the App­Store (pro­vid­ing the run­time for the app, like a self-standing .jar/.war) then I can’t see this hap­pen­ing, and option a is about as use­ful as a toi­let bowl filled with taco meat.theoffice.jpg

On the other hand, option b: Mak­ing a run­time they release out­side of the app store for appli­ca­tion devel­op­ers to use to write an appli­ca­tion in Java and then have it compile-down to an Objective-C runtime/bytecode binary — then it could work, but those would be some *fat* bina­ries with­out a lot of magic.

Now — could the same thing be done with Python? Per­haps. Right now we have the pyObjC bridge that ships with Leop­ard that allows you mostly unfet­tered access into the Objective-C/OSX pro­gram­ming envi­ron­ment. This means you can build “native” appli­ca­tions in Python.

I doubt these bind­ings will work/exist on the iPhone, which means you want some util­ity to take Python code and “inter­pret” it down into an Objective-C binary, i.e.: an embed-able envi­ron­ment ala what Sun may end up hav­ing to do where you write an app in pyObjC/Python and the app+runtime is com­piled down into Objective-C.

Again, with­out a lot of trick­ery, these would be fatass bina­ries — prob­a­bly fat­ter than the notion of the uni­ver­sal bina­ries most peo­ple ship nowa­days for OS/X.

It’s a thought — now I should get back to pok­ing at Objective-C and other pre-pycon hack­ery. This is some­thing peo­ple more versed in com­pil­ers, run­times and with more free time than me will prob­a­bly explore.

Where Am I?

You are currently browsing the iPhone category at jessenoller.com.