SlideShare une entreprise Scribd logo
1  sur  32
MacRuby
        For fun...
       and profit!


Presented by: Joshua Ballanco
A quick introduction...
• Been using Ruby since 2004
• MacRuby Core Team member
• Worked for Apple 2006 to 2010
• Currently at Patch (AOL)
• https://github.com/jballanc
• @manhattanmetric
Overview
• Using MacRuby as a Cocoa REPL
• Cocoa Development with MacRuby
 •   Getting Started

 •   Building and Running

 •   Hooking Up a UI

 •   Using Gems

 •   Packaging and Shipping
What is MacRuby?

• http://www.macruby.org
• http://www.macruby.org/files/
• http://www.macruby.org/files/nightlies/
• Available from RVM (but not recommended)
• Source at GitHub:
  https://github.com/MacRuby/MacRuby
What is MacRuby?
• Compiling MacRuby:
 •   Need LLVM *2.9* (see the README)

 •   rake ; sudo rake install

• Bugs – https://www.macruby.org/trac/report
• MacRuby-devel mailing list
• @macruby, #macruby
Ruby Syntax
Ruby Syntax




                             Parser
                            MRI’s parse.y




                           Compiler
                      RoxorCompiler <C++>




     VM (sans GVL)
                                            LLVM (with JIT)
RoxorVM & RoxorCore <C++>




                     Objective-C Runtime
MacRuby for Fun!
• REPL – Read Eval Print Loop
MacRuby for Fun!
• REPL – Read Eval Print Loop
• Useful tool for learning, development, and
  debugging
MacRuby for Fun!
• REPL – Read Eval Print Loop
• Useful tool for learning, development, and
  debugging
• LISP, Python, Ruby all benefit from a REPL
• C, C++, Java do not
MacRuby for Fun!
• REPL – Read Eval Print Loop
• Useful tool for learning, development, and
  debugging
• LISP, Python, Ruby all benefit from a REPL
• C, C++, Java do not
• Obj-C ...has MacRuby!
MacRuby for Fun!
MacRuby for Fun!

• Let’s learn CoreData!
MacRuby for Fun!

• Let’s learn CoreData!
• There sure is a lot of documentation on
  http://developer.apple.com about CoreData
Core Data Utility Tutorial
Data Management




        2010-09-19
Contents

Introduction          Introduction to Core Data Utility Tutorial 7

                      Who Should Read This Document 7
                      Organization of This Document 7
                      See Also 8


Chapter 1             Overview of the Tutorial 9

                      Task Goal 9

Chapter 2             Creating the Project 11

                      Create a New Project 11
                         Create the project 11
                         Link the Core Data framework 11
                         Adopt Garbage Collection 12
                      What Happened? 12

Chapter 3             Creating the Managed Object Model 13

                      Specifying the Entity 13
                      Create the Managed Object Model 13
                         Create the Model Instance 13
                         Create the Entity 14
                         Add the Attributes 14
                         Add a Localization Dictionary 15
                      Instantiate a Managed Object Model 16
                      Build and Test 16
                      Complete Listing 16


Chapter 4             The Application Log Directory 19

                      The applicationLogDirectory Function 19
                      Update the main Function 20
                      Build and Test 20


Chapter 5             Creating the Core Data Stack 21

                      Overview 21
                      The managedObjectContext Function 21
                        Create the Context Instance 21
                        Set up the Persistent Store Coordinator and Store 22


                                                                               3
            2010-09-19 | © 2005, 2010 Apple Inc. All Rights Reserved.
CHAPTER 8
     Complete Source Listings




          if ([key isEqualToString:@"processID"]) {
              self.processID = 0;
          }
          else {
              [super setNilValueForKey:key];
          }
     }

     @end




38   The Run Class
     2010-09-19 | © 2005, 2010 Apple Inc. All Rights Reserved.
MacRuby for Fun!

• Let’s learn CoreData!
• There sure is a lot of documentation on
  http://developer.apple.com about CoreData
MacRuby for Fun!

• Let’s learn CoreData!
• There sure is a lot of documentation on
  http://developer.apple.com about CoreData
• Documentation is boring :-(
setup.rb
MacRuby for Fun!

• Let’s learn CoreData!
• There sure is a lot of documentation on
  http://developer.apple.com about CoreData
• Documentation is boring... :-(
MacRuby for Fun!

• Let’s learn CoreData!
• There sure is a lot of documentation on
  http://developer.apple.com about CoreData
• Documentation is boring... :-(
• REPLs are fun! :-)
MacRuby for Profit!
• Things you will need:
 • MacRuby nightly build (or 0.11 when it
    comes out)
 • Xcode 4.2 (v4.1 is definitely broken, v3-
    series may still work)
 • Gumption (and the mailing list address)
MacRuby for Profit!

• Install Xcode FIRST! then MacRuby
• Start Xcode, choose the MacRuby template
• Build and go!
Building and Running
• MacRuby template already contains targets
    needed to compile, build, and run
•   macruby_deploy does all the hard work...
Hooking Up a UI

• MacRuby classes are Objective-C classes
• Define outlets with attr_* methods
• Any MacRuby method with a single
  argument named “sender” can be used as
  an action
Using Gems

• Install with sudo macgem install <gemname>
• Require Gems in rb
• Use Gems for Development
• Vendor Gems with macruby_deploy --gem
  for Distribution
Packaging and Shipping
• App bundles generated by macruby_deploy
  are relocatable to machines without
  MacRuby (or even with incompatible
  versions of MacRuby)
• Bundles can be signed for App store
  distribution with the codesign CLI tool
• Excellent blog post at: http://astonj.com/
  tech/how-to-submit-your-macruby-app-to-
  the-mac-app-store/
Bonus!
MacRuby...
...and you didn’t even know it!!!
• CocoaPods!
• https://github.com/CocoaPods/CocoaPods
• Like Gems for iOS (and OS X... and
  MacRuby)
• Uses MacRuby under the covers
• Complemented by Laurent Sansonetti!
Thank you!


 *Flame transition quota fulfilled
Questions?


 *Flame transition quota fulfilled

Contenu connexe

Tendances

Enabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition LanguageEnabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition Languageelliando dias
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play FrameworkWarren Zhou
 
Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014Chen-en Lu
 
Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!🎤 Hanno Embregts 🎸
 
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...chbornet
 
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...All Things Open
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Ryan Cuprak
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Shaer Hassan
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action Alex Movila
 
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...Toshiaki Maki
 
Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityClaus Ibsen
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xGeertjan Wielenga
 

Tendances (20)

Enabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition LanguageEnabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition Language
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 
Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014
 
Maven
MavenMaven
Maven
 
Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!
 
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
 
Maven
MavenMaven
Maven
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
 
Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivity
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.x
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
 

En vedette

MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?Joshua Ballanco
 
RubyMotion: Under the Hood
RubyMotion: Under the HoodRubyMotion: Under the Hood
RubyMotion: Under the HoodJoshua Ballanco
 
5分でできる U S T配信(保存用)
5分でできる U S T配信(保存用)5分でできる U S T配信(保存用)
5分でできる U S T配信(保存用)Hiroaki Kobayashi
 

En vedette (9)

A Tale of Two Rubies
A Tale of Two RubiesA Tale of Two Rubies
A Tale of Two Rubies
 
There and Back Again
There and Back AgainThere and Back Again
There and Back Again
 
MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?
 
RubyMotion: Under the Hood
RubyMotion: Under the HoodRubyMotion: Under the Hood
RubyMotion: Under the Hood
 
Getting Your Ruby EGOT
Getting Your Ruby EGOTGetting Your Ruby EGOT
Getting Your Ruby EGOT
 
Debugging RubyMotion
Debugging RubyMotionDebugging RubyMotion
Debugging RubyMotion
 
Keeping ruby reasonable
Keeping ruby reasonableKeeping ruby reasonable
Keeping ruby reasonable
 
5分でできる U S T配信(保存用)
5分でできる U S T配信(保存用)5分でできる U S T配信(保存用)
5分でできる U S T配信(保存用)
 
Ruby memory model
Ruby memory modelRuby memory model
Ruby memory model
 

Similaire à MacRuby for Fun and Profit

Launchpad: Lessons Learnt
Launchpad: Lessons LearntLaunchpad: Lessons Learnt
Launchpad: Lessons LearntTim Penhey
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO Community
 
NA Developer Day - Taking your COBOL apps to Net & JVM
NA Developer Day - Taking your COBOL apps to Net & JVM NA Developer Day - Taking your COBOL apps to Net & JVM
NA Developer Day - Taking your COBOL apps to Net & JVM Micro Focus
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allMarc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
 
2.3 (Architecture) Moving to Managed Code
2.3   (Architecture) Moving to Managed Code2.3   (Architecture) Moving to Managed Code
2.3 (Architecture) Moving to Managed CodeMicro Focus
 
Fundamentals of java --- version 2
Fundamentals of java --- version 2Fundamentals of java --- version 2
Fundamentals of java --- version 2Uday Sharma
 
JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?Charlie Gracie
 
#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?Charlie Gracie
 
Mobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobileFest2018
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Railselliando dias
 
04 integrate entityframework
04 integrate entityframework04 integrate entityframework
04 integrate entityframeworkErhwen Kuo
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...techblog
 
CNCF Live Webinar: Low Footprint Java Containers with GraalVM
CNCF Live Webinar: Low Footprint Java Containers with GraalVMCNCF Live Webinar: Low Footprint Java Containers with GraalVM
CNCF Live Webinar: Low Footprint Java Containers with GraalVMLibbySchulze
 
Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?Dev_Events
 
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plans
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plansOpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plans
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plansMichael Vorburger
 

Similaire à MacRuby for Fun and Profit (20)

Launchpad: Lessons Learnt
Launchpad: Lessons LearntLaunchpad: Lessons Learnt
Launchpad: Lessons Learnt
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
 
NA Developer Day - Taking your COBOL apps to Net & JVM
NA Developer Day - Taking your COBOL apps to Net & JVM NA Developer Day - Taking your COBOL apps to Net & JVM
NA Developer Day - Taking your COBOL apps to Net & JVM
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
2.3 (Architecture) Moving to Managed Code
2.3   (Architecture) Moving to Managed Code2.3   (Architecture) Moving to Managed Code
2.3 (Architecture) Moving to Managed Code
 
Fundamentals of java --- version 2
Fundamentals of java --- version 2Fundamentals of java --- version 2
Fundamentals of java --- version 2
 
JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?
 
#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?
 
Hack Rio/OS
Hack Rio/OSHack Rio/OS
Hack Rio/OS
 
Mobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great again
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Rails
 
04 integrate entityframework
04 integrate entityframework04 integrate entityframework
04 integrate entityframework
 
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performanceJs tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...
 
CNCF Live Webinar: Low Footprint Java Containers with GraalVM
CNCF Live Webinar: Low Footprint Java Containers with GraalVMCNCF Live Webinar: Low Footprint Java Containers with GraalVM
CNCF Live Webinar: Low Footprint Java Containers with GraalVM
 
Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?
 
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plans
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plansOpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plans
OpenDaylight Developers Experience 1.5: Eclipse Setup, HOT reload, future plans
 

Dernier

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Dernier (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

MacRuby for Fun and Profit

  • 1. MacRuby For fun... and profit! Presented by: Joshua Ballanco
  • 2. A quick introduction... • Been using Ruby since 2004 • MacRuby Core Team member • Worked for Apple 2006 to 2010 • Currently at Patch (AOL) • https://github.com/jballanc • @manhattanmetric
  • 3. Overview • Using MacRuby as a Cocoa REPL • Cocoa Development with MacRuby • Getting Started • Building and Running • Hooking Up a UI • Using Gems • Packaging and Shipping
  • 4. What is MacRuby? • http://www.macruby.org • http://www.macruby.org/files/ • http://www.macruby.org/files/nightlies/ • Available from RVM (but not recommended) • Source at GitHub: https://github.com/MacRuby/MacRuby
  • 5. What is MacRuby? • Compiling MacRuby: • Need LLVM *2.9* (see the README) • rake ; sudo rake install • Bugs – https://www.macruby.org/trac/report • MacRuby-devel mailing list • @macruby, #macruby
  • 7. Ruby Syntax Parser MRI’s parse.y Compiler RoxorCompiler <C++> VM (sans GVL) LLVM (with JIT) RoxorVM & RoxorCore <C++> Objective-C Runtime
  • 8. MacRuby for Fun! • REPL – Read Eval Print Loop
  • 9. MacRuby for Fun! • REPL – Read Eval Print Loop • Useful tool for learning, development, and debugging
  • 10. MacRuby for Fun! • REPL – Read Eval Print Loop • Useful tool for learning, development, and debugging • LISP, Python, Ruby all benefit from a REPL • C, C++, Java do not
  • 11. MacRuby for Fun! • REPL – Read Eval Print Loop • Useful tool for learning, development, and debugging • LISP, Python, Ruby all benefit from a REPL • C, C++, Java do not • Obj-C ...has MacRuby!
  • 13. MacRuby for Fun! • Let’s learn CoreData!
  • 14. MacRuby for Fun! • Let’s learn CoreData! • There sure is a lot of documentation on http://developer.apple.com about CoreData
  • 15. Core Data Utility Tutorial Data Management 2010-09-19
  • 16. Contents Introduction Introduction to Core Data Utility Tutorial 7 Who Should Read This Document 7 Organization of This Document 7 See Also 8 Chapter 1 Overview of the Tutorial 9 Task Goal 9 Chapter 2 Creating the Project 11 Create a New Project 11 Create the project 11 Link the Core Data framework 11 Adopt Garbage Collection 12 What Happened? 12 Chapter 3 Creating the Managed Object Model 13 Specifying the Entity 13 Create the Managed Object Model 13 Create the Model Instance 13 Create the Entity 14 Add the Attributes 14 Add a Localization Dictionary 15 Instantiate a Managed Object Model 16 Build and Test 16 Complete Listing 16 Chapter 4 The Application Log Directory 19 The applicationLogDirectory Function 19 Update the main Function 20 Build and Test 20 Chapter 5 Creating the Core Data Stack 21 Overview 21 The managedObjectContext Function 21 Create the Context Instance 21 Set up the Persistent Store Coordinator and Store 22 3 2010-09-19 | © 2005, 2010 Apple Inc. All Rights Reserved.
  • 17. CHAPTER 8 Complete Source Listings if ([key isEqualToString:@"processID"]) { self.processID = 0; } else { [super setNilValueForKey:key]; } } @end 38 The Run Class 2010-09-19 | © 2005, 2010 Apple Inc. All Rights Reserved.
  • 18. MacRuby for Fun! • Let’s learn CoreData! • There sure is a lot of documentation on http://developer.apple.com about CoreData
  • 19. MacRuby for Fun! • Let’s learn CoreData! • There sure is a lot of documentation on http://developer.apple.com about CoreData • Documentation is boring :-(
  • 21. MacRuby for Fun! • Let’s learn CoreData! • There sure is a lot of documentation on http://developer.apple.com about CoreData • Documentation is boring... :-(
  • 22. MacRuby for Fun! • Let’s learn CoreData! • There sure is a lot of documentation on http://developer.apple.com about CoreData • Documentation is boring... :-( • REPLs are fun! :-)
  • 23. MacRuby for Profit! • Things you will need: • MacRuby nightly build (or 0.11 when it comes out) • Xcode 4.2 (v4.1 is definitely broken, v3- series may still work) • Gumption (and the mailing list address)
  • 24. MacRuby for Profit! • Install Xcode FIRST! then MacRuby • Start Xcode, choose the MacRuby template • Build and go!
  • 25. Building and Running • MacRuby template already contains targets needed to compile, build, and run • macruby_deploy does all the hard work...
  • 26. Hooking Up a UI • MacRuby classes are Objective-C classes • Define outlets with attr_* methods • Any MacRuby method with a single argument named “sender” can be used as an action
  • 27. Using Gems • Install with sudo macgem install <gemname> • Require Gems in rb • Use Gems for Development • Vendor Gems with macruby_deploy --gem for Distribution
  • 28. Packaging and Shipping • App bundles generated by macruby_deploy are relocatable to machines without MacRuby (or even with incompatible versions of MacRuby) • Bundles can be signed for App store distribution with the codesign CLI tool • Excellent blog post at: http://astonj.com/ tech/how-to-submit-your-macruby-app-to- the-mac-app-store/
  • 30. MacRuby... ...and you didn’t even know it!!! • CocoaPods! • https://github.com/CocoaPods/CocoaPods • Like Gems for iOS (and OS X... and MacRuby) • Uses MacRuby under the covers • Complemented by Laurent Sansonetti!
  • 31. Thank you! *Flame transition quota fulfilled
  • 32. Questions? *Flame transition quota fulfilled

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n