Pharo: Objects at your Fingertips

Marcus Denker
Marcus DenkerResearch Scientist at INRIA
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
Pharo: Objects at your Fingertips
• 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
Pharo: Objects at your Fingertips
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
1 of 48

Recommended

Pharo: Syntax in a Nutshell by
Pharo: Syntax in a NutshellPharo: Syntax in a Nutshell
Pharo: Syntax in a NutshellMarcus Denker
2K views25 slides
Introduction To C# by
Introduction To C#Introduction To C#
Introduction To C#SAMIR BHOGAYTA
5.1K views119 slides
Chapter 2 by
Chapter 2Chapter 2
Chapter 2application developer
406 views23 slides
Yacc lex by
Yacc lexYacc lex
Yacc lex915086731
3.4K views21 slides
C# basics by
 C# basics C# basics
C# basicsDinesh kumar
14.5K views39 slides
Python basic by
Python basicPython basic
Python basicSaifuddin Kaijar
12.3K views25 slides

More Related Content

What's hot

F# Eye For The C# Guy - f(by) Minsk 2014 by
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 2014Phillip Trelford
1.3K views26 slides
More on Lex by
More on LexMore on Lex
More on LexTech_MX
8K views42 slides
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014 by
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 2014Phillip Trelford
1K views26 slides
Meta Object Protocols by
Meta Object ProtocolsMeta Object Protocols
Meta Object ProtocolsPierre de Lacaze
5.4K views48 slides
Python basics by
Python basicsPython basics
Python basicsHoang Nguyen
2K views30 slides
F# for C# devs - Copenhagen .Net 2015 by
F# for C# devs - Copenhagen .Net 2015F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015Phillip Trelford
1K views31 slides

What's hot(20)

F# Eye For The C# Guy - f(by) Minsk 2014 by Phillip Trelford
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
Phillip Trelford1.3K views
More on Lex by Tech_MX
More on LexMore on Lex
More on Lex
Tech_MX8K views
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014 by Phillip Trelford
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 Trelford1K views
Introduction to Python Programming by VijaySharma802
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
VijaySharma80267 views
Ruby For Java Programmers by Mike Bowler
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java Programmers
Mike Bowler7.6K views
2nd puc computer science chapter 8 function overloading by Aahwini Esware gowda
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloading
PYTHON NOTES by Ni
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
Ni 11.5K views
Domain Specific Languages In Scala Duse3 by Peter Maas
Domain Specific Languages In Scala Duse3Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3
Peter Maas1.4K views
Compiler Construction | Lecture 7 | Type Checking by Eelco Visser
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
Eelco Visser929 views
Basic Concepts in Python by Sumit Satam
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
Sumit Satam4.3K views
Hack programming language by Radu Murzea
Hack programming languageHack programming language
Hack programming language
Radu Murzea408 views
The Ring programming language version 1.5.4 book - Part 6 of 185 by Mahmoud Samir Fayed
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

Viewers also liked

Pharo Hands-On: 02 syntax by
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo
1.3K views30 slides
The Pharo Programming Language by
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Languagebergel
24K views20 slides
Reflection in Pharo: Beyond Smalltak by
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakMarcus Denker
1.2K views56 slides
Pharo devnology20150401 by
Pharo devnology20150401Pharo devnology20150401
Pharo devnology20150401Stephan Eggermont
3.9K views17 slides
2008 Sccc Smalltalk by
2008 Sccc Smalltalk2008 Sccc Smalltalk
2008 Sccc Smalltalkbergel
869 views44 slides
Squeak & Pharo @ NYC Smalltalk by
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSeanDeNigris
1.4K views19 slides

Viewers also liked(12)

Pharo Hands-On: 02 syntax by Pharo
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntax
Pharo1.3K views
The Pharo Programming Language by bergel
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Language
bergel24K views
Reflection in Pharo: Beyond Smalltak by Marcus Denker
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond Smalltak
Marcus Denker1.2K views
2008 Sccc Smalltalk by bergel
2008 Sccc Smalltalk2008 Sccc Smalltalk
2008 Sccc Smalltalk
bergel869 views
Squeak & Pharo @ NYC Smalltalk by SeanDeNigris
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC Smalltalk
SeanDeNigris1.4K views
Pharo tutorial at ECOOP 2013 by Pharo
Pharo tutorial at ECOOP 2013Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013
Pharo20.9K views
Pharo Roadmap by ESUG
Pharo RoadmapPharo Roadmap
Pharo Roadmap
ESUG1.7K views
You Can’t Do That With Smalltalk! by ESUG
You Can’t Do That With Smalltalk!You Can’t Do That With Smalltalk!
You Can’t Do That With Smalltalk!
ESUG8.6K views
Pharo Hands-on: 05 object model by Pharo
Pharo Hands-on: 05 object modelPharo Hands-on: 05 object model
Pharo Hands-on: 05 object model
Pharo879 views
Haskell vs. F# vs. Scala by pt114
Haskell vs. F# vs. ScalaHaskell vs. F# vs. Scala
Haskell vs. F# vs. Scala
pt11427.8K views

Similar to Pharo: Objects at your Fingertips

Pharo: Objects at your Fingertips by
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo
2.7K views48 slides
Pharo: A Reflective System by
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective SystemPharo
1.4K views37 slides
Pharo Status ESUG 2014 by
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo
1.3K views43 slides
Visual Studio .NET2010 by
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
1.8K views42 slides
Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018 by
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 2018FrenchTechCentral
347 views100 slides
Step talk by
Step talkStep talk
Step talkESUG
732 views47 slides

Similar to Pharo: Objects at your Fingertips(20)

Pharo: Objects at your Fingertips by Pharo
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your Fingertips
Pharo2.7K views
Pharo: A Reflective System by Pharo
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective System
Pharo1.4K views
Pharo Status ESUG 2014 by Pharo
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
Pharo1.3K views
Visual Studio .NET2010 by Satish Verma
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma1.8K views
Inria Tech Talk - Programmation Pharo - Mercredi 26 septembre 2018 by FrenchTechCentral
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
FrenchTechCentral347 views
Step talk by ESUG
Step talkStep talk
Step talk
ESUG732 views
Pharo, an innovative and open-source Smalltalk by Serge Stinckwich
Pharo, an innovative and open-source SmalltalkPharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source Smalltalk
Serge Stinckwich2.1K views
Pharo3 at Fosdem by Pharo
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
Pharo1.6K views
The why and how of moving to php 7 by Wim Godden
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
Wim Godden232 views
2013 pharo is yours revisited. Santiago DCC University of Chile Presentation. by Pharo
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.
Pharo1.4K views
2013 lecture-01-introduction by Pharo
2013 lecture-01-introduction2013 lecture-01-introduction
2013 lecture-01-introduction
Pharo702 views
Pharo: Programming in an Immersive World (Stéphane Ducasse Technology Stream) by IT Arena
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)
IT Arena613 views
Fosdem 13: Pharo 2.0 update by Marcus Denker
Fosdem 13: Pharo 2.0 updateFosdem 13: Pharo 2.0 update
Fosdem 13: Pharo 2.0 update
Marcus Denker5.1K views
Talk: Pharo at JM2L 2009 by Marcus Denker
Talk: Pharo at JM2L 2009Talk: Pharo at JM2L 2009
Talk: Pharo at JM2L 2009
Marcus Denker1.1K views
Advanced WCF Workshop by Ido Flatow
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
Ido Flatow6.6K views
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria... by ITCamp
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...
ITCamp2K views

More from Marcus Denker

Soil And Pharo by
Soil And PharoSoil And Pharo
Soil And PharoMarcus Denker
47 views12 slides
ConstantBlocks in Pharo11 by
ConstantBlocks in Pharo11ConstantBlocks in Pharo11
ConstantBlocks in Pharo11Marcus Denker
50 views26 slides
Demo: Improved DoIt by
Demo: Improved DoItDemo: Improved DoIt
Demo: Improved DoItMarcus Denker
4 views3 slides
First Class Variables as AST Annotations by
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST AnnotationsMarcus Denker
5 views42 slides
Supporting Pharo / Getting Pharo Support by
Supporting Pharo / Getting Pharo SupportSupporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo SupportMarcus Denker
8 views19 slides
Lecture: "Advanced Reflection: MetaLinks" by
Lecture: "Advanced Reflection: MetaLinks"Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"Marcus Denker
11 views54 slides

More from Marcus Denker(20)

First Class Variables as AST Annotations by Marcus Denker
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST Annotations
Marcus Denker5 views
Supporting Pharo / Getting Pharo Support by Marcus Denker
Supporting Pharo / Getting Pharo SupportSupporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo Support
Marcus Denker8 views
Lecture: "Advanced Reflection: MetaLinks" by Marcus Denker
Lecture: "Advanced Reflection: MetaLinks"Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"
Marcus Denker11 views
thisContext in the Debugger by Marcus Denker
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
Marcus Denker413 views
Lecture. Advanced Reflection: MetaLinks by Marcus Denker
Lecture. Advanced Reflection: MetaLinksLecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinks
Marcus Denker11 views
Improving code completion for Pharo by Marcus Denker
Improving code completion for PharoImproving code completion for Pharo
Improving code completion for Pharo
Marcus Denker292 views
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks by Marcus Denker
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
Marcus Denker213 views
Lecture: Advanced Reflection. MetaLinks by Marcus Denker
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinks
Marcus Denker1.4K views
Open-Source: An Infinite Game by Marcus Denker
Open-Source: An Infinite GameOpen-Source: An Infinite Game
Open-Source: An Infinite Game
Marcus Denker1.2K views
PharoTechTalk: Contributing to Pharo by Marcus Denker
PharoTechTalk: Contributing to PharoPharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to Pharo
Marcus Denker684 views
Feedback Loops in Practice by Marcus Denker
Feedback Loops in PracticeFeedback Loops in Practice
Feedback Loops in Practice
Marcus Denker860 views

Recently uploaded

HTTP headers that make your website go faster - devs.gent November 2023 by
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
22 views151 slides
Mini-Track: AI and ML in Network Operations Applications by
Mini-Track: AI and ML in Network Operations ApplicationsMini-Track: AI and ML in Network Operations Applications
Mini-Track: AI and ML in Network Operations ApplicationsNetwork Automation Forum
10 views24 slides
Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
18 views6 slides
virtual reality.pptx by
virtual reality.pptxvirtual reality.pptx
virtual reality.pptxG036GaikwadSnehal
14 views15 slides
PRODUCT LISTING.pptx by
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptxangelicacueva6
14 views1 slide
Design Driven Network Assurance by
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
15 views42 slides

Recently uploaded(20)

HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays17 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab21 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software280 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive

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
  • 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
  • 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