2. A History of Apple and Ruby
MacRuby
2002 2003 2004 2005 2006 2007 2008 2009
OS X 10.5 OS X 10.x
OS X 10.2 OS X 10.4
Ruby 1.8.6 Ruby 1.8.7
Ruby 1.6.7 Ruby 1.8.2
RubyGems RubyGems
RubyCocoa RubyCocoa
Rails Rails 2.2
3. Apple’s Goals:
Make Mac OS X the best
platform for Ruby developers
4. Apple’s Goals:
t
s
e
b
e
h class
t
Make Ruby a first
Cocoa programming language
on Mac OS X
5. Mac OS X Stack
User Experience
Application Frameworks
Graphics and Media
Darwin
6. Mac OS X Stack - Languages
User Experience Objective-C
Application Frameworks
Graphics and Media
Darwin C
7. Bridging Ruby & Objective-C
RubyCocoa
by
by FUJIMOTO Hisakuni (2001)
Bundled with Mac OS X 10.5 (stable)
9. Problems with RubyCocoa:
It’s a bridge
Messaging syntax is different
Ruby uses green threads
Two runtimes, two GCs
10. Enter MacRuby
MacRuby 0.4
Objective-C 2.0 Ruby 1.9
Core Garbage Standard
Runtime YARV Parser
Foundation Collector Library
Garbage Built-ins
Collector
Every Ruby class is an Objective-C class
Every Ruby object is an Objective-C object
Every Ruby method is an Objective-C method