OS News

27 October 1999


The Squeak Evolution

By Colin Cordner


 
   
The hype surrounding Java, however merited, has had the effect of grabbing attention away from other quite worthy computer language projects  
Squeak is a highly portable, multi-platform, object orientated, freely distributed, and open-source programming environment  
Squeak has not been the unfortunate victim of the intense media fads that sometimes strike against new and interesting technologies  
Fortunately, quite a diverse set of resources are available to those interested in the Squeak world  
 

Look around anywhere in the media these days and what do you see? Geek Chic. After untold centuries of playing second fiddle to the beefier and more silver-tongued members of the species, geeks are finally enjoying a spot in the limelight. Gates, Forbes, Jobs - all their nerdy bespectacled mugs have been seated at the forefront of our pop culture. From Time magazine to the hallowed preppy stronghold of the Nightly Business Report, journalists, wall-street suits, and talk show hosts the world over are cooing and preening over the new lords and ladies of the high court. Geek fashion, geek lingo, geek tech, and geek culture are quickly being embraced into the "cool" life-style of mainstream culture.

Even the sacred halls of programming have felt the influence of mainstream enthusiasm. "Java is cool!" declare the pundits, and so it shall be. So many media larks singing its praises has the effect of greatly inflating the interest in the Java programming language. The hype surrounding Java, however merited, has had the effect of grabbing attention (and headlines) away from other quite worthy computer language projects, among them an underappreciated project called Squeak.

What is Squeak?

Squeak is a Smalltalk-80 implementation originally developed under license by a team at Apple Computers, Inc. in 1996. It is a highly portable, multi-platform, object orientated, freely distributed, and open-source programming environment. Squeak is distributed under a very liberal license which allows interested parties to download, copy, and modify it, while shielding Apple from any legal claims related to its application. Today the core team behind Squeak includes Dan Ingalls, Alan Kay, Ted Kaehler, John Maloney, and Scott Wallace, with many other Squeak enthusiasts involved in porting, adding features, and bug fixing.

Smalltalk-80, the language from which Squeak is derived, harkens back to the nearly mystical days of lore at Xerox PARC in the 1970s. Developed by a team headed by Dan Ingalls (who now heads the Squeak project), Smalltalk was positioned as the underlying software environment for the Dynabook project that was conceived and headed by PARC's Alan Kay. Though the original Dynabook project never reached fruition, Smalltalk was one of several related technologies that continued on. Squeak is one of the offspring resulting from the original work at PARC. It is, in fact, a complete system modeled after the original Blue Book specifications of Smalltalk-80, with adaptations made to take advantage of modern computing systems.

Squeak's features - incremental garbage cleanup, true direct pointers, an interpreter (or virtual machine) for running in or on top of a specific environment, and impressive graphical ability - make Squeak a pleasant environment to work in. It is enhanced further by the many amenities - such as sound synthesis - that Squeakers have provided to bring Squeak and Smalltalk into the world of multimedia. Perhaps best of all, Squeak has not been the unfortunate victim of the intense media fads that sometimes strike against new and interesting technologies - and whose resulting attention often ends with said technology being pulled too hard in too many directions by the interests of its new hangers-on. Rather, Squeak has been steadily managed, improved, extended, and nurtured by a community of dedicated developers who are relatively free of fanatic evangelism, and decidedly platform neutral. Squeak, it seems, is a matter of evolution rather than revolution. Squeak - in an analogy - is your all-embracing Buddhist friend who happens to break bricks with his head, and teach Tai-Chi on weekends.

Indeed, if the "hipness" of a technology can be expressed as being directly proportional to its technical utility/ability, and inversely proportional to itıs mainstream adoption, then Squeak is one of the hippest techs on campus.

Squeak Tech

In order to truly understand what makes Squeak so great, it requires an examination of the underlying language and principles. Alan Kay's Dynabook was meant to be a portable computing system that could both be used practically as a device for, say, design and music composition, and as a medium for introducing students to the world of computer programming. Since language is best introduced at as young an age as possible, the language would have to be simple enough to be understood and use without expecting a 14-year old to know or learn calculus or linear algebra. Also, tasks as diverse and changing as music and architecture require an environment that is highly flexible and extensible in application. Finally, the device should be able to communicate with other devices and computers in order to reflect the reality that the broad range of resources and ideas may not be at the immediate fingertips of the user.

This might be a great place to simply sum up and say, "...And that's how they got the ideas for laptops and Squeak!" but it would be glossing things over a bit. In reality, the software end of this project (which is what we're interested in) did not spring forth fully formed from the brain of Dan Ingalls (Though that may be neat to picture). The Smalltalk project itself evolved through various forms between 1972 and 1980, when it was finally released to the world outside of PARC. The essential structure of the idea, though, is and was always as such: Squeak as an environment comes about in two parts - a platform independent Virtual Image that contains the classes that make up Squeak's functionality, and a platform specific Virtual Machine on which the image runs.

Within the Virtual Image are all those parts of Squeak which are immediately visible and useful to the user. These include the user interface, data structures, graphics and text handlers, compiler, decompiler, and debugger. All these are written in Smalltalk, with the compiler generating them into an intermediate language known as "byte codes".

The Virtual Machine, as mentioned, is the platform specific bit of code that serves as an intermediary between the Squeak environment and the environment on which it runs. Though this may be directly interfacing with the computer's hardware, it quite often means operating ontop of an operating system such as the MacOS, Windows, or Linux. In Squeak's case, the VM is written entirely in Smalltalk, making it easy to debug, analyze, and change. The VM serves to interpret incoming byte codes, and provides a storage manager and "primitive methods" - these latter being more intensive operations that are implemented in machine code. For increased overall performance, Squeak employs a translator which produces equivalent C code from the Smalltalk code given.

The Squeak Interface

To the users' point of view, of course, the most immediate feature of Squeak is the User Interface. The Squeak team, for its part, has supplied two seperate UIs for the users' enjoyment: MVC (Model-View-Controller), and Morphic.

As with most Smalltalk environments, Squeak requires a pointing interface such as a mouse. As well, it utilizes the standard 3 button mouse approach (Red button, Yellow button, Blue button). Those without a three-button mouse (such as Mac owners), need not worry - second and third button actions can be had by combining a mouse down with a modifier key such as alt or command.

The default interface for Squeak (as of v2.6 and under) is MVC - a quick, responsive graphical user interface. Users of operating systems such as Apple's MacOS, and Microsoft's Windows will find MVC more than a bit familiar. There is good reason for this - MVC is the standard interface for Smalltalk environments, hailing back to the interface standard for Smalltalk-80. The basis for the MVC standard developed at Xerox PARC was infact the inspiration for Apple's GUI OSes, which in turn inspired Windows and others.

MVC operates much as one would expect, with a few exceptions. MVC utilizes a system of windows to display objects such as text and graphics. MVC Windows function much the same as windows in other GUIs - a close box to remove them, and the ability to resize or collapse them to a windowshade. Scrollbars appear on the left side of windows, popping up at need and remaining hidden the rest of the time.

Users will quickly find, though, a distinct lack of menu bars. Instead, MVC uses pop-up menus in order to perform commands (many also available through keyboard shortcuts). A different menu can be called up at the touch of each mouse button, allowing the user to change the screen depth, save work, or just about any other command that can be thought of. From a practical standpoint the pop-up menu approach proves very handy, especially for those who must traverse large monitors.

Morphic, on the other hand, is a very similar - though visually different - interface that belies a great deal more capabilites. Morphic hales back to the Self project, and has capabilities very much different from that of MVC. Though the general controls and functionality are identical to those of MVC, Morphic includes features that outstrip MVC on several fronts. One of the most striking features is the "Halo".

In Morphic, every object (or Morph) has a set of characteristics that may be altered by the user. It doesn't really matter what the object is - it can be a text object, a 2 or 3-dimensional shape, an image, etc. - it can all be resized, flipped, turned or trashed, and the interface of choice is the Halo. The Halo is not quite as mysterious as it sounds. Actually, it pops up at the click of a Red Button - a simple ring of coloured dots aound the periphery of the object in question. Each dot can be maninpulated with the mouse for a desired affect. For instance, by grabbing and dragging the yellow dot, it is possible to enlarge or shrink an object. The Blue dot can be used to rotate an object, the X dot to trash it, and so on.

In addition, Morphic provides support for TrueType fonts, anti-aliasing, and complete 3-D Wonderlands via Squeak-Alice. If that isn't enough, both Morphic and MVC provide Smalltalk scripting environments to help automate repetitive tasks.

This, of course, by no means covers the full extent of Squeak's features. Support for 1-, 2-, 4-, and 8-bit indexed and 16-, and 32-bit RGB colour through BitBlt, a "warp drive" for fast rotations and other transformations, anti-aliasing, and support for 16-bit sound, as well as sockets and internet access are also present. Squeak is ever-expanding and improving, with many more features and abilities that could easily be covered in an article of any reasonable density.

Fortunately, quite a diverse set of resources are available to those interested in the Squeak world. In the short time that I've been playing with Squeak, I've come across information and resources enough to keep a Squeak newbie like myself entertained for a good long while. Among resources I 've found most useful are:

Squeak Central - http://www.squeak.org Squeak Discussion Area, The - http://minnow.cc.gatech.edu/squeak.1 Squeak License Agreement - http://www.squeak.org/license.html Squeak OOPSLA Paper - ftp://st.cs.uiuc.edu/Smalltalk/Squeak/docs/OOPSLA.Squeak.html Chris Phoenixıs Squeak Tutorial - http://squeak.cs.uiuc.edu/cphoenix_tutorial/intro.html An Introduction to Smalltalk (by Wolfgang Kreutzer) - http://kaka.cosc.canterbury.ac.nz/~wolfgang/cosc205/smalltalk1.html#basic ...and John Maloneyıs Bankaccount Tutorial - http://www.squeak.org/tutorials/BankAccount.html

Any of the above would serve as a welcome intro to the world of Squeak/Smalltalk, and Squeak itself can be downloaded from Squeak Central. Even though most geeks will find the spotlight to be a nice change of pace after eons in the backbenches, a few will always prefer to run off the beaten track. If Java isnıt your cup of tea, or C++ doesnıt add up for you, maybe youıll want to check it out - a romp in the Squeak world may be what your looking for.

Colin Cordner is a suspected human (of sorts) who's rarified version of reality (such as it is) has sometimes been known to coincide with our own (for the most part). On those rare occasions when it does, he is most often found at his day job at Fall's Edge, or else moonlighting at The High-Performance PC Guide.

Home | News | Features | Discussion | Contents | Contact Us | Search

Copyright © 1999 OS News