I just did a stupid thing...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I just did a stupid thing...

Eliot Miranda-2
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"?

--
relieved,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: I just did a stupid thing...

Nicolas Cellier



2014-05-14 21:15 GMT+02:00 Eliot Miranda <[hidden email]>:
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






Reply | Threaded
Open this post in threaded view
|

Re: I just did a stupid thing...

Nicolas Cellier
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 <[hidden email]>:



2014-05-14 21:15 GMT+02:00 Eliot Miranda <[hidden email]>:

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