Planet Squeak

blogs about Squeak, Pharo, Croquet and family
planet squeak - planet squeak es - planet squeak jp - planet croquet - planet squeak code - planet smalltalk

September 13, 2019


Spec2 new PR in Pharo 80


Commander 2 integration




Commander 2 integration of the 13 of September 2019


Bug fixes


by Stéphane Ducasse at September 13, 2019 03:26 PM

September 11, 2019

Craig Latta

a Web UIs update

livecoded Vue versions of the Smalltalk devtools

I’ve created working Vue versions of the traditional Smalltalk workspace and classes browser, livecoded in the web browser from the full Squeak IDE. These use the vue-draggable-resizable component as the basis of a window system, for dragging and resizing, and the vue-menu component for pop-up context menus. Third-party Vue components are loaded live from the network using http-vue-loader, avoiding all offline build steps (e.g., with webpack). Each Smalltalk devtool UI is expressed as a Vue “single-file component” and loaded live.

When enough of the Smalltalk devtools are available in this format, I can provide an initial Squeak object memory snapshot without the UI process and its supporting code, and without the relatively large bitmaps for the Display, drop-shadows, and fonts. This snapshot will be about two megabytes, down from the 35-megabyte original. (I also unloaded lots of other code in The Big Shakeout, including Etoys and Monticello). This will greatly improve Caffeine’s initial-page-load and snapshot times.

I’m also eager to develop other apps, like a proper GUI for the Chrome devtools, a better web browser tabs manager, and several end-user apps. Caffeine is becoming an interesting platform!

by Craig Latta at September 11, 2019 10:18 PM

September 03, 2019


Fund rising for a book on Spec20

Hello Pharoers and Smalltalk Friends
Often you or other complain that there is not enough documentation, tutorials…. (even if we have a MOOC worth 155 K euros, several great books, but yes we should update them.
Now I started to work on a new book on Spec 20 with Cyril Ferlicot and I decided that I will not write it for free because it will take me at least 6 months.
So I decided that if this community wants more books and documentation, it should prove its will 🙂
I created a fundraising campaign to check if people can align their wishes and their means.
So feel free to sponsor this great book.

Building user interfaces with spec 20 –

Organisations can also do it.
BTW: the crowd funding system and other cost will cost us 10% and after we will pay taxes
on this. So I prefer not to count our hour cost because else I would really not write a book at all.

by Stéphane Ducasse at September 03, 2019 06:38 PM

August 28, 2019


Pharo-Headless-Linux-VM debugging

Guille’s procrastination experiments inspired me to procrastination of my own,
with an experiment around debugging Pharo-Headless-Linux-VM using Visual Studio running on Windows.
I’ve refined the steps-from-scratch to reproduce down to the following…
1. Install Windows Subsystem from Linux
2. Install Visual Studio 2019
3. Build and run hello-world exercise inside WSL
4. Build and run Pharo-Headless-VM inside WSL

Now lets get started…

Install Windows Subsystem from Linux
1A. On a Windows 10 box, go to the Windows App Store and Ubuntu 18.04…


1B. Ensure this configured as the default (otherwise later the $defaultWSLPath variable doesn’t work and you may see a Visual Studio error “Could not open windows subsystem shell”)…

C:\Users\Ben>wslconfig /l
Windows Subsystem for Linux Distributions:
Legacy (Default)

C:\Users\Ben>wslconfig /setdefault Ubuntu-18.04

C:\Users\Ben>wslconfig /l
Windows Subsystem for Linux Distributions:
Ubuntu-18.04 (Default)


btw, my Windows 10 box recently upgrade to latest version.
C:\Users\Ben> ver
Microsoft Windows [Version 10.0.18362.295]

1C. Start Ubuntu-18.04, then update/upgrade/install pre-requisites…
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install clang gcc gdb make rsync zip        # Visual Studio requirement
sudo apt-get install uuid-dev                      # Pharo VM build requirement

While that is running…


Install Visual Studio 2019
2A. Download and run the installer for Visual Studio Community 2019 (not Visual Studio Code)


2B. When the “Visual Studio Installer” opens, under its “Workloads” tab, select “Linux development with C++” and click **Install**.


Build and run hello-world exercise inside WSL

3A. Start Visual Studio 2019
and at its opening window, under “Get started” click “Create a new project”.
Then scroll down and choose “CMake Project” and <Next>.
and configure…
Project name: hello-world
then click <Create>.


Now it may immediately start the CMake build and get an error because its using the default “x64-Debug” configuration.

Ignore that, we will create a new configuration to build on Windows Subsystem for Linux.

3B. From the “Configuration drop-down” (where you see “x64-Debug”)
select “Manage Configurations…”
Delete “x64-Debug”.
Add… “WSL-Debug” and use all defaults then press <CTRL-S> to save.

Inside WSL, Cmake will start generating the makefiles.

At some point you might see “Supported CMake version is not present on WSL. Install CMake binaries built by Microsoft?”
YES, do that.

3C. After “CMake generation finished”,
pull down “Select Startup Item” and select “hello-world”
then press the green PLAY button.

Inside WSL, the make build will start and after its done the pharo executable will run there.
In the [Output] tab, it was successful if you see  “The thread ‘hello-world’ (0x1f7a) has exited with code 0” .

3D. For proof that its running inside WSL, lets write a file!
In the “Solution Explorer” tab, browse to “hello-world.cpp” and change its contents to…
#include <stdio.h>
int main()
FILE* fp;
int i;
/* open the file for writing*/
fp = fopen(“/tmp/built-by-visual-studio”, “w”);
fprintf(fp, “It worked.\n”);
return 0;
then press the green PLAY button.
After you see “thread ‘hello-world’ has exited with code 0”
open a WSL shell and run…
$ cat /tmp/built-by-visual-studio
It worked

3E. To experience debugging Linux from Visual Studio, first remove the test file…
$ rm /tmp/built-by-visual-studio
then put a breakpoint on “fopen” and click the PLAY button.
Check if the file is there…
$ cat /tmp/built-by-visual-studio
cat: /tmp/built-by-visual-studio: No such file or directory
<STEP OVER> fopen
$ cat /tmp/built-by-visual-studio
<STEP OVER> fprintf
$ cat /tmp/built-by-visual-studio
<STEP OVER> fclose
$ cat /tmp/built-by-visual-studio
It worked

3F. All done…
File > Close Folder

Build and run Pharo-Headless-VM inside WSL
4A. From Visual Studio 2019 opening window, under “Get started” click “Clone or check out code”
Repository location:
then click <Clone>.

4B. In the bottom-right status bar, click the “branching” icon and choose “Manage Branches”.
Expand “remotes/origin”,
then right-click “headless-WSL-VisualStudio” and “Checkout”

A fixed “WSL-Debug” configuration is a part of this branch, so its CMake-build should auto-start and complete successfully.

4C. After “CMake generation finished”,
pull down “Select Startup Item” and select “pharo (build/vm/pharo)”
then press the green PLAY button.

Don’t worry if it sits for a long time on “BalloonEnginePlugin>>primitiveAddRect”

The [Error List] tab pops up with 116 Warnings.
Switching back to the [Output] tab, you hopefully see “thread ‘pharo’ (0x4d0d) has exited with code 0”

So the VM just built and ran headless under Windows Subsystem for Linux.

Now lets debug that from Visual Studio.

4D. Browse to src/main.c and put a breakpoint in main() on the call to parseArguments()
Then click the PLAY button.
Once stopped at the breakpoint, <STEP INTO>.
In the [Autos] tab, expand the “parameters” variable.  Observe “imageFile” is empty.
Notice “imageFile” becomes “Pharo.image” after <STEP OVER> splitVMAndImageParameters().

So now I leave you to play.  I’d be interested in hearing about people’s experiences.

Placing the correct PharoHeadless.image in the right place to actually run the image
is left as an exercise for the reader.
cheers -ben

by Stéphane Ducasse at August 28, 2019 03:30 PM

August 25, 2019


[Ann] Pharo Consortium New Bronze Member: Object Guild

The Pharo Consortium is very happy to announce that the Object Guild has joined the Consortium as a Bronze Member.

Object Guild

Simply Revolutionary
High fidelity software solutions for values-driven organisations.
We help you to help the world become a better place.

Object Guild differentiates itself as a custom software design and development shop in the following ways:

– by a commitment to use technology and software to make the world a better place;
– by seeking and serving clients who are equally committed to social and environmental enhancement;
– by focusing on “Software that Fits,” that seamlessly integrates with and enhances the complex system where it is deployed;
– by our commitment to Pharo and Smalltalk development, including expanding and enhancing Pharo;
– by a focus on education and training, internal and for clients, that advances the “state-of-the-practice” of software development.

The goal of the Pharo Consortium is to allow companies and institutions to
support the ongoing development and future of Pharo.

Individuals can support Pharo via the Pharo Association.

by Stéphane Ducasse at August 25, 2019 04:59 PM

August 24, 2019


[ann] pre-release Voyage 1.6

I made a pre-release for voyage 1.6 at
It enables to usage in pharo8. Also included is a first preview of using ArangoDB [1] with Voyage

by Stéphane Ducasse at August 24, 2019 04:57 PM

August 23, 2019


[ann] Iterator framework for Pharo


I wanted to have an iterator framework for Pharo for a long time.
So I started building it step by step and today I think that, while it still requires more documentation, it is ready to be announced and used by others.
I present you Iterators :
The idea is that, as described by the iterator design pattern, any object that needs to be walked provides one or many iterators.
In the library, #iterator method is the convention to get the default iterator of any object (if it has one).
Iterators provides a DSL to deal with iterators combination.
It is inspired from shell’s streams manipulation syntax:
– The pipe “|” allows one to chain iterators
– The “>” allows one to create a new collection with data transformed through chained iterators
– The “>>” allows one to fill an existing collection with data transformed through chained iterators
For example, one can write:
iterator := #(1 2 3) iterator.
| [ 😡 | x * 2 ] collectIt
| [ 😡 :y | x + y ] reduceIt
> Array “#(12)”
iterator := #(1 2 3) iterator.
collectionToFill := OrderedCollection new.
| [ 😡 | x * 2 ] collectIt
| [ 😡 :y | x + y ] reduceIt
> collectionToFill.
collectionToFill “anOrderedCollection(12)”
The equivalent of “/dev/null” in Linux also exists:
iterator := #(1 2 3) iterator.
| [ 😡 | x * 2 ] collectIt
| [ :object | object logCr ] doIt “Just print incoming objects in transcript.”
> NullAddableObject “Special object that ignore incoming objects.”
There are documentation and examples on the GitHub repository.
Initially, the goal was to avoid to duplicate all collection’s iterator methods (e.g. #collect:, #select:, etc) in composite objects.
Thus, it provides an IteratorWithCollectionAPI which wrap an iterator and provides all the methods we want (#collect:, #select:, …).
Via IteratorWithCollectionAPI, your objects automatically gets the Collection API, you just need to access it via #iterator message:
myObject iterator select: [ 😡 | x isFoo ]
This is another way to use the framework, just to avoid code duplication.
Future work is to provide the possibility to have iterator with multiple inputs.
I already have an undocumented prototype on the repository that works like this:
it1 := (1 to: 10) iterator.
it2 := (1 to: 10) iterator.
it1 & it2
| [ 😡 :y | x@y ] mergeIt
> Array. “{(1@1). (2@2). (3@3). (4@4). (5@5). (6@6). (7@7). (8@8). (9@9). (10@10)}”
Yes, “&” operator will again kind of mimic the one from the shell.
Hope it helps other people.
Feedback is welcome.

by Stéphane Ducasse at August 23, 2019 04:56 PM

[Ann] Magritte ready for Pharo 80

Just a little announce to let you know that magritte is now ready for Pharo 80.


by Stéphane Ducasse at August 23, 2019 12:27 PM

[ann] PolyMath 1.0

Dear all,

we are happy to announce the release of PolyMath 1.0, the
computational framework for Pharo.

Please find more information about the project here:

Changelog of modifications is available here:

You can install the 1.0 version in a fresh Pharo 7.0 with the
following code snippet:

Metacello new
repository: ‘github://PolyMathOrg/PolyMath:v1.0/src‘;
baseline: ‘PolyMath’;

Thank you Hemal, Oleks, Atharva, Nikhil, Konrad and Werner for your
help on this release.
I will do a PolyMath 1.0 talk at ESUG 2019.


Serge Stinckwich

by Stéphane Ducasse at August 23, 2019 10:20 AM

August 21, 2019

Torsten Bergmann

Pharo Headless - Beta

An early preview - but you can already get real headless vm and image from zero-conf and play with it. This is work from the Pharo Consortium Team from the last couple of months.

Some interesting features:

And the one I like most: the virtual machine is now a dynamic library. Which is the first but an important step towards embedding Pharo into other applications!

If you want to try it out check the headless branch within the OpenSmalltalk VM repository:

There is also a Continuous integration (CI) job available.

Read the full announcement.

by Torsten ( at August 21, 2019 07:54 AM

Pharo bindings to the LLVM disassembler and Unicorn library

Guille Polito wrote bindings to the LLVM disassembler and Pharo bindings to the Unicorn library. Both projects are available on GitHub:

This should allow for better machine code simulation directly within Pharo.


by Torsten ( at August 21, 2019 07:38 AM


The UI framework in Pharo receives an update. Spec2 will replace Spec over time - it is already included within upcoming Pharo 8 (which is still in development). Both run in parallel to ease migration.

Source code is also on GitHub:

It is possible to load Spec2 into latest Pharo release - Pharo 7. You will find a script on the project page. Some early documentation on Spec2 is already available as PDF booklet - but as the framework itself work in progress.

Spec2 will also allow for a binding to other backends like Gtk (which is based on Mars project from Esteban):

by Torsten ( at August 21, 2019 07:33 AM

Booklet - Testing in Pharo

An upcoming new booklet for Pharo. It is about "Testing in Pharo" including SUnit, DrTest and other. Still work in progress but PDF is already here

by Torsten ( at August 21, 2019 07:26 AM

Pharo Chip Designer

Pavel released a new project: Pharo Chip Designer - a Silicon chip layout design game written in Pharo Code is on GitHub:

Sample Video is here:

by Torsten ( at August 21, 2019 07:25 AM

Event Music Manager for Pharo - ESUG2019.

The project Event Music Manager (EMM) for Pharo from Benoît Verhaeghe allows us to play with music and video in Pharo. It will also be shown on ESUG 2019 conference.

Source code is available on GitHub:

It uses Seaside web framework and a special UFFI binding to the VLC lib which is also available on GitHub;

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.

 Go check the trailer:

by Torsten ( at August 21, 2019 07:23 AM

GistBrowser for Pharo

There is a nice GistBrowser for Pharo - now also including Gist Press support.
Code is on GitHub:

by Torsten ( at August 21, 2019 07:16 AM

Woden 3D engine for Pharo - ESUG 2019 Demo

ESUG 2019 conference is ahead and Ronie Salgado is preparing a demo of his 3D engine Woden - written in Pharo.

by Torsten ( at August 21, 2019 07:09 AM


The page allows to browse VAST ENVY goodies.

The "Spider" project from Jan van de Sandt ( seems to allow similar but for the ST source graph of git and MC projects. Work in progress - but nice example for P3/Glorp, Seaside and Pharo  usage if you have a deeper look at the code. Nice!

by Torsten ( at August 21, 2019 07:06 AM

August 15, 2019


[ANN] Pharo Pomodoro now on GitHub

I migrated my Pomodoro timer project to GitHub now:

and you can load it using Catalog or script. I tested with Pharo 8.

See also


And yes – additionally to my blog
you will also find my news on Twitter now

by Stéphane Ducasse at August 15, 2019 11:19 AM

[Ann] Pharo v7.0.4

Repository: pharo-project/pharo · Tag: v7.0.4 · Commit: ccd1f64 · Released by: estebanlm

This release has 2 assets:

Visit the release page to download them.

by Stéphane Ducasse at August 15, 2019 07:42 AM

[Ann] Commander v2.0.0

Repository: pharo-spec/Commander2 · Tag: v2.0.0 · Commit: 3dbd6b1 · Released by: juliendelplanque

Commander v2.0.0 will be integrated into Pharo after ESUG.


How to migrate code using Commander2 v1.2.0 to v2.0.0

This release provide a migration mechanism for the following renamings:

One can use the CmV2ReleaseMigrator class as follow:

1. Load the migration group

Metacello new
	repository: 'github://pharo-spec/Commander2/src';
	baseline: 'Commander2';
	load: #('migration')

2. Collect the command classes to migrate

In this step, one need to create an array of all the classes defined by his/her project that inherit from CmCommand.

An example of such script can be:

myCommandClasses := MyRootCommandClass withAllSubclasses.

3. Run the migration script

CmV2ReleaseMigrator migrate: myCommandClasses

Then run the tests of your project to ensure everything still work correctly

This release has 2 assets:

Visit the release page to download them.


by Stéphane Ducasse at August 15, 2019 07:29 AM

August 11, 2019

Pierce Ng

Minimizing Docker Pharo

As tweeted: Docker image of Pharo VM, 7.0.3-based app Pharo image, changes/sources files, Ubuntu 16.04, 484MB. With Pharo VM Alpine Docker image, 299MB. Build app Pharo image from minimal, run without changes/sources, Alpine Pharo VM, 83MB!

And here's the Docker container resident set size upon switching from the 484MB Docker image to the Alpine-based Docker image:

Pharo Docker RSS

Norbert Hartl and I are collaborating on minimizing Dockerized Pharo. All are welcome to join.

by Pierce Ng at August 11, 2019 11:41 PM


[ANN] Pharo Chip Designer


I have created a little program based on an old educational game by Zachtronics (KOHCTPYKTOP: Engineer of the People[1]) named Pharo Chip Designer.
It is an inaccurate and highly simplified tool for the design of silicon chip layouts. Unlike common tools for logic circuits designs, in Pharo Chip Designer, you need to face the real-life problems like propagation delays or limited amount of layers and available substrate area.
It contains levels from the original game, but you can play with your custom designs on larger surfaces. And of course, use all the Pharo power to control the I/O signals.
The Pharo Chip Designer required Pharo 8.0 and Spec2.
— Pavel

by Stéphane Ducasse at August 11, 2019 08:14 AM

August 09, 2019


Autonomous robot running 100% on PharoThings IoT

Steven Costiou and @Allex Oliveira are working on an autonomous robot, all Pharo: motors, sensors and algorithms

by Stéphane Ducasse at August 09, 2019 09:26 PM

About Pharo vm activity


Some Pharo friends ask about the place Pharo consortium engineers were working on the Pharo VM: Here it is:

The current focus is

You can also check the other branches about threaded and others.

A summary of my interaction with Guille, Esteban, and Pablo.


by Stéphane Ducasse at August 09, 2019 08:30 AM

August 08, 2019


[ANN] Pharo Headless – Beta

For the anxious, you can get real headless vm and image from zero-conf.

$ wget | bash

Zero conf scripts remain unchanged for users.

However, if you are launching the VM by hand from the executable
instead of the launcher scripts (pharo and pharo-ui) as in

$ ./pharoexecutable Pharo.image

the image will launch in headless mode and will not open a window.
To launch it in headfull, you can use the –interactive argument after
the image, which will make the image open a window using SDL2.

$ ./pharoexecutable Pharo.image –interactive

Long version

Hi, this mail is the happy intermediate result of the work that us,
the Pharo Consortium Team, has been doing in the last couple of
Our main objective is to have a real headless implementation of Pharo
where all the responsibility to open or not a World window (or other)
is handled by the image.
For doing so we have done a series of modifications in the image and
the VM side.
We consider this is the path that Pharo 8 and following versions
should follow, as it will severely improve server-side and command
line Pharo and in building custom desktop applications.

These modifications are available only in 64-bits machines (Windows,
OSX, and Linux).
ARM32 and 64bits headless is in the roadmap, but it is delayed because
we have prioritized our three major platforms for this first couple of

All this work is based in Opensmalltalk-VM and Ronnie’s initial work
on headless.
We are really grateful to all the contributors in the history of this
nice product.
To achieve a real headless VM we have brought modifications in the
source tree because most of the platform code to open and manipulate
windows is not required anymore.
Instead, we use the SDL2 library that implements a nice layer on top
of the OS and allows us to manage on the image side through FFI.

So this mail is now an open call for (beta?)testing.
The sources of the current VM we are building are in the headless branch in
And we have set up a CI that is both building and testing the VM in

For the future we have a lot of ideas, that will wait for another long
email or a beer-talk @ESUG.
We want to hear your ideas!!

Image-Side Improvements

– The image handles the creation or not of the main world window.
– We incorporated the idea of World renderer, where different backends
are used to render the world.
– We have 3 backends: VM support (compatibility with non-headless
VMs), and OSWindow with two backends: SDL and GTK3+.
– The modifications in the image are fully backward compatible with
the non-headless VM and are pushed since weeks in the latest 8.0
– We move the handling of events to the image side when using SDL and
GTK3+, opening the door to a richer set of events and finer-grained
control over them.
– SDL and GTK versions are implemented using FFI calls.

VM-Side Improvements

– VMMaker code migrated to Tonel thanks to Feenk and included in the
repository of the VM.
– Making VMMaker execute in Pharo 7 and 8.
– Removing GPL code from the VM repository (GDB).

– Slowly adding new tests for the JIT / Slang and VMGeneration.
– Restructuring of the source code.
– A new simpler CMake build.
– Generate VM code from Slang on each build.
– A CI process to validate (including the run of the tests in Pharo
and the ones adding to the VM).
– Simplification of the codebase.

– Maximize the reuse of code between the platforms (preferring the
standard versions over the platform-specific).
– Cleaning up duplicated code.
– All the plugins are now external plugins.
– The VM is now a dynamic library. This is a first step towards
embedding Pharo into other applications.
– The main executable is a thin frontend (you can change it or
implement your own).

– Removing unused plugins.
– Improved crash dump. Especially the crash dump works now in Windows 64bits.
– Dummy implementation of Security plugin (it is going away…. eventually).
– Cleanup of SSL, UUID, and Socket plugin.

– Cleanup of conditional code (Still to improve).
– Improving the types used in the functions (we have to be neat to be
– Improving the lookup of modules
– Improving the logging of the VM
– Improving the handling of VM arguments

Thanks a lot for reading so long!!
We hope you enjoy the VM and please tell us all the problems you find!!

Pablo, Guille, and Esteban

by Stéphane Ducasse at August 08, 2019 05:21 PM

August 03, 2019


[Ann] Machine code simulation in Pharo

Hi everybody,
I’ve been playing around with machine code simulation this last week and I’ve made bindings for the unicorn library and the llvm disassembler:
Funny thing: both support lots of platforms (x86 and arm both 32 and 64 bits and more…). So out of the box we can simulate and disassemble lots of platforms.
And in one afternoon I’ve played with them to do a native debugger with Spec2 just for fun.
Hope this evolves a bit more soon, and that it helps somebody.

by Stéphane Ducasse at August 03, 2019 10:16 AM

July 26, 2019


[ann] Smalltalk WebCamp day in Ghent

Hi Seaside users,

We are organising a Smalltalk WebCamp day in the Yesplan offices in Ghent on October 22nd.
The idea originated in the Seaside channel of the Pharo discord group. However, it’s not supposed to be Seaside only. All Smalltalkers doing web development, possibly involving other technologies on top of Smalltalk, are encouraged to join. Let’s meet and exchange ideas. The topics are to be determined, following the idea of an unconference [1], except that, for practical reasons, we will ask you to confirm your attendance beforehand.
More info to follow asap.
Save the date and respond already to the group if you are interested to attend.

by Stéphane Ducasse at July 26, 2019 06:26 AM

July 23, 2019


Tech Talk Video: How to contribute to Pharo

by Stéphane Ducasse at July 23, 2019 01:44 PM

July 22, 2019


[ANN] GistBrowser-Pharo.

Interact with GitHub Gist on Pharo.

by Stéphane Ducasse at July 22, 2019 08:37 AM