7. Mac OS X
Applications
Application
Frameworks
Cocoa, WebKit, ...
Core Technologies CoreGraphics, CoreFoundation, ...
Darwin Kernel, userland, libdispatch, ...
8. Ruby sur 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 sur OS X
• Ruby sur une plateforme Unix...
• Avec quelques agréments en plus...
par ex: mongrel_rails_persists:
intégration launchd, bonjour
• Et Cocoa alors ?
19. MacRuby
• One GC to release them all
• One runtime to bind them
• In the land of Cocoa where Obj-C lie
20. MacRuby
• One GC to release them all
• One runtime to bind them
• In the land of Cocoa where Obj-C lie
• Et HotCocoa pour rubyfier le tout
21. MacRuby
Laurent Sansonetti
(Apple)
Vincent Isambart
Kich Kilmer
Eloy Duran
Ben Stiglitz
Matt Aimonetti
...
http://www.macruby.org
http://twitter.com/macruby
22. En toute simplicité...
• La meilleure plateforme pour les devs Ruby
• Une plateforme de qualité pour les devs Cocoa
40. 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