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
40
votes
8 answers

Squeak or Pharo for the beginning Smalltalker?

I am a Rubyist that is just starting to dabble in Smalltalk and am trying to chose an implementation to experiment with. It seems like Squeak or Pharo would be a good choice, but I'm having trouble finding current information to help decide which…
gregspurrier
  • 1,448
  • 2
  • 13
  • 13
29
votes
4 answers

Using Squeak from a shell

Can I launch Squeak as a REPL (no GUI), where I can enter and evaluate Smalltalk expressions? I know the default image don't allow this. Is there any documentation on how to build a minimum image that can be accessed from a command-line shell?
Vijay Mathew
  • 26,737
  • 4
  • 62
  • 93
25
votes
2 answers

What is the difference between self and yourself in Smalltalk?

In Smalltalk, there are two terms often found within a method body: self and yourself. What is the difference between them?
Euan M
  • 1,126
  • 11
  • 20
17
votes
3 answers

Is Pharo just a repackaging/rebranding of Squeak?

I'm trying to learn some Smalltalk. First found was Squeak, but since it has been removed from Gentoo ebuild tree because of security problem, so I decided to find an alternative. Then I found Pharo through Seaside project, after I downloaded Pharo…
number5
  • 15,913
  • 3
  • 54
  • 51
17
votes
3 answers

What is the difference between a Squeak/Pharo Trait and a Newspeak Mixin?

So Squeak/Pharo support Traits and Newspeak has Mixins. What is the difference? Traits have no instVars but Mixins have?
Richard Durr
  • 3,081
  • 3
  • 20
  • 26
15
votes
1 answer

How does find-by-example work in the Pharo Finder?

One of the things I was most impressed with when digging into Pharo was that the Finder could do find-by-example. I'd previously only seen this in languages like Haskell, where it's possible to know for certain that a function has no side effects.…
Avdi
  • 18,340
  • 6
  • 53
  • 62
14
votes
2 answers

Are Smalltalk bytecode optimizations worth the effort?

Consider the following method in the Juicer class: Juicer >> juiceOf: aString | fruit juice | fruit := self gather: aString. juice := self extractJuiceFrom: fruit. ^juice withoutSeeds It generates the following bytecodes 25 self …
Leandro Caniglia
  • 14,495
  • 4
  • 29
  • 51
14
votes
5 answers

Why do methods return "self" by default in Smalltalk?

Background In Smalltalk, if you don't excplicitly return anything then the message passing evaluates to the receiver (or "self" in the message context). For example, given this method: MyClass >> myMethod Transcript show: 'hello'; cr. Evaluating…
Sebastian N.
  • 1,962
  • 15
  • 26
14
votes
2 answers

Check if an object is an instance of a given class or of a subclass of it

Is there an easy way to do this in Smalltalk? I'm 80% sure that there is some method but can't find it anywhere. I know that I can use (instance class = SomeClass) ifTrue: And I know that I can use superclass etc... but I hope that there is…
Uko
  • 13,134
  • 6
  • 58
  • 106
14
votes
3 answers

How to get started with git / github support for Monticello?

I've read recently that git / github support has been added to Monticello. I have also seen some Smalltalk projects published in github. Like: https://github.com/timfel/ratpack My questions: How to get started? What do I need to install in order to…
Sebastian N.
  • 1,962
  • 15
  • 26
13
votes
4 answers

How can I easily change to native fonts in Smalltalk Squeak/Pharo

With every new Squeak/Pharo image, I immediately change the fonts to some native version. It is a lot of mouseclicks and I want to script the process.
soemirno
  • 29,244
  • 3
  • 19
  • 14
13
votes
7 answers

Native standalone executable with smalltalk?

I really like live smalltalk environment (though I only experimented a bit with Pharo), but there is one thing why I can't really use it for everyday development. It seems that it is not possible to create a native standalone executable from…
user2102508
  • 1,009
  • 11
  • 23
13
votes
1 answer

What are Smalltalk pragmas conceptually?

I have used pragmas in Pharo Smalltalk and have an idea about how they work and have seen examples for what they are used in Pharo. My questions are: what are pragmas conceptually, to what construct do they compare in other languages, when should i…
MartinW
  • 4,966
  • 2
  • 24
  • 60
12
votes
2 answers

Smalltalk: what's the difference between "&" and "and:"

I just started learning Smalltalk at uni. I would like to know the difference between the messages & and and: (just like | and or:)
Sol
  • 123
  • 5
12
votes
4 answers

Does Pharo provide tail-call optimisation?

The implementation of Integer>>#factorial in Pharo is: factorial "Answer the factorial of the receiver." self = 0 ifTrue: [^ 1]. self > 0 ifTrue: [^ self * (self - 1) factorial]. self error: 'Not valid for negative…
Wilfred Hughes
  • 29,846
  • 15
  • 139
  • 192
1
2 3
60 61