Planet Smalltalk

February 09, 2016

Yoshiki Ohshima - [仕事] Edward Tufte セミナー

視覚化やプレゼンテーションに関するアイディアや著書で有名なEdward Tufteは、1日セミナーを全国で開催しているのですが、今回は近場で開かれるということで参加してきました。立派なホテルのホールに200人くらい受講者が来ているのでなかなかのものです。最初の1時間は彼の著書を読むという時間に充てられています。(が、Tufteがその間に歩き回って本にサインをしてくれます(頼まなくてもしてくれたりします)。同僚の意見によれば、講演後に後でサインを求める人の列ができるよりも時間短縮になるのでは、ということ ...

February 08, 2016

Torsten Bergmann - Amber Smalltalk 0.15.1

Release 0.15.1 is out. Breaks IE8 compatibility, wraps Promise directly, has a few changes under hood & will be strictly semver from now on.

Torsten Bergmann - A little Bloc demo

Another demo of Bloc (the replacement for Morphic): a hit test.

Torsten Bergmann - BioSmalltalk

BioSmalltalk: Bioinformatics in a pure objects environment. Based ob Pharo.

February 07, 2016

Benoit St-Jean - Amber 0.15.1

La version 0.15.1 de Amber est maintenant disponible.

Classé dans:Amber, Smalltalk Tagged: Amber, Smalltalk

Bruce Badger - NHS: standards please, not monster systems

I saw this:
('paperless NHS' plans)

There have been many attempts to solve this, all of them involving throwing large (very large) sums of money at consultancy shops to build "systems". These systems end up being monsters, taking the work of hundreds of developers and pouring that work into one seething unmanageable pot, while being managed by people who are expert in extracting extra costs from the client, i.e. government i.e us.

The alternative: Focus on document exchange standards.

With defined document standards, private firms and indeed the open source software community, can compete to build systems which conform to the standards. For example, imagine a 'document' which is my medical history - I should be able to send this (or parts of it) to my GP. The GP could then add new information to the document and send on part of the document to a specialist (using a conforming software system of his or her choice). Standard parts of documents could be blood tests, CT scans, DNA decode, name & address ... etc.

Security is a significant concern with this kind of data.   A document should be encrypted and only people with permission (e.g. a signed digital certificate) can read it. Technology for this already exists.  In the case above, the GP would send the file to the specialist and the specialist would need to get permission from me to read it (this could just take the form of an computer message saying "is it OK for consultant x to read document y?").

For people who are not tech savvy there could be central registries of documents which maintain records of who is allowed to see what.  Companies could complete to provide such services, but the NHS could provide a simple one (which should be a bought-in system, not a build in-house monster system). Such systems would allow people to visit a medical person and give permission there and then for documents to be read.

For people who are very ill it must be possible for medical people to obtain permission to read medical documents (e.g. from the courts, as with a search warrant). This could be a delegated power, but as with all access there must be a clear audit trail. (lots of alternative exists for this kind of thing. Block chains may a strong current option).

As we have seen, system-centric approaches fail. Instead, the government should focus on developing document standards. Aim (perhaps in the medium to long term), to work with ISO & WHO so electronic medical documents can be exchanged around the world.

Please, no more monster systems or even system-centric central government projects for the NHS.

Benoit St-Jean - Smalltalk en vrac (23)


Un cours gratuit de 7 semaines sur Pharo!  Tous les détails de ce MOOC sont ici!

Il y a finalement un API en Smalltalk pour le InterPlanetary File System (IPFS).  Le projet est ici.


Transférer de gros fichiers avec Seaside, c’est maintenant plus facile! Les détails ici.


Aida 6.6 est maintenant aussi disponible pour Squeak 5! L’annonce ici.



Classé dans:Smalltalk Tagged: Aida, cours, fichiers, InterPlanetary File System, IPFS, Mooc, Pharo, Seaside, Smalltalk, Squeak, transfert

Smalltalk Jobs - Smalltalk Jobs -2/6/16

  • Miami, FLGemStone/SmallTalk Developer through Cresens Inc Careers
    • Required Skills:
      • Development and Support experience in GemStone / SmallTalk, VisualWorks applications. (32bit application is being used )
      • Solaris OS
      • C language
      • SQL
      • Ability to Comprehend requirements and develop the code in these technology
      • Self-driven and motivated individual
      • Semiconductor industry experience – Process Control, Recipe Management in particular.
      • Interface between MES and GemStone/SmallTalk applications
    • Additional listings: Cresens Inc Careers
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

Filed under: Employment Tagged: jobs, Smalltalk, Smalltalk jobs

February 06, 2016

Pharo Weekly - More Enhancements

17526 growMemoryByAtLeast: duplicated

17530 fix testDangerousClassesConditions

17242 String>>compare:caseSensitive seems to be failing for extended charset comparisons
17521 recategorizing uncategorised method

17522 Failing test: ReleaseTest>>#testInstalledMethodsWithIncorrectTrailerKind

17479 Interval class comment mixes step/stop when explaining Instance Variables
17366 wrong TempsNamesQCompress method trailer ?

17406 Renaming a class using the class menu “rename” option allows for non-capitalized class name
17516 add #isFromSharedPool to OCLItteralVariable

17495 Decompiler cant decompile Object>>#instVarAt: due to error code

17508 Deprecate Unused Morph methods: submorphNamed: and submorphNamed: aName ifNone: aBlock
17515 fix minimal Pharo shrinking build

17512 Spec should use FastTable

17501 ProcessTest>>testHighPriorityOverridesWaitTime intermittent failures

17035 The smallSaveIcon is the same as the smallSaveAsIcon

17513 ThemeIcons>>#downloadFromUrl not working

17500 Implement class creation methods for new layouts

17491 find selector shows syntax error debugger
16735 Replace Startup/Shutdown list with SessionManager

17490 Command Line Handler test runner should print a small stack for failures and errors

17496 add table for all defined method selectors and use it in code completion and syntax highlighting

17466 testVisitXMLParserConfigurationWithVersion101 failing

17438 New Rubric Configuration

17454 QualityAssistant v2.3.3
17474 adapt Athens to UnifiedFFI 0.11 (pointer arity logic)

17421 RubTextMethodLink and RubTextClassLink Leaks (TextStyling related)

17442 Improve Morph>>#flash

17348 Enhance shortcut learnability

17452 UIManager has a test method …

17022 Return sequence not always emitted
17296 Remove Delay>>otherwise:

17453 add #genForRBArgumentNode
17423 PopupChoiceDialogWindow keyboard navigation

17435 ClassOrganisation>>#changeFromString: MNU for empty change
17301 Morph>>#drawOnAthensCanvas: should only fill innerBounds

17384 RBNulllFormater>>#format: should not return nil

17404 ExternalBrowser can not show meta class definition

17443 RubTextAreaExamples>>#show:while: should not use #displayWorldSafely

17457 Change Growl setting name to PopupNotifier
17444 SVColorSelectorMorph should not use (World displayWorldSafely)

17408 The generic stack debugger defines double meaning for some keybindings when editing code

17335 We should add a #ffiSizeOf:

17267 fix senders of #compactClassesArray

17077 ReleaseTest testMethodsWithUnboundGlobals fails for some slotexamples

17425 unload BaselineOfFFINB

17427 deprecated Form class>>#unload

17415 SimpleButtonMorph lacks #themeChanged

17357 Lost instance variables (AthensCairoPatternSurfacePaint)

17422 Rename FFI-NB to UnifiedFFI

17419 Rename AthensCairoCanvas setAlpha: to drawWithAlpha:

17416 Integrate GTools version 3.9

Pierce Ng - Metaprogramming Pascal with Mustache in Smalltalk

A while back I wrote about command line scripting of Pharo to backup an SQLite database, specifically, this server’s iptables log. Eventually I wrote a program in Pascal to archive and rollover the log database. Reason being, using the excellent Free Pascal compiler, I link SQLite statically into the final executable, meaning I only deploy a single binary executable, which is a tad more convenient than deploying the Pharo VM, image, sources, and script files.

Well, not quite just one file.

My program, iptlb, uses the SQLite online backup API to back up the running log database to an archive database file, then “backs up” an empty template database to the running log database file, effectively overwriting it. Because I want the flexibility to change the database schema during each backup run, iptlb creates a new template database each time it is invoked. Because I also want just one Pascal source file, I want to store the database schema in the source file itself, so that the schema gets version-controlled along with the Pascal code.

However, Pascal does not support multi-line string literals:

(* This Pascal code is invalid. *)
  dbSchema = '
    create table x (xk int, xv varchar);
    create table y (yk int, yv int);

This means that I cannot embed the database schema into iptlb’s Pascal source directly as a multi-line string. In production, I have to also deploy the database schema SQL as a separate file which is read by iptlb to create its template database.

There is a workaround in Pascal for lack of multi-line strings, as follows:

  sl: TStringList;
  dbSchema: String;
  sl := TStringList.create;
  sl.add('create table x (xk int, xv varchar);');
  sl.add('create table y (yk int, yv int);');
  dbSchema := sl.text; // dbSchema is now the multiline string.;

This looks like a templating thing. And that calls for Mustache!

After fiddling around, I created a simple class PMMultiLineStringTemplate which wraps the work with Mustache. Here’s the motivating use case:

| tmpls mst |

"The Mustache template of the Pascal code."
tmpls := '
function {{functionName}}: String;
  sl: TStringList;
  sl := TStringList.create;{{#stringList}}
  {{functionName}} := sl.text;;

mst := PMMultilineStringTemplate new.
mst atAttribute: 'functionName' putValue: 'dbSchema'.
mst template: tmpls.

FileSystem disk workingDirectory / 'ulog-schema.sql' readStreamDo: [ :rs |
    rs ascii.
    [ rs atEnd ] whileFalse: [
        | x |
        x := rs nextLine.
        (x size > 0) ifTrue: [
            mst atAttribute: 'stringList' withSubKey: 'sline' putValue: x ]]].

FileSystem disk workingDirectory / 'dbschema.pas' writeStreamDo: [ :ws |
    ws ascii;
        lineEndConvention: #lf; 
        nextPutAll: mst value ]

Copying the output of dbschema.pas (generated with a proper schema as above) into iptlb.pas, I now have one source file iptlb.pas embedding the SQL schema, and I deploy one binary executable iptlb only.

February 05, 2016

Torsten Bergmann - Aida 6.6 runs on newest Squeak 5

The Weekly Squeak - Aida 6.6 runs on newest Squeak 5


Janko writes:

Dear all,

Squeak 5 together with a shiny new website was released
this summer so it was a time to prepare Aida for this release as well. On you can find a link to All-in-One package to
run Aida 6.6 on latest Squeak 5 for Linux, Mac and Win.

Thanks to Tobias Pape for help and Robert Hirschfeld for inspiration!

Best regards

Torsten Bergmann - Large file uploads in Seaside

Nice article on how to use Seaside and Nginx to handle large file uploads

Torsten Bergmann - Pharo MOOC available

The registration for Pharo Massive Open Online Course (Pharo MOOC) is available

Torsten Bergmann - IPFS

SmallIPFS - Smalltalk Interplanetare Filesystem API. Read more and have a look at the project page

Joachim Tuchel - MOOC on Live Object Programming in Pharo

Ever wondered why Smalltalk developers love their environment and what all the buzz about Live Object Programming is about? Would you like to learn Smalltalk and understand why Smalltalkers are so passionate about it? Maybe this Free online course is the right opportunity for you to start discovering a new level of programming and widen […]

Johan Brichau - Large file uploads in Seaside

Uploading files in a Seaside web application is easy. Unfortunately, there is a drawback to the easiness: entire files are loaded into the Seaside backend’s memory because an instance of WAFile contains the entire file’s contents. In many situations, loading the file contents in the Seaside backend’s memory is not necessary (for example, if the file only needs to be stored on disk) or even impossible (e.g. in the case of extremely large files).

This post details an extension to Seaside that works together with the NGINX front-end web server and its file upload module. The uploaded file is stored to disk and NGINX subsequently only passes a file reference to the Seaside backend. This off-loads the heavy lifting to the web server and prevents memory overload in the Seaside backend while still keeping close to the ease of implementation of “traditional” file uploads in Seaside.

Many of you will notice that this solution is based on work by Nick Ager, whose blog post has unfortunately disappeared from the web. Since there have been several questions on the Seaside mailinglist on this topic, I thought it would a good idea to revisit our implementation (which has been working in production for years now) and make it usable as a separate Seaside extension.


The Seaside extension to support large file uploads is in the optional Seaside-ExternalFileUpload package. At the time of writing of this post, you need to load this package manually in your Seaside3.x image. The package should work well in 3.0, 3.1 and 3.2.

NGINX with file upload module

You need to compile NGINX from source because, like many of its modules, the file upload module is not included in the binary distributions. Also, since NGINX 1.3.0 or so, you need to make sure to use version 2.2 of the file upload module. Executing the following commands should work for you, but mind you might need to pass additional configuration options to the configure command to fit your NGINX setup.

  sudo curl -O
  sudo tar xf nginx-1.8.1.tar.gz
  cd nginx-1.8.1
  sudo curl -L -o nginx-upload-module-2.2.0.tar.gz
  sudo tar xf nginx-upload-module-2.2.0.tar.gz
  sudo mv vkholodkov-nginx-upload-module-aba1e3f nginx-upload-module-2.2.0
  sudo ./configure --add-module=./nginx-upload-module-2.2.0/
  sudo make install

NGINX configuration

Once you get NGINX installed, you need to configure an upload location in the server block that concerns your Seaside app. The following configuration defines that location as the path /fileupload, which means that the file upload plugin is listening at that location. Files uploaded to that location will be stored in the upload_store directory on the server. In our case, the files will be uploaded to /var/www/uploadstore.

Once the file is uploaded, the request that is sent to the Seaside back end (listening at location /) has the additional fields name, content_type and path that contain the respective properties of the uploaded file. These properties will be available in the Seaside callback attached to the file upload field. Finally, the configuration also ensures all (other) fields of the form are sent to Seaside such that all callbacks of the form are executed there.

Please see the file upload module documentation for more information on these and other configuration parameters.

# Upload form should be submitted to this location
location ~ /fileupload {

  # Pass altered request body to this location
  upload_pass /;

  error_page 405 415 = /;

  # Store files to this directory
  upload_store /var/www/uploadstore;

  # Allow uploaded files to be read only by user
  upload_store_access user:rw group:rw all:rw;

  # Set specified fields in request body
  upload_set_form_field $upload_field_name "";
  upload_set_form_field $ "$upload_file_name";
  upload_set_form_field $upload_field_name.content_type "$upload_content_type";
  upload_set_form_field $upload_field_name.path "$upload_tmp_path";

  # seaside automatically assigns sequential integers to fields with callbacks
  # we want to pass those fields to the backend
  upload_pass_form_field "^\d+$";

  upload_cleanup 400 404 499 500-505;

Example File Upload

The package Seaside-ExternalFileUpload contains an example component WAFileUploadExample that demonstrates “traditional” file uploads side-by-side with the new “external” file uploads. Here is the snippet for such an external file upload (i.e. where the upload is handled by the front-end web server NGINX):

html form
  fileUploadLocation: 'fileupload';
  with: [
      html externalFileUpload
          callback: [ :ef | file := ef ].
      html submitButton
          text: 'Upload file via front-end'

Like any form with a file upload field, you need to set it to be multipart. Next, you need to pass the fileUploadLocation, which is the location configured in NGINX to handle file uploads. In our case, this is fileupload, but you can choose any name you want for that location as long as you use the same name here and in the NGINX configuration. The file upload field tag is externalFileUpload (instead of fileUpload). The callback block of this field [ :ef | file := ef ] will be invoked with a WAExternalFile instance instead of a WAFile instance. A WAExternalFile contains the uploaded file’s filename, its content type and path on disk. From here on, it’s up to you what to do with the file. A good idea is to move the file to its proper location, for example.

The Seaside-ExternalFileUpload package is currently a preview package. It will evolve as we integrate it further, for example by adding support for the ajax file uploads (as they are part of Seaside 3.2) and the jQuery file upload plugin. More about this in upcoming posts.

Please contact us on the Seaside mailinglist in case you need help or for any additional comments and remarks.

February 04, 2016

Pharo Weekly - An example of debugging with moldable tools


One thing we noticed over the past year since we introduced GT in Pharo is that people still tend to use these tools in a similar way classic tools were used. We think there is a more potential in these tools.

To change this, we would like to collect stories of how using these tools enabled a workflow that was otherwise not possible. To get this started, we will start to document more consistently some of the sessions, and we would like to get input from your as well. The idea is to create a catalog of tutorials that people can follow and get inspired from.

Let me start. I recently had to debug a small problem, and I ended up having an experience that I found beautiful:

What do you think?


Benoit St-Jean - Quelques moqueries!

Non, il ne s’agit pas d’un billet humoristique! Mais dans ce cas-ci, moquerie se veut la traduction imprécise (à dessein) du terme mock, qui signifie plutôt simulacre dans le cas qui nous occupe.

Un mock, c’est un outil comme un autre.  Même si parfois j’ai l’impression qu’on surévalue grandement son utilité.  En 20 ans de Smalltalk, je n’ai eu qu’à travailler avec des mocks seulement 2 fois!

Plusieurs solutions existent pour votre environnement de développement favori!


Disponible pour Squeak, Pharo, aussi la version pour VisualWorks dans le Cincom Public Repository


Disponible pour Dolphin,et Pharo.


Une version pour VisualAge,


Une version pour Pharo.


Disponible pour VisualWorks et Squeak.


Disponible pour VisualWorks.

Classé dans:Dolphin, Pharo, Smalltalk, Squeak, VisualAge, VisualWorks Tagged: BabyMock, Dolphin, DoubleAgent, MiniSMock, mock, Mocketry, Pharo, SMock, Squeak, Teachable, VisualAge, VisualWorks

February 03, 2016

Benoit St-Jean - Smalltalk en vrac (22)


L’immutabilité dans la VM Cog : enfin!


Un extracteur de headers (les header files en C) pour faciliter vos projets avec FFI.  Les détails ici et ici.

Un article en français dans Linux Magazine.

Classé dans:Cog, Machine virtuelle, Pharo, Smalltalk, VM Tagged: C extracteur, Cog, FFI, header, header files, immutabilité, Linux, magazine, VM

February 01, 2016

Pharo News - Press article about Pharo

<p>New article about Pharo in the issue 190 of the french computer magazine <a href="">GNU Linux Magazine</a>. Learn how to create a PDF file with Pharo and Artefact. </p> <p><figure><img src="/files/posts/gnulinux-magazine-190.jpg"></img><figcaption></figcaption></figure></p>

Pharo News - Press article about Pharo

<p>New article about Pharo in the issue 190 of the french computer magazine <a href="">GNU Linux Magazine</a>. Learn how to create a PDF file with Pharo and Artefact. </p> <p><figure><img src="/files/posts/gnulinux-magazine-190.jpg"></img><figcaption></figcaption></figure></p>

Pharo Weekly - Parsing User-Agent strings with a web service

I want to share a snippet of code.

In HTTP, a client identifies itself using the User-Agent header. That string is long and cryptic. To make sense of it you have to parse it. There are web services that can do this. Here is how you can invoke one of them.

ZnClient new
  host: '';
  queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4';
  queryAt: 'getJSON' put: 'all';
  contentReader: [ :entity | NeoJSONReader fromString: entity contents ];

Since STON parsing is backward compatible with JSON, you can use that as well.

ZnClient new
  host: '';
  queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4';
  queryAt: 'getJSON' put: 'all';
  contentReader: [ :entity | STON fromString: entity contents ];

You will get back a nice dictionary with much more sensible key/value pairs.

Note that this is a public service. I think it would be polite and more efficient if you put a cache in front of it, like LRUCache.


January 30, 2016

Pharo Weekly - Fuel faster and BMP reader :)

Fuel reading is 60% faster than BMP:
Smalltalk garbageCollect; garbageCollect.
r1 := [FileLocator imageDirectory / ‘test.bmp’ readStreamDo: [ :s |
s binary.
fromBMP := BMPReadWriter formFromStream: s]] benchFor: 2 seconds.
Smalltalk garbageCollect; garbageCollect.
r2:=[FileLocator imageDirectory / ‘test.fuel’ readStreamDo: [ :s |
s binary.
fromFuel := (FLMaterializer newDefault materializeFrom: s) root]] benchFor: 2 seconds.
{ r1. r2 } “an Array(a BenchmarkResult(2,199 iterations in 2 seconds 2 milliseconds. 1,098 per second) a BenchmarkResult(5,728 iterations in 2 seconds 3 milliseconds. 2,860 per second))”

January 29, 2016

Pharo Weekly - Travis CI integration added to OSSubprocess and FFICHeaderExtractor

Hi guys,

This is just to let you know that with the help of Esteban and between some work together [1] [2] I was able to have Travis CI integrated with OSSubprocess and FFICHeaderExtractor [3] [4] . Both projects are built and tested under Linux and OSX. Note also that one of the projects does a lot of FFI calls to system libs like libc and the other even generates C programs, compiles them and run it. Even the OS dependencies (like installing the compiler) are resolved correctly :)

January 27, 2016

Pharo Weekly - FFI C Header Extractor

Dear all,

I am happy to announce the first release of FFICHeaderExtractor project. You can find the project and the documentation here:

Pharo News - [ANN] Pharo on Bountysource

<p>We have set up a Bountysource Team for Pharo. This means that everyone can suggest bounties, contribute money to existing bounties or support Pharo development directly with a monthly contribution.</p> <p>Have a look here: <a href=""></a></p> <p>Existing bounties can be found here: <a href=""></a></p> <p>To learn more about bounty source, see the <a href="">FAQ</a></p> <p>For supporting Pharo development with a monthly contribution, see </p> <ul><li> <a href=""></a></li></ul>

Pharo News - [ANN] Pharo on Bountysource

<p>We have set up a Bountysource Team for Pharo. This means that everyone can suggest bounties, contribute money to existing bounties or support Pharo development directly with a monthly contribution.</p> <p>Have a look here: <a href=""></a></p> <p>Existing bounties can be found here: <a href=""></a></p> <p>To learn more about bounty source, see the <a href="">FAQ</a></p> <p>For supporting Pharo development with a monthly contribution, see </p> <ul><li> <a href=""></a></li></ul>

January 26, 2016

Benoit St-Jean - Numerical Methods 2016

La toute dernière version de Numerical Methods est arrivée! La présente édition est une version abrégée où tout le code Java a été enlevé pour ne garder que le plus intéressant : le code Smalltalk.

Maintenue par Stéphane Ducasse et Serge Stinckwich, cette version demeure toutefois fidèle à l’originale de Didier H. Besset.

Pour obtenir cette librairie (SciSmalltalk), vous n’avez qu’à venir ici. Pour être informé des derniers développements, il y a un groupe Google.

Classé dans:Smalltalk Tagged: Didier H. Besset, Numerical Methods, SciSmalltalk, Serge Stinckwich, Stéphane Ducasse