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
| 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 =
- Optional fusion of developed program and development environment
- Live object inspection
= 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
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
- literals for byte arrays that can be composed only of integer numbers in the range from 0 to 255
- literals for scaled decimals, a representation of fixed point decimal numbers able to accurately represent decimal fractions
- 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].
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 |
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
| Ring metamodel, better code simulator |
2.0
| browser improvements, QA tools, Fuel serializer, better files API |
3.0
| new modular compiler (Opal) and debugger, continuations |
4.0
| GTools, slots |
5.0
| Spur VM, UFFI, improved reflectivity |
6.0
| 64-bit and Git support |
6.1
| improved Git support |
7.0
| bootstrapping, new code browser (Calypso), stateful traits |
8.0
| improved support of Git, testing, refactoring and Windows |
9.0
| GTK3 support, object-centric debugger and inspector, refactorings, official ARM VMs |
10.0
| Cleanups, modularization, many rewritten and improved tools |
11.0
| Ephemerons, SIMD, more efficient closures, improved tools |
{{Version |c |12.0}}
| 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}}
External links
- {{Official website|pharo.org}}
{{Smalltalk programming language}}
Category:Programming languages
Category:Object-oriented programming languages
Category:Class-based programming languages
Category:Dynamically typed programming languages
Category:Smalltalk programming language family
Category:Cross-platform free software
Category:Free and open source compilers
Category:Programming languages created in 2008
Category:Software using the MIT license