Category Archives: Unsorted

New Pharo by Example book available!


After several iterations and some month of efforts, the new version of Pharo by Example is finally available in print form and pdf.

Tx all the contributors.

Pharo TechTalk


I added

This is linked from

The idea is to keep a log of all past tech talks with links to the archival recording (if there is one).


An instance variables cache


at Synectique, we are using cache for lots of projects and for now we were always using another instance variable or a dictionary to store many. It is complicated to maintain and we are always reinventing the wheel.

That’s why i created a first implementation (very naive but functional, documented and tested) of a cache.

It is available here (with usage explication):!/~GuillaumeLarcheveque/SmallCache

and you can get it by doing:

Metacello new
smalltalkhubUser: ‘GuillaumeLarcheveque’ project: ‘SmallCache’;
configuration: ‘SmallCache’;
version: #development;

Tell me if you are interested in it or if you have ideas about it.

Pillar 4.0.7 for Pharo 50 is out


We are happy to announce a new version of Pillar for Pharo 50 and 60.
Thanks Maxime Roelandt for the help.
     – Now we can rebuild the mooc slides (the metadata is correctly handled)
     – The double walking of the tree fixes by Yann Dubois is integrated.
     – We checked and we can produce HTML, books and slides
The version 4.0.7 will be the last stable version for Pharo 50.
On Pharo 60 we will start a large cleaning. Here is the list:
– integrate AST tokens fixed by Doru.

– decouple the installer logic from the command-line work made by Maxime.
– remove the DNU tricks for magritte elements.
– repackage and minimize dependencies (the core of Pillar should not depend on magritte).
– package a minimal core that could be used for class comments.
– document architecture and phases.
– remove the “optimisation hell” produced by metadata vs. data. (KISS principle please).
– make sure that ecstatic can be reexpressed on top of the new system.
– make sure citezen components and smart publication ecstatic plugin can work
– remove dependency to git script in the book template.
– add test block so that we can run the tests of a book automatically.
If you want to help you are welcome.
Pillar can be a really sexy Pharo showcase.

[consortium] 27 feb-5 march


This is my weekly ChangeLog, from 27 February 2017 to 5 March 2017.
You can see it in a better format by going here:


3 March 2017:

* And now I made compile on linux too

I think Iceberg is fixed now for linux, can someone with linux try +vmLatest60+.

* I worked on VM for linux, this time fixing dependencies for libgit2: it was not working because it was trying to link libssh2 existing in the system instead the one we provide (a problem with rpath)… I figured out I  need to add some CMAKE options:


otherwise +make install+ was ignoring the +-Wl,rpath,.+ configuration. With this it seems to be working, but now I have a problem with +libssh2+ compilation.

I’ll see this next.

* I took some moments to fix a problem on new UFFI version (0.26): Now, structures use a class variable to keep the offset value of a field. So now, instead having an accessor to a field of the form (for example):

^ handle unsignedLongAt: 42

… now you have an accessor of the form:

^ handle unsignedLongAt: OFFSET_MYFIELD

this is necesary to allow different platforms to use same structures (because sizes of fields, and in consequence of offsets of them inside a stricture are different). This ‘offsets’ are calculated (as structure compiled specs) at first access to +#compiledSpec+ of structure, which usually happens when you use it first time… but now always, as [case: 19788]( shows.

Well, now I fixed that

2 March 2017:

* I added a Discord link on [](… I want to slowly start moving our community there. I know Slack is very popular among us this days but Dicords offers some advantages (like no 10k limit on messages and a powerful search).

1 March 2017:

* … and now I made the [case:19783](, to make SDL2 work on 64bits (it works!)

* Yesterday I spent the full day debugging a VM to see why Athens was not working for 64bits and I finally figured out the problem was in image and not in VM

As a result of the work, I produced these fixes:

* [case:19781]( to fix a problem answering pointers on callbacks.
* [case:19782]( to actually prepare Athens.

With this two cases, Athens works in 64bits (almost)

Now there is a problem in 64bits callbacks that makes the +VGTigerDemo runDemo+ to fail after some cycles. Since this problem does not happens on 32bits, I assume there is a problem on how callbacks work on 64bits. I’m not working on that (I will work also in migrating SDL2).

27 February 2017:

* Well, I spend some time trying to blindly figure out why athens may crash time to time when drawing surfaces,  basically testing the approachs [Ronie proposes](

First approach consists on copying data to not rely on a surface at all. Problem with this is that it involves a whole full copy, that causes a lot of GC that pauses a lot the image… so smoothness is gone.

Second approach seems a lot more doable, but I still don’t know if it works:

Form subclass: #AthensCairoSurfaceForm
instanceVariableNames: ‘surface’
classVariableNames: ”
package: ‘Athens-Cairo’

^ surface

AthensCairoSurfaceForm>>surface: anObject
surface := anObject

“create a form and copy an image data there”
self checkSession.
self flush.
^ (AthensCairoSurfaceForm extent: (self width@self height) depth: 32 bits: id)
surface: self;

this will prevent surfaces to be garbage collected before its time and seems to be working fine (at least in my machine).


Testing regexp


I wrote a little tool to test regular expressions and verify that
given samples match it. It also helps to divide an expression into
subexpressions to retrieve parts of a matched string.

Screenshot is attached. Code, load instructions and full tutorial
on how to use it is on

Hope it is useful for others too. Have fun!


XML Metadata Interchange (XMI) for Pharo


if you work with UML, modeling tools or model data exchange often you might know XMI –
the XML Metadata Interchange format.

I wrote a little package that makes it easier to work and browse data based on this
format within Pharo.

For instance you can open an XMI object either from a given stream
or URL:

(XMIFile fromURL: ‘’) inspect

You can also open a file

XMIFile importFile

Code is available on

The package includes a small GT extension allowing you to walk and dive through the XMI
structure (see attached screenshot) and as the XMI nodes are unified it is easy to
code some code generators or transformers in Pharo afterwards.

For instance I used this package for a simple Pharo code generator based on Eclipse EMF models/diagrams.

Within the code you will find some examples to browse through prominent XMI models like:

– UML Spec
=> (XMIFile fromURL: ‘’) inspect

=> (XMIFile fromURL: ‘’) inspect

=> (XMIFile fromURL: ‘’) inspect

=> (XMIFile fromURL: ‘ inspect

Once the inspector opens you have to select the “rootNode” and then the “Hierarchy” tab.

In Pharo 6 you can load “XMI” right from catalog. Hope the package is useful for others too.


Agile visualisation book….

Just a little announce to tell you that the nice Agile visualisation book is now part of the Pharo books on

Great job Alexandre Bergel!


Trick to get one single menu

Hi Pablo,

Concerning the World menu you first define your menu in a method, and
tag it with a dedicated pragma, for example in Dr. Geo I wrote:

worldMenu: aBuilder
(aBuilder item: ‘New’ translated)
action: [DrGeo newFullScreen];
icon: ThemeIcons current smallNewIcon;
order: 0.
(aBuilder item: ‘Open’ translated)
action: [DrGeo openFigureThumbnail: nil];
icon: ThemeIcons current smallOpenIcon;
order: 1.
(aBuilder item: ‘Quit’ translated) action: [DrGeo quit]; order: 999

Then you register this as your new world menu using the pragma name:

WorldState desktopMenuPragmaKeyword: ‘drgeoMenu’.

Pharo Bootstrapping


I have published a short video of the Pharo bootstrapping from a Ring model that is browsed and modified by the Calypso browser.

No audio, please enable subtitles for the description.

— Pavel