Return to this week's Bulletin

 

 



07 September 2001

Squeak: A Powerful Computing Tool for Amateur Scientists

by Sheldon Greaves

Approximately one year ago my spouse and I had the occasion of spending an evening with Ted Kaeler and his wife. If that name rings a bell, Macintosh afficionados may recall that he was on the original Macintosh team, and was one of the programmers behind the original HyperCard program. Suffice it to say, Ted is a bright and creative guy.

Ted spent much of the evening telling us about an exciting and powerful programming language he is involved with called Squeak. What caught my attention from an amateur scientist viewpoint is that Squeak is a language that can be ported very very easily to run on a vast range of machines with virtually no significant changes to the code. It is far more portable even than Java, as Squeak can run on machines that are far too old to run Java. For amateurs, this makes it possible to conduct large-scale projects with lots of people running specially-written software on a lot of different kinds of machines.

The following information is taken from the Squeak web site, located at http://www.squeak.org. If you want to download Squeak and play with it, you can do so for free from their download page, http://squeak.org/download/.

-SG

What is Squeak?

Squeak is an open, highly-portable Smalltalk-80 implementation whose virtual machine is written entirely in Smalltalk, making it easy to debug, analyze, and change. To achieve practical performance, a translator produces an equivalent C program whose performance is comparable to commercial Smalltalks.

Other noteworthy aspects of Squeak include

  • real-time sound and music synthesis written entirely in Smalltalk
  • extensions of BitBlt to handle color of any depth and anti-aliased image rotation and scaling
  • network access support that allows simple construction of servers and other useful facilities
  • it runs bit-identical on many platforms (Windows, Mac, Unix, and others)
  • a compact object format that typically requires only a single word of overhead per object
  • a simple yet efficient incremental garbage collector for 32-bit direct pointers
  • efficient bulk-mutation of objects
Squeak is available for free via the Internet, at this and other sites. Each release includes platform-independent support for color, sound, and network access, with complete source code. Originally developed on the Macintosh, members of its user community have since ported it to numerous other platforms including Windows 95 and NT, Windows CE (it runs on the Cassiopeia and the HP320LX), all common flavors of UNIX, Acorn RiscOS, and a bare chip (the Mitsubishi M32R/D).

What it is not
The Squeak Smalltalk system bears no relation to the "Squeak" language designed by Rob Pike and Luca Cardelli in 1985, nor to its successor, "Newsqueak".

What is Cool about Squeak

To quote from Dwight Hughes, a frequent contributor to the Squeak mailing list, "How is Squeak important? Squeak extends the fundamental Smalltalk philosophy of complete openness -- where everything is available to see, understand, modify, and extend for whatever purpose -- to include even the VM. It is a genuine, complete, compact, efficient Smalltalk-80 environment (*not* a toy). It is not specialized for any particular hardware/OS platform. Porting is easy -- you are not fighting entrenched platform/OS dependencies to move to a new system or configuration. It has essentially been put into the public domain - greatly broadening potential interest, and potential applications. The core team behind Squeak includes Dan Ingalls, Alan Kay, Ted Kaehler, John Maloney, and Scott Wallace. All of this has attracted many of the best and most experienced Smalltalk programmers and implementers in the world."

Squeak stands alone as a practical Smalltalk in which a researcher, professor, or motivated student can examine source code for every part of the system, including graphics primitives and the virtual machine itself. One can make changes immediately and without needing to see or deal with any language other than Smalltalk. Squeak runs bit-identical images across its entire portability base, greatly facilitating collaboration in diverse environments. The system, together with an adherance, for better or for worse, to the image model (the entire state of Squeak is manifest in an image file), has yielded a system of extreme portability and sharability. Any image file will run on any interpreter even if it was saved on completely different hardware, with a completely different OS (or no OS at all!).

A Brief History of Squeak

Squeak began, very simply, with the needs of a research group at Apple. We wanted a system as expressive and immediate as Smalltalk to pursue various application goals (prototypical educational software, user interface experiments and (let''s be honest) another run at the Dynabook fence). As you can read in the OOPSLA paper ("Back to the Future") we hit on the idea of writing a Smalltalk interpreter in a subset of Smalltalk, together with a translator from that subset to C.

Philosophy

The current Squeak interpreter combines a classical ST-80 interpreter with a simple yet efficient 32-bit direct-pointer object memory and incremental garbage collector. It also includes a BitBlt graphics system that supports 1-, 2-, 4-, and 8-bit indexed colors, as well as 16- and 32-bit RGB colors, together with a "warp drive" that supports fast rotations and other affine transformations, as well as simple anti-aliasing. Other notable (and equally portable) capabilities of Squeak include 16-bit sound input and output, and support for sockets and general network access.

The portability and sharability of Squeak, together with its malleability (since it is all in Smalltalk, a competent Smalltalker can change anything about it), has given rise to a lot of interest in the academic community, and what one might call the "independent" computer science community. By this phrase we mean to include people who are not so interested in one language over another, or one OS over another, but who have their own particular passion (numerical analysis, graphics, distributed computing, music synthesis, O-O education, etc) and who want a system that can provide the most flexible and immediate command over experiments in their field of interest.

The Squeak Community

Squeak has an active and enthusiastic user community. Participants include teachers working on currculum materials, commercial and academic users, and a number of "quantum mechanics" interested in newer and better approaches to the ultimate goal of making high-quality computation simple and efficient.

The core development team is resident at Disney. Other organizations with significant Squeak interest include The Create project at UCSB, UIUC, Georgia Tech, INRIA in France, and the Univ. of Magdeburg.

The main vehicles for interaction among this community are the Squeak Mailing List, the Squeak Wiki Servers, and the Squeak Archives.

Squeak is Free, with a Liberal License

Smalltalk-80 was developed at Xerox PARC in the 1970s. Apple obtained a license in 1980. A team at Apple developed Squeak in 1996, and have made it available free under license. The license agreement is intended to keep Squeak open and available to the user community, while allowing users to do useful things with Squeak. Here is a paraphrase of the license terms:

You are allowed to change Squeak, write extensions to Squeak, build an application in Squeak, and include some or all of Squeak with your products. You may distribute all of these things along with Squeak, or portions of Squeak, for free or for money. However, you must distribute these things under a license that protects Apple in the way described in this license.

If you modify any of the methods of class objects (or their relationships) that come with Squeak (as opposed to building on top of the classes in the release), you must post the modifications on a web site or otherwise make them available for free to others, just as has been done with Squeak. The same is true if you port Squeak to another machine or operating system - you must post your port on a web site or otherwise make it available for free to others under the same license terms.

Squeak Support

Boris Shingarov once wrote in joking reference to an "unofficial" feature of Squeak, "Wow! Is there anything in Squeak that is supported or official?!!!" We responded, "Of course not. Well, the name is official, and the current version runs bit-identical on more platforms than most other software ;-)."

Seriously, though, there is something here that touches on Squeak philosophy. Official standards and product support are the enemies of change. Next to universal access, malleability is the prime figure of merit for Squeak. It is our intention for Squeak to evolve.

Some people feel tentative about using a system that appears to be dependent on the whimsical enthusiasm of a couple of wizards. Who could make product plans upon such shifting sands?

The answer is simple: Each Squeak release includes everything about itself: the image, the virtual machine, with complete source code for each. If the Squeak team vanished tomorrow, probably 25% of the folks on the Squeak mail list could maintain the current version single-handedly for the next 20 years.

It''s better than being supported. It's having control over your destiny.