7. Mac OS X Stack
Applications
Application
Frameworks
Cocoa, WebKit, ...
Core Technologies CoreGraphics, CoreFoundation, ...
Darwin Kernel, userland, libdispatch, ...
8. Ruby on OS X
2002 Mac OS X 10.2 Ruby 1.6.7
2005 Mac OS X 10.4 Ruby 1.8.2
2007 Mac OS X 10.5 Ruby 1.8.6
RubyCocoa, gems, Rails
2009 Mac OS X 10.6 Ruby 1.8.7
RubyCocoa, gems, Rails
20xx ? Sky is the limit
9. Ruby on OS X
• Ruby, just on another unix platform
• With some small improvements...
e.g. mongrel_rails_persists on OS X Server
launchd / bonjour integration
• What about Cocoa ?
19. MacRuby
• One GC to release them all
• One runtime to bind them
• In the land of Cocoa where Obj-C lie
20. MacRuby
Laurent Sansonetti
(Apple)
Vincent Isambart
Kich Kilmer
Eloy Duran
Ben Stiglitz
Matt Aimonetti
...
http://www.macruby.org
http://twitter.com/macruby
21. Modest goals
• The best platform for Ruby developers
• A great platform for Cocoa developers
39. Grand Central
# A GCD-based implementation of the sleeping barber problem:
# http://en.wikipedia.org/wiki/Sleeping_barber_problem
# http://www.madebysofa.com/#blog/the_sleeping_barber
waiting_chairs = Dispatch::Queue.new('com.apple.waiting_chairs')
semaphore = Dispatch::Semaphore.new(3)
index = -1
while true
index += 1
success = semaphore.wait(Dispatch::TIME_NOW)
if success != 0
puts "Customer turned away #{index}"
next
end
waiting_chairs.dispatch do
semaphore.signal
puts "Shave and a haircut #{index}"
end
end
41. Why MacRuby ?
• Ruby for “mac-like” desktop applications
• A wonderful experimentation playground
• ... Interesting perspectives
42. Q&A
• Ruby 1.9 compatibility
• Right now, ≈ 80% on rubyspec
• Other platforms, portability
• No closed-source dependancies, no
definitive technical blocker
• ... Any takers ?