SlideShare a Scribd company logo
1 of 59
MacRuby
raleigh.rb April 21, 2009
      Sean Johnson
  Snooty Monkey, LLC
first = Job.find_by_company('Clemson University')

second = Job.find_by_company('Strategic Technologies')

startup = Company.new('Venetica')
Company.find_by_name('IBM').acquire(startup)

startup2 = Company.new(:name => '3volve Technology, LLC')
startup2.destroy

startup3 = Company.new(:name => 'Snooty Monkey, LLC')




       me.career.to_s
Product.create(:name => 'Virtual Access',
 :price => 50000, :platform => WIN32)

Product.create(:name => 'Jasper',
 :price => 35000, :platform => JAVA)

Product.create(:name => 'VeniceBridge',
 :price => 70000, :platform => J2EE)

Product.create(:name => 'IBM OmniFind Yahoo Edition',
 :price => 0, :platform => J2EE)

Product.create(:name => 'Live Syllabus', :price => 0,
 :platform => RUBY_ON_RAILS)

Product.create(:name => 'BubbleTimer', :price => 20,
 :platform => RUBY_ON_RAILS)

Product.create(:name => 'NewsMilk iPhone', :price => 0,
 :platform => IPHONE)

Product.create(:name => 'WinTheTrophy',
 :price => 0, RUBY_ON_RAILS)

Product.create(:name => 'Time Portal',
 :price => 35, MAC_RUBY)




 me.products.to_s
O Ruby, Ruby,
wherefore art thou
     Ruby?
YARV      Rubinius
        MRI




JRuby   IronRuby          MacRuby
Cocoa is better than
  Java. It’s 60%
   chocolatier.
cocoa = ruby_on_rails if you.online?

cocoa = ruby_libraries if you.skool == old

cocoa = j2ee if you.wear?(suits)

cocoa = dot_net if you.evil?




cocoa.analogy.to_s
1985
1985

       NeXTSTEP


       OPENSTEP
1985

       NeXTSTEP


       OPENSTEP
1996
1985

                    NeXTSTEP


                    OPENSTEP
         1996


BSD Mach Kernal +
 OPENSTEP Cocoa
    = Mac OS X
1985

                           NeXTSTEP


                           OPENSTEP
         1996


                          Cocoa
BSD Mach Kernal +
 OPENSTEP Cocoa
                    Foundation AppKit
    = Mac OS X
Cocoa in 60 seconds
Typed




   Cocoa in 60 seconds
Typed


    Late bound




   Cocoa in 60 seconds
Typed

                 true == YES
    Late bound




   Cocoa in 60 seconds
Typed

                  true == YES
     Late bound


 false == NO




   Cocoa in 60 seconds
Typed

                   true == YES
     Late bound


 false == NO
               garbage == collected




   Cocoa in 60 seconds
Typed

                   true == YES
     Late bound


 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
Typed

                   true == YES
     Late bound
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed

                   true == YES
     Late bound
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed
 Hash == NSMutableDictionary
               true == YES
    Late bound
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
               true == YES
    Late bound
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
               true == YES camelCased
    Late bound
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
                 true == YES camelCased
     Late bound
                    Array == NSMutableArray
Object == NSObject
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
                 true == YES camelCased
     Late bound
                    Array == NSMutableArray
Object == NSObject
                    nil can do some crazy shit
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
init returns self String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
                 true == YES camelCased
     Late bound
                    Array == NSMutableArray
Object == NSObject
                    nil can do some crazy shit
 false == NO
               garbage == collected it’s complicated




   Cocoa in 60 seconds
init returns self String == NSString
Typed
                                        wordy
 Hash == NSMutableDictionary
                 true == YES camelCased
     Late bound
                    Array == NSMutableArray
Object == NSObject
                    nil can do some crazy shit
 false == NO
               garbage == collected it’s complicated
my_object.method1.method2(arg1, arg2)




   Cocoa in 60 seconds
init returns self String == NSString
Typed
                                       wordy
 Hash == NSMutableDictionary
                 true == YES camelCased
     Late bound
                    Array == NSMutableArray
Object == NSObject
                    nil can do some crazy shit
 false == NO
               garbage == collected it’s complicated
my_object.method1.method2(arg1, arg2)
 [[myObject message1] message2: arg1 label2: arg2];



   Cocoa in 60 seconds
init returns self String == NSString
 Typed
                                         wordy
  Hash == NSMutableDictionary
                  true == YES camelCased
      Late bound
                     Array == NSMutableArray
 Object == NSObject
                      nil can do some crazy shit
   false == NO
                 garbage == collected it’s complicated
  my_object.method1.method2(arg1, arg2)
   [[myObject message1] message2: arg1 label2: arg2];
my_object.method1.method2(arg1, :label2 => arg2)

     Cocoa in 60 seconds
native numbers, strings, arrays, hashes




MacRuby in 60 seconds
Everything is an NSObject




 native numbers, strings, arrays, hashes




MacRuby in 60 seconds
Everything is an NSObject



                      garbage == collected


 native numbers, strings, arrays, hashes




MacRuby in 60 seconds
Everything is an NSObject
           [obj setLame: YES] == obj.lame(false)

                       garbage == collected


 native numbers, strings, arrays, hashes




MacRuby in 60 seconds
Everything is an NSObject
               [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                            garbage == collected


     native numbers, strings, arrays, hashes




 MacRuby in 60 seconds
Everything is an NSObject
               [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                            garbage == collected
  framework ‘foundation’
                            framework ‘Cocoa’
     native numbers, strings, arrays, hashes




 MacRuby in 60 seconds
wrappers
       Everything is an NSObject
               [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                            garbage == collected
  framework ‘foundation’
                            framework ‘Cocoa’
     native numbers, strings, arrays, hashes




 MacRuby in 60 seconds
wrappers
       Everything is an NSObject
                [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                            garbage == collected
  framework ‘foundation’
                            framework ‘Cocoa’
     native numbers, strings, arrays, hashes

  [[myObject message1] message2: arg1 label2: arg2];




 MacRuby in 60 seconds
wrappers
        Everything is an NSObject
                [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                            garbage == collected
   framework ‘foundation’
                            framework ‘Cocoa’
      native numbers, strings, arrays, hashes

  [[myObject message1] message2: arg1 label2: arg2];
my_object.method1.method2(arg1, :label2 => arg2)



  MacRuby in 60 seconds
wrappers
        Everything is an NSObject
                 [obj setLame: YES] == obj.lame(false)
[obj isLame] == obj.lame?
                             garbage == collected
   framework ‘foundation’
                            framework ‘Cocoa’
      native numbers, strings, arrays, hashes

   [[myObject message1] message2: arg1 label2: arg2];
my_object.method1.method2(arg1, :label2 => arg2)
my_object.method1.method2(arg1, label2:arg2)

  MacRuby in 60 seconds
In the beginning...
macruby.org
Install
Hello, I’m a Mac
But...Cocoa is lame!
Cocoa            vs.         Ruby

      wordy                    expressive
initWithContentRect:style
                            game.bets.last.valid?
Mask:backing:defer:scree
n:
Cocoa            vs.         Ruby

      wordy                    expressive
initWithContentRect:style
                            game.bets.last.valid?
Mask:backing:defer:scree
n:
HotCocoa::Mapping.map(:button => :NSButton) do
   def init_with_options(button, options)
    button.initWithFrame options.delete(:frame)
   end
  end


  require 'hotcocoa'
  include HotCocoa

  button :frame => [0,0,20,100]




HotCocoa Constructors
HotCocoa::Mapping.map(:button => :NSButton) do
 defaults :bezel => :rounded,
      :frame => DefaultEmptyRect,
      :layout => {}
end


require 'hotcocoa'
include HotCocoa

b = button




HotCocoa Defaults
HotCocoa::Mapping.map(:button => :NSButton) do
  constant :state, {
    :on => NSOnState,
    :o = NSOState,
    :mixed = NSMixedState
  }
 end

 require 'hotcocoa'
 include HotCocoa

 button :state = :on




HotCocoa Constants
HotCocoa::Mapping.map(:button = :NSButton) do
 custom_methods do
  def bezel=(value)
    setBezelStyle(value)
  end
  def on?
    state == NSOnState
  end
 end
end


require 'hotcocoa'
include HotCocoa

go_button = button :state = on
puts 'yeah!' if go_button.on?




HotCocoa Methods
HotCocoa
/Developer/Examples/Ruby/MacRuby/HotCocoa

/Library/Frameworks/MacRuby.framework/Versions/
      0.4/usr/lib/ruby/1.9.1/hotcocoa/mappings
You got Chocolate in
 my Peanut Butter!
MacRuby 0.4
         (March)

   Xcode Templates
   Embed MacRuby
 HotCocoa coverage /
 HotCocoa::Graphics
     Threaded GC
Control Ruby Runtime from
         Obj-C API
MacRuby 0.5
      YARV      LLVM


   Faster I/O on CFStream


        Pass RubySpec
@macruby

 #ruby-osx

macruby-devel@macosforge.org


http://macruby.org/trac/report
Mac
         iPhone
      Ruby on Rails
  Product Design/Mgmt.
snootymonkey.com   sean@snootymonkey.com

More Related Content

Recently uploaded

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

MacRuby

  • 1. MacRuby raleigh.rb April 21, 2009 Sean Johnson Snooty Monkey, LLC
  • 2. first = Job.find_by_company('Clemson University') second = Job.find_by_company('Strategic Technologies') startup = Company.new('Venetica') Company.find_by_name('IBM').acquire(startup) startup2 = Company.new(:name => '3volve Technology, LLC') startup2.destroy startup3 = Company.new(:name => 'Snooty Monkey, LLC') me.career.to_s
  • 3. Product.create(:name => 'Virtual Access', :price => 50000, :platform => WIN32) Product.create(:name => 'Jasper', :price => 35000, :platform => JAVA) Product.create(:name => 'VeniceBridge', :price => 70000, :platform => J2EE) Product.create(:name => 'IBM OmniFind Yahoo Edition', :price => 0, :platform => J2EE) Product.create(:name => 'Live Syllabus', :price => 0, :platform => RUBY_ON_RAILS) Product.create(:name => 'BubbleTimer', :price => 20, :platform => RUBY_ON_RAILS) Product.create(:name => 'NewsMilk iPhone', :price => 0, :platform => IPHONE) Product.create(:name => 'WinTheTrophy', :price => 0, RUBY_ON_RAILS) Product.create(:name => 'Time Portal', :price => 35, MAC_RUBY) me.products.to_s
  • 4. O Ruby, Ruby, wherefore art thou Ruby?
  • 5. YARV Rubinius MRI JRuby IronRuby MacRuby
  • 6.
  • 7. Cocoa is better than Java. It’s 60% chocolatier.
  • 8. cocoa = ruby_on_rails if you.online? cocoa = ruby_libraries if you.skool == old cocoa = j2ee if you.wear?(suits) cocoa = dot_net if you.evil? cocoa.analogy.to_s
  • 10. 1985 NeXTSTEP OPENSTEP
  • 11. 1985 NeXTSTEP OPENSTEP 1996
  • 12. 1985 NeXTSTEP OPENSTEP 1996 BSD Mach Kernal + OPENSTEP Cocoa = Mac OS X
  • 13. 1985 NeXTSTEP OPENSTEP 1996 Cocoa BSD Mach Kernal + OPENSTEP Cocoa Foundation AppKit = Mac OS X
  • 14. Cocoa in 60 seconds
  • 15. Typed Cocoa in 60 seconds
  • 16. Typed Late bound Cocoa in 60 seconds
  • 17. Typed true == YES Late bound Cocoa in 60 seconds
  • 18. Typed true == YES Late bound false == NO Cocoa in 60 seconds
  • 19. Typed true == YES Late bound false == NO garbage == collected Cocoa in 60 seconds
  • 20. Typed true == YES Late bound false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 21. Typed true == YES Late bound Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 22. String == NSString Typed true == YES Late bound Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 23. String == NSString Typed Hash == NSMutableDictionary true == YES Late bound Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 24. String == NSString Typed wordy Hash == NSMutableDictionary true == YES Late bound Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 25. String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 26. String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 27. String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject nil can do some crazy shit false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 28. init returns self String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject nil can do some crazy shit false == NO garbage == collected it’s complicated Cocoa in 60 seconds
  • 29. init returns self String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject nil can do some crazy shit false == NO garbage == collected it’s complicated my_object.method1.method2(arg1, arg2) Cocoa in 60 seconds
  • 30. init returns self String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject nil can do some crazy shit false == NO garbage == collected it’s complicated my_object.method1.method2(arg1, arg2) [[myObject message1] message2: arg1 label2: arg2]; Cocoa in 60 seconds
  • 31. init returns self String == NSString Typed wordy Hash == NSMutableDictionary true == YES camelCased Late bound Array == NSMutableArray Object == NSObject nil can do some crazy shit false == NO garbage == collected it’s complicated my_object.method1.method2(arg1, arg2) [[myObject message1] message2: arg1 label2: arg2]; my_object.method1.method2(arg1, :label2 => arg2) Cocoa in 60 seconds
  • 32. native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 33. Everything is an NSObject native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 34. Everything is an NSObject garbage == collected native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 35. Everything is an NSObject [obj setLame: YES] == obj.lame(false) garbage == collected native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 36. Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 37. Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected framework ‘foundation’ framework ‘Cocoa’ native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 38. wrappers Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected framework ‘foundation’ framework ‘Cocoa’ native numbers, strings, arrays, hashes MacRuby in 60 seconds
  • 39. wrappers Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected framework ‘foundation’ framework ‘Cocoa’ native numbers, strings, arrays, hashes [[myObject message1] message2: arg1 label2: arg2]; MacRuby in 60 seconds
  • 40. wrappers Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected framework ‘foundation’ framework ‘Cocoa’ native numbers, strings, arrays, hashes [[myObject message1] message2: arg1 label2: arg2]; my_object.method1.method2(arg1, :label2 => arg2) MacRuby in 60 seconds
  • 41. wrappers Everything is an NSObject [obj setLame: YES] == obj.lame(false) [obj isLame] == obj.lame? garbage == collected framework ‘foundation’ framework ‘Cocoa’ native numbers, strings, arrays, hashes [[myObject message1] message2: arg1 label2: arg2]; my_object.method1.method2(arg1, :label2 => arg2) my_object.method1.method2(arg1, label2:arg2) MacRuby in 60 seconds
  • 47. Cocoa vs. Ruby wordy expressive initWithContentRect:style game.bets.last.valid? Mask:backing:defer:scree n:
  • 48. Cocoa vs. Ruby wordy expressive initWithContentRect:style game.bets.last.valid? Mask:backing:defer:scree n:
  • 49. HotCocoa::Mapping.map(:button => :NSButton) do def init_with_options(button, options) button.initWithFrame options.delete(:frame) end end require 'hotcocoa' include HotCocoa button :frame => [0,0,20,100] HotCocoa Constructors
  • 50. HotCocoa::Mapping.map(:button => :NSButton) do defaults :bezel => :rounded, :frame => DefaultEmptyRect, :layout => {} end require 'hotcocoa' include HotCocoa b = button HotCocoa Defaults
  • 51. HotCocoa::Mapping.map(:button => :NSButton) do constant :state, { :on => NSOnState, :o = NSOState, :mixed = NSMixedState } end require 'hotcocoa' include HotCocoa button :state = :on HotCocoa Constants
  • 52. HotCocoa::Mapping.map(:button = :NSButton) do custom_methods do def bezel=(value) setBezelStyle(value) end def on? state == NSOnState end end end require 'hotcocoa' include HotCocoa go_button = button :state = on puts 'yeah!' if go_button.on? HotCocoa Methods
  • 54. You got Chocolate in my Peanut Butter!
  • 55. MacRuby 0.4 (March) Xcode Templates Embed MacRuby HotCocoa coverage / HotCocoa::Graphics Threaded GC Control Ruby Runtime from Obj-C API
  • 56. MacRuby 0.5 YARV LLVM Faster I/O on CFStream Pass RubySpec
  • 58.
  • 59. Mac iPhone Ruby on Rails Product Design/Mgmt. snootymonkey.com sean@snootymonkey.com

Editor's Notes