SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
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
No constructors
No types declaration
No interfaces
No packages/private/protected
No parametrized types
Yet really powerful
Less is better
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
Single Inheritance
Object subclass: #Point!
! instanceVariableNames: 'x y'!
! classVariableNames: ''!
! poolDictionaries: ''!
! category: 'Kernel-BasicObjects'
2 instance variables
subclass of Object
3 kinds of messages
Unary messages
Binary messages
Keywords messages
5 factorial!
Transcript cr
3 + 4
3 raisedTo: 10 modulo: 5!
!
Transcript show: 'hello world'
• Anonymous method
• Passed as method argument or stored
• Functions
	 	 fct(x)= x*x+3, fct(2).
!
	 	 fct :=[:x| x * x + 3].
fct value: 2
!
Blocks
Control structures
Every control structure is realized by message sends
4 timesRepeat: [Beeper beep]
max: aNumber!
! ^ self < aNumber !
! ! ifTrue: [aNumber] !
! ! ifFalse: [self]
<= aPoint !
! "Answer whether the receiver is neither!
! below nor to the right of aPoint."!
!
! ^ x <= aPoint x and: [y <= aPoint y]
A typical method in Point
Method name Argument Comment
Return Binary message
Keyword messageInstance variable
Block
(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
Norbert Hartl norbert@2denker.de
www.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
Instance Variables as Objects —> Slots
!
Proxy model in the base language
!
Structuring reflective API (—> Mirrors)
More Reflection
AST Everywhere
Used in Tools for Navigation
!
Do we need to store text?
!
Use for Behavioral Reflection
Beyond Text
Put “virtualization” in the language
We already use “Images”
Make the Image a first class concept in the language
System - as - Objects
Open Pharo SprintsMay 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

Weitere ähnliche Inhalte

Was ist angesagt?

僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない
Takuya ASADA
 
覚えておきたい! zypper コマンドの使い方
覚えておきたい! zypper コマンドの使い方覚えておきたい! zypper コマンドの使い方
覚えておきたい! zypper コマンドの使い方
Fuminobu Takeyama
 

Was ist angesagt? (20)

Introduction to webassembly
Introduction to webassemblyIntroduction to webassembly
Introduction to webassembly
 
量子情報復習
量子情報復習量子情報復習
量子情報復習
 
How WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularHow WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for Angular
 
〜Apache Geode 入門 gfsh によるクラスター構築・管理
〜Apache Geode 入門 gfsh によるクラスター構築・管理〜Apache Geode 入門 gfsh によるクラスター構築・管理
〜Apache Geode 入門 gfsh によるクラスター構築・管理
 
未来(あす)Xamlの1msに泣かないために
未来(あす)Xamlの1msに泣かないために未来(あす)Xamlの1msに泣かないために
未来(あす)Xamlの1msに泣かないために
 
僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない
 
My Journey to Becoming a Docker Captain
My Journey to Becoming a Docker CaptainMy Journey to Becoming a Docker Captain
My Journey to Becoming a Docker Captain
 
フィルタドライバ入門
フィルタドライバ入門フィルタドライバ入門
フィルタドライバ入門
 
Azure Cosmos DB Emulator on Docker を GitHub Codespaces で動かす!
Azure Cosmos DB Emulator on Docker を GitHub Codespaces で動かす!Azure Cosmos DB Emulator on Docker を GitHub Codespaces で動かす!
Azure Cosmos DB Emulator on Docker を GitHub Codespaces で動かす!
 
覚えておきたい! zypper コマンドの使い方
覚えておきたい! zypper コマンドの使い方覚えておきたい! zypper コマンドの使い方
覚えておきたい! zypper コマンドの使い方
 
virtio勉強会 #1 「virtioの基本的なところ(DRAFT版)」
virtio勉強会 #1 「virtioの基本的なところ(DRAFT版)」virtio勉強会 #1 「virtioの基本的なところ(DRAFT版)」
virtio勉強会 #1 「virtioの基本的なところ(DRAFT版)」
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構
 
はじめてのWubi for Ubuntu 21.04 ドンキ格安 第2世代UMPC NANOTE P8
はじめてのWubi for Ubuntu 21.04 ドンキ格安 第2世代UMPC NANOTE P8はじめてのWubi for Ubuntu 21.04 ドンキ格安 第2世代UMPC NANOTE P8
はじめてのWubi for Ubuntu 21.04 ドンキ格安 第2世代UMPC NANOTE P8
 
Visual Studio를 이용한 어셈블리어 학습 part 2
Visual Studio를 이용한 어셈블리어 학습 part 2Visual Studio를 이용한 어셈블리어 학습 part 2
Visual Studio를 이용한 어셈블리어 학습 part 2
 
SSH力をつかおう
SSH力をつかおうSSH力をつかおう
SSH力をつかおう
 
Hieraテクニック - 効率的にパラメータシートから設定値を取り込む - 横山 浩輔、株式会社NTTデータ
Hieraテクニック - 効率的にパラメータシートから設定値を取り込む - 横山 浩輔、株式会社NTTデータHieraテクニック - 効率的にパラメータシートから設定値を取り込む - 横山 浩輔、株式会社NTTデータ
Hieraテクニック - 効率的にパラメータシートから設定値を取り込む - 横山 浩輔、株式会社NTTデータ
 
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」 BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
 
Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?
 
Multi Chassis LAG for Cloud builders
Multi Chassis LAG for Cloud buildersMulti Chassis LAG for Cloud builders
Multi Chassis LAG for Cloud builders
 
富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案
 

Ähnlich wie Pharo: Objects at your Fingertips

Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
Pharo
 
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
 

Ähnlich wie 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
 
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
 
Pharo: A Reflective System
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective System
 
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)
 
Step talk
Step talkStep talk
Step talk
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
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
 
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
 
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
 
Pharo Update
Pharo UpdatePharo Update
Pharo Update
 
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
 
Smalltalk and Business
Smalltalk and BusinessSmalltalk and Business
Smalltalk and Business
 
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
 
Pharo Status
Pharo StatusPharo Status
Pharo Status
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
 

Mehr von Pharo

Mehr von 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
 

Kürzlich hochgeladen

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Kürzlich hochgeladen (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

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. No constructors No types declaration No interfaces No packages/private/protected No parametrized types Yet really powerful Less is better
  • 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. Single Inheritance Object subclass: #Point! ! instanceVariableNames: 'x y'! ! classVariableNames: ''! ! poolDictionaries: ''! ! category: 'Kernel-BasicObjects' 2 instance variables subclass of Object
  • 19. 3 kinds of messages Unary messages Binary messages Keywords messages 5 factorial! Transcript cr 3 + 4 3 raisedTo: 10 modulo: 5! ! Transcript show: 'hello world'
  • 20. • Anonymous method • Passed as method argument or stored • Functions fct(x)= x*x+3, fct(2). ! fct :=[:x| x * x + 3]. fct value: 2 ! Blocks
  • 21. Control structures Every control structure is realized by message sends 4 timesRepeat: [Beeper beep] max: aNumber! ! ^ self < aNumber ! ! ! ifTrue: [aNumber] ! ! ! ifFalse: [self]
  • 22. <= aPoint ! ! "Answer whether the receiver is neither! ! below nor to the right of aPoint."! ! ! ^ x <= aPoint x and: [y <= aPoint y] A typical method in Point Method name Argument Comment Return Binary message Keyword messageInstance variable Block (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 Norbert Hartl norbert@2denker.de www.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. Instance Variables as Objects —> Slots ! Proxy model in the base language ! Structuring reflective API (—> Mirrors) More Reflection
  • 45. AST Everywhere Used in Tools for Navigation ! Do we need to store text? ! Use for Behavioral Reflection Beyond Text
  • 46. Put “virtualization” in the language We already use “Images” Make the Image a first class concept in the language System - as - Objects
  • 47. Open Pharo SprintsMay 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