Much of my work (as a technology guru at Oasis Digital) is around the intersection of the most current technology (such as Angular) with existing complex, valuable systems used by our customers. Recently an opportunity came up in which we may interact with some older software written in Smalltalk. I’ve used Smalltalk a bit some years ago, but many of the others at work have not.
To help our team understand a bit about Smalltalk, I demonstrated some of the basics (with Pharo, a surprisingly nice open source implementation) and spoke a while. At the end, someone pointed out that many of the words and the slides might be useful as a blog post for future reference.
What is Smalltalk?
History
- Advanced technology – from an earlier era
- http://worrydream.com/EarlyHistoryOfSmalltalk/
- Smalltalk-76, -80
- Byte magazine Smalltalk issue – see PDF available online; this issue seemed like sheer magic when I stumbled across it (already worn and tattered) in a library in the mid-1980s.
- In some ways Smalltalk was decades ahead of its time
- Descendant of “the mother of all demos”
- Predecessor of much of what we use today
- Alan Kay, 1971, “The best way to predict the future is to invent it.”
The basics
- One of the first OO languages
- (very) dynamically typed
- Everything is an object
- Syntax quite different from most of what we use today
- Runs on a virtual machine (like JS, Java, .NET, etc.)
- Contains many ideas that set underneath much of what we do
- Environment consists of many live objects, developer can manipulate
- Those live objects reside in an “image”, which can be persisted, shared, deployed
Implementations
Squeak
- http://squeak.org/
- Free, open source
- Appeared in the early 2000s
- … from some smart people at Disney
- Somehow become open source, a very rare thing at Disney
- Pretty similar to the original Smalltalk
- Its own UI, non-native, looks pretty non-native
- Cog VM http://www.mirandabanda.org/cogblog/about-cog/
SqueakJS
- https://squeak.js.org/
- Free, open source
- not what you might guess!
- Smalltalk VM, run in a browser
- Not very practical, too many layers of VM
Pharo
- http://pharo.org/
- Free, open source
- Fork of Squeak
- Generally newer, more polished look
- Old things cleaned up
- As far as I can tell, still using the same VM as Squeak, Cog VM
- Non-native UI, looks quite nice
VisualWorks
- http://www.cincomsmalltalk.com/main/products/visualworks/
- Commercial, expensive, supported
- Native UI, though perhaps not very “2017”
- Optimized in various commercial ways
Connecting to the world
Source control
- You don’t write Smalltalk as a pile of files
- Instead, manipulate classes etc, inside an image
- Tooling adapts this to a file structure…
- … when you then can put in source control for collaboration
- The result is a repository with numerous small files, which maps to and from native Smalltalk code
- Monticello – let’s look at it.
- Future thing – Iceberg – use this to understand the image-to-file mapping. https://github.com/pharo-vcs/iceberg
Files
Smalltalk runs in an image, but many/all implementations also provide all the primitives you need to talk to files.
Networks
Many/all implementations also provide all the primitives you need to talk to networks, plenty of protocols, etc.
(server-side) web apps
- Seaside.st http://seaside.st/
- (others, I’m sure)
(single-page) web apps
- Nothing that I know of, to write these in Smalltalk
- … but an Angular or other modern web UI could sit on a Smalltalk server
Databases
There are:
- Drivers for SQL databases
- Drivers for NoSQL databases
- Object databases written in Smalltalk
Human factors
Community
There is one. I’m not in it. Who uses Smalltalk today?
- (ancient?) gurus
- Financial companies making zillions
- Complex manufacturing control
- Insurance
- Research / university / learning
- https://montykamath.wordpress.com/smalltalk-companies/
- http://stackoverflow.com/questions/711140/why-isnt-smalltalk-popular
Learning more
- https://www.youtube.com/channel/UCp3mNigANqkesFzdm058bvw
- MOOC
- Books
- Fair amount of code on Github and elsewhere