Monthly Archives: July 2014

Pharo on android: A new generation

Jean-Baptiste Arnaud announced today that he could run Pharo on Android. The previous VM version was 4 years old and was diverging more and more from the VM code because it was not a delta but a complete fork of the code. This smells like a good candidate for the ESUG 2014 technology award.

Here is his announce: 


I made some advances on Android StackVM (using the standard unix sources). 
Last Unix Stack VM with last 40Pharo image (a little bit modified cause au no-NativeBoost and some constraint from the Android Sandboxing ).
– Somes lines of code change in SqUnixMain.c (using if define android, but not a lot, just for allow to load external lib :-).
– 1 communication with java / C files, (will be split in two or three file one for printing debugging, one or two for core).
– 1 external graphical plugins. vm-display-android, really short but for android, because the rendering is done by Android.
All these plugins are includes (not deeply tested yet, but most of them should work):
AndroidPlugin (for now I just allow to do debug printing from the image in the logCat), BitBltPlugin, B2DPlugin, BMPReadWriterPlugin, CroquetPlugin, DSAPrims, FFTPlugin, FileCopyPlugin, FilePlugin, FloatArrayPlugin, FloatMathPlugin, JoystickTabletPlugin, JPEGReaderPlugin, LargeIntegers,Matrix2x3Plugin, RePlugin, SecurityPlugin, JPEGReadWriter2Plugin, SocketPlugin, MiscPrimitivePlugin, ZipPlugin.
And a lot of debugging. :-).
Next step:
– fixing all the Events. 
– Do a real Configuration generator to be able to generate from Jenkins using the NDK. 
– Then merge in the main PharoVM Git :-).
– Do a configuration to allow older pharo image to run on it. Maybe older but I not convince yet.
– And obviously a job for allow anybody to create a android package with it’s own image 🙂
See you soon 🙂

Pharo tools are getting faster :)


[SystemNavigation new browseAllSendersOf: #+] bench '0.688 per second.’
[SystemNavigation new browseAllSendersOf: #+] bench '0.638 per second.'

[SystemNavigation new browseAllSendersOf: #+] bench '1.37 per second.'

And for Nautilus:

[Smalltalk tools browser open] bench '4.46 per second.'

[Smalltalk tools browser open] bench '6.77 per second.' 

[Smalltalk tools browser open] bench '7.17 per second.’

(all with the same VM)


Another powerweek for Pharo

13701 Duplicated methods in menuMorph

13700 AlignmentMorph cleaning

13683 Morph>>changeColor should be an extension of ColorPicker

13687 HSVAColorSelectorMorph should be moved to ColorPicker

13697 Yet another cleanup of MessageBrowser API

13698 Small cleanup of Model and the UI package

13696 Nautilus Refactoring 1: Classlist widget

13694 Small cleanup in System-Changes

13695 cleanup MessageBrowser API a little

13666 Small Code critique cleanup of Kernel

13677 Move WindowEvent to Morphic-Core

13692 Small cleanup GroupManageUI: #prettyName not needed (same as printString now on methods and classes)

13670 Encoder (class from Old Compiler) is referenced by BlockLocalTempCounter

13691 Small Code Critique clean in Morphic-Widgets-Pluggable

13689 Wrong context when debugging a warning

13684 missing code completion in Spotlight

13519 Problem when printing heaps

13571 Something is completely broken regarding Slice submission

13675 safer windows enumeration

13676 safer usage of KMBuffer in HandMorph >> #generateMouseEvent:

13669 CompilerNotifying test failing on main build

13674 safer access to top current window

13667 Delete empty package System-Tools

13664 Remove all references to CodeHolder

13629 Polymorph-Widgets still extends ThreadSafeTranscript

13661 Shadow variables in kernel Context

13662 Merging Opal branch with trunk

13625 we can merge System-Tools with Tool-Base

13570 Add-Halo, menu, mouse on export…. hangs image

13654 Pressing Enter in EyeInspector gives MNU: TextModel>>asText

13653 Add Additional Basic Pharo help to the System Help browser

13660 reduce references to StringHolder

13655 System-Localization and Gettext have classes with identical names

13656 remove CompiledMethod searchForClass and searchForSelector

13657 Remove at: check from RBConsistencyCheckRule

13648 remove VTermInputDriver

13651 move font related methods in BitBlt to Graphics-Fonts package

13649 move ThreadSafeTranscript >> #codePaneMenu:shifted: to Tool-Transcript package

13647 unimplemented #poolDictionaries called by Class, TClass and Trait

13652 move class side ThreadSafeTranscript examples, menuCommandOn: and open to Tool-Transcript package

13645 Small CodeCritique Cleanup of Network-Mail

13643 Move extensions of Package Compiler to Kernel

13642 remove registration of #userManager from ToolsRegistry

12975 Metacello ProfStef use inexistant browse:selector:

13644 Small Codecritic cleanup of Network-MIME

13646 MIMELocalFileDocument seems to be dead code

13638 remove SUnitUnloader

13588 Rename inst var should rename accessors too

13568 Better error message when using “-” prefix

13632 MetaLinks for Globals

13633 Some repacking of Network: NetworkSystemSettings and RFC822

13634 remove empty package PackageInfo

13568 Better error message when using “-” prefix

13632 MetaLinks for Globals

13633 Some repacking of Network: NetworkSystemSettings and RFC822

13634 remove empty package PackageInfo

13630 Links on Class Variables

10034 Remove PackageInfo from system

13623 Move DynamicMessageImplementor close to DebugSession

13621 remove old BreakPoints for now

13624 remove DifferatorSystemSettings

13622 Small Cleanup related to StringHolder and Explorer

13620 LinkWrapper Slot: first working version

13611 add MorphicCoreUIManager

13619 Small cleanup related to Explorer

13604 MorphicModel: ivar accessor only used by Slide and not needed even there

13617 Fixing some tools package extension

13613 move tests from Multilingual-OtherLanguages to Multilingual-Tests package

13614 move RBProgramNode>>#method to accessing category

13616 Lost browseChangesFile: was lost

13608 remove ThumbnailMorph

13610 Taskbar can be packaged separately

13612 Move polymorph extension to workspace

13609 WorkArea could be removed

13615 Finish to split Tools

13592 Small RB Tests cleanup

13589 deprecated TimeStamp

13590 TimeStamp has still instances

13591 unload tests Metacello-TestsTutorial

A PharoLauncher lover

Torsten Bergman wrote the following:

PharoLauncher [1] allows you to work with many Pharo images. You can download fresh images, clone existing ones and with its access to the Pharo CI it allows you to easily reproduce errors in specific Pharo image versions. I REALLY like this tool when working with Pharo. There is a customizable hardware key on my laptop that I can just press to open PharoLauncher, manage and launch the images and dive into the world of Pharo. To optimize my Pharo "easy access workflows" further I wanted all the images that I started with PharoLauncher: - to share a common metacello repository cache (where all the mcz are stored independent from image location) for faster loading - to have the possibility to preset the Squeaksource, SS3 and STHub password already - to set my authors name All this is already explained in Marianos blog posts [2] and [3] and the PharoEnterprise book [4]. Nonetheless I would like to share the script that I personally use. Maybe (in an adopted version) it is usefull for other PharoLauncher users as well: ===================================================================== COMMON SETTINGS FOR ALL PHARO IMAGES WHEN STARTED USING PHAROLAUNCHER ===================================================================== Open any Pharo 3.0/4.0 image and execute StartupPreferencesLoader preferencesGeneralFolder fullName in a workspace to find out the common preferences folder on your local machine. You can put a Smalltalk script into this folder, for instance "" that is evaluated each time an image runs. I've found the following script very useful: ----------------------------------------------------------------- | sharedPackageCacheDirectory | "Never apply to PharoLauncher itself" (SmalltalkImage current imageName includesSubstring: 'Launcher') ifTrue: [ ^self ]. "ask if script should be applied" (UIManager default confirm: 'Apply init script from ', StartupPreferencesLoader preferencesGeneralFolder fullName,' to image') ifFalse: [^self ]. "Use a shared package cache to store Monticello MCS files for all images" sharedPackageCacheDirectory := 'C:\Pharo\commonpackage-cache' asFileReference ensureCreateDirectory; yourself. MCCacheRepository default directory: sharedPackageCacheDirectory. "Set password for Squeaksource" (MCRepositoryGroup default repositories select: [:each | (each isKindOf: MCHttpRepository) and: [((each locationWithTrailingSlash includesSubstring: '') or: [each locationWithTrailingSlash includesSubstring: ''])] ]) do: [:each | each user: 'squeaksourceuser'; password: 'secretsqueaksourcepassword']. "Set password for SmalltalkHub (hub and HTTP repos)" (MCRepositoryGroup default repositories select: [:each | (each isKindOf: MCSmalltalkhubRepository) and: [each locationWithTrailingSlash includesSubstring: ''] ]) do: [:each | each user: 'PharoUser'; password: 'sthubpassword']. (MCRepositoryGroup default repositories select: [:each | (each isKindOf: MCHttpRepository) and: [each locationWithTrailingSlash includesSubstring: ''] ]) do: [:each | each user: 'PharoUser'; password: 'sthubpassword']. "Set author name" Author fullName: 'PharoUser'. UIManager default inform: 'Script applied'. ----------------------------------------------------------------- Hope it is usefull for others too. Bye T. [1]!/~Pharo/PharoLauncher [2] [3] [4]


Hello Pharo users,

I’m pleased to announce the release of Deprecator.
It’s a prototype of a small tool that permits you to deprecate method by annotating them with a <deprecated: …> pragma.
This pragma takes a rewrite expression as argument that specifies how to rewrite the message send to the deprecated method. 
If such a deprecated method is executed, a warning is thrown and a debugger opens.
This debugger has a little ‘Rewrite’ button that permits to rewrite the sending method according to the rewrite expression and then resume the execution with the new rewritten sending method 🙂
The implementation is a proof-of-concept and is a bit hacky here and there, but it works. 
You have a class C with a method that you deprecate. 
Its rewrite expression tells that if it’s executed as the result of a message send of the form: 
<receiver> deprecatedMethodArg1: <arg1> arg2: <arg2>
this message send should be rewritten to: 
<receiver> replacementMethodArg1: <arg2> arg2: <arg1>.
 Note you can change the order of arguments or even the receiver.
C>>deprecatedMethodArg1: o1 arg2: o2
<deprecated: ‘`@receiver replacementMethodArg1: `@arg2 arg2: `@arg1’>
  ^ #deprecated
C>>replacementMethodArg1: o1 arg2: o2
^ #replacement
^ self deprecatedMethodArg1: 1 + 1 arg2: 2 + 2.
Then if you execute C new senderMethod, and then click on the “Rewrite” button of the debugger, then sending method is rewritten to:
^ self replacementMethodArg1: 2 + 2 arg2: 1 + 1.
and the result is #replacement
The repo is on sSmalltalkHub:
user: ”
password: ”
I hope for comments, feature suggestions, code reviews, contributors, etc 🙂 
BTW, if you have a better name for this project let me know! 
For example, I thought about Ammonite because it’s an extinct animal (analogy with deprecated) and it fits the sea naming theme.

SciSmalltalk new version

Dear all,

we are to happy to announce SciSmalltalk v0.12

SciSmalltalk is a new Smalltalk project, similar to existing
scientific libraries like NumPy, SciPy for Python or SciRuby for Ruby.
SciSmalltalk already provide the following basic functionalities:

- complex and quaternions extensions,
- random number generators,
- fuzzy algorithms,
- LAPACK linear algebra package,
- Didier Besset's numerical methods,
- Ordinary Differential Equation (ODE) Solver).

Everything is available here:
All the code is available under the MIT licence.

We have more than 424 green unit tests and we run a CI job here:

This version should work on Pharo 2.0/3.0/4.0 and also Squeak 4.5 (to
be confirmed).

We are a small community, we are looking for more volunteers to
contribute code and documentation. Please join us at :!forum/scismalltalk


Another week of changes

Another great list of changes and improvements in Pharo.

13605 Slider can use setValueSelector instead of accessor everywhere

13603 remove extensions classOrMetaClass and messageName form Context

13598 MorphicModel ivar open: not used

13602 SmalltalkImage >> #openLog dependent on Tools

13601 Add in group DNU

13600 DiffereratorSettings –> move to TextDiffBuilder

13594 Reduce references to CodeHolder

13597 Implement #readsSlot and #writesSlot on CompiledMethod (and tests)

13595 PluggableSystemWindow is dead code

13596 remove package TT.cs

13592 Small RB Tests cleanup

13589 deprecated TimeStamp

13590 TimeStamp has still instances

13591 unload tests Metacello-TestsTutorial


13576 Small code critique cleanup Graphics-Primitives

13587 add tests to make sure globals and class vars use the right bindings

13580 move UnixEnvironment and Win32Environment to NativeBoost


13574 ModelOrNil has only one sender so we should rewrite it and remove it.

13578 safer RPackageOrganizer>>systemMethodRemovedActionFrom:

13585 use term Class Variable, not Shared Variablem in ClassModification

13584 Forward code generation for Globals and Class Vars to meta object

13586 Class Variables should be ClassVariables, not Globals

13581 move ThreadSafeTranscriptPluggableTextMorph to own package named Tool-Transcript

13583 #senders and #implementors on Symbol

13579 MCPatchOperation >> #patchWrapper should be moved to package Polymorph-Tools-Diff

13582 Deprecated #classSymbol

13552 First Class Variables: improve reflective API, ClassBuilder use objects, not string for Globals

13275 RBSmalllintChecker checks classes not defined in environment

13577 UIManager should not use WorldState for defer:

13575 TreeModel in checklist mode gives unchecked items hardcoded color

13571 Something is completely broken regarding Slice submission

13558 PluggableTextFieldMorph should be packaged in PluggableTextMorph

12879 Rename and Recategorize RPackage>>#correspondingMcPackage

13572 little clean of SimpleSwitchMorph and comment

13515 GrafPort and EllipseMidpointTracer should not be in Morphic package

13563 Fix sender of deprecated RPackageOrganizer>>#renamePackage:in: method

6765 Refactoring Extract into Temporary should modify all duplicates

13565 extensions of Polymorph on Polymorph class should be folded in these classes

5618 Refactoring: Cannot permutate arguments

13540 Debugger: method refactoring option

13569 Small Code critique cleanup of MonticelloGUI

13567 Small code critique clean Polymorph

12205 Cleanup gofer>>#directory:

13125 The Find&Replace dialog does not honor the Appearance font size setting

11287 Form class>>fromUserWithExtent: freezes because Rectangle class>>originFromUser:grid: is broken.

13550 Should remove the 30 inbox from pharo 40alpha

13564 Fix all users of TimeStamp: remove Tests, change two remaining clients

13562 remove UUIDGeneration seed generation from sound input

13561 remove some unload class methods

13560 remove DSA seed generation from sound input

13555 IconicListItem should be packaged in Widgets-Basic

13556 ImagePreviewMorph could be packaged close to AlphaImageMorph

13559 ControlButtonMorph and PluggableButtonMorph could be moved to Widgets-Base

13557 Github zip download does not check for the existence of file with the same name

13551 Not all SmartSugs works in Debugger

12790 AthensSurfaceExamples class side examples do not work due to subclassResponsibility

13538 RowScrollerMorph us unused and undocumented


First Iteration of Pharo 40 Report

– Modularisation is under way

  • – Tools 
  • – Morphic
  • – Polymorph 

package structure is slowly getting cleaner

– Infrastructure

  • – Android (Missing management events and graphics)
  • – Raspberry (FFI works, vm works, OS process)

– Spur
should be finished this week

  • – found a bug in Spur related to weak structure (already fixed by Eliot)
  • – release each image we produce to Spur format
  • – nativeBoost is not working
  • – large integer plugin is not working

– Host window integration

  • – OSWindow common interface
  • – Multiple back-ends (VM, SDL2, plugin)
  • – Ready to be integrated.
  • – Need some class comments!

– New bytecode set

  • – integrated this morning
  • – needs a new vm for the bytecodeset

– Spur 64 bits

  • – starting to work on it in September

– Removing old compiler

  • – reloadable
  • – needed for VM
  • – Spur

– System Localization

  • – usman should open a bug issue

– Leading Char Removal

  • – probably we will not do it.

– Guille Core

  • – bootstrap
  • – next friday…
  • – Unloading Reloading tools 
  • – JB will help

– Athens

  • – roadmap
  • – missing txText

– TxText

  • – Widget is there and working
  • – Morph is working
  • – Spec integration
  • – Not all tool use Spec
  • – Clean version
  • – Igor MUST release a version and not try to make the complete system working with it.

– Remove the old browser

  • – kill the filePackage browser
  • – We should get Nautilus or OndoBrowser browsing Ring

– Spec

  • – Should do a pass
  • – Check the design (in particular link between adapter and morph)
  • – Examples-driven are needed

– GitSupport

  • – filetree integration is working but not good enough
  • – small progress.
  • – Martin should check with Max the status of libgit2
  • – Need to build on top of that.

– Morph and theme

  • – we will see if we have the time
  • – brainstorming on a solution

– Make sure that we do not overuse Ring

– Font with FreeType

– Glamour

  • – esteban roadmap
  • – first bootstrap
  • – second only a stripped down version
  • – development outside the image

– Ombu/Epicea

  • – call for more users

– ZnUrl should be used in place of URI URL

– Keychain Removal

– Morph class side announcer

  • – we should look at the announcer plague

– Intersect:

  • – should be finished

– Image-level resources

  • – brainstorming prototyping

– Opal

  • there is progress!
  • – slots <-> OPAL 
  • – subclassing and adding instance compiled 
  • – specific slots are on the way

– ClassBuilder

  • – should be revisited.



Pharo consortium meeting report

The Pharo consortium issued its first annual meeting report 2014-06-report. The report is public and contains all the information exchanged during the meeting. Figures are interesting to look at .


Ephestos – Using and Coding Blender from inside Pharo

Kilon announced Ephetos: a bridge to Blender. Here is its announce.

Its far from production ready but I am too excited to keep to myself. I present to you Ephestos. 

Ephestos is a socket bridge that communicates with Blender the most popular and most powerful open source 3d application. 
The goal is to expose Blender coders to the power of Pharo and Pharo to the power of Blender. As you can imagine the potential is huge but I rather talk what Ephestos can do already. 
Even though Ephestos is in total less than 200 lines of code it can already communicate with blender and affect blender properties. Blender properties are basically instance variables for any kind of blender object, 3d object, material, textures etc So already you can affect a huge deal of blender .
Unfortunately Blender operators seem to crash Blender , probably I am doing something stupid that I will fix. Blender operators are for performing blender actions so they are very important.
I have made a simple video demo of it that can be watched here
To use it you need first the Blender addon which can be found here
The code should be inside a folder named “pyEphestos” and placed in Blender addons directory which is located for Macos in Application Support/Blender/VersionsOfBlender/scripts/addons and in Windows should be in App Data/Roaming/….. or you can place it inside the blender folder in similar sub directory
You also need the Pharo code which can be found here
As I said it is far from production ready , but it works. 
The good news is that the socket communication is blazing fast, at least compared to what I expected. I was able to perform 1000 connections under a second. And each connection carries a 1024 bytes messages , thats a lot of code. Should be possible to pass thousands of lines of code under a second to Blender. 
My only worry is blender itself since it tends to be very crashy in the areas I am pushing. 
By the way Always press esc after you enable Ephestos in Blender to close the socket or else it wont free it and next time you wont be able to open the socket and you will have to restart your OS. And do not make an error with the string passed . I need to add an exception for it so it wont crash blender.