SlideShare a Scribd company logo
1 of 110
Download to read offline
Pharo:
A malleable and powerful
platform
Damien Cassou and Camille Teruel
http://www.pharo.org
What is it?
Programming language + IDE
Object-Oriented, Dynamic, Reflective
Explore + Change running systems
The Ultimate Live Programming
Environment!
Pharo
MIT license
Great community of active doers
Powerful
Elegant and fun to program
Living system under your fingers
Mac, Linux, Android, iOS, Windows
2nd most downloaded on Inria gforge
40-50 active commiters
> 600 mailing-list members
180 license agreements
50 association members
17 industrial consortium members
around 300 external projects
Pharo in numbers
Very High
Activity
Create an ecosystem
where business/innovation
can bloom
We want that you can make research
and money with Pharo.
We want a powerful innovative
dynamic language where we can build
our future.
A Little Journey in the Pharo
Object Model
A pure and minimal object model
Less is more!
No constructors, no static methods, no operators
No interfaces, no private/protected modifiers
No type declarations, no parametrized types
No primitive types, no boxing/unboxing
Still powerful
Everything is an object
213 class
SmallInteger
Objects are instances of
Classes
class is a message sent
to the object 213
SmallInteger is the
result of the message sent
In “Java”:
213.getClass()
Objects are instances of
Classes
Integer
SmallInteger
213
instance of
inherits
from
Sending a message
Integer
SmallInteger
213
factorial
instance of
inherits
from
Classes are objects too
213 class selectors
#(#instVarAt: #sizeInMemory
#printOn:base:length:padded: #< #bitXor: #''
#numberOfDigitsInBase: #'//' #threeDigitName
#highBitOfPositiveReceiver #bitAnd: #isLarge
#largeIdentityHash #'>=' #nextObject #nextInstance
#gcd: #printStringBase: #lowBit #pointsTo:
#basicIdentityHash #fromString:radix: ...)
Classes are objects too
Number allSubclasses
an OrderedCollection(Fraction Float Integer
ScaledDecimal SmallInteger LargePositiveInteger
LargeNegativeInteger)
Fun with Numbers!
1 class
SmallInteger
1 class
SmallInteger
1 class maxVal
1073741823
1 class
SmallInteger
1 class maxVal
1073741823
1 class maxVal + 1
1073741824
1 class
SmallInteger
1 class maxVal
1073741823
1 class maxVal + 1
1073741824
(1 class maxVal + 1) class
LargePositiveInteger
(1/3) + (2/3)
1
(1/3) + (2/3)
1
2/3 + 1
5/3
(1/3) + (2/3)
1
2/3 + 1
5/3
1000 factorial
4023872600770937735437024339230039857193748642107146325437999104299385123986290205920442084869694048004799886101971960586316668729948085589013238296699445
9099742450408707375991882362772718873251977950595099527612087497546249704360141827809464649629105639388743788648733711918104582578364784997701247663288983
5955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593
2019280908782973084313928444032812315586110369768013573042161687476096758713483120254785893207671691324484262361314125087802080002616831510273418279777047
8463586817016436502415369139828126481021309276124489635992870511496497541990934222156683257208082133318611681155361583654698404670897560290095053761647584
7728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103
9681759215109077880193931781141945452572238655414610628921879602238389714760885062768629671466746975629112340824392081601537808898939645182632436716167621
7916890977991190375403127462228998800519544441428201218736174599264295658174662830295557029902432415318161721046583203678690611726015878352075151628422554
0265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860
7883861502794659551311565520360939881806121385586003014356945272242063446317974605946825731037900840244324384656572450144028218852524709351906209290231364
9327349756551395872055965422874977401141334696271542284586237738753823048386568897646192738381490014076731044664025989949022222176590433990188601856652648
5061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970
1374285319266498753372189406942814341185201580141233448280150513996942901534830776445690990731524332782882698646027898643211390835062170950025973898635542
7719674282224875758676575234422020757363056949882508796892816275384886339690995982628095612145099487170124451646126037902930912088908694202851064018215439
9457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970
0277534720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Point class
Point class
Classes are objects too
Point class
Point class
Classes are objects too
“Point class” is an anonymous class
with only one instance: Point.
We call such classes “metaclasses”
Integer
SmallInteger
Class Parallel Inheritance
213
instance of
Integer
SmallInteger
Integer class
SmallInteger class
Class Parallel Inheritance
213
instance of
instance of
instance
of
Integer
SmallInteger
Integer class
SmallInteger class
A “static” method
is just a method of
the metaclass
Integer readFrom: '123'
123
Class Parallel Inheritance
factorial
class
class
readFrom:
Class extensions
A method can be defined in a class that
belongs to another package!
Powerful to build DSLs
$x ctrl , $f ctrl
Ctrl + X , Ctrl + F
ctrl method in
Character class
Summary
Everything is an object
One single model
Classes are objects too
A class is instance of another class
One unique method lookup, look in the
class of the receiver
Pharo: Syntax in a
Nutshell
asm
push: asm RBP;
mov: asm RSP -> asm RBP;
mov: 1024 -> asm RAX;
mov: asm RBP -> asm RSP;
pop: asm RBP;
ret.
identifier := #letter asParser ,
#word asParser star
Assembly
Parsers
Syntax Examples
Syntax on a PostCard
exampleWithNumber: x
|y|
true & false not & (nil isNil)
ifFalse: [ self halt ].
y := self size + super size.
{ 1 . 2 . #($a #a ‘a’ 1 1.0) }
do: [ :each |
Transcript
show: (each class name);
show: (each printString);
show: ‘ ‘ ].
^ x < y
Language Constructs
^	 return
“ 
 comments
#	 symbol or array
‘
 string
[]	 block
.	 separator
; cascade
|	 local or block variable
:=	 assignment
$	 character
<...>	 annotation
Examples
comment:
 “a comment”
character:	 $c $.
string:	 	 'a nice string' 'lulu' 'l''idiot'
symbol:		 #mac #+
array:	 	 { 1 . 123 + 1 }
literal array:	 #(1 2 3 (1 3) $a 4)
byte array:	 #[1 2 3]
block:	 	 [ :x | x * 2 ]
integer:		 1 2r101
real:	 	 1.5 6.03e-34 4 2.4e7
keywords:	 true false nil self super thisContext
Not Syntax
& 	 	 conjunction (and)
|	 	 disjunction (or)
+	 	 addition
<	 	 lower than
ifTrue:	 condition
do:	 	 iteration
...
all of these are
plain methods!
Not Syntax
& 	 	 conjunction (and)
|	 	 disjunction (or)
+	 	 addition
<	 	 lower than
ifTrue:	 condition
do:	 	 iteration
...
Boolean>>
Boolean>>
Number>>
Magnitude>>
Boolean>>
Collection>>
their
classes
3 = 2
ifTrue: [
Error signal: 'Help' ]
3 kinds of messages
Unary messages
Binary messages
Keywords messages
5 factorial
Transcript cr
3 + 4
2 between: 0 and: 5
Transcript show: 'hello world'
postman.send( mail, recipient);
Keyword messages
postman.send( mail, recipient);
Keyword messages
postman send mail recipient
Keyword messages
postman send mail to recipient
Keyword messages
postman send: mail to: recipient
Keyword messages
postman send: mail to: recipient
Keyword messages
send:to: method in the
Postman class
receiver argument 1 argument 2
message send
strings := OrderedCollection new
ArrayList<String> strings = new
ArrayList<String>();
Some Comparisons
persons collect: [:person | person name]
ArrayList<String> strings
= new ArrayList<String>();
for(Person person: persons) {
strings.add(person.name());
}
Some Comparisons
persons collect: #name
ArrayList<String> strings
= new ArrayList<String>();
for(Person person: persons) {
strings.add(person.name());
}
Some Comparisons
[ self doSomething ] fork
new Thread(
new Runnable() {
public void run() {
this.doSomething();}}).start();
Some Comparisons
(10 between: 1 and: 20 + 2) not
false
( ) > Unary > Binary > Keywords
A method definition in Point
Method name
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Argument
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Comment
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Return
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Instance variable
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Binary message
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Keyword message
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
A method definition in Point
Block
<= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
(2@3) <= (5@6)
true
Point>> <= aPoint
"Answer whether the receiver is neither
below nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
in books and slides, we
specify the class name
Class name
Statements and Cascades
Temporary variables Statement
Cascade
| p pen |
p := 100@100.
pen := Pen new.
pen
up;
goto: p;
down;
goto: p+p
Anonymous method
Passed as method argument or stored
f := [:x | x * x + 3].
f value: 2
7
Blocks (aka Closure)
BlockClosure>>value:
Block usage
Integer>> factorial
self = 0
ifTrue: [ ^ 1 ].
self > 0
ifTrue: [ ^ self * (self - 1) factorial ]
#(1 2 3) do: [ :each | each crLog ]
Control Structures
Every control structure is realized by message sends
[ stream atEnd ]
whileFalse: [ self process: stream next ].
Magnitude>> max: aMagniture
^ self > aMagnitude
ifTrue: [ self ]
ifFalse: [ aMagnitude ]
Iterating Collections
#(2 3 4 -35 4)
collect: [ :each| each abs ]
#(2 3 4 35 4)
Iterating Collections
#(2 3 4 -35 4)
select: [ :each| each odd ]
#(-3 -35)
Iterating Collections
#(2 3 4 -35 4)
do: [ :each| Transcript crShow: each ]
2
3
...
Pharo, a live programming
environment
Demo
Modifying classes and methods while
the program is running
Nice libraries and
frameworks
'http://picasaweb.google.com/data/feed/
api/all?q=puppy' asUrl retrieveContents
Gofer new
smalltalkhubUser: 'PharoExtras'
project: 'XMLParser';
loadStable.
data := 'http://picasaweb.google.com/data/
feed/api/all?q=puppy' asUrl retrieveContents.
doc := XMLDOMParser parse: data
data := 'http://picasaweb.google.com/data/
feed/api/all?q=puppy' asUrl retrieveContents.
doc := XMLDOMParser parse: data.
entries := doc
allNodesSelect: [ :n | n name = 'entry' ].
entry := entries anyOne.
content := entry
nodesDetect: [ :n | n name = 'content'].
url := content attributeAt: 'src'.
'http://lh3.ggpht.com/[...]/puppy-and-kitten.jpg'
data := 'http://picasaweb.google.com/data/
feed/api/all?q=puppy' asUrl retrieveContents.
doc := XMLDOMParser parse: data.
path := XPath for: 'entry/content/@src'.
urls := path in: doc.
url := urls anyOne.
'http://lh3.ggpht.com/[...]/puppy-and-kitten.jpg'
(ZnEasy getGif: url) asMorph openInHand
Your turn
Black magic
Execution Stack as an Object
To define exceptions from within the language
Debugger support!
Advanced debugging
Continuation
thisContext
returns an object that represents the
method invocation
can walk (even modify!) the stack
Serializing Continuations
[ "some code causing an error" ]
on: Error
do: [ :error |
FLSerializer
serialize: error
toFileNamed: 'error.fuel' ]
Then in a new image open a debugger on the serialized error:
FLMaterializer
materializeFromFileNamed: 'error.fuel';
debug.
Powerful Breakpoints?
Would be so good if we could say:
“Stop method bar only if it is called from
method named foo” i.e.,
bar
...
Halt whenCalledFrom: #foo.
...
Halt>> whenCalledFrom: aSelector
| ctxt |
ctxt := thisContext.
[ ctxt sender isNil ]
whileFalse: [
ctxt := ctxt sender.
ctxt selector = aSelector
ifTrue: [ self signal ] ]
Pointer Swapping
anObject become: anotherObject
| pt1 pt2 ref |
pt1 := 0@0.
pt2 := 100@100.
ref := pt1.
pt1 become: pt2.
self assert: ref = (100@100).
self assert: pt2 = (0@0).
self assert: pt1 = (100@100).
Pointer Swapping
Some Pharo’s success
stories
Continuous API Testing
keep your services under control 24/7
Norbert Hartl norbert@2denker.de
www.2denker.de
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
We want more success
stories!
We are a cool community
www.10pines.com
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.objectfusion.fr
www.panasoft.com
www.pinesoft.co.uk
www.promedmedical.net
www.sharedlogic.ca
www.smallworks.com.ar
www.trantaria.com
www.square-i.net
yesplan.be
Companies
University of Bueno Aires
University of Bern scg.unibe.ch
University of Brussels soft.vub.ac.be/soft/
Ecole des Mines www.ensm-douai.fr
Université de Savoie www.imus.univ-savoie.fr
Ivan Franko National University of Ukraine
Czech Technical University
University of Life Sciences in Prague
Northen Michigan University www.nmu.edu
University Catholic of Argentina www.uca.edu.ar
University of Santiago www.uchile.cl
Universitat Policnica de Catalunya www.upc.edu
Lectures
Lafhis (University of Bueno Aires )
Software Composition Group (scg.unibe.ch)
CAR (Ecole des mines www.ensm-douai.fr)
RMoD (Inria)
Ummisco (IRD)
Reveal (University of Lugano)
Lysic (University of Bretagne Occidentale)
Pleiad (University of Santiago)
CEA-List
Research Groups
Community Ongoing Work
Better widgets, UI Builder (A. Plantec, G. Chambers, B. van Ryseghem)
Better browsers (B. van Ryseghem, C. Bruni)
Proxy (M. Martinez-Peck)
New compiler (J. Ressia/M. Denker/C. Bera/)
Vectorial canvas (I. Stasenko)
Better FFI (I. Stasenko, E. Lorenzano)
Bootstrap (G. Polito/S. Ducasse/N. Bouraqadi/L. Fabresse)
PDF generation (O. Auverlot, G. Larcheveque)
Network (WebSocket, Oauth, Zinc, Zodiac S. van Caekenberghe)
Consortium & Association
How to sustain Pharo?
How to structure the community?
Consortium Members
Managed by Inria for now
Who: companies, institutions, user groups
Privileged access to the core development team
Influence priorities of the next development
Engineering support time
Job posts
Training/Conferences special prices
Pharo User Association
Managed by the Pharo Association
Individuals
Premium (99 €/year)
Normal (40 €/year)
Join and participate!
Pharo books
Pharo by example
translated to french, merci!
translated to spanish, gracias!
translated to japanese, ありがとう!
german started
http://pharobyexample.org
New books are coming
Deep into Pharo
Pharo for the Enterprise
A glimpse at VM
Everybody can help
Reporting bugs
Confirming bugs
Writing tests
Writing examples
Writing comments
Simple contributing fixes
Discussion, feedback
May 2008 Bern
July 2009 Bern
October 2009 Lille
November 2009 Buenos Aires
March 2010 Bern
May 2010 Buenos Aires
June 2010 Bern
June 2010 Bruxelles
July 2010 London
September 2010 Barcelona
September 2010 Lille
January 2011 Lille
July 2011 Lille
October 2011 Bruxelles
February 2012 Bern
October 2012 Bern
April 2012 Lille
August 2012 Ghent
October 2012 Perto Madryn
January 2013 Santiago
February 2013 Lille
April 2013 Lille
June 2013 Lille
Open Pharo Sprints
To Take Away
Because it is simple and extensible, Pharo is a nice
platform to experiment on
Use it for your own research (language design or
implementation, types, modularity, empirical studies…)
http://www.pharo.org

More Related Content

What's hot

Chapter 8 - Exceptions and Assertions Edit summary
Chapter 8 - Exceptions and Assertions  Edit summaryChapter 8 - Exceptions and Assertions  Edit summary
Chapter 8 - Exceptions and Assertions Edit summaryEduardo Bergavera
 
Introduction to Boost regex
Introduction to Boost regexIntroduction to Boost regex
Introduction to Boost regexYongqiang Li
 
Java Foundations: Methods
Java Foundations: MethodsJava Foundations: Methods
Java Foundations: MethodsSvetlin Nakov
 
SPF Getting Started - Console Program
SPF Getting Started - Console ProgramSPF Getting Started - Console Program
SPF Getting Started - Console ProgramHock Leng PUAH
 
Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameAntony Stubbs
 
Declarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemTDeclarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemTdiannepatricia
 
C interview-questions-techpreparation
C interview-questions-techpreparationC interview-questions-techpreparation
C interview-questions-techpreparationKushaal Singla
 
Object Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIObject Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIAjit Nayak
 
Object Oriented Programming Short Notes for Preperation of Exams
Object Oriented Programming Short Notes for Preperation of ExamsObject Oriented Programming Short Notes for Preperation of Exams
Object Oriented Programming Short Notes for Preperation of ExamsMuhammadTalha436
 
Programming in Python
Programming in Python Programming in Python
Programming in Python Tiji Thomas
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NETJaya Kumari
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 Mahmoud Samir Fayed
 
Chapter 9 - Characters and Strings
Chapter 9 - Characters and StringsChapter 9 - Characters and Strings
Chapter 9 - Characters and StringsEduardo Bergavera
 

What's hot (17)

Chapter 8 - Exceptions and Assertions Edit summary
Chapter 8 - Exceptions and Assertions  Edit summaryChapter 8 - Exceptions and Assertions  Edit summary
Chapter 8 - Exceptions and Assertions Edit summary
 
Java Generics
Java GenericsJava Generics
Java Generics
 
Introduction to Boost regex
Introduction to Boost regexIntroduction to Boost regex
Introduction to Boost regex
 
Java Foundations: Methods
Java Foundations: MethodsJava Foundations: Methods
Java Foundations: Methods
 
SPF Getting Started - Console Program
SPF Getting Started - Console ProgramSPF Getting Started - Console Program
SPF Getting Started - Console Program
 
Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love Game
 
Declarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemTDeclarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemT
 
C interview-questions-techpreparation
C interview-questions-techpreparationC interview-questions-techpreparation
C interview-questions-techpreparation
 
Notes on c++
Notes on c++Notes on c++
Notes on c++
 
Object Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIObject Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part III
 
Object-Oriented Programming Using C++
Object-Oriented Programming Using C++Object-Oriented Programming Using C++
Object-Oriented Programming Using C++
 
Object Oriented Programming Short Notes for Preperation of Exams
Object Oriented Programming Short Notes for Preperation of ExamsObject Oriented Programming Short Notes for Preperation of Exams
Object Oriented Programming Short Notes for Preperation of Exams
 
Programming in Python
Programming in Python Programming in Python
Programming in Python
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NET
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180
 
Chapter 9 - Characters and Strings
Chapter 9 - Characters and StringsChapter 9 - Characters and Strings
Chapter 9 - Characters and Strings
 
Text processing by Rj
Text processing by RjText processing by Rj
Text processing by Rj
 

Viewers also liked

The Pharo Programming Language
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Languagebergel
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your FingertipsMarcus Denker
 
Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakMarcus Denker
 
Squeak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSeanDeNigris
 
2008 Sccc Smalltalk
2008 Sccc Smalltalk2008 Sccc Smalltalk
2008 Sccc Smalltalkbergel
 
Pharo Roadmap
Pharo RoadmapPharo Roadmap
Pharo RoadmapESUG
 
You Can’t Do That With Smalltalk!
You Can’t Do That With Smalltalk!You Can’t Do That With Smalltalk!
You Can’t Do That With Smalltalk!ESUG
 
Pharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo
 
Haskell vs. F# vs. Scala
Haskell vs. F# vs. ScalaHaskell vs. F# vs. Scala
Haskell vs. F# vs. Scalapt114
 

Viewers also liked (12)

The Pharo Programming Language
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Language
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your Fingertips
 
Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntax
 
Pharo devnology20150401
Pharo devnology20150401Pharo devnology20150401
Pharo devnology20150401
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond Smalltak
 
Squeak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC Smalltalk
 
2008 Sccc Smalltalk
2008 Sccc Smalltalk2008 Sccc Smalltalk
2008 Sccc Smalltalk
 
Pharo Roadmap
Pharo RoadmapPharo Roadmap
Pharo Roadmap
 
You Can’t Do That With Smalltalk!
You Can’t Do That With Smalltalk!You Can’t Do That With Smalltalk!
You Can’t Do That With Smalltalk!
 
Pharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo Hands-on: 05 object model
Pharo Hands-on: 05 object model
 
Haskell vs. F# vs. Scala
Haskell vs. F# vs. ScalaHaskell vs. F# vs. Scala
Haskell vs. F# vs. Scala
 
Stoop 432-singleton
Stoop 432-singletonStoop 432-singleton
Stoop 432-singleton
 

Similar to Pharo tutorial at ECOOP 2013

Pharo: Syntax in a Nutshell
Pharo: Syntax in a NutshellPharo: Syntax in a Nutshell
Pharo: Syntax in a NutshellMarcus Denker
 
Pharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source SmalltalkPharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source SmalltalkSerge Stinckwich
 
2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcutPharo
 
Question 1 1 pts Skip to question text.As part of a bank account.docx
Question 1 1 pts Skip to question text.As part of a bank account.docxQuestion 1 1 pts Skip to question text.As part of a bank account.docx
Question 1 1 pts Skip to question text.As part of a bank account.docxamrit47
 
1_Python Basics.pdf
1_Python Basics.pdf1_Python Basics.pdf
1_Python Basics.pdfMaheshGour5
 
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdfBasic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdfComputer Programmer
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsJagat Kothari
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysDevaKumari Vijay
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityGeorgePeterBanyard
 
Lecture-2-Python-Basic-Elements-Sep04-2018.pptx
Lecture-2-Python-Basic-Elements-Sep04-2018.pptxLecture-2-Python-Basic-Elements-Sep04-2018.pptx
Lecture-2-Python-Basic-Elements-Sep04-2018.pptxAbdulQadeerBilal
 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against YouC4Media
 
Lec2_cont.pptx galgotias University questions
Lec2_cont.pptx galgotias University questionsLec2_cont.pptx galgotias University questions
Lec2_cont.pptx galgotias University questionsYashJain47002
 
Functional programming with F#
Functional programming with F#Functional programming with F#
Functional programming with F#Remik Koczapski
 
PythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdfPythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdfdata2businessinsight
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesCoen De Roover
 
Functional Operations - Susan Potter
Functional Operations - Susan PotterFunctional Operations - Susan Potter
Functional Operations - Susan Potterdistributed matters
 

Similar to Pharo tutorial at ECOOP 2013 (20)

Pharo: Syntax in a Nutshell
Pharo: Syntax in a NutshellPharo: Syntax in a Nutshell
Pharo: Syntax in a Nutshell
 
Pharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source SmalltalkPharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source Smalltalk
 
2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut
 
Introduction to Python
Introduction to Python  Introduction to Python
Introduction to Python
 
Question 1 1 pts Skip to question text.As part of a bank account.docx
Question 1 1 pts Skip to question text.As part of a bank account.docxQuestion 1 1 pts Skip to question text.As part of a bank account.docx
Question 1 1 pts Skip to question text.As part of a bank account.docx
 
1_Python Basics.pdf
1_Python Basics.pdf1_Python Basics.pdf
1_Python Basics.pdf
 
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdfBasic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your Fingertips
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample Questions
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing Insanity
 
Lecture-2-Python-Basic-Elements-Sep04-2018.pptx
Lecture-2-Python-Basic-Elements-Sep04-2018.pptxLecture-2-Python-Basic-Elements-Sep04-2018.pptx
Lecture-2-Python-Basic-Elements-Sep04-2018.pptx
 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against You
 
Lec2_cont.pptx galgotias University questions
Lec2_cont.pptx galgotias University questionsLec2_cont.pptx galgotias University questions
Lec2_cont.pptx galgotias University questions
 
Functional programming with F#
Functional programming with F#Functional programming with F#
Functional programming with F#
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
 
Code Metrics
Code MetricsCode Metrics
Code Metrics
 
PythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdfPythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdf
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templates
 
Functional Operations - Susan Potter
Functional Operations - Susan PotterFunctional Operations - Susan Potter
Functional Operations - Susan Potter
 

More from Pharo

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years laterPharo
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a previewPharo
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in PharoPharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Pharo
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with SpecPharo
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPharo
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPIPharo
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlPharo
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksPharo
 
XmppTalk
XmppTalkXmppTalk
XmppTalkPharo
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchainPharo
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and PharoPharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017Pharo
 
Pharo 6
Pharo 6Pharo 6
Pharo 6Pharo
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoPharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bitsPharo
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the RefactoringsPharo
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM PerformancePharo
 
Git with Style
Git with StyleGit with Style
Git with StylePharo
 

More from Pharo (20)

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a preview
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in Pharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alpha
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowl
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
 
XmppTalk
XmppTalkXmppTalk
XmppTalk
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchain
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017
 
Pharo 6
Pharo 6Pharo 6
Pharo 6
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with Pharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bits
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the Refactorings
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM Performance
 
Git with Style
Git with StyleGit with Style
Git with Style
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Pharo tutorial at ECOOP 2013

  • 1. Pharo: A malleable and powerful platform Damien Cassou and Camille Teruel http://www.pharo.org
  • 2. What is it? Programming language + IDE Object-Oriented, Dynamic, Reflective Explore + Change running systems The Ultimate Live Programming Environment!
  • 3. Pharo MIT license Great community of active doers Powerful Elegant and fun to program Living system under your fingers Mac, Linux, Android, iOS, Windows
  • 4. 2nd most downloaded on Inria gforge 40-50 active commiters > 600 mailing-list members 180 license agreements 50 association members 17 industrial consortium members around 300 external projects Pharo in numbers Very High Activity
  • 5.
  • 6. Create an ecosystem where business/innovation can bloom
  • 7. We want that you can make research and money with Pharo. We want a powerful innovative dynamic language where we can build our future.
  • 8. A Little Journey in the Pharo Object Model
  • 9. A pure and minimal object model Less is more!
  • 10. No constructors, no static methods, no operators No interfaces, no private/protected modifiers No type declarations, no parametrized types No primitive types, no boxing/unboxing Still powerful
  • 12. 213 class SmallInteger Objects are instances of Classes class is a message sent to the object 213 SmallInteger is the result of the message sent In “Java”: 213.getClass()
  • 13. Objects are instances of Classes Integer SmallInteger 213 instance of inherits from
  • 15. Classes are objects too 213 class selectors #(#instVarAt: #sizeInMemory #printOn:base:length:padded: #< #bitXor: #'' #numberOfDigitsInBase: #'//' #threeDigitName #highBitOfPositiveReceiver #bitAnd: #isLarge #largeIdentityHash #'>=' #nextObject #nextInstance #gcd: #printStringBase: #lowBit #pointsTo: #basicIdentityHash #fromString:radix: ...)
  • 16. Classes are objects too Number allSubclasses an OrderedCollection(Fraction Float Integer ScaledDecimal SmallInteger LargePositiveInteger LargeNegativeInteger)
  • 19. 1 class SmallInteger 1 class maxVal 1073741823
  • 20. 1 class SmallInteger 1 class maxVal 1073741823 1 class maxVal + 1 1073741824
  • 21. 1 class SmallInteger 1 class maxVal 1073741823 1 class maxVal + 1 1073741824 (1 class maxVal + 1) class LargePositiveInteger
  • 24. (1/3) + (2/3) 1 2/3 + 1 5/3 1000 factorial 4023872600770937735437024339230039857193748642107146325437999104299385123986290205920442084869694048004799886101971960586316668729948085589013238296699445 9099742450408707375991882362772718873251977950595099527612087497546249704360141827809464649629105639388743788648733711918104582578364784997701247663288983 5955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593 2019280908782973084313928444032812315586110369768013573042161687476096758713483120254785893207671691324484262361314125087802080002616831510273418279777047 8463586817016436502415369139828126481021309276124489635992870511496497541990934222156683257208082133318611681155361583654698404670897560290095053761647584 7728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103 9681759215109077880193931781141945452572238655414610628921879602238389714760885062768629671466746975629112340824392081601537808898939645182632436716167621 7916890977991190375403127462228998800519544441428201218736174599264295658174662830295557029902432415318161721046583203678690611726015878352075151628422554 0265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860 7883861502794659551311565520360939881806121385586003014356945272242063446317974605946825731037900840244324384656572450144028218852524709351906209290231364 9327349756551395872055965422874977401141334696271542284586237738753823048386568897646192738381490014076731044664025989949022222176590433990188601856652648 5061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970 1374285319266498753372189406942814341185201580141233448280150513996942901534830776445690990731524332782882698646027898643211390835062170950025973898635542 7719674282224875758676575234422020757363056949882508796892816275384886339690995982628095612145099487170124451646126037902930912088908694202851064018215439 9457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970 0277534720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • 26. Point class Point class Classes are objects too “Point class” is an anonymous class with only one instance: Point. We call such classes “metaclasses”
  • 28. Integer SmallInteger Integer class SmallInteger class Class Parallel Inheritance 213 instance of instance of instance of
  • 29. Integer SmallInteger Integer class SmallInteger class A “static” method is just a method of the metaclass Integer readFrom: '123' 123 Class Parallel Inheritance factorial class class readFrom:
  • 30. Class extensions A method can be defined in a class that belongs to another package! Powerful to build DSLs $x ctrl , $f ctrl Ctrl + X , Ctrl + F ctrl method in Character class
  • 31. Summary Everything is an object One single model Classes are objects too A class is instance of another class One unique method lookup, look in the class of the receiver
  • 32. Pharo: Syntax in a Nutshell
  • 33. asm push: asm RBP; mov: asm RSP -> asm RBP; mov: 1024 -> asm RAX; mov: asm RBP -> asm RSP; pop: asm RBP; ret. identifier := #letter asParser , #word asParser star Assembly Parsers Syntax Examples
  • 34. Syntax on a PostCard exampleWithNumber: x |y| true & false not & (nil isNil) ifFalse: [ self halt ]. y := self size + super size. { 1 . 2 . #($a #a ‘a’ 1 1.0) } do: [ :each | Transcript show: (each class name); show: (each printString); show: ‘ ‘ ]. ^ x < y
  • 35. Language Constructs ^ return “ comments # symbol or array ‘ string [] block . separator ; cascade | local or block variable := assignment $ character <...> annotation
  • 36. Examples comment: “a comment” character: $c $. string: 'a nice string' 'lulu' 'l''idiot' symbol: #mac #+ array: { 1 . 123 + 1 } literal array: #(1 2 3 (1 3) $a 4) byte array: #[1 2 3] block: [ :x | x * 2 ] integer: 1 2r101 real: 1.5 6.03e-34 4 2.4e7 keywords: true false nil self super thisContext
  • 37. Not Syntax & conjunction (and) | disjunction (or) + addition < lower than ifTrue: condition do: iteration ... all of these are plain methods!
  • 38. Not Syntax & conjunction (and) | disjunction (or) + addition < lower than ifTrue: condition do: iteration ... Boolean>> Boolean>> Number>> Magnitude>> Boolean>> Collection>> their classes 3 = 2 ifTrue: [ Error signal: 'Help' ]
  • 39. 3 kinds of messages Unary messages Binary messages Keywords messages 5 factorial Transcript cr 3 + 4 2 between: 0 and: 5 Transcript show: 'hello world'
  • 42. postman send mail recipient Keyword messages
  • 43. postman send mail to recipient Keyword messages
  • 44. postman send: mail to: recipient Keyword messages
  • 45. postman send: mail to: recipient Keyword messages send:to: method in the Postman class receiver argument 1 argument 2 message send
  • 46. strings := OrderedCollection new ArrayList<String> strings = new ArrayList<String>(); Some Comparisons
  • 47. persons collect: [:person | person name] ArrayList<String> strings = new ArrayList<String>(); for(Person person: persons) { strings.add(person.name()); } Some Comparisons
  • 48. persons collect: #name ArrayList<String> strings = new ArrayList<String>(); for(Person person: persons) { strings.add(person.name()); } Some Comparisons
  • 49. [ self doSomething ] fork new Thread( new Runnable() { public void run() { this.doSomething();}}).start(); Some Comparisons
  • 50. (10 between: 1 and: 20 + 2) not false ( ) > Unary > Binary > Keywords
  • 51. A method definition in Point Method name <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 52. A method definition in Point Argument <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 53. A method definition in Point Comment <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 54. A method definition in Point Return <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 55. A method definition in Point Instance variable <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 56. A method definition in Point Binary message <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 57. A method definition in Point Keyword message <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 58. A method definition in Point Block <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] (2@3) <= (5@6) true
  • 59. Point>> <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] in books and slides, we specify the class name Class name
  • 60. Statements and Cascades Temporary variables Statement Cascade | p pen | p := 100@100. pen := Pen new. pen up; goto: p; down; goto: p+p
  • 61. Anonymous method Passed as method argument or stored f := [:x | x * x + 3]. f value: 2 7 Blocks (aka Closure) BlockClosure>>value:
  • 62. Block usage Integer>> factorial self = 0 ifTrue: [ ^ 1 ]. self > 0 ifTrue: [ ^ self * (self - 1) factorial ] #(1 2 3) do: [ :each | each crLog ]
  • 63. Control Structures Every control structure is realized by message sends [ stream atEnd ] whileFalse: [ self process: stream next ]. Magnitude>> max: aMagniture ^ self > aMagnitude ifTrue: [ self ] ifFalse: [ aMagnitude ]
  • 64. Iterating Collections #(2 3 4 -35 4) collect: [ :each| each abs ] #(2 3 4 35 4)
  • 65. Iterating Collections #(2 3 4 -35 4) select: [ :each| each odd ] #(-3 -35)
  • 66. Iterating Collections #(2 3 4 -35 4) do: [ :each| Transcript crShow: each ] 2 3 ...
  • 67. Pharo, a live programming environment
  • 68. Demo Modifying classes and methods while the program is running
  • 72. data := 'http://picasaweb.google.com/data/ feed/api/all?q=puppy' asUrl retrieveContents. doc := XMLDOMParser parse: data
  • 73. data := 'http://picasaweb.google.com/data/ feed/api/all?q=puppy' asUrl retrieveContents. doc := XMLDOMParser parse: data. entries := doc allNodesSelect: [ :n | n name = 'entry' ]. entry := entries anyOne. content := entry nodesDetect: [ :n | n name = 'content']. url := content attributeAt: 'src'. 'http://lh3.ggpht.com/[...]/puppy-and-kitten.jpg'
  • 74. data := 'http://picasaweb.google.com/data/ feed/api/all?q=puppy' asUrl retrieveContents. doc := XMLDOMParser parse: data. path := XPath for: 'entry/content/@src'. urls := path in: doc. url := urls anyOne. 'http://lh3.ggpht.com/[...]/puppy-and-kitten.jpg'
  • 75. (ZnEasy getGif: url) asMorph openInHand
  • 78. Execution Stack as an Object To define exceptions from within the language Debugger support! Advanced debugging Continuation
  • 79. thisContext returns an object that represents the method invocation can walk (even modify!) the stack
  • 80. Serializing Continuations [ "some code causing an error" ] on: Error do: [ :error | FLSerializer serialize: error toFileNamed: 'error.fuel' ] Then in a new image open a debugger on the serialized error: FLMaterializer materializeFromFileNamed: 'error.fuel'; debug.
  • 81. Powerful Breakpoints? Would be so good if we could say: “Stop method bar only if it is called from method named foo” i.e., bar ... Halt whenCalledFrom: #foo. ...
  • 82. Halt>> whenCalledFrom: aSelector | ctxt | ctxt := thisContext. [ ctxt sender isNil ] whileFalse: [ ctxt := ctxt sender. ctxt selector = aSelector ifTrue: [ self signal ] ]
  • 84. | pt1 pt2 ref | pt1 := 0@0. pt2 := 100@100. ref := pt1. pt1 become: pt2. self assert: ref = (100@100). self assert: pt2 = (0@0). self assert: pt1 = (100@100). Pointer Swapping
  • 86.
  • 87.
  • 88. Continuous API Testing keep your services under control 24/7 Norbert Hartl norbert@2denker.de www.2denker.de
  • 89. 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
  • 91. iBizLog - http://www.ibizlog.com A product by Smallworks Tuesday, May 15, 12
  • 92.
  • 93.
  • 95. We want more success stories!
  • 96. We are a cool community
  • 98. University of Bueno Aires University of Bern scg.unibe.ch University of Brussels soft.vub.ac.be/soft/ Ecole des Mines www.ensm-douai.fr Université de Savoie www.imus.univ-savoie.fr Ivan Franko National University of Ukraine Czech Technical University University of Life Sciences in Prague Northen Michigan University www.nmu.edu University Catholic of Argentina www.uca.edu.ar University of Santiago www.uchile.cl Universitat Policnica de Catalunya www.upc.edu Lectures
  • 99. Lafhis (University of Bueno Aires ) Software Composition Group (scg.unibe.ch) CAR (Ecole des mines www.ensm-douai.fr) RMoD (Inria) Ummisco (IRD) Reveal (University of Lugano) Lysic (University of Bretagne Occidentale) Pleiad (University of Santiago) CEA-List Research Groups
  • 100. Community Ongoing Work Better widgets, UI Builder (A. Plantec, G. Chambers, B. van Ryseghem) Better browsers (B. van Ryseghem, C. Bruni) Proxy (M. Martinez-Peck) New compiler (J. Ressia/M. Denker/C. Bera/) Vectorial canvas (I. Stasenko) Better FFI (I. Stasenko, E. Lorenzano) Bootstrap (G. Polito/S. Ducasse/N. Bouraqadi/L. Fabresse) PDF generation (O. Auverlot, G. Larcheveque) Network (WebSocket, Oauth, Zinc, Zodiac S. van Caekenberghe)
  • 101. Consortium & Association How to sustain Pharo? How to structure the community?
  • 102.
  • 103. Consortium Members Managed by Inria for now Who: companies, institutions, user groups Privileged access to the core development team Influence priorities of the next development Engineering support time Job posts Training/Conferences special prices
  • 104.
  • 105. Pharo User Association Managed by the Pharo Association Individuals Premium (99 €/year) Normal (40 €/year) Join and participate!
  • 106. Pharo books Pharo by example translated to french, merci! translated to spanish, gracias! translated to japanese, ありがとう! german started http://pharobyexample.org
  • 107. New books are coming Deep into Pharo Pharo for the Enterprise A glimpse at VM
  • 108. Everybody can help Reporting bugs Confirming bugs Writing tests Writing examples Writing comments Simple contributing fixes Discussion, feedback
  • 109. May 2008 Bern July 2009 Bern October 2009 Lille November 2009 Buenos Aires March 2010 Bern May 2010 Buenos Aires June 2010 Bern June 2010 Bruxelles July 2010 London September 2010 Barcelona September 2010 Lille January 2011 Lille July 2011 Lille October 2011 Bruxelles February 2012 Bern October 2012 Bern April 2012 Lille August 2012 Ghent October 2012 Perto Madryn January 2013 Santiago February 2013 Lille April 2013 Lille June 2013 Lille Open Pharo Sprints
  • 110. To Take Away Because it is simple and extensible, Pharo is a nice platform to experiment on Use it for your own research (language design or implementation, types, modularity, empirical studies…) http://www.pharo.org