Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bringing Scheme to the iPhone

32 views
Skip to first unread message

Baino Engineer

unread,
Jun 12, 2009, 4:43:04 PM6/12/09
to
I would like to share my experience on porting a Scheme interpreter to
Apple's iPhone/iPod touch....

Over a couple of weeks we have been experimenting on porting a Scheme
interpreter to the iPhone. The good news is that we have Scheme
running on the iPhone http://prog.vub.ac.be/doku.php?id=ipop:scheme
This may be among the first Scheme implementations on the iPhone (NON
Jail broken).

regards,
Engineer
Scheme on the iPhone: http://prog.vub.ac.be/doku.php?id=ipop:scheme

Marc Feeley

unread,
Jun 13, 2009, 9:44:21 AM6/13/09
to
On Jun 12, 4:43 pm, Baino Engineer <bainomugi...@gmail.com> wrote:
> This may be among the first Scheme implementations on the iPhone (NON
> Jail broken).

A couple of people have reported that they built Gambit on the iPhone
and iTouch, as far back as January 2008. Search the Gambit mailing
list for "iphone". Note that Gambit provides an optimizing Scheme
compiler in addition to an interpreter. Here are some relevant posts:

https://webmail.iro.umontreal.ca/pipermail/gambit-list/2008-January/001966.html

https://webmail.iro.umontreal.ca/pipermail/gambit-list/2009-June/003550.html

There's also been a port of Gambit to the Nintendo DS in 2007:

https://webmail.iro.umontreal.ca/pipermail/gambit-list/2007-January/001069.html

A port to the Xilinx Virtex-II pro FPGAs (an embedded system) was done
in a few minutes. The changes needed were basically to workaround a
broken stdio library.

The ability to build Gambit with minimal effort on any processor (in
these cases the ARM and PowerPC) is one of Gambit's important
features. That's possible because the Gambit compiler generates
portable C/C++ code. The only prerequisite is that the platform have
a decent C compiler. To my knowledge, no other optimizing Scheme
compiler is as portable as Gambit.

Marc

Grant Rettke

unread,
Jun 13, 2009, 11:44:35 PM6/13/09
to
On Jun 12, 3:43 pm, Baino Engineer <bainomugi...@gmail.com> wrote:
> I would like to share my experience on porting a Scheme interpreter to
> Apple's iPhone/iPod touch....
>
> Over a couple of weeks we have been experimenting on porting a Scheme
> interpreter to the iPhone. The good news is that we have Scheme
> running on the iPhonehttp://prog.vub.ac.be/doku.php?id=ipop:scheme

> This may be among the first Scheme implementations on the iPhone (NON
> Jail broken).
>
> regards,
> Engineer
> Scheme on the iPhone:  http://prog.vub.ac.be/doku.php?id=ipop:scheme

The download link

http://prog2.vub.ac.be/~ebainomu/Streaming/iphone-scheme.mov

seems to be broken.

Marek Kubica

unread,
Jun 14, 2009, 6:28:27 AM6/14/09
to
On Sat, 13 Jun 2009 20:44:35 -0700 (PDT)
Grant Rettke <gre...@gmail.com> wrote:

> The download link
>
> http://prog2.vub.ac.be/~ebainomu/Streaming/iphone-scheme.mov
>
> seems to be broken.

Works for me. Maybe it was a temporary hiccup.

regards,
Marek

Grant Rettke

unread,
Jun 15, 2009, 10:31:20 PM6/15/09
to
On Jun 14, 5:28 am, Marek Kubica <ma...@xivilization.net> wrote:
> On Sat, 13 Jun 2009 20:44:35 -0700 (PDT)
>
> Grant Rettke <gret...@gmail.com> wrote:
> > The download link
>
> >http://prog2.vub.ac.be/~ebainomu/Streaming/iphone-scheme.mov
>
> > seems to be broken.
>
> Works for me. Maybe it was a temporary hiccup.

Oops. I mean the download link; not the movie:

http://prog.vub.ac.be/doku.php?id=ipop:file.zip

Baino Engineer

unread,
Jun 16, 2009, 9:44:14 AM6/16/09
to

You can download the .app and sb. files here
http://prog2.vub.ac.be/~ebainomu/Downloads/iPhone-Scheme.zip . This is
the same as one demonstrated in the movie.

The extended front-end (with "bigger" editor workspace) is also
available here http://prog2.vub.ac.be/~ebainomu/Downloads/iPhone-Scheme1.0.zip

RUNTIME REQUIREMENTS: Mac OS X 10.5.3, iPhone OS 2.0+.

---
Engineer

Brian Harvey

unread,
Jun 16, 2009, 9:56:58 AM6/16/09
to
Baino Engineer <bainom...@gmail.com> writes:
>This may be among the first Scheme implementations on the iPhone (NON
>Jail broken).

I'm confused. I thought that iPhones could only download applications
from Apple (if "NON Jail broken"). And that Apple outlawed programming
languages. (This is one of the reasons I'm not an iPhone user.) Has
something changed?

Grant Rettke

unread,
Jun 16, 2009, 10:54:45 AM6/16/09
to
On Jun 16, 8:56 am, b...@cs.berkeley.edu (Brian Harvey) wrote:

Some Smalltalk apps are for sale in the app store:

http://www.infoq.com/news/2009/05/squeak-smalltalk-iphone

Jens Axel Soegaard

unread,
Jun 16, 2009, 10:59:11 AM6/16/09
to b...@cs.berkeley.edu
Brian Harvey skrev:

Nothing changed.

However if you send the device number of your iphone to the developer,
he can send you an app specifically signed for you - and that you
can install in the same way you install a normal app.

However, if you just want to run the app in the emulator and
not a real device, signing isn't neccessary (IIRC).

If the plan is to put the Scheme interpreter in the App Store, there
might be a problem with Apple's terms:

3.3.2 An Application may not itself install or launch other
executable code by any means, including without limitation through
the use of a plug-in architecture, calling other frameworks, other
APIs or otherwise. No interpreted code may be downloaded or used in an
Application except for code that is interpreted and run by Apple's
Documented APIs and built-in interpreter(s).

--
Jens Axel S�gaard

Grant Rettke

unread,
Jun 16, 2009, 11:26:15 AM6/16/09
to
On Jun 16, 9:59 am, Jens Axel Soegaard

<findrealaddresswithgoo...@soegaard.net> wrote:
> If the plan is to put the Scheme interpreter in the App Store, there
> might be a problem with Apple's terms:
>
>    3.3.2         An Application may not itself install or launch other
>    executable code by any means, including without limitation through
>    the use of a plug-in architecture, calling other frameworks, other
>    APIs or otherwise. No interpreted code may be downloaded or used in an
>    Application except for code that is interpreted and run by Apple's
>    Documented APIs and built-in interpreter(s).

Apple doesn't want you to introduce backdoors into your programs. That
sounds to me like no EVAL; Scheme or Smalltalk.

Pascal J. Bourguignon

unread,
Jun 16, 2009, 11:55:52 AM6/16/09
to
Grant Rettke <gre...@gmail.com> writes:


"An application may not initiate its functions upon events received
from other sources than the user."

Strangely enough, I fail to see the similarity between this
interdiction and 3.3.2...


--
__Pascal Bourguignon__

jlongster

unread,
Jun 17, 2009, 5:13:53 PM6/17/09
to
Hey everyone,

You all are right about Apple disallowing any interpreted code.
However, as Marc previously stated, there's nothing they can do about
compiling Scheme to C, and compiling the C code for the iPhone.

I was able to get Gambit Scheme compiled for the iPhone and write a
small application on top of it. I wrote an article about my
experiences and gave detailed instructions of how to do this
yourself. Writing iPhone apps in Scheme is surely feasible (mostly
because of the incredible portability of Gambit).

http://jlongster.com/blog/2009/06/17/write-apps-iphone-scheme/

- James

Baino Engineer

unread,
Jun 18, 2009, 12:51:21 AM6/18/09
to
On Jun 16, 3:56 pm, b...@cs.berkeley.edu (Brian Harvey) wrote:

> Baino Engineer <bainomugi...@gmail.com> writes:
> >This may be among the first Scheme implementations on the iPhone (NON
> >Jail broken).
>
> I'm confused.  I thought that iPhones could only download applications
> from Apple (if "NON Jail broken").  

As Jens Axel Søgaard explained, with Apple's developer account, you
can deploy applications to your iPhone without going through apple's
App store. It's this way that we port the Scheme interpreter here
(http://prog.vub.ac.be/doku.php?id=ipop:scheme) to the iPhone. The
motivation of these experiments is mainly academic research, no
intentions yet to publish this Scheme interpreter to the Apple store!

Jens Axel Soegaard

unread,
Jun 22, 2009, 10:49:22 AM6/22/09
to jlongster
jlongster skrev:

I got your app running on the simulator yesterday. No changes
was need to run it in OS 3.0.

An example of Apple rejecting emulator related apps:

http://nexus404.com/Blog/2009/06/22/iphone-commodore-64-emulator-app-rejected-by-apple-c64-app-violates-iphone-sdk-agreement/

I hope they reconsider. The developer distributes a fixed set
of games with the C64 emulator - and he has licensed them properly.

Pascal J. Bourguignon

unread,
Jun 22, 2009, 11:11:19 AM6/22/09
to

Whatever. What's clear is that I won't consider buying or programming
an iPhone while these rules exist. (And while I cannot buy an open
one, when you spend that kind of money you don't want to be locked to
a single operator).

--
__Pascal Bourguignon__

Grant Rettke

unread,
Jun 22, 2009, 11:00:17 PM6/22/09
to
On Jun 22, 9:49 am, Jens Axel Soegaard

<findrealaddresswithgoo...@soegaard.net> wrote:
> An example of Apple rejecting emulator related apps:
>
> http://nexus404.com/Blog/2009/06/22/iphone-commodore-64-emulator-app-...

>
> I hope they reconsider. The developer distributes a fixed set
> of games with the C64 emulator - and he has licensed them properly.

Can we agree that the acceptance process has issues?

In that same article you saw that Sega had no problem selling Golden
Axe, which is essentially an emulator with a copy of one game, for the
iPhone.

It seems to be in "how you sell it" to Apple.

Again, there are Smalltalk apps there, but surely they did advertise
the fact as a feature as the C64 emulator has, nor did Sega for Golden
Axe.

Grant Rettke

unread,
Jun 22, 2009, 11:02:00 PM6/22/09
to
On Jun 22, 10:11 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

> Whatever.  What's clear is that I won't consider buying or programming
> an iPhone while these rules exist.

While it is a rule, that Apple can do as they wish, it is more about
how you "sell the app" to Apple than some cut and drive objective
criteria.

> (And while I cannot buy an open
> one, when you spend that kind of money you don't want to be locked to
> a single operator).

It depends on what you want to do with it. If you simply want to use
it as a computer, it is terrible deal that is hard to justify.

If you want to try to make some money, then it is a different story.

0 new messages