[go: nahoru, domu]

Jump to content

Pharo: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rescuing 3 sources and tagging 0 as dead.) #IABot (v2.0
m →‎History: WP:LINKs add. Small WP:COPYEDIT WP:EoS WP:TERSE: cut needless word repeat.
(28 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{Advert|date=April 2019}}
{{Use mdy dates|date=April 2013}}
{{Use mdy dates|date=April 2013}}
{{Other uses}}
{{About|the Pharo programming language|the investment firm|Pharo Management}}
{{Distinguish|text=the similar term [[Pharaoh (disambiguation)]]}}

{{Distinguish|pharoh}}
{{Infobox programming language
{{Infobox programming language
| name = Pharo
| name = Pharo
| logo = Pharo Logo v3.0.svg
| title = Pharo
| logo = <!-- Filename only -->
| logo caption = Pharo logo with [[lighthouse]]
| screenshot = Pharo 6.0.jpg
| logo caption =
| paradigm = [[Object-oriented programming|object-oriented]]
| screenshot = Pharo 6.0.jpg
| family = [[Smalltalk]]: [[Squeak]]
| caption = Screenshot of the Pharo IDE
| developer = Pharo community
| collapsible =
| released = {{Start date and age|2008|03}}
| author = Pharo board<ref>[https://pharo.org/about The Pharo board]</ref>
| latest release version = {{wikidata|property|edit|reference|P348}}
| developer = Pharo community
| released = {{Start date and age|2008}}
| latest release date = {{Start date and age|{{wikidata|qualifier|P348|P577}}}}
| latest release version = 8.0
| latest preview version =
| latest release date = {{Start date and age|2020|01|20}}
| latest preview date = <!-- {{Start date and age|202y|mm|dd}} -->
| typing = [[Dynamic typing|dynamic]]
| latest preview version =
| programming language = [[Smalltalk]]
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD}} -->
| operating system = [[Microsoft Windows|Windows]], [[Linux]], [[macOS]], others
| frequently updated = <!-- DO NOT include this parameter unless you know what it does -->
| platform = [[ARM architecture family|ARM]], [[IA-32]], [[x86-64]]
| status = Active
| license = [[MIT License|MIT]], partly [[Apache License|Apache]] 2.0<ref>[https://pharo.org/license Pharo license information]</ref>
| programming language = [[Smalltalk]]
| website = {{URL|pharo.org}}
| operating system = [[Microsoft Windows|Windows]], [[Linux]], [[macOS]], others
| influenced by = [[Smalltalk]] ([[Squeak]])
| platform =
| influenced =
| size =
| language =
| language count = <!-- DO NOT include this parameter unless you know what it does -->
| language footnote =
| genre = [[Object-oriented programming]] language, [[Integrated development environment|IDE]]
| license = [[MIT license]], partly [[Apache License]] 2.0<ref>[https://pharo.org/license Pharo license information]</ref>
| alexa =
| website = {{URL|https://pharo.org}}
| standard =
| AsOf =
| influenced by = [[Smalltalk]] ([[Squeak]])
| influenced =
}}
}}


'''Pharo''' is a [[Cross-platform software|cross-platform]] implementation of the classic [[Smalltalk]]-80 [[programming language]] and [[runtime system]].<ref name=":0">{{Cite book |last1=Black |first1=Andrew P. |last2=Ducasse |first2=Stéphane |last3=Nierstrasz |first3=Oscar |last4=Pollet |first4=Damien |last5=Cassou |first5=Damien |last6=Denker |first6=Marcus |date=October 28, 2009 |url=https://www.worldcat.org/oclc/957555627 |title=Pharo by example |isbn=978-3-9523341-4-0 |location=Kehrsatz, Switzerland |oclc=957555627}}</ref> It is based on the [[OpenSmalltalk]] [[virtual machine]] (VM) named Cog,<ref>{{Cite web |title=OpenSmalltalk |url=https://opensmalltalk.org/ |access-date=2021-11-24 |website=opensmalltalk.org}}</ref><ref>{{Citation |title=OpenSmalltalk/opensmalltalk-vm |date=2021-11-23 |url=https://github.com/OpenSmalltalk/opensmalltalk-vm |publisher=OpenSmalltalk |access-date=2021-11-24}}</ref><ref>{{Cite web |title=Cog Blog: About Cog |url=http://www.mirandabanda.org/cogblog/about-cog/ |access-date=2021-11-24}}</ref><ref name="AndrewPBlack2009">{{cite book |last1=Black |first1=Andrew P. |last2=Ducasse |first2=Stéphane |last3=Nierstrasz |first3=Oscar |last4=Pollet |first4=Damien |date=October 28, 2009|others=Samuel Morello |title=Pharo by Example |url=https://www.researchgate.net/publication/40637510|isbn=978-3-9523341-4-0}}</ref>{{Rp|page=16}} which evaluates a dynamic, [[Reflective programming|reflective]], and [[Object-oriented programming|object-oriented]] programming language with a [[Syntax (programming languages)|syntax]] closely resembling [[Smalltalk#Syntax|Smalltalk-80]]. It is [[free and open-source software]], released under a mix of [[MIT License|MIT]], and [[Apache License|Apache]] 2 licenses.
'''Pharo''' is an [[open source]] dynamic and reflective language which is inspired by the [[programming language]] [[Smalltalk]]. Pharo offers several [[live programming]] features such as immediate object manipulation, live update and hot recompiling.


Pharo is shipped with [[source code]] compiled into a ''system image'' that contains all software needed to run Pharo.{{r|AndrewPBlack2009|page=16|pp=}} Like the original Smalltalk-80, Pharo provides several [[live programming]] features such as immediate object manipulation, [[Reflective programming|live updates]], and [[just-in-time compilation]] (JIT). The system image includes an [[integrated development environment]] (IDE) to modify its components.
== Introduction ==
Pharo is a pure object-oriented dynamically typed and reflective language. The stated goal of Pharo is to revisit Smalltalk design and enhance it.


Pharo was forked from [[Squeak]] v3.9 in March of 2008.<ref>{{Cite web |title=DevelopOnTheWeb |url=http://developontheweb.co.uk/pharo.html |access-date=2021-11-24 |website=developontheweb.co.uk}}</ref><ref name=":0"/><ref name="AndrewPBlack2009"/>{{r|AndrewPBlack2009|page=10|pp=}}<ref>{{Cite web |title=The Rise and Fall of Commercial Smalltalk |url=http://www.wirfs-brock.com/allen/posts/914 |access-date=2021-11-24 |website=www.wirfs-brock.com|language=en-US}}</ref>
The name Pharo comes from the French word "phare" ({{IPA-fr|faʁ}}) which means lighthouse. This is why the Pharo logo shows a drawing of a lighthouse inside the final letter ''O'' of the name.

== Overview ==
Pharo is a pure object-oriented, dynamically typed, and reflective language. The stated project goal is to revisit Smalltalk design and enhance it.

The name Pharo comes from the French word "phare" ({{IPA-fr|faʁ}}) which means [[lighthouse]]. This is why the Pharo logo shows a drawing of a lighthouse inside the final letter ''O'' of the name.


== Key features ==
== Key features ==
=== Virtual machine ===
* Multiplatform virtual machine with [[just-in-time compilation]] (JIT), combined generational [[Garbage collection (computer science)|garbage collector]], [[ephemeron]]s, forwarders
* Fast object enumeration
* Easy [[call stack]] manipulation
* AST metalinks
* Relatively low memory consumption
* Customizable compiler
* Optional complete object memory persistence
* Resumable exceptions
* Fast object serialization


=== Built-in software ===
* Optional fusion of developed program and [[Integrated development environment|development environment]]
* Optional fusion of developed program and [[Integrated development environment|development environment]]
*Live object inspection


=== Language features ===
* A pure object-oriented approach
* Simple syntax
* Simple syntax
* Object-oriented programming
* Immediate object identity swapping
* Immediate object identity swapping
* Resumable exceptions
* Live object inspection
* Dynamic inheritance
* Dynamic inheritance
* Multiplatform virtual machine with [[Just-in-time compilation|JIT]], combined generational [[Garbage collection (computer science)|garbage collector]], ephemerons, forwarders
* Easy call stack manipulation
* Fast object enumeration
* Objects as methods
* Objects as methods
* Optional [[Green threads]]
* Optional [[Green threads]]
* AST metalinks
* Customizable metaclasses
* Customizable metaclasses
* Easy to use proxy objects
* Relatively low memory consumption
* Customizable compiler
* Optional complete object memory persistence
* Fast object serialization
* Easy use of proxy objects


== Relation to Smalltalk ==
== Relation to Smalltalk ==
Pharo is based on general concepts of Smalltalk but seeks to improve on them, so does not limit itself to them. The basic syntax of the language has a close resemblance to Smalltalk. However, the way [[Class (computer programming)|classes]] are defined in Pharo differs from other Smalltalk [[Dialect (computing)|dialects]].{{How |date=October 2019}}

Pharo is based on general concepts of Smalltalk but seeks to improve on them so does not limit itself to them. The basic syntax of the language has a close resemblance to Smalltalk. However, the way classes are defined in Pharo differs from other Smalltalk dialects.{{How|date=October 2019}}


== Language syntax ==
== Language syntax ==

[[File:Pharo syntax postcard.svg|400px|thumb|right|Pharo syntax postcard]]
[[File:Pharo syntax postcard.svg|400px|thumb|right|Pharo syntax postcard]]
The Pharo syntax is based on [[Smalltalk#Syntax|Smalltalk-80]] language syntax with several extensions. Some of these are common among modern Smalltalk dialects.
The Pharo syntax is based on [[Smalltalk#Syntax|Smalltalk-80]] language syntax with several extensions. Some of these are common among modern Smalltalk dialects.


* literals for dynamic arrays. The expressions that specify the array content are evaluated in time of the program execution
* literals for dynamic [[Array (data structure)|arrays]]. The expressions that specify the array content are evaluated during program execution
<source lang="smalltalk">{1. 2. 1+2}</source>
<syntaxhighlight lang="smalltalk">{1. 2. 1+2}</syntaxhighlight>
* literals for byte arrays that can be composed only of integer numbers in the range from 0 to 255
* literals for [[byte]] arrays that can be composed only of integer numbers in the range from 0 to 255
<source lang="smalltalk">#[1 2 3 4]</source>
<syntaxhighlight lang="smalltalk">#[1 2 3 4]</syntaxhighlight>
* literals for scaled decimals, a representation of fixed point decimal numbers able to accurately represent decimal fractions
* literals for scaled decimals, a representation of fixed point decimal numbers able to accurately represent decimal fractions
<source lang="smalltalk">3.14s2</source>
<syntaxhighlight lang="smalltalk">3.14s2</syntaxhighlight>
* pragmas. In Smalltalk-80 the pragmas are used only for primitive methods. In Pharo they are fully capable method annotations
* pragmas. In Smalltalk-80 the pragmas are used only for primitive methods. In Pharo they are fully capable method annotations
<source lang="smalltalk"><gtInspectorPresentationOrder: 30></source>
<syntaxhighlight lang="smalltalk"><gtInspectorPresentationOrder: 30></syntaxhighlight>
* two double quotes inside a comment are interpreted as a single double quotes character that is part of the content of the comment
* two double quotes inside a comment are interpreted as one double quote character that is part of the content of the comment


The Pharo language syntax is supposed to be very simple and minimalistic. The basic language elements are often presented on a single postcard. The grammar is classified as LL(1).
The Pharo language syntax is supposed to be very simple and minimalist. The basic language elements are often presented on one postcard as a showcase for the language's brevity. The grammar is classified as LL(1).


The language grammar does not specify directly how the code should be stored in files. Pharo uses [https://github.com/pharo-vcs/tonel Tonel] as the preferred code serialization format.
The language grammar does not specify directly how the code should be stored in files. Pharo uses [https://github.com/pharo-vcs/tonel Tonel] as the preferred code serializing format.


== History ==
== History ==
Pharo emerged as a fork of [[Squeak]], an open-source Smalltalk environment created by the Smalltalk-80 team ([[Daniel Henry Holmes Ingalls, Jr.|Dan Ingalls]] and [[Alan Kay]]). Pharo was created by S. Ducasse [http://stephane.ducasse.free.fr] and M. Denker in March 2008. It focuses on modern software engineering and development techniques.{{Citation needed|date=October 2015}} Pharo is supported by the Pharo consortium (for legal entities) [http://consortium.pharo.org] and the Pharo association for physical persons [http://association.pharo.org].
Pharo emerged as a fork of [[Squeak]], an open-source Smalltalk environment created by the original Smalltalk-80 team ([[Daniel Henry Holmes Ingalls, Jr.|Dan Ingalls]] and [[Alan Kay]]). Pharo was created by S. Ducasse [http://stephane.ducasse.free.fr] and M. Denker in March 2008. It focuses on modern software engineering and development techniques.{{Citation needed |date=October 2015}} Pharo is supported by the Pharo consortium (for legal entities) [http://consortium.pharo.org] and the Pharo association for physical persons [http://association.pharo.org].



[[File:Pharo look history.png|350px|right]]
[[File:Pharo look history.png|350px|right]]

{| class="wikitable" style="margin-left: 1em;"
{| class="wikitable" style="margin-left: 1em;"
! Pharo version
! Version
! Release date
! Release date
! Major features
! Major features
|-
|-
|
|
| March 16, 2008 <ref>{{cite web|url=https://pharoweekly.wordpress.com/2018/05/29/pharo-got-10-years/ |title=Pharo got 10 years |publisher=Pharo-project.org |accessdate=May 31, 2018}}</ref>
| March 16, 2008<ref>{{cite web |url=https://pharoweekly.wordpress.com/2018/05/29/pharo-got-10-years/ |title=Pharo got 10 years |publisher=Pharo-project.org |access-date=May 31, 2018}}</ref>
| Fork of Squeak environment
| Fork of Squeak environment
|-
|-
| Pharo 1.0
| 1.0
| April 15, 2010
| April 15, 2010
| real closures, EToys and MVC removed
| real [[Closure (computer programming)|closures]], EToys and [[Model–view–controller|MVC]] removed
|-
|-
| Pharo 1.1
| 1.1
| July 26, 2010
| July 26, 2010
| Cog JIT VM, Settings framework
| Cog JIT VM, Settings framework
|-
|-
| Pharo 1.2
| 1.2
| March 29, 2011
| March 29, 2011
| new Finder, Recent changes tool, improved Help, better themes
| new Finder, Recent changes tool, improved Help, better themes
|-
|-
| Pharo 1.3
| 1.3
| August 2011
| August 2011
| Zinc, headless images
| Zinc, headless images
|-
|-
| Pharo 1.4
| 1.4
| April 2012<ref>{{cite web|url=http://www.pharo-project.org/pharo-download/release-1-4 |title=Pharo Open Source Smalltalk — Release 1.4 |publisher=Pharo-project.org |date=April 17, 2012 |accessdate=April 5, 2013}}</ref>
| April 2012<ref>{{cite web |url=http://www.pharo-project.org/pharo-download/release-1-4 |title=Pharo Open Source Smalltalk — Release 1.4 |publisher=Pharo-project.org |date=April 17, 2012 |access-date=April 5, 2013}}</ref>
| Ring metamodel, better code simulator
| Ring metamodel, better code simulator
|-
|-
| Pharo 2.0
| 2.0
| March 18, 2013.<ref>{{cite web|url=http://www.pharo-project.org/pharo-download/release-2-0 |title=Pharo Open Source Smalltalk — Release 2.0 |publisher=Pharo-project.org |date=March 18, 2013 |accessdate=April 5, 2013}}</ref>
| March 18, 2013<ref>{{cite web |url=http://www.pharo-project.org/pharo-download/release-2-0 |title=Pharo Open Source Smalltalk — Release 2.0 |publisher=Pharo-project.org |date=March 18, 2013 |access-date=April 5, 2013}}</ref>
| browser improvements, QA tools, Fuel serializer, better files API
| browser improvements, QA tools, Fuel serializer, better files API
|-
|-
| Pharo 3.0
| 3.0
| April 2014.<ref>{{cite web |url=http://pharo.org/news/pharo-3.0-released |title=Pharo Open Source Smalltalk — Release 3.0 |publisher=pharo.org |date=April 30, 2014 |access-date=May 1, 2014 |archive-url=https://web.archive.org/web/20170823120219/http://pharo.org/news/pharo-3.0-released |archive-date=August 23, 2017 |url-status=dead }}</ref>
| April 2014<ref>{{cite web |url=http://pharo.org/news/pharo-3.0-released |title=Pharo Open Source Smalltalk — Release 3.0 |publisher=pharo.org |date=April 30, 2014 |access-date=May 1, 2014 |archive-url=https://web.archive.org/web/20170823120219/http://pharo.org/news/pharo-3.0-released |archive-date=August 23, 2017 |url-status=dead}}</ref>
| new modular compiler (Opal) and debugger, continuations
| new modular compiler (Opal) and debugger, continuations
|-
|-
| Pharo 4.0
| 4.0
| April 2015.<ref>{{cite web |url=http://pharo.org/news/pharo-4.0-released |title=Pharo Open Source Smalltalk — Release 4.0 |publisher=pharo.org |date=April 15, 2015 |access-date=April 16, 2015 |archive-url=https://web.archive.org/web/20180722182007/http://pharo.org/news/pharo-4.0-released |archive-date=July 22, 2018 |url-status=dead }}</ref>
| April 2015<ref>{{cite web |url=http://pharo.org/news/pharo-4.0-released |title=Pharo Open Source Smalltalk — Release 4.0 |publisher=pharo.org |date=April 15, 2015 |access-date=April 16, 2015 |archive-url=https://web.archive.org/web/20170823121253/http://pharo.org/news/pharo-4.0-released |archive-date=August 23, 2017 |url-status=dead}}</ref>
| GTools, slots
| GTools, slots
|-
|-
| Pharo 5.0
| 5.0
| May 2016. <ref>{{cite web |url=http://pharo.org/news/pharo-5.0-released |title=Pharo Open Source Smalltalk — Release 5.0 |publisher=pharo.org |date=May 12, 2016 |access-date=May 13, 2016 |archive-url=https://web.archive.org/web/20180722182016/http://pharo.org/news/pharo-5.0-released |archive-date=July 22, 2018 |url-status=dead }}</ref>
| May 2016<ref>{{cite web |url=http://pharo.org/news/pharo-5.0-released |title=Pharo Open Source Smalltalk — Release 5.0 |publisher=pharo.org |date=May 12, 2016 |access-date=May 13, 2016 |archive-url=https://web.archive.org/web/20171229043803/http://pharo.org/news/pharo-5.0-released |archive-date=December 29, 2017 |url-status=dead}}</ref>
| Spur VM, UFFI, improved reflectivity
| Spur VM, UFFI, improved reflectivity
|-
|-
| Pharo 6.0
| 6.0
| 6 June, 2017. <ref>{{cite web|url=http://pharo.org/news/pharo6.0-released |title=Pharo Open Source Smalltalk - Release 6.0|publisher=pharo.org |date=June 6, 2017}}</ref>
| 6 June, 2017<ref>{{cite web |url=http://pharo.org/news/pharo6.0-released |title=Pharo Open Source Smalltalk - Release 6.0 |publisher=pharo.org |date=June 6, 2017 |access-date=June 6, 2017 |archive-date=November 20, 2017 |archive-url=https://web.archive.org/web/20171120040249/http://pharo.org/news/pharo6.0-released |url-status=dead}}</ref>
| 64-bit and Git support
| 64-bit and Git support
|-
|-
| Pharo 6.1
| 6.1
| 24 July, 2017. <ref>{{cite web|url=http://pharo.org/news/pharo6.1-released |title=Pharo 6.1 released|publisher=pharo.org |date=July 24, 2017}}</ref>
| 24 July, 2017<ref>{{cite web |url=http://pharo.org/news/pharo6.1-released |title=Pharo 6.1 released |publisher=pharo.org |date=July 24, 2017 |access-date=August 11, 2017 |archive-date=August 20, 2017 |archive-url=https://web.archive.org/web/20170820201213/http://pharo.org/news/pharo6.1-released |url-status=dead}}</ref>
| improved Git support
| improved Git support
|-
|-
| Pharo 7.0
| 7.0
| 22 January, 2019. <ref>{{cite web|url=https://pharo.org/news/pharo7.0-released |title=Pharo 7.0 released|publisher=pharo.org |date=January 22, 2019}}</ref>
| 22 January, 2019<ref>{{cite web |url=https://pharo.org/news/pharo7.0-released |title=Pharo 7.0 released |publisher=pharo.org |date=January 22, 2019 |access-date=January 22, 2019 |archive-date=February 12, 2022 |archive-url=https://web.archive.org/web/20220212044144/https://pharo.org/news/pharo7.0-released |url-status=dead}}</ref>
| bootstrapping, new code browser (Calypso), stateful traits
| bootstrapping, new code browser (Calypso), stateful traits
|-
|-
| 8.0
| {{Version |c |Pharo 8.0}}
| 20 January, 2020. <ref>{{cite web|url=https://pharo.org/news/pharo8.0-released |title=Pharo 8.0 Released!|publisher=pharo.org |date=January 20, 2020}}</ref>
| 20 January, 2020<ref>{{cite web |url=https://pharo.org/news/pharo8.0-released |title=Pharo 8.0 Released! |publisher=pharo.org |date=January 20, 2020 |access-date=January 20, 2020 |archive-date=February 12, 2022 |archive-url=https://web.archive.org/web/20220212044145/https://pharo.org/news/pharo8.0-released |url-status=dead}}</ref>
| improved support of Git, testing, refactoring and Windows
| improved support of Git, testing, refactoring and Windows
|-
| 9.0
| 15 July, 2021<ref>{{cite web |url=https://pharo.org/news/pharo9-released.html |title=Pharo 9.0 Released! |publisher=pharo.org |date=July 15, 2021}}</ref>
| GTK3 support, object-centric debugger and inspector, refactorings, official [[ARM architecture family|ARM]] VMs
|-
| 10.0
| 5 April, 2022<ref>{{cite web |url=https://pharo.org/news/pharo10-released.html |title=Pharo 10.0 Released! |publisher=pharo.org |date=April 5, 2022}}</ref>
| Cleanups, modularization, many rewritten and improved tools
|-
| 11.0
| 11 May, 2023<ref>{{cite web |url=https://pharo.org/news/pharo11-released.html |title=Pharo 11.0 Released! |publisher=pharo.org |date=May 11, 2023}}</ref>
| Ephemerons, [[Single instruction, multiple data|SIMD]], more efficient closures, improved tools
|-
| {{Version |c |12.0}}
| 26 May, 2024<ref>{{cite web |url=https://pharo.org/news/2024-04-26-pharo12-released.html |title=Pharo 12.0 Released! |publisher=pharo.org |date=May 26, 2024}}</ref>
| New debug points system, new class definitions, permanent space
|}
|}



== Use of Pharo ==
== Use of Pharo ==

=== Companies and consultants ===
=== Companies and consultants ===
Some companies use Pharo for their development projects.<ref>{{cite web|url = http://www.pharo-project.org/about/success-stories|title = (Press Release) Pharo Open Source Smalltalk — Success stories|publisher = Pharo-project.org|date = |accessdate = April 5, 2013}}</ref> In particular, they use:
Some companies use Pharo for their development projects.<ref>{{cite press release |url=http://www.pharo-project.org/about/success-stories |title=Pharo Open Source Smalltalk — Success stories |publisher=Pharo-project.org |date= |access-date=April 5, 2013}}</ref> In particular, they use:
* [[Seaside (software)|Seaside]] for dynamic web development<ref>{{cite web |url=http://www.seaside.st |title=Home |publisher=seaside.st |date=March 18, 2007 |access-date=April 5, 2013}}</ref>

* [[Seaside (software)|Seaside]] for dynamic web development<ref>{{cite web|url=http://www.seaside.st |title=Home |publisher=seaside.st |date=March 18, 2007 |accessdate=April 5, 2013}}</ref>
* Zinc for server architectures<ref>{{cite web |url=http://zn.stfx.eu/zn/index.html |title=Zinc HTTP Components |publisher=Zn.stfx.eu |date= |access-date=April 5, 2013}}</ref>
* Zinc for server architectures<ref>{{cite web|url=http://zn.stfx.eu/zn/index.html |title=Zinc HTTP Components |publisher=Zn.stfx.eu |date= |accessdate=April 5, 2013}}</ref>
* [[Moose (analysis)|Moose]]<ref>{{cite web |last1=Girba |first1=Tudor |url=http://www.moosetechnology.org |title=Home |publisher=Moose technology |date= |access-date=April 5, 2013}}</ref> to analyse data and software from all programming languages
* Graphic [[Library (computing)|libraries]] for evolved [[user interface]]s
* [[Moose (analysis)|Moose]]<ref>{{cite web|last=Girba |first=Tudor |url=http://www.moosetechnology.org |title=Home |publisher=Moose technology |date= |accessdate=April 5, 2013}}</ref> to analyse data and software from all programming languages
* [[Roassal]] to visualize data<ref>{{cite web |url=http://agilevisualization.com |title=Agile Visualization |publisher=Object Profile |date= |access-date=May 31, 2018}}</ref>
* Graphic libraries for evolved user interfaces
* [[Roassal]] to visualize data<ref>{{cite web|url=http://agilevisualization.com |title=Agile Visualization |publisher= Object Profile |date= |accessdate=May 31, 2018}}</ref>


The Pharo consortium<ref>{{cite web|url=http://consortium.pharo.org |title=web: Pharo Consortium |publisher=Consortium.pharo.org |date=March 31, 2013 |accessdate=April 5, 2013}}</ref> was created for companies wishing to support the Pharo project. The Pharo association<ref>{{cite web|last=Ducasse |first=Stephane |url=http://association.pharo.org |title=association: Pharo Association |publisher=Association.pharo.org |date= |accessdate=April 5, 2013}}</ref> was recently{{When|date=October 2019}} created for users wishing to support the project.
The Pharo consortium<ref>{{cite web |url=http://consortium.pharo.org |title=web: Pharo Consortium |publisher=Consortium.pharo.org |date=March 31, 2013 |access-date=April 5, 2013}}</ref> was created for companies wishing to support the Pharo project. The Pharo association<ref>{{cite web |last1=Ducasse |first1=Stephane |url=http://association.pharo.org |title=association: Pharo Association |publisher=Association.pharo.org |date= |access-date=April 5, 2013}}</ref> was created in 2011<ref>{{cite web |url=https://www.journal-officiel.gouv.fr/pages/associations-detail-annonce/?q.id=id:201100131025 |title=Annonce JOAFE n°1025 de la parution n°20110013 du 26 mars 2011 |publisher=Journal-officiel.gouv.fr |access-date=May 1, 2022}}</ref> for users wishing to support the project.


== Performance and virtual machine (VM) ==
== Performance and virtual machine (VM) ==
Pharo relies on a virtual machine that is written almost entirely in Smalltalk itself. Beginning in 2008, a new virtual machine (Cog) for Squeak, Pharo and [[Newspeak (programming language)|Newspeak]] has been developed that has a level of performance close to the fastest Smalltalk virtual machine.<ref>{{cite web|url=http://www.mirandabanda.org/cogblog/ |title=Cog Blog |publisher=Mirandabanda.org |date= |accessdate=April 5, 2013}}</ref> In 2014/2015 the VM community is working on Spur, a new Memory Manager for Cog that should again increase performance and provide better 64-bit VM support.<ref>{{cite web|url=https://clementbera.wordpress.com/2014/02/06/7-points-summary-of-the-spur-memory-manager/ |title=7-point summary of the Spur memory manager |publisher=Clément Béra |date= |accessdate=April 17, 2015}}</ref>
Pharo relies on a virtual machine that is written almost entirely in Smalltalk. Beginning in 2008, a new virtual machine (Cog) for Squeak, Pharo and [[Newspeak (programming language)|Newspeak]] has been developed that performs nearly as well as the fastest Smalltalk virtual machine.<ref>{{cite web |url=http://www.mirandabanda.org/cogblog/ |title=Cog Blog |publisher=Mirandabanda.org |date= |access-date=April 5, 2013}}</ref> In 2014/2015 the VM community is working on Spur, a new Memory Manager for Cog that should again increase performance and provide better 64-bit VM support.<ref>{{cite web |url=https://clementbera.wordpress.com/2014/02/06/7-points-summary-of-the-spur-memory-manager/ |title=7-point summary of the Spur memory manager |publisher=Clément Béra |date= |access-date=April 17, 2015}}</ref>


== See also ==
== See also ==
Line 184: Line 186:


== References ==
== References ==
{{reflist}}
{{Reflist}}


== External links ==
== External links ==
Line 191: Line 193:
{{Smalltalk programming language}}
{{Smalltalk programming language}}


[[Category:Programming languages]]
[[Category:Object-oriented programming languages]]
[[Category:Class-based programming languages]]
[[Category:Class-based programming languages]]
[[Category:Dynamically typed programming languages]]
[[Category:Dynamically typed programming languages]]
[[Category:Smalltalk programming language family]]
[[Category:Smalltalk programming language family]]
[[Category:Cross-platform free software]]
[[Category:Free compilers and interpreters]]
[[Category:Programming languages created in 2008]]
[[Category:2008 software]]
[[Category:Software using the MIT license]]
[[Category:Software using the MIT license]]
[[Category:Software using the Apache license]]
<!-- Hidden categories below -->
[[Category:Articles with example Smalltalk code]]

Revision as of 16:53, 4 May 2024

Pharo
Pharo logo with lighthouse
Paradigmobject-oriented
FamilySmalltalk: Squeak
DeveloperPharo community
First appearedMarch 2008; 16 years ago (2008-03)
Stable release
12.0[1] Edit this on Wikidata / 26 April 2024; 4 months ago (26 April 2024)
Typing disciplinedynamic
Implementation languageSmalltalk
PlatformARM, IA-32, x86-64
OSWindows, Linux, macOS, others
LicenseMIT, partly Apache 2.0[2]
Websitepharo.org
Influenced by
Smalltalk (Squeak)

Pharo is a cross-platform implementation of the classic Smalltalk-80 programming language and runtime system.[3] It is based on the OpenSmalltalk virtual machine (VM) named Cog,[4][5][6][7]: 16  which evaluates a dynamic, reflective, and object-oriented programming language with a syntax closely resembling Smalltalk-80. It is free and open-source software, released under a mix of MIT, and Apache 2 licenses.

Pharo is shipped with source code compiled into a system image that contains all software needed to run Pharo.[7]: 16  Like the original Smalltalk-80, Pharo provides several live programming features such as immediate object manipulation, live updates, and just-in-time compilation (JIT). The system image includes an integrated development environment (IDE) to modify its components.

Pharo was forked from Squeak v3.9 in March of 2008.[8][3][7][7]: 10 [9]

Overview

Pharo is a pure object-oriented, dynamically typed, and reflective language. The stated project goal is to revisit Smalltalk design and enhance it.

The name Pharo comes from the French word "phare" (French pronunciation: [faʁ]) which means lighthouse. This is why the Pharo logo shows a drawing of a lighthouse inside the final letter O of the name.

Key features

Virtual machine

  • Multiplatform virtual machine with just-in-time compilation (JIT), combined generational garbage collector, ephemerons, forwarders
  • Fast object enumeration
  • Easy call stack manipulation
  • AST metalinks
  • Relatively low memory consumption
  • Customizable compiler
  • Optional complete object memory persistence
  • Resumable exceptions
  • Fast object serialization

Built-in software

Language features

  • Simple syntax
  • Object-oriented programming
  • Immediate object identity swapping
  • Dynamic inheritance
  • Objects as methods
  • Optional Green threads
  • Customizable metaclasses
  • Easy to use proxy objects

Relation to Smalltalk

Pharo is based on general concepts of Smalltalk but seeks to improve on them, so does not limit itself to them. The basic syntax of the language has a close resemblance to Smalltalk. However, the way classes are defined in Pharo differs from other Smalltalk dialects.[how?]

Language syntax

Pharo syntax postcard

The Pharo syntax is based on Smalltalk-80 language syntax with several extensions. Some of these are common among modern Smalltalk dialects.

  • literals for dynamic arrays. The expressions that specify the array content are evaluated during program execution
{1. 2. 1+2}
  • literals for byte arrays that can be composed only of integer numbers in the range from 0 to 255
#[1 2 3 4]
  • literals for scaled decimals, a representation of fixed point decimal numbers able to accurately represent decimal fractions
3.14s2
  • pragmas. In Smalltalk-80 the pragmas are used only for primitive methods. In Pharo they are fully capable method annotations
<gtInspectorPresentationOrder: 30>
  • two double quotes inside a comment are interpreted as one double quote character that is part of the content of the comment

The Pharo language syntax is supposed to be very simple and minimalist. The basic language elements are often presented on one postcard as a showcase for the language's brevity. The grammar is classified as LL(1).

The language grammar does not specify directly how the code should be stored in files. Pharo uses Tonel as the preferred code serializing format.

History

Pharo emerged as a fork of Squeak, an open-source Smalltalk environment created by the original Smalltalk-80 team (Dan Ingalls and Alan Kay). Pharo was created by S. Ducasse [1] and M. Denker in March 2008. It focuses on modern software engineering and development techniques.[citation needed] Pharo is supported by the Pharo consortium (for legal entities) [2] and the Pharo association for physical persons [3].

Pharo version Release date Major features
March 16, 2008[10] Fork of Squeak environment
1.0 April 15, 2010 real closures, EToys and MVC removed
1.1 July 26, 2010 Cog JIT VM, Settings framework
1.2 March 29, 2011 new Finder, Recent changes tool, improved Help, better themes
1.3 August 2011 Zinc, headless images
1.4 April 2012[11] Ring metamodel, better code simulator
2.0 March 18, 2013[12] browser improvements, QA tools, Fuel serializer, better files API
3.0 April 2014[13] new modular compiler (Opal) and debugger, continuations
4.0 April 2015[14] GTools, slots
5.0 May 2016[15] Spur VM, UFFI, improved reflectivity
6.0 6 June, 2017[16] 64-bit and Git support
6.1 24 July, 2017[17] improved Git support
7.0 22 January, 2019[18] bootstrapping, new code browser (Calypso), stateful traits
8.0 20 January, 2020[19] improved support of Git, testing, refactoring and Windows
9.0 15 July, 2021[20] GTK3 support, object-centric debugger and inspector, refactorings, official ARM VMs
10.0 5 April, 2022[21] Cleanups, modularization, many rewritten and improved tools
11.0 11 May, 2023[22] Ephemerons, SIMD, more efficient closures, improved tools
Current stable version: 12.0 26 May, 2024[23] New debug points system, new class definitions, permanent space

Use of Pharo

Companies and consultants

Some companies use Pharo for their development projects.[24] In particular, they use:

The Pharo consortium[29] was created for companies wishing to support the Pharo project. The Pharo association[30] was created in 2011[31] for users wishing to support the project.

Performance and virtual machine (VM)

Pharo relies on a virtual machine that is written almost entirely in Smalltalk. Beginning in 2008, a new virtual machine (Cog) for Squeak, Pharo and Newspeak has been developed that performs nearly as well as the fastest Smalltalk virtual machine.[32] In 2014/2015 the VM community is working on Spur, a new Memory Manager for Cog that should again increase performance and provide better 64-bit VM support.[33]

See also

References

  1. ^ https://pharo.org/news/2024-04-26-pharo12-released.html. {{cite web}}: Missing or empty |title= (help)
  2. ^ Pharo license information
  3. ^ a b Black, Andrew P.; Ducasse, Stéphane; Nierstrasz, Oscar; Pollet, Damien; Cassou, Damien; Denker, Marcus (October 28, 2009). Pharo by example. Kehrsatz, Switzerland. ISBN 978-3-9523341-4-0. OCLC 957555627.{{cite book}}: CS1 maint: location missing publisher (link)
  4. ^ "OpenSmalltalk". opensmalltalk.org. Retrieved November 24, 2021.
  5. ^ OpenSmalltalk/opensmalltalk-vm, OpenSmalltalk, November 23, 2021, retrieved November 24, 2021
  6. ^ "Cog Blog: About Cog". Retrieved November 24, 2021.
  7. ^ a b c d Black, Andrew P.; Ducasse, Stéphane; Nierstrasz, Oscar; Pollet, Damien (October 28, 2009). Pharo by Example. Samuel Morello. ISBN 978-3-9523341-4-0.
  8. ^ "DevelopOnTheWeb". developontheweb.co.uk. Retrieved November 24, 2021.
  9. ^ "The Rise and Fall of Commercial Smalltalk". www.wirfs-brock.com. Retrieved November 24, 2021.
  10. ^ "Pharo got 10 years". Pharo-project.org. Retrieved May 31, 2018.
  11. ^ "Pharo Open Source Smalltalk — Release 1.4". Pharo-project.org. April 17, 2012. Retrieved April 5, 2013.
  12. ^ "Pharo Open Source Smalltalk — Release 2.0". Pharo-project.org. March 18, 2013. Retrieved April 5, 2013.
  13. ^ "Pharo Open Source Smalltalk — Release 3.0". pharo.org. April 30, 2014. Archived from the original on August 23, 2017. Retrieved May 1, 2014.
  14. ^ "Pharo Open Source Smalltalk — Release 4.0". pharo.org. April 15, 2015. Archived from the original on August 23, 2017. Retrieved April 16, 2015.
  15. ^ "Pharo Open Source Smalltalk — Release 5.0". pharo.org. May 12, 2016. Archived from the original on December 29, 2017. Retrieved May 13, 2016.
  16. ^ "Pharo Open Source Smalltalk - Release 6.0". pharo.org. June 6, 2017. Archived from the original on November 20, 2017. Retrieved June 6, 2017.
  17. ^ "Pharo 6.1 released". pharo.org. July 24, 2017. Archived from the original on August 20, 2017. Retrieved August 11, 2017.
  18. ^ "Pharo 7.0 released". pharo.org. January 22, 2019. Archived from the original on February 12, 2022. Retrieved January 22, 2019.
  19. ^ "Pharo 8.0 Released!". pharo.org. January 20, 2020. Archived from the original on February 12, 2022. Retrieved January 20, 2020.
  20. ^ "Pharo 9.0 Released!". pharo.org. July 15, 2021.
  21. ^ "Pharo 10.0 Released!". pharo.org. April 5, 2022.
  22. ^ "Pharo 11.0 Released!". pharo.org. May 11, 2023.
  23. ^ "Pharo 12.0 Released!". pharo.org. May 26, 2024.
  24. ^ "Pharo Open Source Smalltalk — Success stories" (Press release). Pharo-project.org. Retrieved April 5, 2013.
  25. ^ "Home". seaside.st. March 18, 2007. Retrieved April 5, 2013.
  26. ^ "Zinc HTTP Components". Zn.stfx.eu. Retrieved April 5, 2013.
  27. ^ Girba, Tudor. "Home". Moose technology. Retrieved April 5, 2013.
  28. ^ "Agile Visualization". Object Profile. Retrieved May 31, 2018.
  29. ^ "web: Pharo Consortium". Consortium.pharo.org. March 31, 2013. Retrieved April 5, 2013.
  30. ^ Ducasse, Stephane. "association: Pharo Association". Association.pharo.org. Retrieved April 5, 2013.
  31. ^ "Annonce JOAFE n°1025 de la parution n°20110013 du 26 mars 2011". Journal-officiel.gouv.fr. Retrieved May 1, 2022.
  32. ^ "Cog Blog". Mirandabanda.org. Retrieved April 5, 2013.
  33. ^ "7-point summary of the Spur memory manager". Clément Béra. Retrieved April 17, 2015.