Ruby on the iPhone

Anyone else out there realized that Ruby has been compiled for and now
runs on the iPhone? If you have an iPhone, go visit this site:
http://iphone.nullriver.com/beta/. Installer.app will help you
easilly install a terminal and Ruby (!!!). Just go to /usr/local/bin
and play. I did a tiny bit of benchmarking myself just for giggles.

http://evan.tiggerpalace.com/?p=30

Granted that I haven’t played with SWIG yet but I wonder how it would
do for wrapping UIKit. I imagine that it’s not nearly as simple as it
sounds.

Evan Light

On Aug 19, 2007, at 19:09, Evan Light wrote:

Anyone else out there realized that Ruby has been compiled for and now
runs on the iPhone? If you have an iPhone, go visit this site:
http://iphone.nullriver.com/beta/. Installer.app will help you
easilly install a terminal and Ruby (!!!). Just go to /usr/local/bin
and play. I did a tiny bit of benchmarking myself just for giggles.

http://evan.tiggerpalace.com/?p=30

Nearly this same message was posted two weeks ago.

Granted that I haven’t played with SWIG yet but I wonder how it would
do for wrapping UIKit. I imagine that it’s not nearly as simple as it
sounds.

Wouldn’t RubyObjC be far more appropriate?

Unfortunately it doesn’t have most standard libraries or rubygems, which
make it somewhat limited (e.g. irb doesn’t work). The iphone doesn’t
have a
compiler that runs ON the phone, so everything has to be cross-compiled
on
your own computer. That means even once ruby is running on the phone,
you
would have to pre-compile any gems with C before putting them on the
phone.
For more complicated libraries such as ruby, compiling it required a lot
of
hand-tweaking and static compiling. If anyone wants to lend a hand,
especially with just getting a solid ruby binary with stdlib and
rubygems,
it would be greatly appreciated. There is a working toolchain that you
can
install on your computer. We use this to compile anything (cocoa apps,
or
just binaries we run from the shell). You can check out the following
sites
for more detail:

http://iphone.natetrue.com
http://iphone.fiveforty.net/wiki/index.php?title=Main_Page

Check out the IRC channels from the 2nd link. Most of the active
discussion,
especially for compiling, is in #iphone-dev and #iphone-uikit. The
current
ruby binary was compiled by NerveGas.

If you have not been actively following the iphone hackery, there is a
lot
of interesting and impressive work that’s been done.

Matt

PS - Python is working pretty well, and includes a working module for
sqlite. There is a sqlite3 binary in the first link, if you want to run
that
directly from the shell.

On Aug 19, 10:24 pm, Eric H. [email protected] wrote:

Nearly this same message was posted two weeks ago.
Sorry for the repost then.

Granted that I haven’t played with SWIG yet but I wonder how it would
do for wrapping UIKit. I imagine that it’s not nearly as simple as it
sounds.

Wouldn’t RubyObjC be far more appropriate?

http://www.rubyobjc.com/

True. SWIG doesn’t accomodate Objective-C, does it? :wink: Bitten by my
over-enthusiasm.