[Cuis-dev] Cuis stable releases - last interpreter VM image?

Juan Vuletich JuanVuletich at zoho.com
Wed Nov 1 10:42:30 CDT 2017

Hi David,

On 10/31/2017 8:06 PM, David T. Lewis via Cuis-dev wrote:
> Hi Hannes,
> On Tue, Oct 24, 2017 at 10:25:35AM +0200, H. Hirzel via Cuis-dev wrote:
>> Hello
>> I am looking for a recent Cuis image which may be run with an
>> interpreter VM (e.g. on old hardware) [1][2].
>> There is 'active development'
>>      https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>> and 'stable releases'
>>     https://github.com/Cuis-Smalltalk/Cuis-Smalltalk
>> Which of the different images there may still be run with an interpreter VM?
> There are currently three image formats that are being actively supported in Cuis.
> Checking this with the ckformat utility (http://wiki.squeak.org/squeak/6290), we
> have this in Cuis:
>     lewis at lewis-Gazelle-Pro:~/squeak/Cuis/Cuis-Smalltalk-Dev$ for i in *.image; do echo $i `ckformat $i`; done
>     Cuis5.0-3196-32.image 6521
>     Cuis5.0-3196.image 68021
>     Cuis5.0-3196-v3.image 6505
> The 68021 format image is 64-bit Spur, 6521 is 32-bit Spur, and 6505 is the
> original V3 image format that works with StackInterpreter, Cog, and the traditional
> interpreter VM.

Thanks for the explanation!

> Checking this on my Ubuntu system with interpreter VM and Cog, the V3 Cuis
> image works on Cog, but it no longer works on interpreter VM due to an
> apparent problem with display handling.
> The V3 Cuis image used to work with interpreter VM, and I am not sure when this
> problem began happening for the combination of interpreter VM and Cuis V3 image
> (which I think was probably what you were originally asking about).
> My first guess would be that Cuis has recently started to use some primitive
> that is present in the Cog VM but not yet present in the interpreter VM.

Oh. I wasn't aware of all this at all. Somehow I forgot that Cuis could 
and should run on the Interpreter VM!

> If anyone has any suggestions as to what may have changed in Cuis with regard
> to using new primitives or using Cog specific features, I will try to find
> the problem and fix it (but right now I do not have much time and I do not
> really know where to look).

Ok. It wasn't easy! Debugging image startup is tricky!

For this debugging, I used Squeak- from 
http://www.squeakvm.org/unix/ running on Debian 8.

The problem is in
Character >> #nonImmediateNumericValue
     "Answer the numeric value of the receiver, if instances happen to 
be regular (i.e. not in Spur)"
     ^self instVarAt: 1

The reason for this weird implementation and not just answering the 
instance variable is only to avoid a (harmless) Undeclared in the Spur 
variants (where Character is an immediate class).

I could make Cuis run on this VM, by starting it first in CogV3, change 
the method to answer the ivar, and saving the image. This hacked image 
starts normally with the Interpreter VM, but evaluating, for example, 
'3 at 4 instVarAt: 1' fails the primitive. It looks like in this VM, 
#instVarAt: always fails... (and could also break other senders).

David, can you please take a look?


Juan Vuletich

More information about the Cuis-dev mailing list