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.

BBC BASIC and RiscOS

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 (http://scratch.mit.edu/) 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.

Marten

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

PUM 2.0.3 – Gemstone Sorting/Index Definitions

Only minor news:

* with 2.0.3 the first support for SortedCollection within the modeller has been added – but only one attribute level has been added so far – resulting in code like: SortedCollection sortBlock: [ :a :b | a getName < b getName ].

* with 2.0.3 the first support for identity/equality index management definition on associations has been added. Helper methods for audit indices and creating/deleting of indices are now created.

Posted in Smalltalk | Tagged , | Leave a comment

PUM 2.x – Sencha ExtJS Client Code

… after working hard on the server-side code generation for Gemstone, we switched to the client-side code generation for Sencha ExtJS5 library. We use this library in our browser clients – therefore more work was needed to help the Javascript developers with their code base and give them the possibility to react much faster to model changings.

We already created the model definitions for Sencha, we now write these model definitions into the file system within our Sencha project structure.

For all API-operation definitions we create JS-functions which simply ends up with calling “Ext.Ajax.request” … and return the values.

In addition to these “simple” Ajax calls we also create code to define a suitable “data store”, a data structure central to the whole data-management of Sencha. By using a “data store” you enable your application to create, update, reading and destroying of objects on the server side.

After doing this we will return to the Gemstone generator and we have to create the support for “data store” API calls on the server side.

Posted in Smalltalk | Tagged , , , | Leave a comment