Planet Squeak

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

July 23, 2018


Cryptography on github

After several attempts to solve the Cryptography package problems over the years I decided to move it on my own to github.

What I did:

- researched all authors and used the git migration tool to get the package from smalltalkhub to github 
- released a version 0.1 that should be exactly the same as the code on smalltalkhub for people that want to change
- fixed an occurrence of IfNotNilDo: in the Cryptography package to make it load in pharo7
- added a metacello baseline
- added a group „all" that loads everything like it is now with one package
- added travis files and enable travis checks for pull requests
- released a version 0.2 that contains the original code plus travis and metacello
- Started to cut off the ASN1, PKCS12 and X509 classes in separate packages
- Added to each new package a -Tests package containing tests
- constructed all dependencies in the baseline
- added a core group that loads the now slimmed down package solely

I must say this was really great with the help of promote-demote package tag functionality and the dependency browser. The only thing missing is kind of a tool to construct the metacello baseline. I miss Versionner here.

What I didn’t do:

- checking all the other packages in the repo. There are packages with old style ffi calls and things that seem to be squeak dependent.

I hope with the time and people’s complaints we can figure out what is obsolete and what needs to be adjusted.

The repository is now at <>

but I’m happy to move it to a better place if someone has an idea. 

Pull requests and tickets are welcome.

Hope you like it,


by Stéphane Ducasse at July 23, 2018 12:20 PM

July 22, 2018


New success story: LawTracker

Here is a new success story around Pharo.

Do not hesitate to send to us your success stories.

by Stéphane Ducasse at July 22, 2018 09:26 AM

July 20, 2018

Pierce Ng


MelcGraph is a graph algorithm library by Ciprian Teodorov. I've updated the package to handle the deprecation of #name, using 'label' in place of 'name' as inst-var and in selectors. Thanks Ciprian for giving me commit access to the repo.

by Pierce Ng at July 20, 2018 05:19 PM


About dynabook and DrGeo


The Dynabook concept and Dr. Geo share some values.

Here is how


by Stéphane Ducasse at July 20, 2018 05:18 PM

Memory Profiler

by Stéphane Ducasse at July 20, 2018 05:14 PM



I am finally releasing an initial public version of Pharo Git Thermite, a tool that I am developing as part of my master thesis for visualizing Monticello and Git commits, for Pharo and Python:

GitHub Page with sources/documentation/issue tracker:

Short video examples:
- Monticello Visualization;
- GitHub pull request:
- Local git commit:

Feedback form:

Best regards,

by Stéphane Ducasse at July 20, 2018 05:06 PM

July 15, 2018


Unicode normalisation in Pharo

by Stéphane Ducasse at July 15, 2018 01:58 PM

July 11, 2018


Google API

I created a new repo at since the original repo is self-hosted, I don’t know what the contribution policy is, and I need the fix to continue my work. I’ll keep the MC meta info so that my changes can be merged back if desired.

Fun fact. I was able to send a multipart text & html email after a few gotchas. Here is the script in case someone wants to do the same:
| api message raw |
api := GoogleGmailApiUsersMessages new.
api authenticate.
message := MailMessage
from: ‘”Mr. Sender” <>’
to: { ‘”Mrs. Receiver” <>’. }
about: ‘Thank you!’
asFollows: ”.
addAlternativePart: self plainTextString contentType: ‘text/plain’;
addAlternativePart: self htmlString
contentType: ‘text/html’.
raw := message asSendableText base64Encoded.
“Web-safe base64 from
raw := raw copyReplaceAll: ‘+’ with: ‘-‘.
raw := raw copyReplaceAll: ‘/’ with: ‘_’.
api send: ‘’ api options: (Dictionary with: ‘raw’ -> raw)

where #send:options: is just the generated #send: with an argument passed through (instead of nil) as the last argument to:

^ self makeRequestTo: path usingMethod: action with: optionsDict.

by Stéphane Ducasse at July 11, 2018 05:10 PM

[ANN] New Academic Partner: University of Yaoundé 1

The Pharo Consortium is very happy to announce that University of Yaoundé 1 has joined as a Academic Partner.

- University of Yaoundé 1:
- Pharo Consortium:

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 July 11, 2018 06:35 AM

July 10, 2018


[ANN] New Academic Partner: SQLab

The Pharo Consortium is very happy to announce that SQLab has joined as a Academic Partner.

- Software Quality Laboratory, Part of University of Novi Sad:
- Pharo Consortium:

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 July 10, 2018 06:34 AM

July 09, 2018


[ANN] New Academic Partner: ENIT

The Pharo Consortium is very happy to announce that ENIT has joined as a Academic Partner.

- ENIT Ecole Nationale d'ingénieurs de Tarbes:
- Pharo Consortium:

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 July 09, 2018 06:34 AM

Tiling shortcuts


the latest Pharo 7 includes new window tiling shortcuts that should help
you to manage windows position and size without the need of using a mouse.

In this description, the key ⌘ has equivalent in Ctrl on Linux and Windows.
I need to notice that some nicer key combinations would be chosen if the VM
support of key modifiers would be proper on all platforms but that is a
different story…

Windows tiling

⌘+Shift+W, A – move the window to the left half of the screen.
⌘+Shift+W, D – right half
⌘+Shift+W, W – top half
⌘+Shift+W, X – bottom half

⌘+Shift+W, Q – move the window to the top left quadrant of the screen
⌘+Shift+W E – top right quadrant
⌘+Shift+W, Z – bottom left quadrant
⌘+Shift+W, C – bottom right quadrant

⌘+Shift+W, S – maximize the window
⌘+Shift+W, Shift+S – minimize the window

⌘+Shift+W, R – centre the window on the screen with a default extent

Windows moving

⌘+Shift+W, ← – move the window left by half of its width
⌘+Shift+W, → – move the window right by half of its width
⌘+Shift+W, ↑ – move the window up by half of its height
⌘+Shift+W, ↓ – move the window down by half of its height

Windows resizing

⌘+Shift+W, hold ⌘+Shift and press:
A, A – move left window edge left (by half of the window size)
A, S – move left window edge right (by half of the window size)
W, W – move top edge up
W, S – move top edge down
D, D – move right edge right
D, S – move right edge left
X, X – move bottom edge down
X, S – move bottom edge up


— Pavel

by Stéphane Ducasse at July 09, 2018 06:25 AM

July 04, 2018

Ecole des Mines

Sense-South Project: IoT for Environmental Surveillance

As a member of the Sense-South project, we are glad to announce that our proposal has been accepted for funding by the IRD. The project targets innovative sensors and IoT telecommunication networks for environmental surveillance in southern countries. The consortium gathers 27 partners from 4 countries (Cameroon, France, Senegal, Vietnam) spread over 3 continents (Africa,… Continue reading

by noury at July 04, 2018 01:31 PM

June 30, 2018


PolyMath moved to github

Thank to the terrific work of Cyril, all the PolyMath code is now
available on github:

With a lot of magic tricks, Cyril was able to preserve part of the history of the project:

This is nice to all the commits that we have done sine more than 3 years, available as git commits now !

​Thank you again Cyril !

by Stéphane Ducasse at June 30, 2018 11:20 AM

June 28, 2018


[Ann] PolyMath Release

We are pleased to announce the release of PolyMath 0.101
PolyMath is a numerical computing and data analysis library on top of Pharo.
The code is available here:
and can be loaded in a fresh Pharo 6.1 image with:
Metacello new 
  repository: '';
  configuration: 'PolyMath';
  version: '0.101';
The current work is mostly focused on cleaning the codebase in order to release the 1.0 version for September 2018. Please help us, by looking at the issues here: , joining #polymath channel on Discord or polymath mailing-list:!forum/polymath-project
Serge Stinckwich

by Stéphane Ducasse at June 28, 2018 05:44 AM

June 27, 2018

Pierce Ng

Mobile-First Responsive

I've finally gotten around to building a "mobile-first responsive" version of this website. Still powered by Pharo Smalltalk and Seaside, using Seaside-Bootstrap, wrapping Bootstrap 3, for the responsive HTML templating.

by Pierce Ng at June 27, 2018 07:56 PM

June 22, 2018


Dr. Geo release 18.06

We are please to announce the Dr. Geo release 18.06. It follows the 
release 17.07 in July 2017.
A large part of the effort was to port Dr. Geo from the Pharo 3 to Pharo 
7 Smalltalk development environment.
In addition to usual bug fixes several features were added.

*Mini changelog:*
- Dedicated Script browser
- Inspector on Smalltalk Sketch
- Positioning zoom
- Unit tests based on Smalltalk sketch
- Lan share
- Graphic user interface theme
- Fullscreen option
- Lots of bug fixes

Read the complete announcement <>

Dr. Geo is always looking for volunteers to translate 
<> its user interface.

Hilaire Fernandes

by Stéphane Ducasse at June 22, 2018 05:09 PM

June 21, 2018


PharoLauncher V1.2

Hi all,

I just released PharoLauncher 1.2. It includes a new windows installer that you can use without administrator privileges as well as binary signing for OS X and Windows. Also, Pharo Launcher is not anymore identified as ‘Pharo’ application and comes with its own icon.

Here is the changelog (details on <>):
New features:
	#21 Bless the DMG
	#46 sign pharo launcher app for windows
	#103 No way to rename a local template
	#107 Unable to add a description for the image using the Launcher UI
	#121 You can't see/sort images by last modified date
	#69 Import command should also import pharo-local directory
	#70 Import command should delete origin folder if empty
	#73 Managers of Download of VMs and images should be in their own packages
	#76 Use https instead of http to requests the pharo file server
	#82 Official Distributions loads 32bit versions on 64bit System (i.e. provide better information on templates architecture)
	#86 Sort Existing Images Case-Insensitive
	#98 Copy and subfolders problem (contents no copied)
	#101 Templates from a local image are listed in "downloaded". "local" would be a better name
	#102 Template Cleared at Startup setting is enabled, making it weird when trying to use the template feature
	#106 Import could work if we select the parent folder of an image
	#109 Use latest pre-Spur VM to determine the image version
	#122 The Run without settings icon looks like a funny grey/which blob (missing alpha correction)
Bux fixes:
	#41 #selectedMorphList was sent to nil
	#67 bash is not a command usable under windows
	#68 Does not launch images on Windows
	#85 Double click on an existing image open a file selector
	#88 Pharo Launcher on Windows > Failing
	#104 GUI bug makes Launcher unusable
	#110 Image launch not reliable on Windows
	#119 MessageNotUnderstood exception on launch
	#123 The status bar of the Launcher is broken, so can't easily show image descriptions 

Big thanks to all contributors: code, issues report, comments, advices.
You can get platform bundles from pharo download page or <>: <>

by Stéphane Ducasse at June 21, 2018 07:17 AM

June 20, 2018


Web-stack new version: June release


RenoirSt 6.0.0

Full changelog and migration notes here.

Willow 10.1.0

Changes since last announcement (v 8.0.2 ):

Full changelog and migration guide: v9.0.0, v10.0.0 and v10.1.0.

Willow Bootstrap 10.1.0

Changes since last announcement (v 8.0.2):

Full changelog and migration guide: v10.0.0 and v10.1.0.

Willow JQueryUI 9.0.0

Changes since last announcement (v 7.1.0):

Full changelog and migration guide here.

Willow SpinKit 6.0.0

Updated dependencies.

Willow Mixpanel 2.0.0

Updated dependencies.

Willow Playground 7.0.0

Changes since last announcement (v 5.0.0):

by Stéphane Ducasse at June 20, 2018 07:02 PM

June 18, 2018


[Ann] Iceberg V1.1.1

Hi everybody,

This week we have a small patch release of Iceberg, version v1.1.1.
This version will be available in the next Pharo build.

In summary, this release fixes two issues with the new credentials manager,
and introduces a couple of other enhancements/bugfixes.

Below you will find the detailed changes log.

Integrate Iceberg 1.1.1

#864 <> Repairing Missing
repositories lead to wrong source directory
#861 <> update tonel to
#836 <> DefaultBackendType
class variable is unused
#862 <> Iceberg tests are
not running in Pharo 7
#852 <> Make error dialogs
#858 <> IceTipReadOnlyTextMorph
does not allow select and copy anymore
#850 <> Change Detached head
status from error to warning if we are on a tag
#853 <> Clone dialog
"username" is confusing
#860 <> CredentialStore API
#854 <> Error in History

by Stéphane Ducasse at June 18, 2018 08:40 PM

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


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


[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