A Modern Smalltalk

In the history of object-oriented (OO) computer languages, Smalltalk has a special place. It wasn’t the first OO language, and it hasn’t spread as well as some others. But it was the first OO language many people encountered, and it influenced many other languages you’ve probably seen. Developed at the famed Xerox PARC, it also introduced many people to the “model/view/controller” (MVC) architecture. Cuis Smalltalk is a free and portable modern Smalltalk-80 environment. It replaces the traditional MVC framework with Morphic, but otherwise, it would be very familiar to someone who used Smalltalk in the 1990s. The project’s goal is to stay simple at the core, although you can add complexity via packages.

The software has been around for a while, but it is on a rolling release model, so the install page suggests you clone the Git repo. You can, however, get a stable release, which might be important if you were deploying applications. Running the program results in a Cuis desktop where you can open various things like workspaces, help documents, and the transcript.

Smalltalk throws some people because it takes OO to an extreme. For example, you don’t add two and three using an operator. You send the object two a message that includes another object, three. You can think of sending a message as calling a method on an object. As with virtual functions in C++, different objects can respond differently to the same request. For example, an Animal class might have a speak message that causes a cow to print “moo” and a chicken to print “cluck.”

You get used to it, and there’s a very nice class browser that lets you examine classes and what you can do with them. There are even packages to work with an Arduino over a serial port. They haven’t been updated lately, so they might (or might not) need a little work.

We’ve looked at GNU Smalltalk before. We’ve also seen a version that runs directly on a Raspberry Pi.

14 thoughts on “A Modern Smalltalk”

    1. In theory, yes-ish (with 1MB RAM via some complex bank switching). In reality Smalltalk is rather bulky (from a 80’s point of view) and I don’t see away of running effectively on a 6502 chip.

    2. Digital Smalltalk/V ran on a 4.77 MHz 8088 PC with 768k. But the PC was limited to 640k… So every now and then while it was running, it would burp (literally play a sound effect), write out some of RAM to disk, and read something else in.

      1. And it ran acceptably, a usable product.

        It is inside some HP products made in Coloraro Springs.

        Tektronix had their own Smalltalk, used in workstations and buried inside some scopes.

        Hardware engineers picked up OOP much faster than softies, and ran with jt.

  1. Wrote a lot of code in the ‘90s for Smallworld GIS in Magik, a Smalltalk variant. Took a while to learn. It’s now a GE product.

  2. Apple’s Smalltalk on a fat mac is glacially slow. It predates L Peter Deutsch’s seminal JIT interpreter.

    Nonetheless it was sufficient in 1986 to convince me that OOP was the way forward, unlike Prolog or LISP.

  3. Cuis might not run on a 6502, but it works well on a Bananapi, a Bananapi m2zero and my now 18 year old NC-10. Full graphical integrated environment with 512 MB to 1GB and still room for your application. I fixed the firmata package and put some extras on top of it, like I2C and firmata net. So cuis should be ready for the makerspace.
    I still have Digitalk Smalltalk V and Objectworks Smalltalk for Windows 3.0 in my bookshelf ;) … waiting to be installed on some hardware again.

  4. Check out https://cuis.st

    Cuis is a small, hand crafted Smalltalk, which makes it easier to learn
    https://github.com/DrCuis/Explanations/tree/main/200-Why-Cuis

    Scalable vector graphics, unicode, Morphic Ui, plenty of useful development tools, runs on MacOS, Linux, Windows, OpenBSD, QNX, .. Save a working image and run it, windows in the same locations, pixel per pixel on x86, arm64, riscv64 — the definition of portable.

    Try it. You may just like it!

    -KenD

  5. Some larger context: Cuis is a fork of Squeak (https://squeak.org/) which was a research Smalltalk developed by the original Smalltalk team in the mid-90s. The VM (i.e. bytecode interpreter) is actually written in Smalltalk itself (well, a highly-specific subset of it) and gets translated into C. This way, you can code and debug it in the Smalltalk dev environment (which is *very* nice) and once it’s reasonably reliable, produce an actual runnable interpreter. That project is at https://github.com/OpenSmalltalk/ .

    There’s also Pharo (https://pharo.org/) which is also a fork Squeak aimed (AIUI) at more serious development.

    Smalltalk is a really cool language. The entire thing is written in itself. That includes the bytecode compiler and windowing system. It’s all code that you can browse and modify from the IDE and watch the changes take effect immediately. The whole thing is explorable.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.