[squeak-dev] Hobbes woes

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

[squeak-dev] Hobbes woes

Michael Haupt-3
Dear list,

I'm trying to get Hobbes (as available from
http://wwwlehre.ba-stuttgart.de/~helbig/st80/hobbes) running with the
Apple Smalltalk image from the ESUG 2007 DVD. The Hobbes sources have
been filed into a Squeak 3.10.2 image.

Doing "SmalltalkEmulator openAPDAWith: InterpreterWorld" first
stumbles over two missing methods in SystemDictionary that are rather
trivial to provide, but then things break saying that
OrderedCollection class >> accumulatePairsForBecomeIn: is not
understood. That method is nowhere to be found in that image, and also
not in Squeak 3.6, which was, I believe, the version of Squeak Hobbes
was initially ported to.

What does it do? How could it be implemented?

In other words: has anyone successfully started Hobbes in (recent or
less recent) Squeak?

Best,

Michael

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Hobbes woes

stephane ducasse
if you succeed please let us know :)

Stef

On Sep 10, 2008, at 11:46 AM, Michael Haupt wrote:

> Dear list,
>
> I'm trying to get Hobbes (as available from
> http://wwwlehre.ba-stuttgart.de/~helbig/st80/hobbes) running with the
> Apple Smalltalk image from the ESUG 2007 DVD. The Hobbes sources have
> been filed into a Squeak 3.10.2 image.
>
> Doing "SmalltalkEmulator openAPDAWith: InterpreterWorld" first
> stumbles over two missing methods in SystemDictionary that are rather
> trivial to provide, but then things break saying that
> OrderedCollection class >> accumulatePairsForBecomeIn: is not
> understood. That method is nowhere to be found in that image, and also
> not in Squeak 3.6, which was, I believe, the version of Squeak Hobbes
> was initially ported to.
>
> What does it do? How could it be implemented?
>
> In other words: has anyone successfully started Hobbes in (recent or
> less recent) Squeak?

I do not remember (getting old losing brain cells).

>
>
> Best,
>
> Michael
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Hobbes woes

Vassili Bykov-2
In reply to this post by Michael Haupt-3
I don't know why it's missing from those files--or why those files are
posted there in the first place, and how exactly they relate to my
stuff--but here is what it should do:

--------
accumulatePairsForBecomeIn: aBlock
        "Code in aBlock will add pairs to the argument, which is an OrderedCollection.
        When the block has been evaluated, all pairs will have their elements becomed.
        NOTE:  Do not use this method unless you understand about become."
        | mutations pairs |
        mutations _ self new.
        aBlock value: mutations.
        mutations isEmpty ifTrue: [^ self].
        pairs _ mutations asArray.
        Smalltalk isSqueak
                ifTrue: [(pairs collect: [:p | p first])
                                        elementsExchangeIdentityWith: (pairs collect: [:p | p second])]
                ifFalse: [pairs
                                        do: [:p | p first become: p second]]
--------

The reason it's this way is because my design requires that some of
the loaded objects become different things after loading. Individual
become: is fast in VisualWorks, but in Squeak bulk become
(elementsExchangeIdentityWith:) is the only way to get acceptable
performance.

Cheers,

--Vassili

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Hobbes woes

Michael Haupt-3
Hi Vassili,

thank you very much for the code, I will give it a try immediately.

On Thu, Sep 11, 2008 at 3:40 AM, Vassili Bykov <[hidden email]> wrote:
> I don't know why it's missing from those files--or why those files are
> posted there in the first place, and how exactly they relate to my
> stuff

The background is here:
http://www.nabble.com/Hobbes-Emulator-licensed-td4691286.html

Best,

Michael