[Newbies] question on differences between images

Jordi Delgado jdelgado at lsi.upc.edu
Tue Jan 30 12:31:50 UTC 2007


Hi,

Thanks for your answer. I guess I understand now 
why it is image 3.9 who provides the right answer.

>Now... back to that code of yours, it is a serious mess. :)
>(...)
>
>So... I wonder what the 2.5 image does to end up with a BlockContext,
>don't have one handy. Perhaps it does some funny stuff if the argument
>to Compiler is an Array?

Yes, the code was a mess. The same result is obtained by printing the
result of:

(Compiler evaluate: #([ Transcript show: 'Some Text' ])) class

image 2.5 --> BlockContext
image 3.9 --> Array

I've been playing a little bit more with Squeak, and I found another
strange (to me; please, consider that I am still a newbie) thing. 
In some lectures by Stephane Ducasse there is an example illustrating the
difference between literal arrays and arrays created with new:. In particular,
adding the following method to class SmallInteger:

m1

| anArray |
anArray := #( nil ).
(anArray at: 1) isNil
	ifTrue: [ Transcript show: 'Put 1'; cr.  anArray at: 1 put: 1. ]
		
and executing 

1 m1

should display the message 'Put 1' only once. And this is how it works...
in image 3.9

But if we repeat the experiment in image 3.0, it displays nothing in the
Transcript (not even the first execution). Again, I am puzzled by this 
behavior (I am always assuming that these experiments that behave differently
in different Squeak images are standard Smalltalk).

One more thing. Perhaps there is people wondering why someone should worry
about the behavior of an old image. The answer is that I am using a stripped
version of image 3.0 to play with Squeak on a Jornada 720. More recent complete
images are too heavy for the J720 (at least that is my experience; any clue
on how to improve that?).

Well, thanks in advance for your answers

Bests

Jordi



More information about the Beginners mailing list