Running Squeak

It's been a frustrating day trying to get Squeak up and running. One site had archives that I couldn't unpack. Another one had an "all in one" bundle that was a piece of cake to install. Unfortunately, I have to run inisqueak to create my image and it didn't seem to include that. After a bit of playing around, I created a $HOME/.squeak directory, copied Squeak3.7-5989-full.changes, Squeak3.7-5989-full.image and SqueakV3.sources over there, set my SQUEAK_IMAGE environment variable to point to an image file there and successfully ran Squeak. The main window has a variety of different screenshots(?) that I can zoom into and play with and some information that will probably prove useful, though it's a bit of a strange world for me.

It appears that to actually get to write code, I need to expand the System Browser window but Squeak is not automatically opening to that right away. I think that's right, but I'm not sure. I don't know if the image file I copied to the.squeak directory is not the one I wanted. I hover the mouse over various "things" and not all of them have tools tips.

After a bit of playing around and reading through a Squeak tutorial, I created various tiny methods and one of them looked like this:

I now think I understand the lack of if statements (I'm sure my terminology is off.) The (times > 100) expression constructs a boolean objects which understands the message ifTrue:ifFalse:. Since everything is an object and you send messages to them, a bare if hanging out there would not fit the language design.

So how does the loop work? The number 1 (one) creates an integer object which understands the to:do: message. This is very cool, but I'll admit that it's a bit strange to me. I look forward to more play, but tuit reclamation is proceeding, as always, slowly.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Please Log In to Continue

Sometimes during a Perl class, I like to jerk the chains of the Java people who like to play OO-purist.

I ask them "What methods can you call on 1?". They look at me dumbly for a bit. Sometimes they say something about creating a new object, and I have to reinforce the statement: "No, all you get is 1. What methods can you call on it?"

That's a classic example of people misunderstanding the terminology. Even my brief exposure to Squeak is showing me more. While I'm unsure of the process by which (foo > 5) creates a Boolean object in Squeak, it's now clear how the ifTrue:ifFalse messages work and why the traditional if/else statements are procedural in nature. It's not clear to me if mixing a bit of procedural code with OO code is bad, but then, I'm still exploring this. I suspect that the pure OO approach has benefits that get arou