[squeak-dev] I just did a stupid thing...

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed May 14 19:26:34 UTC 2014


Anyway, MC use a DataStream.
A DataStream has no specific method for writing a Character (see typeIDFor:
)
It writes a String like this:

nextStringPut: s
    "Append the string, s, to the receiver.  Only used by DataStream.  Max
size of 64*256*256*256."

    | length |
    (length := s size) < 192
        ifTrue: [self nextPut: length]
        ifFalse:
            [self nextPut: (length digitAt: 4)+192.
            self nextPut: (length digitAt: 3).
            self nextPut: (length digitAt: 2).
            self nextPut: (length digitAt: 1)].
    self nextPutAll: s asByteArray.
    ^s

So, there are chances that the Spur MC output perfectly match the Cog MC
output...
In this case, there is not even a fallback to text.


2014-05-14 21:21 GMT+02:00 Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com>:

>
>
>
> 2014-05-14 21:15 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:
>
> Hi All,
>>
>>     I've moved my VM work from an old Squeak 4.1 image to a trunk-derived
>> 4.5 image and now to a Spur version of that.  Remember that Spur has
>> immediate characters.  So the stupid thing I did was...
>>
>> I just published a version of Compiler to trunk form my Spur image.  So
>> right now that package's binary component is potentially Spur format.  I
>> realised too late and thought "oh s..., maybe I broke trunk".  So I started
>> up my non-Spur image and checked that I could successfully load the new
>> Compiler package.
>>
>>  Can anyone who understands the binary scheme inside Monticello packages
>> explain why it "just worked"?
>>
>>
> MCZ also embed a textual source file.
> If ever MC fails to decode the binary blob it falls back to decoding the
> text...
>
> --
>> relieved,
>> Eliot
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140514/340a6b06/attachment.htm


More information about the Squeak-dev mailing list