Pharo

{{Other uses}}

{{Distinguish|text=the similar term Pharaoh (disambiguation)}}

{{Use mdy dates|date=April 2013}}

{{Infobox programming language

| name = Pharo

| logo = Pharo Logo v3.0.svg

| logo_size = 200px

| logo caption = Pharo logo with lighthouse

| screenshot = Pharo 6.0.jpg

| screenshot_size = 250px

| paradigm = object-oriented

| family = Smalltalk: Squeak

| developer = Pharo community

| released = {{Start date and age|2008|03}}

| latest release version = {{wikidata|property|edit|reference|P348}}

| latest release date = {{Start date and age|{{wikidata|qualifier|P348|P577}}}}

| latest preview version =

| latest preview date =

| typing = dynamic

| programming language = Smalltalk

| operating system = Windows, Linux, macOS, others

| platform = ARM, IA-32, x86-64

| license = MIT, partly Apache 2.0[https://pharo.org/license Pharo license information]

| website = {{url|https://pharo.org/}}

| influenced by = Smalltalk (Squeak)

| influenced =

}}

Pharo is a cross-platform implementation of the classic Smalltalk-80 programming language and runtime system.{{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}} It is based on the OpenSmalltalk virtual machine (VM) named Cog,{{Cite web |title=OpenSmalltalk |url=https://opensmalltalk.org/ |access-date=2021-11-24 |website=opensmalltalk.org}}{{Citation |title=OpenSmalltalk/opensmalltalk-vm |date=2021-11-23 |url=https://github.com/OpenSmalltalk/opensmalltalk-vm |publisher=OpenSmalltalk |access-date=2021-11-24}}{{Cite web |title=Cog Blog: About Cog |url=http://www.mirandabanda.org/cogblog/about-cog/ |access-date=2021-11-24}}{{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 |publisher=Lulu.com |url=https://www.researchgate.net/publication/40637510|isbn=978-3-9523341-4-0}}{{Rp|page=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.{{r|AndrewPBlack2009|page=16|pp=}} 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 2008.{{Cite web |title=DevelopOnTheWeb |url=http://developontheweb.co.uk/pharo.html |access-date=2021-11-24 |website=developontheweb.co.uk}}{{r|AndrewPBlack2009|page=10|pp=}}{{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}}

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

= 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 |date=October 2019}}

Language syntax

File:Pharo syntax postcard.svg

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

  • 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 [https://github.com/pharo-vcs/tonel 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 [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

class="wikitable" style="margin-left: 1em;"

! Pharo version

! Release date

! Major features

| March 16, 2008{{cite web |url=https://pharoweekly.wordpress.com/2018/05/29/pharo-got-10-years/ |title=Pharo got 10 years |date=May 29, 2018 |publisher=Pharo-project.org |access-date=May 31, 2018}}

| 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{{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}}

| Ring metamodel, better code simulator

2.0

| March 18, 2013{{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}}

| browser improvements, QA tools, Fuel serializer, better files API

3.0

| April 2014{{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}}

| new modular compiler (Opal) and debugger, continuations

4.0

| April 2015{{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}}

| GTools, slots

5.0

| May 2016{{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}}

| Spur VM, UFFI, improved reflectivity

6.0

| 6 June 2017{{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}}

| 64-bit and Git support

6.1

| 24 July 2017{{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}}

| improved Git support

7.0

| 22 January 2019{{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}}

| bootstrapping, new code browser (Calypso), stateful traits

8.0

| 20 January 2020{{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}}

| improved support of Git, testing, refactoring and Windows

9.0

| 15 July 2021{{cite web |url=https://pharo.org/news/pharo9-released.html |title=Pharo 9.0 Released! |publisher=pharo.org |date=July 15, 2021}}

| GTK3 support, object-centric debugger and inspector, refactorings, official ARM VMs

10.0

| 5 April 2022{{cite web |url=https://pharo.org/news/pharo10-released.html |title=Pharo 10.0 Released! |publisher=pharo.org |date=April 5, 2022}}

| Cleanups, modularization, many rewritten and improved tools

11.0

| 11 May 2023{{cite web |url=https://pharo.org/news/pharo11-released.html |title=Pharo 11.0 Released! |publisher=pharo.org |date=May 11, 2023}}

| Ephemerons, SIMD, more efficient closures, improved tools

{{Version |c |12.0}}

| 26 May 2024{{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}}

| New debug points system, new class definitions, permanent space

Use of Pharo

= Companies and consultants =

Some companies use Pharo for their development projects.{{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}} In particular, they use:

  • Seaside for dynamic web development{{cite web |url=http://www.seaside.st |title=Home |publisher=seaside.st |date=March 18, 2007 |access-date=April 5, 2013}}
  • Zinc for server architectures{{cite web |url=http://zn.stfx.eu/zn/index.html |title=Zinc HTTP Components |publisher=Zn.stfx.eu |date= |access-date=April 5, 2013}}
  • Moose{{cite web |last1=Girba |first1=Tudor |url=http://www.moosetechnology.org |title=Home |publisher=Moose technology |date= |access-date=April 5, 2013}} to analyse data and software from all programming languages
  • Graphic libraries for evolved user interfaces
  • Roassal to visualize data{{cite web |url=http://agilevisualization.com |archive-url=https://archive.today/20160817185952/http://agilevisualization.com/ |url-status=usurped |archive-date=August 17, 2016 |title=Agile Visualization |publisher=Object Profile |date= |access-date=May 31, 2018}}

The Pharo consortium{{cite web |url=http://consortium.pharo.org |title=web: Pharo Consortium |publisher=Consortium.pharo.org |date=March 31, 2013 |access-date=April 5, 2013}} was created for companies wishing to support the Pharo project. The Pharo association{{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}} was created in 2011{{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}} 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.{{cite web |url=http://www.mirandabanda.org/cogblog/ |title=Cog Blog |publisher=Mirandabanda.org |date= |access-date=April 5, 2013}} 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.{{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= February 6, 2014|access-date=April 17, 2015}}

See also

References

{{Reflist}}