Breaking News !
MacRuby developer
attacked by raptors
Text
Text
Text
Text
MacRuby
Mac OS X
Applications
Application
Frameworks
Cocoa, WebKit, ...
Core Technologies CoreGraphics, CoreFoundation, ...
Darwin Kernel, userland, libdispatch, ...
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
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 ?
Une affaire de famille
SmallTalk
Objective-C Ruby
Ecrire une “vraie” appli
Mac en Ruby ?
GitNub
RubyCocoa
• Un vrai bridge (Fujimoto Hisakuni, 2001)
• Syntaxe... intéressante
• Ruby 1.8
• Green threads, non réentrant
• Deux runtimes, deux GC
• Ouch
Facile.
(si on connait Objective-C, Cocoa, Ruby, et les dragons qui se cachent dans les recoins du bridge)
MacRuby
MacRuby
• One GC to release them all
MacRuby
• One GC to release them all
• One runtime to bind them
MacRuby
• One GC to release them all
• One runtime to bind them
• In the land of Cocoa where Obj-C lie
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
MacRuby
Laurent Sansonetti
(Apple)
Vincent Isambart
Kich Kilmer
Eloy Duran
Ben Stiglitz
Matt Aimonetti
...
http://www.macruby.org
http://twitter.com/macruby
En toute simplicité...
• La meilleure plateforme pour les devs Ruby
• Une plateforme de qualité pour les devs Cocoa
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
Le bonheur
?
Pourquoi MacRuby ?
• Ruby pour développer des applications
desktop “mac-like”
• Un terrain d’expérimentation formidable
• Des perspectives ... intéressantes
Q&A
• Compatibilité Ruby 1.9
• Actuellement ≈ 80% sur la suite
rubyspec
• Portabilité sur d’autres plateformes
• Dépendances FLOSS, aucun obstacle
technique insurmontable...
• ... des volontaires ?
0 comments
Post a comment