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
12
votes
1 answer

What is the difference between these web servers in Seaside: Zinc, Kom, and Swazoo?

It's been a while since I've dabbled in Seaside, and, wanting to play around with it again for a small project, I downloaded the one-click image for Pharo and thought I'd look through the documentation to get my bearings. (There is a related…
Amos M. Carpenter
  • 4,848
  • 4
  • 42
  • 72
12
votes
2 answers

If my Pharo image goes into an infinite loop, how do I break out of the loop?

Yesterday I was about 2 hours in to working on my Pharo image when I accidentally wrote some code and executed it that caused an infinite loop -- actually, I was calling one method from another method, which in turn called the original method, back…
xofz
  • 5,600
  • 6
  • 45
  • 63
12
votes
6 answers

Is it possible to extend an individual object in Smalltalk

I'm doing research in Smalltalk reflection, and I was wondering if it was possible to extend an individual object like that would be possible for instance in Ruby. With this I mean a selector that only particular objects respond to. Here is some…
froginvasion
  • 833
  • 6
  • 19
11
votes
1 answer

Iterate a collection backwards in Pharo Smalltalk

I'm new using Pharo and I'm trying to iterate over an OrderedCollection, but starting from the end. For example: | c | c := OrderedCollection new. c add: (1). c add: (2). c add: (3). c do: [ :each | Transcript show: each ; cr ] The result is 1 2 3…
Carlos Rivero
  • 342
  • 2
  • 17
11
votes
1 answer

Are there any realtime pusher type services that use pure websocket for the server backend?

I am interested in developing a multiplayer game with Pharo Smalltalk as a server backend, and amber smalltalk + an html5 gaming library for the web client frontend. Pharo smalltalk has websocket support, and I have experimented with making a game…
zenchess
  • 411
  • 4
  • 11
11
votes
4 answers

How to learn Pharo

I installed Pharo 1.4 and tried to read "Pharo by example". Unfortunately, the book and the Pharo image were totally out of synch with each other: menus were different; classes used as examples were not there e.g; BouncingAtomsMorph class. It is a…
Sharphawk
  • 499
  • 4
  • 8
11
votes
3 answers

Magma, GOODS, GLORP, or something else?

So I've been using Smalltalk for about 6 months now (Squeak and Pharo), mostly doing data analytics, and I'm about to start my first Seaside app. So my question to all you Smalltalkers out there is, what is your favorite persistence solution? I've…
Alex
  • 4,316
  • 2
  • 24
  • 28
10
votes
2 answers

Where could I find more examples of using PetitParser?

I'm looking for additional examples of using PetitParser beyond PPArithmeticParser and PPLambdaParser that are provided in the tests package and a couple of blog posts by Lukas? If anyone's willing to share theirs, it would be much…
Boris Slobodin
  • 233
  • 1
  • 6
10
votes
2 answers

Capture string in regex replacement

From what I can gather from the Pharo documentation on regex, I can define a regular expression object such as: re := '(foo|re)bar' asRegex And I can replace the matched regex with a string via this: re copy: 'foobar blah rebar'…
lurker
  • 56,987
  • 9
  • 69
  • 103
10
votes
2 answers

Are Traits good or bad?

This is an open-ended question, but I would like to solicit some opinions from the SO community on Traits; do you think Traits in Squeak/Pharo are a good thing, or should you stay away from them and use composition and delegation instead? I ask…
giuseppe
  • 101
  • 3
10
votes
1 answer

Parsing comments with PetitParser in Pharo

Is there a simpler way to parse 1-line comments than this? comment ^ '//' asParser , (#any asParser starLazy: (#newline asParser)) , #newline asParser ==> [ :result | nil "Ignore comments" ] program ^ (comment /…
Damien Cassou
  • 2,555
  • 1
  • 16
  • 21
10
votes
2 answers

Is it possible to deploy a pharo image without .changes and .sources files

I've built a pharo application that I want to give to my customers. The application is based on seaside and will run headless. For this I don't need the .source and .changes file. I would like to save some space in the distribution archive and…
Norbert Hartl
  • 10,481
  • 5
  • 36
  • 46
10
votes
6 answers

Invoking shell commands from Squeak or Pharo

How can you invoke shell commands from Squeak and Pharo? Do these environments have anything in them like the system() function in certain unix languages to run external shell commands, or the backticks (can't make them here do to the editor, but…
squeaknewb
10
votes
5 answers

Why does add: return the object added in Smalltalk collections?

Background Something that catches every Smalltalk newbie is that add: does not return "self" but the object being added. For example, with this code: myCollection := OrderedCollection new add: 'Peter'; add: 'John'; add:…
Sebastian N.
  • 1,962
  • 15
  • 26
10
votes
2 answers

How to copy a Monticello package to another repository under a different name with Gofer

The context is this one: A package had several branches developped in several repositories squeaksource source.squeak.org/trunk Development stopped in source.squeak.org, and the goal is to transfer the branch back to squeaksource in order to have…
aka.nice
  • 9,100
  • 1
  • 28
  • 40
1
2
3
60 61