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, 2014

Torsten Bergmann

Package Dependencies Analysis in Pharo with new features

Package Dependencies Analysis in Pharo has new features. Read more

by Torsten ( at July 23, 2014 07:09 PM

Smart Breakpoints alpha Release

The first release of SmartBreakpoints for Pharo.

by Torsten ( at July 23, 2014 08:09 AM

ScienceSmalltalk v0.12

There is a new release of SciSmalltalk v 0.12 (written in Pharo Smalltalk) available. Also check out the project page on GitHub.

Beside many others you can use it for mathematical epidemiology modeling, look here for a quick start example on how to obtain the numerical solution of a simple one-dimensional Ordinary Differential Equation (ODE) and visualizing results using Graph-ET.

by Torsten ( at July 23, 2014 08:06 AM

Essence# Invoking .NET with out/ref parameters

A detailed story on invoking .NET methods that have “out” or “ref” parameters from Essence#, a Smalltalk for .NET platform.

by Torsten ( at July 23, 2014 06:23 AM

Improved refactorings

More improvements on the refactoring side of life.

by Torsten ( at July 23, 2014 06:21 AM

July 18, 2014

Torsten Bergmann

Fun with Pharo (when writing books)

Beside the Pharo by Example, Deep into Pharo and the Pharo Enterprise book (available on CI, GitHub and as PDF) there is now also the idea of a book about "funny" things like implementing games in Pharo.

Therefore a new clone of the Pharo by Example book was created with the name "Fun with Pharo". The book is built on CI, the books source is hosted on GitHub and currently it includes already infos on how to build a digital Tamagotchi with Smalltalk or how the PhlappyBird game works.

The PDF for "Fun with Pharo" is already available.

If you want to contribute you should have a look and learn about Pillar and I would recommend to use either Online PillarHub or the new one-click image for PillarHub that you can run locally to write an own chapter.

by Torsten ( at July 18, 2014 07:18 AM

July 16, 2014

Torsten Bergmann


A small demonstration of Ephestos , a communication bridge between Pharo and Blender.
Code is on SmalltalkHub - but actually it is only a simple methodn on the Pharo side:

sendMessage: aString
   stream := SocketStream openConnectionToHostNamed: ''  port: 4000 .
   stream sendCommand: aString.
   stream close.

by Torsten ( at July 16, 2014 01:46 PM

Pharo Consortium 2014 Annual Report

The Pharo 2014 Annual Report of the Pharo consortium ( is available here:

by Torsten ( at July 16, 2014 12:18 PM

July 15, 2014

Torsten Bergmann


A one click image for PillarHub is available now on CI. You can now run it locally very easy.

Just download (for instance using PharoLauncher), run and check http://localhost:8080

If you still do not know what PillarHub is all about then read this.

by Torsten ( at July 15, 2014 03:00 PM


A Morphic based Flappy Bird clone written in Pharo.

Code is on SmalltalkHub:!/~zeroflag/PhlappyBird

by Torsten ( at July 15, 2014 09:17 AM

July 14, 2014

Torsten Bergmann

Toronto Smalltalk User Group

The Toronto Smalltalk User Group patio night is Monday, July 14 at Pauper's Pub, on the street level patio. See

by Torsten ( at July 14, 2014 09:20 AM

Essence#’s Predecessor: Iron Smalltalk

Some more insights into Essence# - another Smalltalk for the .NET environment.

by Torsten ( at July 14, 2014 09:15 AM

Package Dependencies Analyzer

A new tool for Pharo to check dependencies. Read more.

by Torsten ( at July 14, 2014 09:10 AM

July 10, 2014

Torsten Bergmann

PBKDF2 (Password-Based Key Derivation Function 2) for Pharo

to secure your applications. Move to Udo's blog to read about it.

by Torsten ( at July 10, 2014 09:43 AM

July 09, 2014

Torsten Bergmann

Systemd socket activation

Max and Nik provide a Pharo VM patch for socket activation. If you run many (Seaside) images - each on an own port - this patch allows you to lower the server load and free up resources for images with a high request rate.

Read all the details here and watch the video:

by Torsten ( at July 09, 2014 06:12 AM

July 08, 2014

Torsten Bergmann

Elegant Pharo code

Nice article from Sven

by Torsten ( at July 08, 2014 06:19 AM

July 07, 2014

Torsten Bergmann

SqueakJS 0.2 released, now runs Etoys

The Squeak VM built on top of JavaScript can now also run the Etoys image. Read more.

by Torsten ( at July 07, 2014 04:48 PM

July 05, 2014

The Weekly Squeak

SqueakJS runs Etoys now


From Bert Freudenberg:

Hi all,

my SqueakJS VM has reached a major milestone. It is now sufficiently complete to run a full Etoys image (and possibly other non-closure images, too). It has support for most BitBlt modes, WarpBlt, even some Balloon2D rendering (for TTF fonts), a virtual file system, image saving etc.

Try it:
(Safari and IE are significantly faster than Firefox and Chrome, best is Safari Webkit nightly, works on iPad too, hopefully Android)

For more details, see my blogpost:

Feedback and contributions welcome :)

- Bert -

by Ron Teitelbaum at July 05, 2014 01:22 AM

July 04, 2014

Bert Freudenberg

SqueakJS runs Etoys now

TL;DR: Try Etoys in your web browser without a plugin (still buggy, but even works on iPad). Feedback from more platforms is very welcome, and fixes to improve the compatibility, too.

Half a year has passed since my initial release of SqueakJS. Now I can report on some significant progress since then.

For one, I adopted a UI layout similar to Dan’s Smalltalk-72 emulator, where the debugger interface is only visible when the system is stopped. Now that the basics are working, there is no need to show the debugger all the time. Try it yourself at the Lively page.

But more importantly, many more subsystems are working now. BitBlt is almost complete (all the important modes are implemented), WarpBlt works (for scaling and rotating morphs), the image can be saved, an emulated file system supports reading and writing of persistent files. This now is enough to not only run the very old and undemanding “mini.image”, but SqueakJS now can even run the very latest Etoys image, the same version as on Squeakland. Beware of the many incomplete features and outright bugs still left to be fixed, but try it for yourself here.

While Etoys feels a lot slower than the MVC “mini.image”, and some operations take many seconds, it is surprisingly responsive for normal interaction. On the browsers with the fastest JIT compilers (Safari on Mac, IE on Windows) it is almost good enough, even though no serious optimizations were done yet. It is also interesting to see that some browsers (Chrome and Firefox) are currently significantly slower. And not just a little slower, but Safari outperforms Chrome by 200% for this workload! This is likely due to Safari›’s excellent LLVM-based FTL JIT.

The remarkable thing about the screenshot above is how unremarkable it looks. Apart from the missing white oval behind the “Home” label it looks just like it’s supposed to. In comparison, a week ago the screen still looked like this:

The difference is that Tobias Pape and I added support for Balloon2D rendering. This is Squeak’s default vector rendering engine, originally created by Andreas Raab to show Flash animations. But unlike the rest of the SqueakJS VM, we did not port the original code. Instead, our plugin intercepts the drawing commands and renders them using HTML5 canvas drawing routines. While still far from complete, it can already render one kind of important shapes: TrueType font glyphs. They are defined by Bézier curves, which need to be rendered with anti-aliasing to look nice. And now that we can render text, the graphics are almost complete. Many more details still need to be implemented, especially color gradients.

This highlights one strength of Squeak: The VM and its plugin modules present a well-defined, stable interface to the outside world. That is what makes a machine truly “virtual”. In contrast, other systems rely on FFI (the foreign function interface) or similar techniques for extension. While convenient during rapid development, it does not keep the interface small and stable. That interface is overly broad and unpredictable. Typically, client code must be special-cased per platform. It's calling C functions directly, which may or may not exist on a given platform. That makes it much harder to move the system to another platform, and in particular one that is completely different, like the web browser. The Squeak Etoys image on the other hand did not have to be modified at all.

What I’d like to see fixed in Squeak is that there should be working fallback code for all non-essential primitive functions. This would make it much easier to get up and running on new platforms.

For SqueakJS, bugs need to get fixed, and many features are still missing to run Etoys fully. Adding support for other Squeak releases than Etoys would be great (closure/Cog/Spur images). Contributions are welcome: fork my github project.

by Bert ( at July 04, 2014 08:42 PM

SqueakJS: A Lively Squeak VM

I'm proud to announce SqueakJS, a new Squeak VM that runs on Javascript:

It was inspired by Dan's JSqueak/Potato VM for Java, and similarly only runs the old Squeak 2.2 mini.image for now. But I developed it inside the Lively Kernel, which allowed me to make a nice UI to look inside the VM (in addition to all the Lively tools):

It represents regular Squeak objects as Javascript objects with direct object references. SmallIntegers are represented as Javascript numbers, there is no need for tagging. Instance variables and indexable fields are held in a single array named "pointers". Word and byte binary objects store their data in arrays named "bytes" or "words". CompiledMethod instances have both "pointers" and "bytes". Float instances are not stored as two words as in Squeak, but have a single "float" property that stores the actual number (and the words are generated on-the-fly when needed).

For garbage collection, I came up with a hybrid scheme: the bulk of the work is delegated to the Javascript garbage collector. Only in relatively rare circumstances is a "manual" garbage collection needed. This hybrid GC is a semi-space GC with an old space and a new space. Old space is a linked list of objects, but newly allocated objects are not added to the list, yet. Therefore, unreferenced new objects will be automatically garbage-collected by Javascript. This is like Squeak's incremental GC, which only looks at objects in new space. The full GC is a regular mark-and-sweep: it's marking all reachable objects (old and new), then unmarked old objects get removed (a very cheap operation in a linked list), and new objects (identified by their missing link) are added to the old-space list. One nice feature of this scheme is that its implementation does not need weak references, which Javascript currently does not support.

This scheme also trivially supports object enumeration (Squeak's nextObject/nextInstance primitives): If the object is old, the next object is just the next link in the list. Otherwise, if there are new objects (newSpaceCount > 0) a GC is performed, which creates the next object link. But if newSpaceCount is 0, then this was the last object, and we're done.

The UI for now copies the Squeak display bitmap pixel-by-pixel to a typed array and shows it on the HTML 2D canvas using putImageData(). Clipboard copying injects a synthetic CMD-C keyboard event into the VM, then runs the interpreter until it has executed the clipboard primitive in response, then answers that string. This is because the web browser only allows clipboard access inside the copy/paste event handlers. You can drag an image file from your disk into the browser window to load it.

Besides running it on your desktop, you can install it as offline web app on an iPad:

On the iPad there is neither right-click nor command keys, but the menu is available on the inside of the flop-out scrollbars. It needs a fairly recent browser, too - it works in iOS 7, but apparently not in older ones. On Android it works in Chrome 31, but not quite as well (for example, the onscreen-keyboard does not come up on an Galaxy Note tablet).

Go to the project page to try it yourself. The sources are on GitHub, and contributions are very welcome.

Have a great Christmas!

by Bert ( at July 04, 2014 03:47 PM

Torsten Bergmann

Working with Smalltalk

New open jobs at Yesplan and Cincom. If you want to work with Smalltalk just contact them.

by Torsten ( at July 04, 2014 01:14 PM

July 03, 2014

Torsten Bergmann

Circle layout

now in Roassal. See here.

by Torsten ( at July 03, 2014 08:19 PM


The people behind Pharocloud have implemented an online editor (and storage) for Pillar documents. So you can easily write documents in Swiki syntax that can be translated to different formats (HTML, Latex, PDF)

You can check it out here:

You can create an account and add own documentation articles. Source code is on SmalltalkHub.

by Torsten ( at July 03, 2014 08:08 AM

Cyclades for Pharo 3.0

Cyclades is a pitch set explorer for adn developed in Pharo v3.0

The software has been involved in MIE (music images emotions), a GEM project which explores the emotional link between music and images and focuses on the different types of emotional synchronization and on possible invariants involved in associations. See some screenshots or download from

by Torsten ( at July 03, 2014 07:01 AM

July 01, 2014

Torsten Bergmann

Amber 0.12.6

just arrived. Read more.

by Torsten ( at July 01, 2014 03:20 PM

June 30, 2014

Torsten Bergmann

Pharo Academic partner program

Pharo community started an academic partner program

by Torsten ( at June 30, 2014 02:12 PM

June 25, 2014

Torsten Bergmann

Pharo Tutorial - Rediscovering the UX of the legendary HP-35 Scientific Pocket Calculator

Sven provides a nice tutorial for Pharo and a nice appetizer for using Smalltalk.

by Torsten ( at June 25, 2014 06:12 PM

June 24, 2014

Torsten Bergmann

Pharo and GoogleMaps

By accident I found!/~smaass/GMaps a small project to access google maps from Pharo. Allows you to easily work with Google maps by querying for an address:

g := GoogleMaps geocode: 'Rue du Bel air, Paris'.
^ g address inspect

or visiting a location in the browser:

|g url|
g := GoogleMaps geocode: 'Rue du Bel air, Paris'.
url := String streamContents: [:s |
s nextPutAll: '';
nextPutAll: g location x asString;
nextPut: $,;
nextPutAll: g location y asString;
nextPutAll: ',16z'
NBWin32Shell shellBrowse: url

Requires NeoJSON, so load this first from configuration browser.

by Torsten ( at June 24, 2014 05:34 PM

June 21, 2014

Torsten Bergmann

Geopolitical territory in Pharo

Territory is an application made in Pharo to build geopolitical territory, written by Hernan Morales Durand.

Code is here and a screenshot here.

by Torsten ( at June 21, 2014 06:23 PM

June 20, 2014

Torsten Bergmann


Looks like Hernan started to implement a FIFAWorldCup2014 app.

by Torsten ( at June 20, 2014 01:25 PM