Planet Squeak

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

June 18, 2018


Collecting sensor data with PharoThings

On this page you can see the temperature, humidity and pressure data of my room in Inria, in real time (or almost real, 10 min between the data …)

Allex Oliveira

Screen Shot 2018-06-18 at 14.03.53.png

by Stéphane Ducasse at June 18, 2018 12:05 PM

News from PharoThings

The first words of PharoThings on LCD HD44780.

The breadboard is to better organize the components. It’s easier manipulate the wires using it.

In that breadborad, I has 3 sensors (MCP9808, BME280, ADXL345), 2 leds, 2 buttons and 1 LCD. The potentiometer is to control the energy power to LCD.
More volts is more contrast on LCD.
Allex Oliviera


by Stéphane Ducasse at June 18, 2018 12:03 PM

June 15, 2018

Torsten Bergmann

GT Documenter for Pharo

GT Documenter - a new GT Tool for Pharo based on Bloc graphic framework

by Torsten ( at June 15, 2018 02:29 PM


Daywork: a New Pharo success story



by Stéphane Ducasse at June 15, 2018 12:58 PM

1500 pull requests closed :)


As of today, we closed 1500 pull requests: <>

These of course range from trivialities to merging sub-systems with hundreds of commits…


by Stéphane Ducasse at June 15, 2018 10:45 AM

June 14, 2018


[Ann] Gt Documenter


We are happy to announce a new leap of GToolkit Documenter, the tool for manipulating live documents directly in the development environment:

Documenter is part of the second generation GToolkit project, it is based on Bloc and works with the latest Pillar. It is mainly developed by Juraj Kubelka.

Attached you can see a preview of how documents look like:

At its core it offers a live editor for manipulating Pillar documents. The interaction happens seamlessly directly in the text editor, and it can be combined with different types of previews to serve several classes of use cases:
	• code documentation
	• tutorials
	• interactive data notebook

Code documentation
Documenter complements the GToolkit Examples engine to redefine code documentation. When practicing example-driven development, examples get written as part of the typical development. Once examples exist, they can be quickly put together in a document to form documentation. For example, the linked picture shows the comment of a class containing a visual explanation:

You can see a live example of documentation by inspecting the following snippet:
	GtDocumenter editorForText: BrToggleExamples comment. 

Documenter offers a new experience of writing tutorials for Pharo by enabling the creation and embedding of Epicea change sessions directly in the document. For example, take a look at the following animation:

The document shows a method on top, and a change preview at the bottom showing both the code and the associated diff to the state from the image. Applying the change updates both the change view (no more diff), and method preview. This speeds up significantly the process of going through a tutorial. Furthermore, given that now the document shows the diff to the current image, the reader can safely explore alternative scenario and come back to the tutorial at any time without losing the overview.

The size of the preview can also be adjusted live:

You can see a live tutorial by inspecting:
	IceRepository repositoriesLocation / 'feenkcom'/ 'gtoolkit-examples' / 'doc' / 'tutorial' / 'examples-tutorial.pillar’.

Interactive data notebook:
A Documenter document can also be used as an interactive notebook. Internally it essentially acts as a playground:
	• it supports defining variables in code snippets, and
	• the execution of code shows an embedded inspector.

For example:

An example, can be seen by inspecting:
	IceRepository repositoriesLocation / 'feenkcom'/ 'gtoolkit' / 'doc' / 'gtoolkit' / 'gtoolkit.pillar'. 

As always, please do let us know what you think.

The feenk team

by Stéphane Ducasse at June 14, 2018 01:19 PM

June 12, 2018

Torsten Bergmann


Yet Another Chip 8 Emulator - written in Cuis Smalltalk

by Torsten ( at June 12, 2018 06:53 AM


[Ann] Iceberg 1.1.0

Time for the weekly Iceberg update.
Thanks to all brave users, issue reporters and contributors :).

Key changes: we have introduced some tag support, a new credential manager to manage keys and passwords per host or repository, a new version of tonel, and made a first step towards a simplified contribution to Iceberg by listing it as Pharo's repository.

Guille in behalf of all Iceberg contributors

Following, the detailed changes log.

New Features
#842 <> Adding Credentials
#843 <> Update Tonel to 1.0.7
#823 <> Iceberg repository
should be listed as Pharo's one
#841 <> Basic tag support (
#372 <>)

#787 <> Add Windows ci with
Appveyor (not yet green!)

#827 <> Add package dialog
has some glitches
#833 <> replace #asIcon with
#832 <> Move Iceberg from
MostUsedTools to Tools
#830 <> Better handling of
not github remote urls
#825 <> Enhance Migrate to
tonel commit message
#637 <> Show tag version
instead of "Detached HEAD"
#829 <>

Bug Fixes
#835 <> Compare file
definitions by their binary uninterpreted content
#838 <> Clone from incorrect
github repository fails with DNU
#826 <> Pushing to virgin
repository raises a DNU


by Stéphane Ducasse at June 12, 2018 05:54 AM

June 10, 2018

Pierce Ng

World Cup 2018 with Glorp

I last wrote about football.db in a Jul 2014 blog post. Four years have gone by, and the World Cup is here again. This time around, I've started building a Glorp descriptor system for the World Cup data.

football.db's data is described in YAML files which are assembled into SQLite databases using tools written in Ruby. From the constructed 2014 and 2018 World Cup databases, I've created SQL dumps and placed them in the repo. To get an SQLite database from the 2018 SQL dump file:

% sqlite3 wc2018.db < wc2018.sql

In its current state, footballdb-Glorp allows querying the initial World Cup first round group membership.

| login sess |
login := Login new
  database: UDBCSQLite3Platform new;
  host: '';
  port: '';
  username: '';
  password: '';
  databaseName: '/tmp/wc2018.db';
sess := OFDescriptor sessionForLogin: login.
sess login.
[   Transcript clear.	
    (sess read: OFTournamentTeam) do: [ :ea |
      Transcript show: ea group title , ' - ', ea team title; cr ]
] ensure: [ sess logout ].

This Glorp descriptor may not be completed in time for this World Cup which is starting in a few days, but will be in time for the next one for sure! :-) Load it thusly:

Metacello new 
  repository: 'github://PierceNg/footballdb-Glorp:master/repo';
  baseline: 'OpenFootball';

by Pierce Ng at June 10, 2018 04:34 PM

June 07, 2018

Clement Bera

Free chunk management in the Cog VM

Hi all,

Recently I have been working on a new compactor algorithm for the Cog VM. The full GC is right now a stop the world Mark-Compact algorithm. In heaps of 1-2Gb, Between 30 and 50% of the full GC pause time is currently spent in the compaction phase. The rest of the pause is mostly due to the marking phase, but also some other things (managing mmap, etc.). I am currently trying to decrease the compaction time by a factor of 4 (according to preliminary results) while using only in the common case an extra memory region (defaulted to 16Mb) whichever heap size is used. The new compaction algorithm is a hybrid Mark-Sweep-Compact, which compacts only part of the heap at each full GC based on the current occupation of the memory regions.

But! This post is not about the new compaction algorithm. It is about the recent changes I am introducing in the free chunks management to support efficient free chunks merges.

Free chunks are all referenced from a freelists object, known by the VM, as shown on the following figure. Since small free chunks are the most common, the freelists object includes a fixed number of fields to optimize free chunks allocation / deallocation of small free chunks. The exact number is based on the numFreeLists VM setting, X on the figure, currently 32 or 64 fields depending on word size.


Slots 1 to X for the freelists objects refers to the first free chunk of the given size, in allocationUnits (currently 64 bits). Since in Spur every object has at least a single field to support the forwarding object scheme, each free chunk has at least 1 field. This first field of each free chunk is abused to organize the chunks as a linked list. The first free chunk of size 1 points to the next one, etc.

With the linked list design, allocation is very efficient, but detaching a free chunk from the list may cost a lot (the VM may need to iterate over the whole list). Because of my new compaction algorithm, I needed to be able to detach efficiently free chunks to merge unmarked objects and free chunks to larger chunks during the sweep phase.

To solve this issue, I made today the free chunk linked list a double linked list. To do so, I needed 2 fields per objects. In 32 bits, that’s not a problem since the allocation unit is 64 bits and each object requires at least a field for the forwarding object scheme. In 64 bits, I had to keep free chunks of size 1 in a single linked list, and detaching a free chunk of this specific size still requires to iterate over the whole linked list. The figure shows the 64 bits case, where free chunks of size 1 are organized as a single linked list, and larger free chunk as double linked lists.

Free chunks larger that X are managed differently, they’re managed through a simplified version of the AVL tree with naive rebalancing which in practice is very efficient. For large free chunks, the first 5 fields are abused (we assume X >= 5). Each node in the tree is a double linked list with the free chunks of the specific size, re-using the first two fields as for the small chunks. The next three fields are used to represent the binary tree connections, parent is the parent in the tree (0 for the root), smallerIndex is the first child (a chunk with a smaller size) and largerIndex the second child (a chunk with a larger size).

With the double linked list scheme, detaching a free chunk does not require any more to walk linked list of the tree, the VM can just check the prev/parent relationships and remove the chunk. This sped-up drastically the sweep phase (most of the time was in detachFreeObject:) but it addition it improved the current production compactor which was also trying to merge free chunks in some cases.

I hope you enjoyed the post.

by Clement Bera at June 07, 2018 10:02 AM

June 04, 2018


Pharo Shop

Thanks Lusy for the design.

by Stéphane Ducasse at June 04, 2018 05:26 AM

June 02, 2018


All Pharo Syntax on a postcard!

Screen Shot 2018-06-02 at 08.34.42.png




by Stéphane Ducasse at June 02, 2018 06:36 AM

June 01, 2018


Pharo being shown at main ICSE research track!

Great job! Juraj, Alex and others.

We have the answer to the first questions! Yes live programming is useful for real projects!






by Stéphane Ducasse at June 01, 2018 06:37 PM

May 31, 2018


[ANN] VM for Pharo 6.1 updated


I backported stable VM from Pharo 7 to Pharo 6.1.
It should fix some issues (not listed, because I really don’t know them).

Let me know if something is wrong.


by Stéphane Ducasse at May 31, 2018 06:49 PM

ESUG 2018 CFP and student volunteers

You can find here all the information about the conference….


by Stéphane Ducasse at May 31, 2018 09:39 AM

May 30, 2018


Registration for the Pharo Mooc


The registration for the Pharo mooc is open

Mooc will start in October 2018.

Check testimonies at


New this year: Japanese subtitles and Spanish subtitles.

And PreSequel lectures on object-oriented programming.



by Stéphane Ducasse at May 30, 2018 07:40 PM

Iceberg 1.0.0

Hi all,

Time for a new Iceberg update, that will be available in the next Pharo
build. This time, there are lots of cleanups and enhancements. On the big

- Tonel migration plugin is available in the "Other menu item"
- Tests are green on 64 bits! (meaning iceberg can be safely used in 64

Thanks to everybody that participated in reviewing, opening/closing issues
or even fixing a typo!

# Documentation

Just as a reminder, here you have a link to iceberg's wiki, convering some
info like terminology, how to help us, and so on...

# And some videos ;)

- Branching and merging
- Loading a Baseline
- Contributing to Iceberg

# Changes Log

Enjoy, Guille

PS, detailed changes log below:

# Cleanups

#819 Fix tooltip typo in settings
#800 Iceberg should be removed from the catalogue
#801 Remove not referenced packages
#803 Correct some lints in tests
#806 Bad repair options when local repository is missing
#725 Remove and clean old UI
#794 Some classes should use category "utilities" instead of "utility"
#791 Begin to remove old UI
#734 Begin to remove old UI
#576 Add link to github/gitlab ssh instructions

# Enhancements

#776 Upgrade to Commander 0.6.2  dependencies
#765 Add command to copy SHA from history window
#793 Add the commit message to history window
#785 Metacello conflicts are not handled Metacello Integration

# Bug fixes

#771 IceTipRemoveFromRepositoryPackageCommand >> execute is not implemented
#748 Code subdirectory in empty repository
#767 Error while pulling with renamed packages
#814 Moving extension from a package removes extended class
#807 When we do not have the right to push on a report we get an Error
instead of the pop up!
#768 Inverse merge preview shows wrong diff
#784 Pulling from a non existing remote branch fails#810 #removePackage:
should recursively delete files

# Documentation

#702 Create screencast - How to contribute to iceberg
#774 Copy Wiki contribution page to pharo-project/pharo wiki

# Infrastructure

#761 Make tests run in 64 bits Pharo 7

by Stéphane Ducasse at May 30, 2018 06:46 PM

Torsten Bergmann

Designing Code Quality Assistants for Pharo

by Torsten ( at May 30, 2018 03:36 PM

May 29, 2018


Pharo got 10 years!


While browsing an old folder, I found the first commit of Pharo.

‘From Sapphire0.1 of 16 March 2008 [latest update: #10018] on 24 April 2008 at 10:22:48 pm’!
“Change Set: 00-classcleaning
Date: 24 April 2008
Author: stephane.ducasse
adding hasSharedPools instaed of sharedPools > 0″!
There is one import symbol in this first commit! It was about improving the system.
Pharo is a much better name 🙂 because it protects boats lost in the tempest and show the way!

by Stéphane Ducasse at May 29, 2018 05:41 PM

May 28, 2018

Germán Arduino

Gestión de Inventario de Riesgos, un enfoque práctico

Un nota cubriendo la gestión del inventario de riesgos de una manera práctica, en esta dirección.

by Germán Arduino ( at May 28, 2018 11:56 AM

May 23, 2018


[Ann] New iceberg videos!

Hi all,

This time (just before releasing a new version of iceberg) I wanted to share some videos with you. Feedback is welcome.

!! How to contribute to Iceberg

This video shows how to contribute to iceberg.
For this, you should update your iceberg installation and then just do a pull request.
This means that you need to start by forking

- Path 1: Clone and pull (easy)
  - Clone your fork
  - Checkout the latest development branch (e.g., dev-0.7)
  - Pull from pharo-vcs/iceberg

  This path does not always work, as this is kind of self-brain surgery. Iceberg is updating itself. If this does not work, go to path 2

- Path 2: Install from scratch (if Path 1 does not work)
  - Use the script in the README file to unload and reinstall iceberg
  - Make sure you use the latest development branch in the Metacello script (e.g., dev-0.7)
  - Clone your fork and checkout the development branch

Once you have the correct version, you can load the tests by loading the development group of the baseline.

!! Basic Branching and Merging

This video shows in a simple example how to branch, merge and checkout different commits. In this video we first create a new class with a method, then we create another branch and force a conflict. We resolve the conflict during merge.

In the middle, bonus feature, we checked out a commit and stayed in
Detached HEAD for a while ;)

!! Loading a baseline from your repository

This video shows how to load a baseline from Iceberg's UI.
We clone an existing project, see it is "Not loaded" and use Metacello plugin to load the default group.


PS: Tomorrow I'll answer the threads about Iceberg that were going around
here in the mailing list. I was running today.

by Stéphane Ducasse at May 23, 2018 07:24 PM

Torsten Bergmann

Pharo 7 on SqueakJS (demo)

With some tweaks mostly related to FFI and fonts, we are able to run Pharo 7 on SqueakJS VM. Read more or try out directly in your web browser.

by Torsten ( at May 23, 2018 06:06 AM


PngSuiteExplorer is a simple tool to test the support for PNG files in Pharo using the "official" test-suite for PNG.

by Torsten ( at May 23, 2018 06:03 AM

May 20, 2018

Pierce Ng

SQLite Boolean

From its documentation, SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true).

I've added Boolean handling to UDBC-SQLite. When writing to an SQLite database from Pharo, true is written as integer 1 and false as integer 0. SQLite uses dynamic typing, and any column in an SQLite database, except an INTEGER PRIMARY KEY column, may be used to store a value of any type, irrespective of the column's type declaration. As such, when writing Boolean values to a database, UDBC-SQLite does not check the database's type declaration.

When reading an SQLite database, UDBC-SQLite does check a column's type declaration: If a column is Boolean, UDBC-SQLite reads 1 as true, 0 as false, NULL as nil, and any other integer values raises an exception. I've encountered real world data where the string "t" means true and "f" means false for a Boolean column, so UDBC-SQLite handles these cases too.

Glorp has been similarly updated. Loading GlorpSQLite, from my development fork for now, installs both UDBC-SQLite and Glorp:

Metacello new
  repository: 'github://PierceNg/glorp-sqlite3';
  baseline: 'GlorpSQLite';

All Glorp unit tests should pass. Tested on Linux using fresh 32- and 64-bit 60540 images.

by Pierce Ng at May 20, 2018 02:27 PM


Compiling squeak.cog.spur/build on FreeBSD 11 amd64

After some hacking, I can invoke squeak and get some version info
As I get time, I will continue hacking on this and as time permits, I will work with whoever is interested.
Process I am following is as follows
git clone
cp -Rv build.linux64x64/ build.freebsd64x64
cd build.freebsd64x64/squeak.cog.spur/
[create backup copies of original plugins.* and build/mvm
cp ; cp plugins.ext plugins.ext.orig
cp build/mvm ./
[hack,baby hack!]
reduce to minimal (I blogged on this a couple of years ago: )
AsynchFilePlugin \
B2DPlugin \
BitBltPlugin \
after some hacking, I reduced plugins.ext to this:
B3DAcceleratorPlugin \
SqueakFFIPrims \
LocalePlugin \
UnicodePlugin \
UnixOSProcessPlugin \
UUIDPlugin \
ImmX11Plugin \
modified mvm to this (note the FreeBSD addition to the case statement, the addition of libiconv and the –without–vm-sound-FOO)
#!/usr/bin/env bash
set -e
# Spur VM with VM profiler and threaded heartbeat
case $(uname -s) in
           CFLAGS=”$CFLAGS -I/usr/local/include”
           LIBS=”$LIBS -lexecinfo”
           LDFLAGS=”$LDFLAGS -L/usr/local/lib”
           CFLAGS=”$CFLAGS -I/usr/local/include”
           LIBS=”$LIBS -lexecinfo -liconv”
           LDFLAGS=”$LDFLAGS -L/usr/local/lib”
if [ $# -ge 1 ]; then
        INSTALLDIR=”$1″; shift
echo -n “clean? “
read a
case $a in
n|no|N|NO)      echo “ok but this isn’t safe!!”;;
*)                      test -f Makefile && make reallyclean
test -f || (test -f ../ && cp -p ../ . || cp -p ../../ .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure –without-npsqueak \
                –with-vmversion=5.0 \
                –with-src=spur64src \
                –without-vm-sound-MacOSX \
                –without-vm-sound-Sun \
                –without-vm-sound-custom \
                –without-vm-sound-ALSA \
        TARGET_ARCH=”-m64″ \
        CFLAGS=”$CFLAGS” \
        LIBS=”$LIBS” \
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
./mvm  (it will error out trying to build sound plugins even though I put those –without-vm-sound-foo thingies in)
make[1]: stopped in /usr/home/timmy/usr/src/opensmalltalk-vm/build.freebsd64x64/squeak.cog.spur/build/vm-sound-ALSA
edit the Makefile and search for “sound”
modify LIBS
LIBS=           -luuid -lutil -lpulse-simple -lasound  -lm  -lexecinfo -liconv
LIBS=           -luuid -lutil  -lm  -lexecinfo -liconv
PLUGINS_LA      =  vm-display-X11${la} vm-display-null${la} vm-sound-ALSA${la} vm-sound-NAS${la} vm-sound-OSS${la} vm-sound-null${la} vm-sound-pulse${la} B3DAcceleratorPlugin${la} SqueakFFIPrims${la} LocalePlugin${la} UnixOSProcessPlugin${la} UUIDPlugin${la} ImmX11Plugin${la} XDisplayControlPlugin${la}
becomes :
PLUGINS_LA      =  vm-display-X11${la} vm-display-null${la}  B3DAcceleratorPlugin${la} SqueakFFIPrims${la} LocalePlugin${la} UnixOSProcessPlugin${la} UUIDPlugin${la} ImmX11Plugin${la} XDisplayControlPlugin${la}
(Why are the –without-vm-sound–… directives ignored?)
type make.
it compiles.
but the ‘getversion’ program barfs a bit (probably UUID problemvi M):
VM_RELEASE: $CommitHash$
VERSION_TAG: 5.0-$CommitHash$
VERSION_NUMBER: 5.0.$CommitHash$
DEFAULT_IMAGE_NAME: squeak.image
timmy@dpdev1:~/usr/src/opensmalltalk-vm/build.freebsd64x64/squeak.cog.spur/build %
and the resulting products output reflects that:
tree sqcogspur64linuxht/
|– bin
|   `– squeak
|– lib
|   `– squeak
|       `– 5.0-$CommitHash$
|           `– squeak
`– squeak
hack some more, renaming the lib/squeak/5.0
mv 5.0-\$CommitHash\$/ 5.0
check the executable:
file 5.0/squeak 5.0/squeak: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/, for FreeBSD 11.1, FreeBSD-style, not stripped
invoke it and check version (outputs as at the beginning of the post)
try to run it..
../opensmalltalk-vm/products/sqcogspur64linuxht/lib/squeak/5.0/squeak Squeak5.1-16548-64bit.image -headless
squeak: could not find any display driver
Abort (core dumped)

by timothy at May 20, 2018 07:38 AM

May 19, 2018


PharoContributor videos

Pharo contributor is a simple tool to help you contributing to Pharo.

now provides two videos demonstrating how this tool can be used as an alternative to easily contribute to latest Pharo 7



by Stéphane Ducasse at May 19, 2018 06:17 PM

Call for new GC testers

Hi all.

We’ve been working on a GC with lower pause time recently and we are looking for people working with images over 2 Gb to tune it (Deployed applications, not interested in quick hacks). We can sign NDAs if required.

Companies and people helping us will be guaranteed that the GC about to be deployed will be fine-tuned for the use-cases they provided. To evaluate and tune it properly, we need three kind of use-cases (>2 Gb):

– an image growing from a small size to a large size

– an image performing random accesses on objects on a large heap

– an image decreasing memory

The best would be for us 3 DoIts performing the 3 examples with low dependencies aside from the image so we can reproduce easily.

Clément Bera <>

by Stéphane Ducasse at May 19, 2018 05:52 AM

May 18, 2018


[Ann] OSSubprocess 1.0.0

Hi all,

News from the OSSubprocess side. For those who do not know it, OSSubprocess is the library to call external processes from Pharo.

These are the main points of this release.

- 64bits support
- Issues Working on both Pharo 6 and 7
- Issue #34: Adding tests to validate that the return code is correctly handled
- Issue #27: Cleanup: remove OSSubprocess-Tests package
- PR #26: Add stress tests

This version works for Pharo >=6. Users of Pharo5 will need to stick with v0.2.5, because of non-compatible changes in uFFI (required mostly for 64 bits).

- We moved the repository to pharo-contribution to remove pressure from Mariano for releases and integrations
- We updated the configuration in the catalog
- We decided to move to a 1.0.0 versioning schema because 0.* does look like the library is not stable and it actually is (We have been using it in pillar and iceberg for quite some time).

You can load this version from the catalog or using with:

Metacello new
   baseline: 'OSSubprocess';
   repository: 'github://pharo-contributions/OSSubprocess:v1.0.0/repository';

Detailed changes log in

If you have any issues (or PR!), we wait for your issue entry in

Have a nice weekend,

Guille Polito

Research Engineer

by Stéphane Ducasse at May 18, 2018 06:15 PM

Torsten Bergmann

Alternative Pharo-contributor tool explained with videos now provides two videos demonstrating how this tool can be used as an alternative to easily contribute to latest Pharo 7

Video 1:


and Video 2:

by Torsten ( at May 18, 2018 10:43 AM

May 17, 2018

Torsten Bergmann

Pillar Techtalk

by Torsten ( at May 17, 2018 04:30 PM