Questions tagged [pharo]

Pharo is an open-source Smalltalk environment. It is a derivative of Squeak and is MIT licensed with some original Apple parts remaining under the Apache 2.0 license.

Pharo is a fork of Squeak, an implementation of the object-oriented, dynamically typed, reflective programming language Smalltalk.

Appearing in 2008, Pharo focuses on removing unessential code from Squeak and serves as the reference implementation of Seaside, a web application framework for developing web applications in Smalltalk. The name Pharo may be a reference to the famous Pharos lighthouse in ancient Alexandria.

Pharo 4.0 includes much improved tools to analyse and view objects and to construct browsers (Spotter, Playground, Glamour framework).

Squeak before version 4.0 shipped under the Squeak license, which was not an approved OSI open source licence, Pharo has a policy that enforces contributors to agree to publishing their code under the MIT License. Many packages that are integrated into the Squeak base distribution are optional in Pharo. Unlike Squeak, Pharo ships with TrueType fonts bundled already.

Useful links

913 questions
7
votes
2 answers

Importing a GNU Smalltalk project into Pharo?

I have about 1800 lines of GNU Smalltalk code I'd like to pull into Pharo. I've started doing it class by class, selector by selector, but it is very time consuming and tedious. Is there a way to bulk import a project? I could easily adjust the…
lurker
  • 56,987
  • 9
  • 69
  • 103
7
votes
2 answers

Adding stuff to run on startup of Pharo Image

I'd like to add stuff to run at the beginning of a pharo image start-up. Nothing fancy just a call to a class method that is an entry point to my application. I can't find any guides to making smalltalk scripts at startup. Alternatively are there…
Roman A. Taycher
  • 18,619
  • 19
  • 86
  • 141
7
votes
2 answers

How to uninstall Pharo Glamorous Toolkit?

I want to uninstall the Glamorous Toolkit (to me seems to be overloaded versions of classic Smalltalk tools) in Pharo 4 or 5. Here is my code: | config configName | configName := #ConfigurationOfGTInspectorCore. config := (MBConfigurationInfo …
Juanjo
  • 155
  • 3
7
votes
5 answers

How to print Smalltalk code from Pharo/Squeak?

What is the best way to print - syntax colored and well formatted - code from Pharo/Squeak on paper? 1) Is there a way to print directly from within Pharo/Squeak? (i use it on macosx) 2) Is there a way to export syntax colored, well formatted code…
Helene Bilbo
  • 1,142
  • 7
  • 20
7
votes
1 answer

Double dispatch in Pharo

Could someone please explain the process of double dispatch in Pharo 4.0 with Smalltalk? I am new to Smalltalk and am having difficulty grasping the concept, since it is implemented very differently in Java as compared to Smalltalk. It will be very…
ruhi
  • 73
  • 3
7
votes
2 answers

Smalltalk Seaside - jQuery Ajax Callback

So I have a non-Ajax callback working fine using this code (the 'convert' method calculates a new value for the 'result' instance variable): html form: [ html text: 'Number to convert: '. html textInput callback:…
Bryan Green
  • 441
  • 3
  • 18
7
votes
5 answers

Is it OK to leave the [ and ] out for messages like at:ifAbsent: if you don't need a full block?

In Smalltalk (and specifically Pharo/Squeak) I want to know if it is OK to leave out the "[" and "]" for the argument to messages like at:ifAbsent: if you don't need a block, like this; ^ bookTitles at: bookID ifAbsent: ''. and ^ books at: bookID…
claudio
  • 71
  • 1
7
votes
0 answers

Why would you choose Squeak over Pharo today?

I am trying to understand the uses of both. Already I have seen stuff on the SmalltalkHub doesn't often build on Squeak but always seems to work with Pharo. What are the advantages now in 2014 to choose Squeak and not Pharo?
Marco
  • 71
  • 2
7
votes
2 answers

Monticello: Workflow for simultaneous collaborative development / correctly numbering a version when copying to remote repository

While working, I make lots of revisions. Whenever the code is in reasonable shape, I like to commit. But not all of those commits are interesting. So I make these commits to the local disk or a private server. It looks something like this: I…
Daniel Lyons
  • 22,421
  • 2
  • 50
  • 77
7
votes
2 answers

Debugging interpreter in VM when changing vm primitives

Context As a university project we want to change the the pharo vm to use an object-table and see what happens. We use a pharo-vm clone from github and VMMaker. Building the VM works fine. To get started we added a primitive that returns an…
User
  • 14,131
  • 2
  • 40
  • 59
7
votes
1 answer

How do I instrument test runners in SUnit?

I would like to instrument SUnit tests in Pharo. What is the proper way to change how tests are run? Example: I want to introduce a timeout to tests, each test I run should be aborted after a given delay. Problem: SUnit does not feature a dedicated…
camillobruni
  • 2,298
  • 16
  • 26
7
votes
2 answers

How to make a perspective transformation with Athens/Cairo in Pharo Smalltalk

I found affine transformation functionality (rotate, shear, translate, scale) in Athens/Cairo in Pharo Smalltalk. I am looking for a perspective transformation. Is this possible at all? At least there seem to be no convenience methods for this in…
MartinW
  • 4,966
  • 2
  • 24
  • 60
7
votes
1 answer

Parsing RDF in Smalltalk

Is there any example, in any Smalltalk flavour, showing how to parse a RDF file? The only package I've seen is Rikaiko with a RDFXMLReader class, but there are no references and it seems very undocummented.
Juan Aguerre
  • 388
  • 2
  • 7
6
votes
1 answer

How to prevent Pharo from executing a #startUp-Method of a class?

I added a startUp-Method to one of my classes that immediatelly quits my image. Is there a way to prevent Pharo from executing that method so that I can fix it?
AME
  • 2,499
  • 5
  • 29
  • 45
6
votes
2 answers

Comparing newline counts speed between wc and Smalltalk

I am comparing performance for reading how many lines contains a file. I did it first using the wc command line tool: $ time wc -l bigFile.csv 1673820 bigFile.csv real 0m0.157s user 0m0.124s sys 0m0.062s and then in a clean Pharo Core…
Juan Aguerre
  • 388
  • 2
  • 7