Planet Squeak

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

April 21, 2018


Migration of Seaside book started!


I decided to start to migrate the Seaside book to Pillar and make it a community-oriented book.
I will work regularly on it and offer it as a gift to the community.

If some of you want to join the effort, you are welcome.


by Stéphane Ducasse at April 21, 2018 07:27 AM

April 19, 2018

Torsten Bergmann

Dockerizing Pharo

Some slides on how to dockerize Pharo.

by Torsten ( at April 19, 2018 02:44 PM

April 18, 2018

Torsten Bergmann

Iceberg 0.7 explained

Iceberg - the Code Versioning Tool for Pharo with a binding to git now has a reworked model and UI. Esteban gave an intro to it in a techtalk:

by Torsten ( at April 18, 2018 12:55 PM


REST services are easy to implement in Pharo - especially with "Teapot" and my simple "Tealight" extensions for it. Read the Tealight project page with some documentation and examples to get an idea about it.

If you worked with or heard about REST then you might also come across GraphQL. It's a technology initially developed at Facebook.

In GraphQL, the shape of the response is built up on the server side to match the shape of a given JSON query.

So while in REST when you ask for a "book" item you receive a predefined JSON response with all attributes of the book. In GraphQL you might ask only for the books title or in another case for the books title and author at the same URL and receive an appropriate response.

Now there is also an initial library for GraphQL available for Pharo and VisualWorks.

Really nice!

by Torsten ( at April 18, 2018 12:51 PM

Programming Neural Networks in Pharo - Preview

Agile Artificial Intelligence with Pharo - a new book is in the pipe. You can already have a preview.

by Torsten ( at April 18, 2018 12:23 PM

April 13, 2018


QRCode – A thank you note


Given that the mailing lists are often used to ask questions when we get in trouble, report bugs and other issues, conduct public discussion between strong headed individuals, we quickly forget what a fantastic platform Pharo is.
Last month I implemented a rough MVP-style ticket sales platform that was successfully used to sell and validate at the entrance, about 1000 digital, online tickets for a relatively large 3000+ attendance event (a party). It took only a couple of days to build and deploy, and it was a lot of fun – it was even done in ‘unstable’ Pharo 7.
Early on I decided to identify each individual ticket by a unique URL. For easier presentation and scanning purposes, I encoded that URL in a QR code.
Although I am grateful for the whole Pharo ecosystem (including Seaside), we all build on top of other people’s work, I was especially happy with Jochen Rick’s QRCode package (!/~JochenRick/QRCode/). This is such a great piece of work !
It worked right out of the box in Pharo 7 (even though it is from 2013/2014), was well designed, easy to figure out, was well documented, had unit tests. I can’t say anything bad about it, it is as close to perfect as I have ever seen. So: thanks Jochen, you made my day !
Here is how a ticket generates its own QR code:

^ self url asString asQRCode formWithQuietZone magnifyBy: 5

Just beautiful.
It is also easy (for a non-graphics, non-UI person like me) to combine the QR code with some text:
T123Ticket >>#asQRCodeWithText

| form font |
form := Form extent: 535 @ 185 depth: 1.
font := LogicalFont familyName: ‘Bitmap DejaVu Sans’ pointSize: 14.
self asQRCode displayOn: form at: 0 @ 0.
form getCanvas
drawString: self url asString at: 180 @ 20 font: font color: Color black;
drawString: self id36, ‘ – ‘, ticketId asString at: 180 @ 45 font: font color: Color black;
drawString: (name ifNil: [ ‘N.N’ ]) at: 180 @ 90  font: font color: Color black;
drawString: (email ifNil: [ ‘@’ ]) at: 180 @ 115 font: font color: Color black;
drawString: (phone ifNil: [ ‘+’ ]) at: 180 @ 140 font: font color: Color black.
^ form

Next we combine this with a nice template designed by a graphics artist:
T123Ticket >>#asQRCodeWithTextInTemplate
| templateFile form |
templateFile := ‘tickets123-template-{1}.jpg’ format: { self event id }.
form := PluginBasedJPEGReadWriter formFromFileNamed: templateFile.
self asQRCodeWithText displayOn: form at: 20@540.
^ form
And finally, the ticket form is encoded as a JPEG (to be mailed and so on):
T123Ticket >>#asJPEGBytes
^ ByteArray streamContents: [ :out |
PluginBasedJPEGReadWriter putForm: self asQRCodeWithTextInTemplate onStream: out ]
I also found GT Inspector very handy (again) in doing back end work (managing payments and other administration), especially the ability to use Spotter on a collection open in an inspector.
Anyway, I know many of you have similar happy experiences, I just wanted to share (one of) mine.
Thanks Jochen, thanks everyone.

by Stéphane Ducasse at April 13, 2018 06:59 PM

April 12, 2018


[Testimony] migration to 6.1 was super easy.

Thanks for all the hard work.

It took me about 30 minutes to migrate one of my projects from 32bit Pharo 5 to 64bit 6.1 this afternoon.  It has about 40 external dependencies so I thought it would take much longer to get everything sorted.


by Stéphane Ducasse at April 12, 2018 09:34 AM

April 07, 2018


[Bloc] fun with MozCanvas


by Stéphane Ducasse at April 07, 2018 07:57 PM

[Pharo-dev] [ann] gt diagrammer


We are happy to announce an initial version of GT Diagrammer, an engine for constructing diagrams interactively. This is the newest addition to the next generation GT built on Bloc.

It looks like this:
We chose to work on Diagrammer for multiple reasons. First, developers often need to create hand-built diagrams to communicate intentions, and an integrated experience should not require us to leave our environment to create them. At the same time, Diagrammer is an application that requires a widget and interactions, and thus it is a nice exercise for Bloc and Brick.

One requirement we had from the beginning was to make it work with any Bloc element. This means that the editing part had to be reasonably generic. To this end, we now have elements that can define visual editors. This is somewhat a combination between Magritte descriptions, and inspector extensions. An interesting side effect is that now we can edit visual properties when inspecting any element. In other words, we got the basic infrastructure of a UI painter. It looks like this:

The user interface essentially relies on two widgets: scrollable list and toggle button. While the visual look of the toggle button is inspired from material design, the most interesting part is that now we have an implementation for controlling looks per element instance. A key issue here is that looks can react to events coming from the element and inject visual attributes and possible even change behavior (for example, changing an icon while pressing a button). We will post more about looks soon.

We now also have a nice solution for overlays. For example, we have an overlay showing selection and an overlay for resizing elements.

Perhaps less obvious, Diagrammer also offers a basic infrastructure for the area of visual languages. As Diagrammer works with any Bloc elements, we can simply create dedicated visual elements. As an example, Diagrammer comes with an implementation of a UML class figure. Furthermore, as the functionality does not impose a specific model, custom language semantics can be mapped on visual actions.

There are several things to do still for it to become a mature solution. An important next step is to serialize a diagram scene in a reproducible manner. Currently, the diagram (or any element) can be exported as pdf (, svg (, png, gif or jpeg by directly using the low level canvas. However, for the diagram to be truly useful we need to store the result in either code or another reloadable form such as STON. Other future directions are related to figure controlling (for example, custom anchors or line bending points) and to enhanced editors.

To play with it, the easiest way is to download the new GT in a Pharo 6.1 image:
Metacello new
baseline: ‘GToolkit’;
repository: ‘github://feenkcom/gtoolkit/src’;

And then inspect:
GtDiagrammerElement new

The feenk team

“Presenting is storytelling.”

by Stéphane Ducasse at April 07, 2018 06:02 PM

April 03, 2018

Germán Arduino

Coyote, Gestión e Inventario de Riesgos

Coyote es un sistema de gestión integral de riesgos informáticos y operacionales, destinado a cualquier tipo de empresa que necesite manejar sus riesgos a través de una herramienta de seguimiento que permita controlarlos.

No sólo es necesario registrar e informar los riesgos que se detectan, sino que es imprescindible, para una adecuada gestión de los mismos, realizar el seguimiento pertinente y consensuar el tratamiento que se dará a los mismos.

Además, es importante disponer en todo momento de un tablero de control que permita conocer el estado de los riesgos de la compañía así como también cuáles están abiertos desde hace más tiempo, cuáles implican mayor impacto en la eventualidad de materializarse y cuáles pueden esperar ya que su impacto no es significativo.

Coyote permite realizar todas estas gestiones y facilita el trabajo de la Gestíón de Riesgos en forma constante con las nuevas funcionalidades que se van agregando al producto.

by Germán Arduino ( at April 03, 2018 02:38 PM

April 01, 2018


Learning Object-Oriented Programming, Design and TDD with Pharo


We are happy to officially announce that

Learning Object-Oriented Programming, Design and TDD with Pharo

is now available for print on

Pharo association members will soon receive a 20% reduction!

Stéphane Ducasse and Damien Pollet


by Stéphane Ducasse at April 01, 2018 12:35 PM

[ANN] MaterialDesignLite v1.2.0 for Seaside

Hello everyone,

Today I released the version v1.2.0 of MaterialDesignLite for Seaside.

The main changes are:
– There is a brand new demo with more examples and documentation. You
can find it here:
– There is a new concepts: The extensions. Extensions are not describe
by Material Design but are meant to help developers while building web
application. This release contains 3. A way to simplify the use of
dialogs, called “root dialog”, a resizeable left panel and a resizeable
right panel with tabs.
– There is a new widget: the progress widget
– New brushes to use premade typography and typogaphy styles

This release is tagged with v1.2.0 and I also introduced tags v1.2.x and
v1.x.x which are moving tags following patch and minor versions.

Here is the full changelog of the release:

If you have issues, need a new feature or have a comment on the project
feel free to open a issue:

Have a nice day!

Cyril Ferlicot

by Stéphane Ducasse at April 01, 2018 09:16 AM

March 30, 2018


[Testers Required] New FreeType implementation using FFI

I have implemented the backend of FreeType using only FFI calls.

So the whole implementation is in the image side, the current plugin has a lot of problems handling the release of the pointers. The new implementation is using the mechanism that is already present in UFFI to release the Heap pointers, so it should be more stable and easier to modify if there is an issue.
The FT2Plugin is not used anymore in this version.
I have tested it in the different platforms, but beside OSX I have only made a smoke test. I need some users to try it, so I ask you if you can test in different installations.
The image can be downloaded from the CI
32 bits:
64 bits:
Thanks to all!!

by Stéphane Ducasse at March 30, 2018 04:38 PM

March 29, 2018


[Ann] Highcharts JS Wrapper and the Web Stack


We’re happy to announce a new version of the Highcharts JS Wrapper and the Web Stack hosted at This is a multi-release announcement of the following related project versions:

  • HighchartsSt v6.0.0
    • Updated Highcharts and Highstock JS libraries to version 6.0.3
    • Improved Importing Tools
    • Improved Travis CI integration
  • Willow v7.0.0. Changes since latest announcement:
    • Added composition of table row commands
    • Refactored a bunch of common utilities into it’s own project
    • Improved JSScript extensions
  • Willow-Bootstrap v7.0.0
    • Updated Willow base support to v7.0.0
    • Improved Radio Web Views
  • Willow-JQueryUI v6.0.0
    • Updated Willow base support to v7.0.0
    • Improved Radio Web Views
  • Willow-SpinKit v4.0.0
    • Updated Willow base support to v7.0.0
  • Willow-Playground v3.0.0

    • Updated dependencies to the latest versions
    • You can now grab a ready to use image from the releases page
  • RenoirSt v4.1.0
    • Add another way of creating descendant combinators for cases when the right part of the expression needs parenthesis
    • Updated dependencies

SemanticUI and Materialize CSS integration are still a work in progress.

Find a more detailed changelog and migration instructions on the release pages of each repository.

Special thanks to Ignacio Martinez and Juan Escalada for contributing some of the new features. Also to Maxi Tabacman and Mariano Martinez Peck for the Highcharts update.
Anyone interested in joining our ba-st projects is welcomed, and you can also get some interesting ideas in crafting lint rules to support team coding standards.


Gabriel Cotelli, Maxi Tabacman and all the contributors.

by Stéphane Ducasse at March 29, 2018 04:49 PM

March 27, 2018


Understanding MetaLinks


I did last week a short lecture at VUB Brussels. Topic: MetaLinks.

by Stéphane Ducasse at March 27, 2018 04:17 PM

March 23, 2018

Historical - Ramon Leon


8 years dead this old blog; still hundreds of active subscribers to the old rss feeds; amazing. Seaside and Smalltalk never took over the world, but I still use them daily, guess I'm an old gray beard now, but it's a nice beard. :)

by Ramon Leon at March 23, 2018 03:48 PM

March 22, 2018

Torsten Bergmann


Boadebui, a simple MIDI sequencer for Squeak Smalltalk.

by Torsten ( at March 22, 2018 07:58 AM

March 19, 2018


New Files in Pharo – Migration Guide, How To’s and examples

Hi all,
I’ve put some minutes summarizing the new APIs provided by the combination of the new File implementation and the Zn encoders. They all basically follow the decorator pattern to stack different responsibilities such as buffering, encoding, line ending conversions.
Please, do not hesitate to give your feedback.
1. Basic Files
By default files are binary. Not buffered.
(File named: ‘name’) readStream.
(File named: ‘name’) readStreamDo: [ :stream | … ].
(File named: ‘name’) writeStream.
(File named: ‘name’) writeStreamDo: [ :stream | … ].
2. Encoding
To add encoding, wrap a stream with a corresponding ZnCharacterRead/WriteStream.
utf8Encoded := ZnCharacterReadStream on: aBinaryStream encoding: ‘utf8’.
utf16Encoded := ZnCharacterReadStream on: aBinaryStream encoding: ‘utf16’.
utf8Encoded := ZnCharacterWriteStream on: aBinaryStream encoding: ‘utf8’.
utf16Encoded := ZnCharacterWriteStream on: aBinaryStream encoding: ‘utf16’.
3. Buffering
To add buffering, wrap a stream with a corresponding ZnBufferedRead/WriteStream.
bufferedReadStream := ZnBufferedReadStream on: aStream.
bufferedWriteStream := ZnBufferedWriteStream on: aStream.
It is in general better to buffer the reading on the binary file and apply the encoding on the buffer in memory than the other way around. See
[file := Smalltalk sourcesFile fullName.
(File named: file) readStreamDo: [ :binaryFile |
(ZnCharacterReadStream on: (ZnBufferedReadStream on: binaryFile) encoding: ‘utf8’) upToEnd
]] timeToRun. “0:00:00:09.288”
[file := Smalltalk sourcesFile fullName.
(File named: file) readStreamDo: [ :binaryFile |
(ZnBufferedReadStream on: (ZnCharacterReadStream on: binaryFile encoding: ‘utf8’)) upToEnd
]] timeToRun. “0:00:00:14.189”
4. File System
By default, file system files are buffered and utf8 encoded to keep backwards compatibility.
‘name’ asFileReference readStreamDo: [ :bufferedUtf8Stream | … ].
‘name’ asFileReference writeStreamDo: [ :bufferedUtf8Stream | … ].
FileStream also provides access to plain binary files using the #binaryRead/WriteStream messages. Binary streams are buffered by default also.
‘name’ asFileReference binaryReadStreamDo: [ :bufferedBinaryStream | … ].
‘name’ asFileReference binaryWriteStreamDo: [ :bufferedBinaryStream | … ].
If you want a file with another encoding (to come in the PR, you can specify it while obtaining the stream:
‘name’ asFileReference
    readStreamEncoded: ‘utf16’
    do: [ :bufferedUtf16Stream | … ].
‘name’ asFileReference
    writeStreamEncoded: ‘utf8’
    do: [ :bufferedUtf16Stream | … ].
5. Line Ending Conventions
If you want to write files following a specific line ending convention, use the ZnNewLineWriterStream.
This stream decorator will transform any line ending (cr, lf, crlf) into a defined line ending.
By default it chooses the platform line ending convention.
lineWriter := ZnNewLineWriterStream on: aStream.
If you want to choose another line ending convention you can do:
lineWriter forCr.
lineWriter forLf.
lineWriter forCrLf.
lineWriter forPlatformLineEnding.
6. About performance questions
Well, I’d say it we did it in the name of modularity. And yes, I believe that having separate responsibilities help in designing, testing and ensuring more easily the correctness of each of the parts in isolation.

I’ve done also some profiling and it does not look like we’ve lost in performance either (reading and decoding a 35MB file):
[file := Smalltalk sourcesFile fullName.
(File named: file) readStreamDo: [ :binaryFile |
(ZnCharacterReadStream on: (ZnBufferedReadStream on: binaryFile) encoding: ‘utf8’) next: binaryFile size.
]] timeToRun. “0:00:00:01.976”
[file := Smalltalk sourcesFile fullName.
(MultiByteFileStream fileNamed: file)
converter: (TextConverter newForEncoding: ‘utf8’);
] timeToRun. “0:00:00:02.147”

by Stéphane Ducasse at March 19, 2018 07:34 PM

Woden with Vulkan and openGL on Windows

woden_windows.png I just managed to get Woden working with Vulkan, and OpenGL on Windows. Finally, smooth movement (My tearing was Linux failure). My only complain is that it takes too long on loading a Pharo image on Windows.

Ronie Salgado

by Stéphane Ducasse at March 19, 2018 07:25 AM

March 18, 2018

Pierce Ng


I've just added RIPEMD160 to the EVP interface in OpenSSL-Pharo. This post serves as a HOWTO.

OpenSSL's C interface defines RIPEMD160 thusly:

const EVP_MD *EVP_ripemd160(void);

Create LcLibCrypto>>apiEvpRIPEMD160 for it:

  ^ self ffiCall: #(EVP_MD* EVP_ripemd160 ())
    module: self library

Next, create LcEvpRIPEMD160 as a subclass of LcEvpMessageDigest:

LcEvpMessageDigest subclass: #LcEvpRIPEMD160
  instanceVariableNames: ''
  classVariableNames: ''
  package: 'OpenSSL-EVP'

  super initialize.
  handle := LcLibCrypto current apiEvpRIPEMD160.
  self errorIfNull: handle

Add class-side accessors:

LcEvpRIPEMD160 class>>blocksize
  ^ 64

LcEvpRIPEMD160 class>>hashsize
  ^ 20

And that's it! Using the test vectors from the RIPEMD160 home page and RFC 2286, the unit tests verify that we can now use RIPEMD160 for hashing and HMAC from within Pharo:

  | msg result |

  msg := ''.
  result := ByteArray readHexFrom: '9c1185a5c5e9fc54612808977ee8f548b2258d31' readStream.
  self assert: (md hashMessage: msg) equals: result

  | msg result expectedResult |

  msg := 'Hi There'.
  key := ByteArray readHexFrom: '0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b' readStream.
  expectedResult := ByteArray readHexFrom: '24cb4bd67d20fc1a5d2ed7732dcc39377f0a5668' readStream.
  result := (HMAC on: LcEvpRIPEMD160)
    key: key;
    digestMessage: msg asByteArray.
  self assert: result equals: expectedResult

by Pierce Ng at March 18, 2018 03:45 PM

March 16, 2018

Torsten Bergmann

Pharo to Anki

Using Pharo to create Anki decks that help to deliberately practice Japanese grammar by visualizing.

by Torsten ( at March 16, 2018 07:37 AM

March 15, 2018

Torsten Bergmann

Instance inspection in Pharo

The Pharo Inspector on classes now has “instances” view. I added this a a few days ago and forgot to send a message to the list so anyone knows. Looks like I should blog more about my contributions again.

by Torsten ( at March 15, 2018 07:25 AM

Pharo AWS SDK with SNS support

The Pharo AWS SDK now supports Amazon Simple Notification Service (SNS)

by Torsten ( at March 15, 2018 06:58 AM


Making Twitter Bootstrap work with Seaside 3.1 on Squeak 5.1

Tobias Pape solved the problem here:



Add class side method to

TBSBootstrapExample class >>methodNamed: aSymbol
^ self >> aSymbol

The “>>” message is from Behavior…take the time to look it up, its a great one for the toolbox.


Add instance side method to:


CompiledMethod >sourceCode
^ self getSource


My hunch is that this is a pharo thing that does not port to Seaside until now.



by timothy at March 15, 2018 12:24 AM

March 14, 2018

Torsten Bergmann

Feenk work on a Diagrammer for Pharo in Bloc

The Feenk team is working on on Diagrammer in Pharo. The idea is that developers should not have to leave the IDE - not even for drawing diagrams and they give a nice graphic preview on a more elaborate control of lines and figures in this tool with some screenshots on their twitter account.

 - Preview 1
 - Preview 2
 - Preview 3

This nicely shows what is already possible in Bloc.

by Torsten ( at March 14, 2018 01:39 PM

March 13, 2018

Torsten Bergmann

Pharo-sentry v0.2.2 releases

The unofficial Pharo SDK for Sentry error tracking platform from Peter is available with a new 0.2.2. release. Now with support for breadcrumbs and basic context.

Code is here:

by Torsten ( at March 13, 2018 04:48 PM

Updated DiscordsSt for Pharo

A new version of DiscordsSt, An API wrapper for Discord written in Pharo

by Torsten ( at March 13, 2018 12:37 PM

March 11, 2018


Bloc, brick and GT update


Here is an update of the work on Bloc, Brick and GT. As always, please do let us know what you think.

– Improved the deletion in the text editor and covered the scenarios with examples
– Worked on the text selection. Still work needed for selection to be production ready:
– Balanced rope structure for even better performance of the editor. Overall, the performance of the text editor improved 2x.
– Selectable curves:

– Resizer overlay. The tweet below also shows how we can now easily script dragging behavior in examples:

– Diagrammer is a new engine for drawing diagrams based on Bloc. This is the first version, and we will continue working on it in the following weeks, so stay tuned for more news. This is also one of the first Bloc applications:
– Andrei put together a beautiful description of a scenario in which an application is molded interactively in the Playground & Inspector. The subject is face recognition, and the resulting code is both functional and explainable. This is intended as a tutorial material that shows what moldable development means and how it changes the way we program:

Have fun,
The feenk team

by Stéphane Ducasse at March 11, 2018 08:08 PM

Torsten Bergmann

Playing with face detection in Pharo

A nice medium article from Andrei Chis on "Playing with face detection in Pharo"

by Torsten ( at March 11, 2018 07:11 PM

March 09, 2018


Cruiser: A Pharo app packager

Hi Pharoers!

I pleased to announce you the first release of Cruiser: a tool to package your Pharo applications. The idea is to quickly convert an application from a development environment to a production one. A production environment means:

I let you discover it on:


by Stéphane Ducasse at March 09, 2018 08:28 PM