Three words: "Ruby on iPhone"

Yes, that’s right, ladies and gents. Thanks the hackery of a great many individuals (no, I am not among them), just this evening, I ran the following on my iPhone:

ruby -e “10.times { puts ‘foo’ }”

You can guess what happened.

Here’s how you do it, in short order, with minimal agony: Use the unofficial developed by some folks at NullRiver. That’s it! From there, install the “Community Sources”, install “Ruby”, the BSD extensions, and “Mobile Terminal” and then go rubify yourself.

Ironically, this is not officially a product of theirs – more than likely because it is unwise to declare third party software for the iPhone as an official product at this tenuous time.

I wonder how long it will be before some intrepid Ruby coder works out a way to get to UIKit easily from Ruby and gens up some rdoc for it. I wonder if SWIG would help here?

Just for giggles, I tried:

ruby -e ‘;a=1;b=1;1000000.times {a=a+b};puts a;puts “time: #{ - start}”’”

On my 2.16 Ghz Core Duo Macbook Pro, this took 0.280763 seconds. On the iPhone, this took 10.060393 seconds.

Looks like a speed difference of a factor of 50 for this simple computation.

Update: Um, ok, maybe it’s closer to 36 than 50.

Posted by evan on Sunday, August 19, 2007

blog comments powered by Disqus