Hands-On Pharo:
Get ready hacking in one day
http://stephane.ducasse.free.fr
http://www.pharo.org
Getting the Feel

of Pharo

http://stephane.ducasse.free.fr
http://www.pharo.org
Objectives
What is Pharo/Objectives
Get the feel
Model/Syntax
Testing / Saving / Finding information
Coding
Wrap-up
What is it?
Language + Environment
Simple Language
Object-Oriented, Dynamic, Reflective
Explore + Change running systems
Live Programming
Pharo
100% MIT license
Pure object language
Great community of active doers (70
committers in Pharo 40)
Powerful
Elegant and fun to program
Living system under your fingers
Mac, Linux, Android, iOS, Windows
Some projects
Web frameworks - Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth,
WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV.
Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET,
Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo,
Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods.
Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy,
Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time -
Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings,
Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks
(baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit
Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window
manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling
Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D:
Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive
Geometry - DrGeo…
Some projects
Web frameworks - Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth,
WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV.
Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET,
Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo,
Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods.
Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy,
Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time -
Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings,
Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks
(baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit
Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window
manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling
Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D:
Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive
Geometry - DrGeo…
AND MUCH
MORE
Our goals...
A powerful engine
to invent (y)our future
Pharo is a vehicule
Pharo is not at its end, just starting
Pharo is not our dream, it is what we have
But **every** single day we improve it
Enabler
“One of the things that drew me to do the Delay
refactoring, is simply that I could. That is, I was
amazed that I could dig so deep so easily, see a
path to improvement and effect change at a
fundamental level. Excepting complexities with
the Continuous Integration due to “changing the
wheels on the car at 100km/h” (and one slip), it
seems to have gone reasonably smoothly.  That
sense of mastery is seductive.”
Enabler: Turtles all the way
A Bryant developed Seaside in Pharo ancestor
(while he knew ruby, python, scheme, C,
objective-C) because he could manipulate the
stack behind the back of developers. Seaside is
based on stack on-demand reification.
An ecosystem where
innovation/business bloom
We want that **you** can make
money with Pharo. We want to be
able to invent solutions to existing
problems.
!
We want a powerful innovative
dynamic language where we can build
our future.
We are a cool community
Tweets, blogs, buzz
Pharo 3,303 tweets / 1092 followers
S. Ducasse tweets 669 / 804 followers
S. Stinckwich 8712 / 1006 followers
Moose 502 tweets / 255 followers
Youtube Pharo smalltalk: about 1540
videos!
• Uni. of Buenos Aires • Uni. of Bern • Uni. of
Maroua • Uni. of Brussels • Ecole des Mines de
Douai • Uni. de Savoie • Ivan Franko Nat. Uni. of
Lviv • Czech Technical Uni. • CULS Prague

• Uni. of Quilmes • Uni. of La Plata • Northern
Michigan Uni. • Uni. Technologica Nacional
(UTN) • Uni. Catholic of Argentina • Uni. of Chile
• Uni. Policnica de Catalunya • Uni. de Bretagne
Occidentale • Uni. of Tomsk • Uni. of Fernhagen
• IT University of Copenhagen • Uni. Cat del
Sacro Cuore of Brescia
Pharo's Teachers
Lafhis (AR)

Software Composition Group (CH)

CAR (FR)

RMOD (FR)
Ummisco (IRD)
Reveal (CH)
Lysic (FR)

Pleiad (CL)
CEA-List (FR)
Uqbar (AR)
CCMI-FIT(CZ)
Research Groups
www.2denker.de
www.agilitic.com
www.airflowing.com
www.anymorphic.com
www.ardishealth.com
www.beta9.be
www.bombardier.com
www.cmsbox.com
www.finworks.biz
seaside.gemstone.com
www.ibizlog.com
www.inceptive.be
www.jooshr.com
www.majcon.de
www.mindclue.ch
www.miriamtech.com
www.myneat.org
www.netstyle.ch
www.panasoft.com
www.pinesoft.co.uk
www.promedmedical.net
www.sharedlogic.ca
www.smallworks.com.ar
www.10pines.com
www.trantaria.com
www.yesplan.be
www.synectique.eu
www.sorabito.com
objectprofile.com
!
Companies
Books
Pharo by example http://www.pharobyexample.org
translated to french, merci!
translated to spanish, gracias!
translated to japanese, ありがとう!
Deep into Pharo http://www.deepintopharo.org
Numerical Methods
	 https://github.com/SquareBracketAssociates/NumericalMethods/
releases
New books in preparation
Updated Pharo by Example
Entreprise Pharo
Fun with Pharo
Some success stories…
Continuous API Testing
keep your services under control 24/7
Norbert Hartl norbert@2denker.de
www.2denker.de
eMCee is developed and deployed using pharo
- zinc
- seaside
- jquery
- magritte
- mongotalk
- magritte-mongo
- fuel
- metacello
mail@2denker.de
• Entry Level Track & Trace Product
• Complements T3 Full Product
• One Page Javascript HTML5 / Ajax Client
• REST Back End in Pharo Smalltalk
• Gateways to multiple data providers
WEBDRUCK.CH
Web-To-Print Solution
• Design and create
individual printed
matter
• eShop with credit
card payment
• High quality PDF
output with Printing
Process integration
• Thousands of orders
for seven Swiss
printing companies
NTed: disaster scenario
recovery
iBizLog - http://www.ibizlog.com
A product by Smallworks
Tuesday, May 15, 12
Pinesoft MBagger
Pharo
is
yours
Getting the object feel
• Live interaction
• Using Inspectors
• Talk and interact with objects
• Programs are objects too
http://youtu.be/CuimMwuZiGA
Scripting live
https://www.youtube.com/watch?v=1Nze9tnwYxY
http://www.pharocasts.com/2010/08/see-how-to-get-
data-from-url-parse-xml.html
Simplicity and elegance
Simple but complete object model
Syntax fits on a postcard!
Less is more!
No constructors, no static methods, no operators
No type declaration, no primitive types,
No interfaces, no need for factory
No packages/private/protected modifiers
No parametrized types
No boxing/unboxing
Still powerful
Object model
Everything is an object instance of a class
!
Single inheritance
!
Public virtual methods
!
Protected field
The complete syntax
exampleWithNumber: x
“A method that illustrates every part of Smalltalk method syntax”
<menu>
| y |
true & false not & (nil isNil) ifFalse: [self halt].
y := self size + super size.
#($a #a ‘a’ 1 16rFF 2r1010101010101010101 1.0)
do: [ :each | Transcript
show: (each class name);
show: (each printString);
show: ‘ ‘].
^ x < y
…
The complete syntax
exampleWithNumber: x
“A method that illustrates every part of Smalltalk method syntax”
<menu>
| y |
true & false not & (nil isNil) ifFalse: [self halt].
y := self size + super size.
#($a #a ‘a’ 1 1.0)
do: [ :each | Transcript
show: (each class name);
show: (each printString);
show: ‘ ‘].
^ x < y
Fun, simple
Pure & elegant
Productive
Empowering
Addictive
Full access
Creating good energy, 	

software quality,	

learning and having fun	

!
http://pharo.org
Join
Pharo Hands-On: 01 welcome

Pharo Hands-On: 01 welcome

  • 1.
    Hands-On Pharo: Get readyhacking in one day http://stephane.ducasse.free.fr http://www.pharo.org
  • 2.
    Getting the Feel ofPharo http://stephane.ducasse.free.fr http://www.pharo.org
  • 3.
    Objectives What is Pharo/Objectives Getthe feel Model/Syntax Testing / Saving / Finding information Coding Wrap-up
  • 4.
    What is it? Language+ Environment Simple Language Object-Oriented, Dynamic, Reflective Explore + Change running systems Live Programming
  • 5.
    Pharo 100% MIT license Pureobject language Great community of active doers (70 committers in Pharo 40) Powerful Elegant and fun to program Living system under your fingers Mac, Linux, Android, iOS, Windows
  • 6.
    Some projects Web frameworks- Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth, WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV. Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET, Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo, Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods. Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy, Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time - Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings, Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks (baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D: Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive Geometry - DrGeo…
  • 7.
    Some projects Web frameworks- Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth, WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV. Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET, Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo, Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods. Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy, Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time - Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings, Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks (baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D: Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive Geometry - DrGeo… AND MUCH MORE
  • 8.
  • 9.
    A powerful engine toinvent (y)our future
  • 10.
    Pharo is avehicule Pharo is not at its end, just starting Pharo is not our dream, it is what we have But **every** single day we improve it
  • 11.
    Enabler “One of thethings that drew me to do the Delay refactoring, is simply that I could. That is, I was amazed that I could dig so deep so easily, see a path to improvement and effect change at a fundamental level. Excepting complexities with the Continuous Integration due to “changing the wheels on the car at 100km/h” (and one slip), it seems to have gone reasonably smoothly.  That sense of mastery is seductive.”
  • 12.
    Enabler: Turtles allthe way A Bryant developed Seaside in Pharo ancestor (while he knew ruby, python, scheme, C, objective-C) because he could manipulate the stack behind the back of developers. Seaside is based on stack on-demand reification.
  • 13.
  • 14.
    We want that**you** can make money with Pharo. We want to be able to invent solutions to existing problems. ! We want a powerful innovative dynamic language where we can build our future.
  • 15.
    We are acool community
  • 16.
    Tweets, blogs, buzz Pharo3,303 tweets / 1092 followers S. Ducasse tweets 669 / 804 followers S. Stinckwich 8712 / 1006 followers Moose 502 tweets / 255 followers Youtube Pharo smalltalk: about 1540 videos!
  • 17.
    • Uni. ofBuenos Aires • Uni. of Bern • Uni. of Maroua • Uni. of Brussels • Ecole des Mines de Douai • Uni. de Savoie • Ivan Franko Nat. Uni. of Lviv • Czech Technical Uni. • CULS Prague
 • Uni. of Quilmes • Uni. of La Plata • Northern Michigan Uni. • Uni. Technologica Nacional (UTN) • Uni. Catholic of Argentina • Uni. of Chile • Uni. Policnica de Catalunya • Uni. de Bretagne Occidentale • Uni. of Tomsk • Uni. of Fernhagen • IT University of Copenhagen • Uni. Cat del Sacro Cuore of Brescia Pharo's Teachers
  • 19.
    Lafhis (AR)
 Software CompositionGroup (CH)
 CAR (FR)
 RMOD (FR) Ummisco (IRD) Reveal (CH) Lysic (FR)
 Pleiad (CL) CEA-List (FR) Uqbar (AR) CCMI-FIT(CZ) Research Groups
  • 20.
  • 21.
    Books Pharo by examplehttp://www.pharobyexample.org translated to french, merci! translated to spanish, gracias! translated to japanese, ありがとう! Deep into Pharo http://www.deepintopharo.org Numerical Methods https://github.com/SquareBracketAssociates/NumericalMethods/ releases New books in preparation Updated Pharo by Example Entreprise Pharo Fun with Pharo
  • 22.
  • 25.
    Continuous API Testing keepyour services under control 24/7 Norbert Hartl norbert@2denker.de www.2denker.de
  • 26.
    eMCee is developedand deployed using pharo - zinc - seaside - jquery - magritte - mongotalk - magritte-mongo - fuel - metacello mail@2denker.de
  • 28.
    • Entry LevelTrack & Trace Product • Complements T3 Full Product • One Page Javascript HTML5 / Ajax Client • REST Back End in Pharo Smalltalk • Gateways to multiple data providers
  • 29.
    WEBDRUCK.CH Web-To-Print Solution • Designand create individual printed matter • eShop with credit card payment • High quality PDF output with Printing Process integration • Thousands of orders for seven Swiss printing companies
  • 30.
  • 31.
    iBizLog - http://www.ibizlog.com Aproduct by Smallworks Tuesday, May 15, 12
  • 41.
  • 42.
  • 43.
    Getting the objectfeel • Live interaction • Using Inspectors • Talk and interact with objects • Programs are objects too
  • 44.
  • 45.
  • 46.
  • 47.
    Simplicity and elegance Simplebut complete object model Syntax fits on a postcard!
  • 48.
    Less is more! Noconstructors, no static methods, no operators No type declaration, no primitive types, No interfaces, no need for factory No packages/private/protected modifiers No parametrized types No boxing/unboxing Still powerful
  • 49.
    Object model Everything isan object instance of a class ! Single inheritance ! Public virtual methods ! Protected field
  • 50.
    The complete syntax exampleWithNumber:x “A method that illustrates every part of Smalltalk method syntax” <menu> | y | true & false not & (nil isNil) ifFalse: [self halt]. y := self size + super size. #($a #a ‘a’ 1 16rFF 2r1010101010101010101 1.0) do: [ :each | Transcript show: (each class name); show: (each printString); show: ‘ ‘]. ^ x < y
  • 51.
  • 52.
    The complete syntax exampleWithNumber:x “A method that illustrates every part of Smalltalk method syntax” <menu> | y | true & false not & (nil isNil) ifFalse: [self halt]. y := self size + super size. #($a #a ‘a’ 1 1.0) do: [ :each | Transcript show: (each class name); show: (each printString); show: ‘ ‘]. ^ x < y
  • 53.
    Fun, simple Pure &elegant Productive Empowering Addictive Full access
  • 54.
    Creating good energy, software quality, learning and having fun ! http://pharo.org Join