Wednesday, April 24, 2013

Smart Suggestions for Pharo

The idea of "Smart Suggestions for Pharo" is to have suggestions based in the text selected or the cursor position in the code editor.

Read more about and see some screenshots here.

Wednesday, April 17, 2013

ObjC bridge for Pharo

Esteban is working on an ObjC bridge for Pharo. Here is a first demo video comparing graphics within the world canvas and outside of the usual Morphic World using the bridge.

Tuesday, April 16, 2013

Pharo 3.0 and Opal compiler

After Pharo 2.0 came out the development on 3.0 immediately started.

Pharo 3.0 already has many new updates and today it also integrates Opal (a new compiler).
If you want to know more about Opal then read here or look at this presentation from the Deep into Smalltalk summer school.

Still Opal is not the default compiler - but step by step...

Monday, April 15, 2013

Friday, April 12, 2013

Athens Tutorial

Want to use the new Athens graphics package? There is a new tutorial that you can run from within the image. This video from James shows how to use it.

Thursday, April 11, 2013

Profiling using Spy framework

Alexandre Bergel is demonstrating some profiling and visualization of the Spy framework. He uses package "HelpSystem" - stuff that I wrote back in 2010. Interesting point of view on things I did myself in the past. Looks like I should apply these visualizations to the new Online Help system as well to get even better results. Thanks!

Sunday, April 07, 2013

Friday, April 05, 2013

Amber Smalltalk Game

A nice demo of an in-browser game developed in Amber Smalltalk is available
since today. Click here to try or read here.

If the demo runs in your browser click on "class browser" to see the code.

Thursday, April 04, 2013

Alan Kay interview

Again an interesting interview with Alan Kay.


Quicksilver is a tool for the interactive exploration of hierarchical graphs. Code is on SmalltalkHub.
Gofer new
smalltalkhubUser: 'Quicksilver' project: 'Quicksilver';
package: 'Quicksilver';
It requires Moose and can be used to create Roassal visualizations like this from a filesystem.

Wednesday, April 03, 2013

Athens Vector graphics tutorial for Pharo

Athens is a new vector graphics API for Pharo. There is now an in-image tutorial from Igor you can use to get used to it. Really nice!

Trying Parasol with Selenium in Pharo Smalltalk

Johan Brichau answered my question from my last post: about the difference between the "Parasol" and "Webtester":
So I gave Parasol a short try today:
  • a fresh Mozilla Firefox was already installed on my machine
  • Parasol still requires old Pharo 1.4, so even when I prefer Pharo 2.0 I downloaded it again
  • I installed the current version selenium-server-standalone-2.31.0.jar of Selenium which can be found here
On Windows (64Bit) I start the JAR with a batch to tell the Java component about the firefox location

java -jar C:\selenium\selenium-server-standalone-2.31.0.jar -Dwebdriver.firefox.bin="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"

Now in Pharo 1.4 image I installed Parasol using:

Gofer new
    url: '';
    package: 'ConfigurationOfParasol';
((Smalltalk at: #ConfigurationOfParasol) project version: #development) load: 'dev'.

WAKomEncoded startOn: 8080.
Deprecation raiseWarning: false; showWarning: false.

Took a while since it loads Seaside. After anything is set up I can easily script the webdriver/Firefox from a Smalltalk workspace. Here is an example:

"Start the driver and open wikipedia" 
driver := BPRemoteWebDriver new.
driver get: ''.
"click on search"
(driver findElementByID: 'searchInput') click.

"enter some text"
driver getKeyboard sendKeys: ('Pharo' , (String with: BPKeys return)).

"query some text from the webpage"
Transcript show: ((driver findElementByID: 'mw-content-text') findElementByTagName: 'p') getText.

driver quit

So it is easy to write SUnit tests or automate some tasks you do on the web using Pharo. With the help of F12 in the webbrowser it is easy to find out about element ids, ... in HTML, so one can easily navigate through pages.

I worked with Selenium in Java and other languages already in the past. Parasol is not as comfortable as with the Selenium IDE recorder - but it works and using Smalltalk usually makes one more productive.

It is nice to see that I can now also control the Firefox browser to automate things and write webtests directly from within Pharo Smalltalk.

Parasol - web testing using Smalltalk

There is a project called "Parasol" allowing you to do web testing using Smalltalk. It uses Selenium.

Still dont know what the difference to "WebTester" is - which is another project for webtesting I already blogged about.

Tuesday, April 02, 2013

Pharo and GitFS

There is a GitFS available for Pharo. It is a work in progress and there is already some docu.

Fuel and Tanker demo session

First videos from PharoConf 2013 appear on the net. One video is about Tanker - an experimental package loader. It uses Fuel to do serialization and deserialization and will allow for faster loading.

Didnt know about the debugger menu item to serialize the stack to a .fuel file. Allows to serialize an error stack in case of problem and materialize the stack in another image to reproduce.

Nice - try that with other technologies out there ;)

Code for Fuel is already in Pharo 2.0. The Tanker project is on SmalltalkHub.

Back to the command line with Pharo Smalltalk

Pharo 2.0 allows you to easily deal with the command line. This is very useful if you want to script some daily tasks or your CI builds.

You can pass arguments to the image and also register own command line commands. Just check out the class comment in class "CommandLineHandler" and check its subclasses.

Creating an own handler is easy: just subclass CommandLineHandler with a custom class:

CommandLineHandler subclass: #TimeCommandLineHandler
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 category: 'Custom-CommandLine'

Implement a class side method to return the command name:

 ^ 'time'

and implement an instance side #activate method:

 self activateHelp.
 FileStream stdout 
  nextPutAll: '[time] ';
  nextPutAll: Time now asString

Now call it from the command line

    $PATH_TO_VM myImage.image time

and it will print the current time on stdout. Note that the #activateHelp will activate the --help option which displays the class comment of your custom handler class.

Also note that it is now possible to write in colors in a terminal from Pharo as this photo shows (click to enlarge):


Get Pharo easily

If you want to install Pharo on your platform you can go to:

and download the specific distribution for your platform from the platforms directory. For instance "" for Windows, "" for Mac and "" for Linux.

There is also a "" if you change platforms often (just put it on a USB stick). Also note that Pharo 3.0 is already available there as well - so if you want to help with fixes and changes feel free to do so.

If you visit

there is another way to install it. This page includes the Zero conf script allowing you to easily
install Pharo using the command line. For Pharo 2.0 this is:

    wget -O - | bash

And you can use:

    wget --quiet -O - | bash

for the current stable release of Pharo and the PharoVM.