SlideShare a Scribd company logo
1 of 48
Download to read offline
Pharo: Object at
your Fingertips
Marcus Denker
http://www.pharo-project.org
What is it?
Language + Environment
Simple Language (Smalltalk)
Object-Oriented, Dynamic, Reflective
Explore + Change running systems
!

The Ultimate Programming Environment!
Pharo
MIT license
Mac, Linux, Android, iOS, Windows
Great community
Improving steadily
Many excellent libraries
Started 2008

Pharo 1.0 released October 2009
2.0 is the current stable
Pharo3: Early 2014
Plan: 1 Release per year
Language
(in 10 minutes)
Pharo started with Smalltalk-80 (Squeak)
Language still very much Smalltalk
But the goal is to develop it further
Example: Reflective Capabilities
Less is better
No constructors
No types declaration
No interfaces
No packages/private/protected
No parametrized types
Yet really powerful
Objects are instances of Classes
Objects are instances of Classes
!

(10@200)
Objects are instances of Classes
!

(10@200) class
Objects are instances of Classes
!

(10@200) class
Point
Classes are objects too
Classes are objects too
!

Point selectors
!
Classes are objects too

!
Point selectors

!
> an IdentitySet(#eightNeighbors #+ #isZero #sortsBefore: #degrees #printOn: #sideOf:
#fourNeighbors #hash #roundUpTo: #min: #min:max: #max #adaptToCollection:andSend:
#quadrantOf: #crossProduct: #= #nearestPointOnLineFrom:to: #bitShiftPoint: #* #guarded
#insideTriangle:with:with: #grid: #truncateTo: #y #setR:degrees: #normal #directionToLineFrom:to:
#truncated #nearestPointAlongLineFrom:to: #theta #scaleTo: #encodePostscriptOn: #> #asPoint
#extent: #r #roundTo: #max: #interpolateTo:at: #triangleArea:with: #angleWith: #dotProduct:
#isSelfEvaluating #'<=' #to:intersects:to: #'//' #isInsideCircle:with:with: #< #scaleFrom:to: #corner:
#to:sideOf: #x #'>=' #roundDownTo: #onLineFrom:to:within: #transposed #ceiling #angle #basicType
#translateBy: #asFloatPoint #'' #adaptToNumber:andSend: #abs #negated #octantOf:
#asIntegerPoint #flipBy:centerAt: #scaleBy: #floor #onLineFrom:to: #isPoint #reflectedAbout: #/ #dist:
#asNonFractionalPoint #bearingToPoint: #reciprocal #rotateBy:centerAt: #rotateBy:about: #rounded
#setX:setY: #squaredDistanceTo: #normalized #veryDeepCopyWith: #- #storeOn: #rect: #deepCopy
#isIntegerPoint #min #adhereTo: #adaptToString:andSend:)
Methods are public
Instance variables are protected
Single Inheritance
2 instance variables

Single Inheritance

Object subclass: #Point!
! instanceVariableNames: 'x y'!
! classVariableNames: ''!
! poolDictionaries: ''!
! category: 'Kernel-BasicObjects'

subclass of Object
3 kinds of messages
Unary messages

5 factorial!
Transcript cr

Binary messages

3 + 4

Keywords messages
3 raisedTo: 10 modulo: 5!
!

Transcript show: 'hello world'
Blocks
• Anonymous method
• Passed as method argument or stored
• Functions

	 	

fct(x)= x*x+3, fct(2).

!

	 	
!

fct :=[:x| x * x + 3].
fct value: 2
Control structures
Every control structure is realized by message sends
4 timesRepeat: [Beeper beep]

max: aNumber!
! ^ self < aNumber !
! !
ifTrue: [aNumber] !
! !
ifFalse: [self]
A typical method in Point
Method name

Argument

Comment

<= aPoint !
! "Answer whether the receiver is neither!
! below nor to the right of aPoint."!
!

! ^ x <= aPoint x and: [y <= aPoint y]
Return

Block
Binary message
Keyword message
Instance variable

(2@3) <= (5@6)

true
Complete Syntax on a PostCard
exampleWithNumber: x
“A method that has unary, binary, and key word messages, declares arguments and
temporaries (but not block temporaries), accesses a global variable (but not and
instance variable), uses literals (array, character, symbol, string, integer, float), uses the
pseudo variable true false, nil, self, and super, and has sequence, assignment, return
and cascade. It has both zero argument and one argument blocks.”
	 |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
Environment
Language + Environment are closely linked
Reflection is the basis
Classes, Methods, Packages are Objects
The tools manipulate these Objects
Class Browser
Inspector
Demo: Changing a class at runtime
Demo: Exploring the system
Demo: Inspect World
There is so much more…
Pharo Books
Pharo Success Stories
Continuous API Testing

keep your services under control 24/7

www.2denker.de

Norbert Hartl norbert@2denker.de
eMCee is a montoring service for backend interfaces
- Web application to define backend interfaces
- Monitors reliability of interface periodically
- Sends warning if status of interface changes
- Provides overview graphs about reliability
- Snapshots requests for debugging purposes

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
Pharo Consortium
Managed by INRIA
Who: companies, institutions, user groups
Privileged access to the core development team
Influence priorities of the next development

http://consortium.pharo.org
Future +
Research
More Reflection
Instance Variables as Objects —> Slots
!

Proxy model in the base language
!

Structuring reflective API (—> Mirrors)
Beyond Text
AST Everywhere
Used in Tools for Navigation
!

Do we need to store text?
!

Use for Behavioral Reflection
System - as - Objects

Put “virtualization” in the language
We already use “Images”
Make the Image a first class concept in the language
Open Pharo Sprints
May 2008 Bern

July 2009 Bern

October 2009 Lille
November 2009 Buenos Ares
March 2010 Bern

May 2010 Buenos Ares
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
April 2012 Lille
September 2012 Ghent
October 2013 Lille

November 2013 Buenos Aires
Pharo: Objects at your Fingertips

More Related Content

What's hot

More on Lex
More on LexMore on Lex
More on Lex
Tech_MX
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
Phillip Trelford
 

What's hot (20)

F# Eye For The C# Guy - f(by) Minsk 2014
F# Eye For The C# Guy - f(by) Minsk 2014F# Eye For The C# Guy - f(by) Minsk 2014
F# Eye For The C# Guy - f(by) Minsk 2014
 
More on Lex
More on LexMore on Lex
More on Lex
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
 
Meta Object Protocols
Meta Object ProtocolsMeta Object Protocols
Meta Object Protocols
 
Python basics
Python basicsPython basics
Python basics
 
F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Ruby For Java Programmers
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java Programmers
 
2nd puc computer science chapter 8 function overloading
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloading
 
java vs C#
java vs C#java vs C#
java vs C#
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 
Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3
 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
 
Unix Tutorial
Unix TutorialUnix Tutorial
Unix Tutorial
 
Python basics
Python basicsPython basics
Python basics
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
 
Hack programming language
Hack programming languageHack programming language
Hack programming language
 
The Ring programming language version 1.5.4 book - Part 6 of 185
The Ring programming language version 1.5.4 book - Part 6 of 185The Ring programming language version 1.5.4 book - Part 6 of 185
The Ring programming language version 1.5.4 book - Part 6 of 185
 
Python Session - 4
Python Session - 4Python Session - 4
Python Session - 4
 

Viewers also liked

Pharo Roadmap
Pharo RoadmapPharo Roadmap
Pharo Roadmap
ESUG
 

Viewers also liked (12)

Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntax
 
The Pharo Programming Language
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Language
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond Smalltak
 
Pharo devnology20150401
Pharo devnology20150401Pharo devnology20150401
Pharo devnology20150401
 
2008 Sccc Smalltalk
2008 Sccc Smalltalk2008 Sccc Smalltalk
2008 Sccc Smalltalk
 
Squeak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC Smalltalk
 
Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013
 
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: Objects at your Fingertips

Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
Pharo
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
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
Serge Stinckwich
 
Flex and PHP For the Flash Folks
Flex and PHP For the Flash FolksFlex and PHP For the Flash Folks
Flex and PHP For the Flash Folks
10n Software, LLC
 
Microsoft (Silverlight)
Microsoft (Silverlight)Microsoft (Silverlight)
Microsoft (Silverlight)
Vinayak Hegde
 

Similar to Pharo: Objects at your Fingertips (20)

Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your Fingertips
 
Pharo: A Reflective System
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective System
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018
Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018
Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018
 
Step talk
Step talkStep talk
Step talk
 
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
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
 
2013 pharo is yours revisited. Santiago DCC University of Chile Presentation.
2013 pharo is yours revisited. Santiago DCC University of Chile Presentation.2013 pharo is yours revisited. Santiago DCC University of Chile Presentation.
2013 pharo is yours revisited. Santiago DCC University of Chile Presentation.
 
2013 lecture-01-introduction
2013 lecture-01-introduction2013 lecture-01-introduction
2013 lecture-01-introduction
 
Pharo: Programming in an Immersive World (Stéphane Ducasse Technology Stream)
Pharo: Programming in an Immersive World (Stéphane Ducasse Technology Stream)Pharo: Programming in an Immersive World (Stéphane Ducasse Technology Stream)
Pharo: Programming in an Immersive World (Stéphane Ducasse Technology Stream)
 
Flex and PHP For the Flash Folks
Flex and PHP For the Flash FolksFlex and PHP For the Flash Folks
Flex and PHP For the Flash Folks
 
Fosdem 13: Pharo 2.0 update
Fosdem 13: Pharo 2.0 updateFosdem 13: Pharo 2.0 update
Fosdem 13: Pharo 2.0 update
 
Talk: Pharo at JM2L 2009
Talk: Pharo at JM2L 2009Talk: Pharo at JM2L 2009
Talk: Pharo at JM2L 2009
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
 
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
 
Microsoft (Silverlight)
Microsoft (Silverlight)Microsoft (Silverlight)
Microsoft (Silverlight)
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

More from Marcus Denker

More from Marcus Denker (20)

Soil And Pharo
Soil And PharoSoil And Pharo
Soil And Pharo
 
ConstantBlocks in Pharo11
ConstantBlocks in Pharo11ConstantBlocks in Pharo11
ConstantBlocks in Pharo11
 
Demo: Improved DoIt
Demo: Improved DoItDemo: Improved DoIt
Demo: Improved DoIt
 
First Class Variables as AST Annotations
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST Annotations
 
Supporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo SupportSupporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo Support
 
Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Variables in Pharo
Variables in PharoVariables in Pharo
Variables in Pharo
 
Lecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinksLecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinks
 
Improving code completion for Pharo
Improving code completion for PharoImproving code completion for Pharo
Improving code completion for Pharo
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
 
Slot Composition
Slot CompositionSlot Composition
Slot Composition
 
Lecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinks
 
PHARO IOT
PHARO IOTPHARO IOT
PHARO IOT
 
Open-Source: An Infinite Game
Open-Source: An Infinite GameOpen-Source: An Infinite Game
Open-Source: An Infinite Game
 
Lecture: MetaLinks
Lecture: MetaLinksLecture: MetaLinks
Lecture: MetaLinks
 
PharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to PharoPharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to Pharo
 
Feedback Loops in Practice
Feedback Loops in PracticeFeedback Loops in Practice
Feedback Loops in Practice
 
Pharo6 - ESUG17
Pharo6 - ESUG17Pharo6 - ESUG17
Pharo6 - ESUG17
 
Pharo6
Pharo6Pharo6
Pharo6
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 

Pharo: Objects at your Fingertips

  • 1. Pharo: Object at your Fingertips Marcus Denker http://www.pharo-project.org
  • 2. What is it? Language + Environment Simple Language (Smalltalk) Object-Oriented, Dynamic, Reflective Explore + Change running systems ! The Ultimate Programming Environment!
  • 3. Pharo MIT license Mac, Linux, Android, iOS, Windows Great community Improving steadily Many excellent libraries
  • 4. Started 2008 Pharo 1.0 released October 2009 2.0 is the current stable Pharo3: Early 2014 Plan: 1 Release per year
  • 6. Pharo started with Smalltalk-80 (Squeak) Language still very much Smalltalk But the goal is to develop it further Example: Reflective Capabilities
  • 7. Less is better No constructors No types declaration No interfaces No packages/private/protected No parametrized types Yet really powerful
  • 9. Objects are instances of Classes ! (10@200)
  • 10. Objects are instances of Classes ! (10@200) class
  • 11. Objects are instances of Classes ! (10@200) class Point
  • 13. Classes are objects too ! Point selectors !
  • 14. Classes are objects too ! Point selectors ! > an IdentitySet(#eightNeighbors #+ #isZero #sortsBefore: #degrees #printOn: #sideOf: #fourNeighbors #hash #roundUpTo: #min: #min:max: #max #adaptToCollection:andSend: #quadrantOf: #crossProduct: #= #nearestPointOnLineFrom:to: #bitShiftPoint: #* #guarded #insideTriangle:with:with: #grid: #truncateTo: #y #setR:degrees: #normal #directionToLineFrom:to: #truncated #nearestPointAlongLineFrom:to: #theta #scaleTo: #encodePostscriptOn: #> #asPoint #extent: #r #roundTo: #max: #interpolateTo:at: #triangleArea:with: #angleWith: #dotProduct: #isSelfEvaluating #'<=' #to:intersects:to: #'//' #isInsideCircle:with:with: #< #scaleFrom:to: #corner: #to:sideOf: #x #'>=' #roundDownTo: #onLineFrom:to:within: #transposed #ceiling #angle #basicType #translateBy: #asFloatPoint #'' #adaptToNumber:andSend: #abs #negated #octantOf: #asIntegerPoint #flipBy:centerAt: #scaleBy: #floor #onLineFrom:to: #isPoint #reflectedAbout: #/ #dist: #asNonFractionalPoint #bearingToPoint: #reciprocal #rotateBy:centerAt: #rotateBy:about: #rounded #setX:setY: #squaredDistanceTo: #normalized #veryDeepCopyWith: #- #storeOn: #rect: #deepCopy #isIntegerPoint #min #adhereTo: #adaptToString:andSend:)
  • 18. 2 instance variables Single Inheritance Object subclass: #Point! ! instanceVariableNames: 'x y'! ! classVariableNames: ''! ! poolDictionaries: ''! ! category: 'Kernel-BasicObjects' subclass of Object
  • 19. 3 kinds of messages Unary messages 5 factorial! Transcript cr Binary messages 3 + 4 Keywords messages 3 raisedTo: 10 modulo: 5! ! Transcript show: 'hello world'
  • 20. Blocks • Anonymous method • Passed as method argument or stored • Functions fct(x)= x*x+3, fct(2). ! ! fct :=[:x| x * x + 3]. fct value: 2
  • 21. Control structures Every control structure is realized by message sends 4 timesRepeat: [Beeper beep] max: aNumber! ! ^ self < aNumber ! ! ! ifTrue: [aNumber] ! ! ! ifFalse: [self]
  • 22. A typical method in Point Method name Argument Comment <= aPoint ! ! "Answer whether the receiver is neither! ! below nor to the right of aPoint."! ! ! ^ x <= aPoint x and: [y <= aPoint y] Return Block Binary message Keyword message Instance variable (2@3) <= (5@6) true
  • 23. Complete Syntax on a PostCard exampleWithNumber: x “A method that has unary, binary, and key word messages, declares arguments and temporaries (but not block temporaries), accesses a global variable (but not and instance variable), uses literals (array, character, symbol, string, integer, float), uses the pseudo variable true false, nil, self, and super, and has sequence, assignment, return and cascade. It has both zero argument and one argument blocks.” |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
  • 25. Language + Environment are closely linked
  • 28. The tools manipulate these Objects
  • 31. Demo: Changing a class at runtime
  • 34. There is so much more…
  • 37. Continuous API Testing keep your services under control 24/7 www.2denker.de Norbert Hartl norbert@2denker.de
  • 38. eMCee is a montoring service for backend interfaces - Web application to define backend interfaces - Monitors reliability of interface periodically - Sends warning if status of interface changes - Provides overview graphs about reliability - Snapshots requests for debugging purposes mail@2denker.de
  • 39.
  • 40. • 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
  • 41. Pharo Consortium Managed by INRIA Who: companies, institutions, user groups Privileged access to the core development team Influence priorities of the next development http://consortium.pharo.org
  • 42.
  • 44. More Reflection Instance Variables as Objects —> Slots ! Proxy model in the base language ! Structuring reflective API (—> Mirrors)
  • 45. Beyond Text AST Everywhere Used in Tools for Navigation ! Do we need to store text? ! Use for Behavioral Reflection
  • 46. System - as - Objects Put “virtualization” in the language We already use “Images” Make the Image a first class concept in the language
  • 47. Open Pharo Sprints May 2008 Bern July 2009 Bern October 2009 Lille November 2009 Buenos Ares March 2010 Bern May 2010 Buenos Ares 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 April 2012 Lille September 2012 Ghent October 2013 Lille November 2013 Buenos Aires