Gemstone/S, PUM – Indices, UTF16 attributes …

Now some information about current development for my modelling tool “PUM” regarding the code generator for Gemstone/S. This is work in progress – and I’m working on our product model with these new features.

Gemstone/S supported versions

I now only support the newest version 3.2.6 of Gemstone – due to the newly introduced index-concept. There was no need here to stay for and other versions. Its the one we are working now with.

Indices Support

For each defined associations the user may now define indices – based on attributes of the instances hold in that association. Supported structures for associations are now: Set, Bag, OrderedCollection, Array, SortedCollection with various options. “large”, “conflict”, “identity” and so on. Not all combination are valid.

When a new instance is created it now also creates ALL defined indices for that instance.

Utf16 attribute support

Up to the current version only the “type” “String” was allowed for a character collection attribute. Now its also possible to define “Utf16″ as a type – and the setting method ensures, that a needed conversion is done before storing a new string into that UTF16-based attribute. Utf16 attributes may also be used for index stuff.

Posted in Smalltalk | Tagged , | Leave a comment

PUM/Gemstone – migration of instances …

When creating new versions of a model one might change already defined classes in that model and add or remove attributes from that class definition.

Gemstone is able to handle different versions of classes and allows the programmer to migrate instances of old class versions to a specific new version of that class.

The job of migration can be very difficult and this is my first attempt in PUM is to at least do the initialize stuff (in the initialize method) also in the migration support method. The generated code looks for all current attributes (in den new model) defined and if they are new, they simply initialize them with the value from that model.

migrateFrom: oldValue instVarMap: unusedParameter
	|  oldNames |

	oldNames := oldValue class allInstVarNames.

	(oldNames includes: #'studyMembership') ifFalse:[ studyMembership := StringKeyValueDictionary new ].
	(oldNames includes: #'quotas') ifFalse:[ quotas := Set new ].
	(oldNames includes: #'quotaFullAppointmentHandling') ifFalse:[ quotaFullAppointmentHandling := CATIEnumQuotaFullAppointmentHandling noHandling ].
Posted in Smalltalk | Tagged , , | Leave a comment

Reading QR images via Gemstone (server side Linux)

Ok, yesterday I posted a short message about creating QR codes on the server via Gemstone. In the afternoon I wanted to implement the reverse way: you have a picture on the server and you want to have the content of the QR code.

Actually here again under Ubuntu 14.04.x one has a package and a tool which does the main mart: “zbar-tools”.

Therefore simply: “sudo apt-get install zbar-tools” and after that installation you get a tool named “zbarimg” which does a simple “scan and decode bar codes from one or more image files”.

After that with MSKLibQREncode-MSK.5.mcz you get simple code to wrap this tool.

Posted in Smalltalk | Tagged , , | Leave a comment

Creating QR codes from Gemstone (server side under Linux) …

A nice library to create QR codes has been created by Kentaro Fukuchi. You may either use the low level C functions offered by his library but a much easier access you get by binding his own tool to create the images …

Ok, you may download the library, do the compilation with the tool and then you might use it from with Gemstone. The make process creates and installs the libraries and tools in the according directories.

Here the simple wrapper around the external tool qrencode

Posted in Smalltalk | Tagged , , | 2 Comments

Working with small machines again …

… and remember in the eighties where Smalltalk-80 ran under Atari-Mega ST in 4 MB of RAM ? That’s history, hardware is fast enough to run even the most difficult software in pretty good speed – at least under Desktop oriented PC (Intel).

With RaspberryPI and all those little computers the available computing power is again limited (although on a very high level …) …

I consider doing a programming course at a school near my place in the autumn and had a look at all these little machines what you can do with it and what not, what software could be used.


I bought the old Pi two years ago and played with it – under RiscOS and under Raspuntu (the Linux derivate for Pi). It felt a little slow (at least under Raspuntu) – but RiscOS simply flies with these small machines – wonderful. But RiscOS has simply other problems …

But what I noticed with Pi/RiscOS is the build in old BASIC BBC interpreter – and out of the box you were able again to write some small programs … pretty amazing for a software system coming to an age of 25 years … interactivity in a kind of way we perhaps have lost over the years and due to the increasing complexity of development tools we are used to use.

BBC Basic is indeed a pretty clever made stuff – BASIC without lines, access to inlined assembler and all those C based operating system functions …

I have not used BASIC for the last 20 years but I was amazed by the simplicity, the interactivity of the systems produced 25 years ago … where even some stuff of the operating system is written in BBC BASIC. That reminds me about Rexx under OS/2 and Amiga …

But of course one can see the drawbacks also: no structure support or even OO oriented support – but programming makes – even without that – fun again. Amazing …

Pi2 and Scratch 1.4

Ok, I bought a Pi2 – to get more speed and have a closer look at Raspuntu. I read so many stuff about Scratch and learning programming by using stuff like this – though I am not that confident, that I like this way of programming very much.

I tried Scratch 1.4 (based on Squeak) and found it pretty ok to use under Pi2. Actually Scratch 1.4 is the latest Scratch version based on Squeak – the current version Squeak 2.0 is now Flash (?) based but seems not to be available under Pi.

Using machines like this also brings up the problem, that presenting web-pages can be a very time consuming task for those webbrowser on these machines – even the Pi2.

Pi2 and Phratch

It is a port of Scratch ( on a recent platforms (Pharo 3.0) – but what the user gets is a very slow reprogramming of Squeak/Scratch. More or less I returned at once back to Scratch 1.4.

That was the overal subjective feeling I got with the Pi2: Pharo images (3.0 – 4.0 images can not be used at all) or application are slower in GUI than Squeak. Just a feeling …

Pi2 and the other stuff

Then I also installed FreePascal and the graphical IDE Lazarus (actually I had to compile it locally on the Pi2) – and by using these tool you have it again: speed. The GUI feels pretty fast (even the Lazarus IDE) – but of course compiling (on a SD card based system) is still a slow process.

Installation of Erlang – no problem but a heavy compile and installation job for the Pi2 – and a good workhorse for all the cores on the Pi2.

And then I looked for a BASIC implementation and I found “Return to Basic” or RTB. Single user project – build in support for the GPIO channels on the PI. Graphic, Sound – build in editor. And again: speed, simple to use, fast enough for interpreted application.

Odroid C1

The familiy of ARM based machines from odroid are also pretty interesting. The C1 is around €5 more expensive than the Pi2 – but offers more speed (1.6 GHz), more RAM.

The good thing is, that the speed is noticeable – Squeak comes up in about one second.

But the community is of course smaller – and with all those external projects available around Pi the Pi is still the main target. But if you just need a small machine with more power and Ubuntu compatibility is enough for you: the odrid may be a good candidate – and with the other models from odroid you may get even more computing power.

Conclusion ?

With Pi2 and odroid-c1 the machines offer enough power to make at least Squeak useable as an programming environment – but I still think, that the GUI programming under Pharo and Squeak is still a no-go – even after so many years. That does not mean, that the systems do not evolve – Pharo is running into the future and the look-and-feel has improved very much over the years on both systems.

I know, that there are pretty different opinions about that in the community.

Pharo 4 is in its early phase only useable under Intel machine, but Pharo 3.0 is there and can be used. The ARM VM still has potential to be speeded up and one can expect more in this direction in the future.

The big suprise for me was Lazarus IDE, Free Pascal and – yes – especially the RtB-BASIC. The later one has speed, simplicity and interactivity – but on the other side some limitations if you want to use structures and that. But source code is available and perhaps it might be a nice hack to enhance RTB to support structures … and  thn I would add socket also to the dialect.

But using BASIC again after so many years it shows how simple or well done the systems can be …. even if they might not grow with your needs. Pretty amazing how much fun can be created with only some lines of code.

Posted in Smalltalk | Tagged , , , , , , | 1 Comment

PUM 2.3.23 and Gemstone

During last weeks lots of stuff has changed in PUM. Its now in in the phase to make it stable again against the standard REST/JSON/server infrastructure in Gemstone/S.

* API definitions can now poduce source code for CRUD calls in Sencha ExtJS
* For Gemstone/S the source code:
* is generated in UTF/8
* generates the Swagger 1.2 API specification as static files

The Sencha source code generation is still not finished and difficult. Actually the models are now generated correctly for the Sencha Architect, but working on a level of model is not the way to go with Sencha Architect. Actually one must create source code for stores … and when using a store, the source code for the models have to be generated on the fly … much, much work to do in an area, which is not documented at all.


Posted in Smalltalk | Tagged , , , | 1 Comment

VASmalltalk 8.6.1 has been published …

… and after some hours working with it: it looks pretty cool. Switched the whole PUM project to 8.6.1 just by importing the config maps.

Posted in Smalltalk | Tagged , | Leave a comment