Let the Fin Begin
Dr. Dobb's Journal January 1999
By Michael SwaineMichael is editor-at-large for DDJ. He can be contacted at email@example.com.
January 1999. The countdown begins. This is the last year of the second millennium anno Domini. Well, the next to the last, according to the pedantic, a group to which I have a lifetime membership. But the chance of convincing the world before the year 2000 that their millennium clock has a fencepost error is slightly less than the chance of getting Americans to convert to the metric system before the year 2000. On the other hand, I expect the metric scenario probability to ramp up after Inauguration Day 2001 if Al Gore is the victim chosen for induction into the pantheon. Al strikes me as a metric kind of guy. I say victim because, given what we Americans put our Presidents through, whoever gets tapped for the job deserves a complementary cup of hemlock and the traditional Mr. T salute: I pity the fool. We should probably incorporate the salute into the inauguration ceremony.
But I was talking about the countdown.
This is the none too soon tag end of the '90s, the beginning of the end of the 1900s, the final fin de siècle of the 1000s, a real page-turner, calendarwise, the temporal interface during which the first half-century of the computer and the nuclear age and the United Nations all breathe their last puff and Everything As We Know It does a slow dissolve to be replaced by Something Remarkably Similar. The more things change, the French say, although they say it in French of course, the more they don't.
Which may or may not justify my eschewing any coverage of Java in this month's column in favor of a language that looked hot 20 years ago and, to some, still looks like a better Java than Java.
Which I will get to after a few other items, including this culture note:
"The more things change, the more they don't" could be the theme of Matt Groening's new television series "Futurama," starting this month on Fox. I considered reviewing the first episode of "Futurama" for this month's column, but was deterred by three considerations:
Count Down to 2000You may know the name Dave Caulkins.
I am always impressed by the number of people I meet at industry events who claim to have read Dr. Dobb's since the earliest days. Either the early readership exceeded the recorded circulation by several orders of magnitude or readers long in the tooth and gray in the beard selectively seek me out at such events for some unknown reason.
Those long-tooths who have been with us for more than a decade may recognize Caulkins' name from his review of Jef Raskin's SwyftCard, a remarkable user interface invention that, despite Dave's review, failed to take the industry by storm.
Others may know Caulkins for his work with Computer Professionals for Social Responsibility or GlasNet. He gets around.
Even those of you just beginning to realize that I'm not talking about the kid in Home Alone may find the following interesting. Caulkins' latest big idea involves using retired ballistic missiles to produce spectacular fireworks displays consisting of tens of thousands of artificial meteors that would fill most of the night sky over major world cities.
He thinks it would be a great way to celebrate the millennium.
Brilliant PebblesThe most expensive parts of the plan -- the rocket engines, guidance computers, and control systems of the missiles -- are already paid for (by your tax dollars) and slated for destruction anyway. All that is required to make a fireworks display to end all fireworks displays is to replace the warheads -- don't want to forget this step! -- with "peaceheads" -- tens of thousands or hundreds of thousands of artificial meteors.
The artificial meteors would be dispersed by a small chemical explosion at the right moment, and would spread out to form a cloud several miles in diameter visible from anywhere within a circle of perhaps a hundred miles around what Caulkins unnervingly calls "ground zero." The display would fill most of the sky over the, um, target city. Artificial meteors would require no fuels or oxidants to produce their colored trails, because, as Caulkins points out, "any mass entering the atmosphere at a velocity of about 11 kilometers per second has potential energy 15 times greater than an equivalent mass of a high explosive." Plenty of energy there. Traveling at supersonic speeds, an artificial meteor could supplement its visual appeal with a nice sonic boom.
Caulkins suggests a mass of 10 grams for the artificial meteors, about 10 times the size of the average visible natural meteor. Or maybe 50 or 100 grams. Along with the right color additives (copper for blue, strontium for red, barium for green, sodium for yellow), this should result in some really impressive meteor trails.
"This project fits the current international political climate," Ted Kaehler, a promoter of the plan, says. "Both we and the Russians have agreed to destroy lots of ballistic missiles of various types. What better way to verify destruction than putting on beautiful displays for the citizens who paid for the missiles?"
The cost, he argues more or less convincingly, would not be much greater than the cost of conventional fireworks displays, and could be underwritten by producers of films, music videos, and rock concerts, who could be given rights to films and videos of the pyrotechnics. Let the fin begin.
You can dig into the pyrotechnicalities of the Millennium Meteor Fireworks project at http://www.webpage.com/ ~kaehler2/fireworks/index.html.
Smalltalk, the argument might run, made object-oriented programming real. It arrived on the scene with a mature class library and culture. It was the real thing, the Amber of which all other realms are but shadows.
Java arrived with compromises and impurities built in. "As the Java class library from Sun gets bigger and bigger," one developer has said, "it gets harder and harder to move off old mistakes; they're built in." He admits that Java is a necessity in today's software world. "But sometimes it hurts me to use it."
Java is getting better all the time, along some dimensions. But it will never become what Smalltalk is. On that dimension, it's not even moving in the right direction.
One not only could argue that; one did argue that. The main points of the above argument, and all the quoted remarks, are from Steven T. Abell, software designer and proprietor of http://www.brising.com. Steven previously held the title of Java Technology evangelist at Netscape.
A Small Platform for SmalltalkBut what can you use Smalltalk for? Most programming jobs these days seem to fall into one of two bins -- Must Be Written in C/C++ or Must Be Written in Java. Where is the Could Be Written in Smalltalk bin? Maybe it's that hot new area of development, Palm apps. Comes now Pocket Smalltalk, an implementation of Smalltalk for the Palm or PalmPilot devices, consisting of a development environment that runs on Windows 95/NT and a cross-compiler that can generate "executable" .PRC files from Smalltalk source.
Pocket Smalltalk requires a 20-KB virtual machine on the Palm device, and the executables are small. A "Hello World" program takes up about 5 KB. It has occurred to some developers that a 20-KB VM is smaller than a lot of JPEGs and could easily be downloaded to a web browser along with the executable. It will immediately occur to you that this raises security issues, but we're talking about a Palm device here, not a desktop PC with a hard disk full of data.
Pocket Smalltalk is being developed as open-source software. A good source of info on Pocket Smalltalk can be found at http://www.tiac.net/users/ajb/pocketst, where you can also download the latest version.
Don't Call It a Mickey Mouse LanguageOr you can download a more serious and more portable Smalltalk. This implementation is from some of the big names in Smalltalk, and is called Squeak. The UIUC Squeaksite seems to be under destruction, but one of these should be stable: http://c2.com:8080/WelcomeVisitors or http://www.webpage.com/~kaehler2.
Apple obtained a license to Smalltalk in 1980, and a team at Apple developed Squeak in 1996 based on ST-80. Some of that team is now working for Walt Disney Imagineering, including Alan Kay, Dan Ingalls, and Ted Kaehler, and some of the developments in Squeak are coming from there. The name, apparently, came from Disney, too.
Squeak takes the free and open software concepts very seriously. Squeak is free, basically in the public domain, subject only to a license intended primarily to keep it open. You can change or extend Squeak, build an application in Squeak, or include some or all of Squeak with your products. You can distribute some or all such changes or extensions or apps along with Squeak, or portions of Squeak, for free or for money. All the license requires is that, if you modify Squeak or port it to another platform, you make the mod or port available to anyone who wants it.
One of the philosophical principles of Smalltalk is openness: Everything is available to see, understand, modify, and extend for whatever purpose. "You control the bits all the way down," as Ted Kaehler puts it. "Write your own new classes. The methods (programs) you add have all the privileges and powers of system methods." Squeak extends that philosophy to include even the VM. You can examine the source code for every part of the system, including the graphics primitives and the virtual machine.
And Squeak is very portable. The currently available ports include Windows 95/NT, MacOS, Sparc SunOS 4.1, Sparc Solaris 2.5, i586 Linux 1.3, hppa HPux 9.1, SGI Irix 6.2, DEC Alpha OSF 3.0., various PDAs (Cassiopeia, HP320LX, Zaurus MI-506, and others), Win CE, AcornRiscOS, OS/2, DOS, BeOS, and Next. The PDA ports use a mini version of Squeak 2.2. Squeak runs bit-identical images on any platform to which it has been ported. Any image file will run on any platform no matter what platform it was saved on, no matter what operating system (since this is Smalltalk, that includes no operating system at all).
A Peek at SqueakSqueak, its fans say, is the premier implementation of Smalltalk available today. Here are some details about the latest implementation: The classical ST-80 interpreter is updated with a 32-bit direct-pointer object memory and incremental garbage collector. A BitBlt graphics system supporting 1-, 2-, 4-, and 8-bit indexed colors, as well as 16- and 32-bit RGB colors, is standard. It also includes a "warp drive" that supports simple antialiasing and fast rotations and other affine transformations. There's support for 16-bit sound input and output, and for sockets and general network access.
Squeak Version 2.2 includes a web browser and mail client, plus other goodies.
Squeak is strict about object orientation. Even control structures are implemented as message patterns. To get the effect of an if-then or case structure, Squeak uses ifTrue:, ifFalse:, and ifFalse: ifTrue: messages. To loop, Squeak uses whileTrue:, whileFalse:, and timesRepeat: messages, among others.
The Squeak fans have a good answer to those who raise questions about support. All open-source software gets the support question: If there's no big company with 800 lines and service contracts behind this, where do I get support?
The Squeak answer is that support is a crutch.
Each Squeak release includes everything about itself -- the image, the virtual machine. You get the complete source code for literally everything. This gives you power. Who needs support when you have control over your destiny?
Squeak is good technology and a great deal.
The question remains: Where does it fit in a world dominated by C/C++ and Java? I firmly believe that diversity in programming paradigms is a good thing, that a pure object-oriented model should at least be preserved as a point of comparison with existing impure OOPS, and that C/C++ and Java are not the best tools for all jobs. The trouble is, the first two points do not provide any reason why you or I should use Squeak or any other language not starting with C or J, and the last point does not compel on its own.
So the question remains. Maybe you have an answer?
Who Links to MeHere's a cute Web gizmo.
Go to the Crit site at http://www.crit.org. Type any URL and browse around from there. (You might want to start by looking at the examples that the Crit site supplies.)
What you see at the bottom of the page are any comments that others have made on the page you are currently viewing. The Crit site supplies software that lets people work collaboratively on the Web, commenting on each others' work.
This seems very useful. It was created by Ka-Ping Yee of the Foresight Institute.
Now look at the top of the page. There's an option here called Crit Map for viewing the current page's Web neighborhood graphically. This doesn't just show the forward hierarchy of links from this page; it also shows you the links to the page. Click on one of the To or From links and the whole graph reshapes itself before your eyes, putting the new page in the center and its To and From links around it.
Cute. Maybe too slow to be very useful, at least on my connection and system, but definitely interesting.
Copyright © 1999 Dr. Dobb's Journal