Author here, feel free to ask any questions you have :).
It's amazing this little project shows up again here. So far, I received a lot of very positive and friendly feedback about this little pet project of mine.
The whole project would not have been possible without the work of Rene Stange, who created the circle bare-metal library for the Raspberry Pi (https://github.com/rsta2) and Dan Banay, who created a C++ implementation of the Smalltalk-80 VM (https://github.com/dbanay/Smalltalk). I mostly hacked together some glue code...
If you want to dig deeper, the Blue Book by Adele Goldberg and David Robson (scan provided by Stephane Ducasse, thanks a lot!) is _the_ reference on both the language and the structure and implementation of the underlying bytecode VM: http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook....
Beware, though it's fully functional, crosstalk is still limited by constraints of the original Smalltalk 80 system - e.g. in terms of color (black and white only), possible screen resolution (2^20 pixels, the system crashes if you try to increase the resolution beyond this) and available memory (~1 MB!).
Nevertheless, I think it's a rather authentic reproduction of a more than 40 year old system and I learned (in a comment thread on a completely different topic) that one of our fellow hackernews regulars used it to teach his kid Smalltalk programming - love it! I haven't tried to optimize it significantly, so there's no JIT compiler or bitblit acceleration using the Raspberry Pi GPU.
There's a more modern bare-metal Smalltalk implementation based on Squeak (https://squeak.org) for the Raspberry Pi by Pablo Marx, though this seems to have some stability problems according to the author: https://github.com/pablomarx/RaspberrySqueak
Finally, if you are interested in alternative bare-metal language/OS environments for the Raspberry Pi, you could also give Lukas Hartmann's (of MNT Reform notebook fame) Interim OS a try: http://interim-os.com
> Beware, though it's fully functional, crosstalk is still limited by constraints of the original Smalltalk 80 system - e.g. in terms of color (black and white only), possible screen resolution (2^20 pixels, the system crashes if you try to increase the resolution beyond this) and available memory (~1 MB!).
I would imagine it would be less work to start with an early Squeak to remove these constraints than to try upgrading this system to remove these old limits?
I wanted to keep the system as close to the original as possible, but some extensions such as increasing the available memory space and screen resolution would be nice even for the original system. It would also be interesting to implement the early ideas for a JIT compiler.
Starting with Squeak is probably the easier way if you want advanced features such as color or network connectivity - still, there might be some interesting ideas to improve the system. One idea I had was to accelerate the bitblit functions using the Raspberry Pi's GPU. Currently, crosstalk uses a simple framebuffer and the runtime has to convert all monochrome bitblit operations into color ones since the Raspberry GPU doesn't have a 1bpp mode.
Support for multiple cores (available in all but the most simple Raspberry Pis) would also be nice. Here, the Roar system (https://github.com/smarr/RoarVM) might be an interesting starting point.
Let's see if I can find some students who want to work on some of these tasks... but my students are nowadays rather interested in Rust and RISC V :) (though a port of crosstalk to the Allwinner D1/Nezha and related boards and JH7110/Vision Five 2 is on my to-do list).
Thanks for the great links and background. I had a couple of questions:
I'm guessing The Blue Book is "thee" book for learning Small Talk then? Are there other resources folks would recommend as well perhaps other books or online resources?
Regarding the bytecode VM, was this one of the earliest languages that ran in its own bytcode VM then? Was this as innovative as it sound for the time? Did it have JIT optimizations as well?
I learned Smalltalk-80 from the blue book after getting the basic ideas from the August 1981 issue of Byte magazine. The book has four parts:
1) the basic ideas behind the language
2) a reference for all the classes
3) a detailed example in the form of a framework for event based simulation
4) a reference implementation of the virtual machine
It was later released as the purple book without part 4 for people interested in learning Smalltalk-80 but not in implementing it.
The link for the blue book is from Stéphane's collection which includes many other books, including ones that some people might find easier to learn from:
The original Smalltalk-80 VMs (Xerox and others) did not have JIT. Deutsch and Schiffman did the 1st JIT one (PS) that was the parent of the ParcPlace HPS VMs.
The paper describing this first Smalltalk JIT is available at ACM (all ACM papers published before the end of 2000 are open access now):
L Peter Deutsch and Allan M. Schiffman, Efficient Implementation of the Smalltalk-80 System, POPL '84: Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Ah neat, this is fascinating. I had never really thought about where they actually came from. I suppose I just assumed it was Java. For anyone else who is curious - the roots of bytecode are in the BCPL compiler and the intermediate O-codes it generated:
It should be noted though that bytecode from that era would often be represented as text rather than binary in storage. If I remember correctly, UCSD p-code was literally just numbers spelled out in text with spaces between them - something that could be conveniently read by just about any language and system around, usually via a primitive like Pascal's own Read function, or BASIC's INPUT.
It makes it that much easier to move from platform to platform when there's no agreement on things that we take for granted these days, like number of bits in a byte etc. But that also makes it harder to recognize what you see when you're used to binary bytecode like JVM or CIL.
There are a lot of famous persons involved in the history of Smalltalk, without who we would have nothing to write about here.
Alan Kay was certainly the driving force, but let's not forget Dan Ingalls, Adele Goldberg, Ted Kaehler, Diana Merry, Scott Wallace, and Peter Deutsch (who is also the founder of Aladdin Enterprises and creator of Ghostscript) - and all others I forgot to mention here...
One other very important person related to this endeavor is Mario Wolczko, who ported Smalltalk 80 to the Perq workstation (his master thesis at Manchester University) and extracted and distributed the Smalltalk 80 VM image - see http://www.wolczko.com/st80/. Later, Mario worked on the SELF language (and many other projects, of course) at Sun Labs.
I still haven't managed to set up the automated test environment on different Raspberry Pi models, this might be an interesting project for one of my students...
I love ST the language, I like ST the image but I hate the tight coupling to the antiquated UI. I know there’s GNU ST but I wish there were more options. I also wonder how difficult it would be to create a modern IDE integration with GNU ST with something like IntelliJ, Eclipse, Net Beans or VS Code.
I'm looking at it myself from the other end: one of the most interesting ideas from Smalltalk, Oberon, Plan9, etc. was having text be executable as programs in a text editor. It's to a visual editor as a command line shell is to a line editor.
I've heard it called an 'integrating development environment,' a system where all the tools to use it like an IDE are there.
I’m fairly confident executable text as well the other functionality of current smalltalk systems can be implemented within a modern IDE framework. What needs updating are the UI components, views, layout, etc. For example, I can envision a left hand tree component for the display of packages/classes/protocols/methods the same way it’s done for for almost every other language.
Could the modern IDE paradigm be approximated within current Smalltalks? Probably, but pulling that off in Squeak or Pharo seems like the wrong approach. Also, deployment of server side applications is more cumbersome in Squeak or Pharo than with GNU Smalltalk.
It means that it runs without an underlying operating system (so it doesn't require Linux etc.), so the Smalltalk VM (or, to be precise, the circle runtime) acts as the OS.
Smalltalk is a programming language (+runtime, GUI, development environment) that originated at the Xerox PARC research center in the early 1970s on the Alto computer. Smalltalk was one of the first object-oriented systems (along with the Norwegian Simula system), it differs from Simula/C++-style OO due to using dynamic dispatch (late binding), i.e., selecting which implementation of a polymorphic operation (method or function) to call at run time instead of at compile time.
It had significant influence on the development of the personal computer. Projects at Apple (Lisa/Mac) and Microsoft (Windows) were influenced by the Smalltalk GUI and Smalltalk was also the basis for Objective C, the language behind the NeXT/MacOS/iOS UI frameworks - now on the way to be supplanted by Swift.
All Xerox PARC environments (Interlisp, Smalltalk, Mesa, Cedar) were bytecode based, because their CISC CPUs were microcoded.
So the first thing a machine would do on boot would be to load the right microcode into the CPU, and then those bytecodes were effectively the Assembly language for the CPU.
They were also the genesis of the first JIT compilers, and the OpenJDK Hotspot traces back its heritage to StrongTalk JIT compiler.
One slight difference from current microcoded CPUs is that the end user could implement their own microcode. So each of the systems you mention above implemented their VMs directly in microcode, and as a result tye bytecode became the instruction set for this 'virtual' machine.
>"Smalltalk is a programming language (+runtime, GUI, development environment) that originated at the Xerox PARC research center in the early 1970s ..."
I'm curious was it used as a standalone OO language outside of GUI development as well or was its primary focus for building graphical UIs?
One example is NXTalk, a Smalltalk system (with its own VM implementation that differs from Smalltalk-80) developed in Robert Hirschfeld's research group (hi Michael! :)) at HPI. NXTalk runs on second generation (ARM7-based) Lego Mindstorms robots in 64kB RAM and 256kB Flash:
I find an sample of Smalltalk is one of the most interesting ways to see how it flows as a language, as its grammar almost reads like English. From Wikipedia [1], this is a piece of Smalltalk code:
> 3 receives the message "factorial" and answers 6
> 4 receives the message "factorial" and answers 24
> 6 receives the message "+" with 24 as the argument and answers 30
> 30 receives the message "between:and:" with 10 and 100 as arguments and answers true
The thing I love about smalltalk is that the language grammar has about 7 rules in it and everything else is defined as passing messages to objects.
Want to add a method? You send the class a message and pass it a block with the method contents.
Want define a class? You send the parent class the subclass message.
Want an if statement? You evaluate a Boolean in a block and send it the ifTrue or ifFalse messages.
It means that sometimes it reads a bit strange, but there's a purity to it I love. Plus if you don't like it you can just define your own methods - for example I once did an (unfinished) library for GNU Smalltalk that gave it a more traditional if statement and loop constructs.
glacials made a typo that makes their explanation harder to folow. The correct smalltalk is:
3 factorial + 4 factorial between: 10 and: 100
And the point about it reading like English is that because the syntax relies heavily on their fancy precedence rules you can make complex expressions without needing parentheses I think. It looks like the compiler magically knows what is meant by the expression, but the reality is that you need to be very aware of the grammar to be able to write it. It does look pretty in my opinion, but definitely opaque to someone not aware of the rules.
Is 3 factorial plus 4 factorial between 10 and 100?
The precedence rules are: unary > binary > keyword. That's it. Various criticisms have been levelled at Smalltalk, but it's a very long stretch to claim that it is difficult for humans to learn.
Really it is a shame that lots of people on tech have never hear of Smalltak. It is in my humble opinion the most influential language ever created. Ask anyone who played with Smalltak in the 80's and they will say the same: "I never ever will have the sensation of power and confidence that Smalltak provided".
I think “most influential” is debatable. In the space of OO languages that found widespread adoption, more seem to be influenced by the Simula-C++ lineage (notwithstanding counterexamples like Objective-C and Ruby).
The problem is that the certificate is issued for multicores.org, but not for www.multicores.org. Removing the "www." from the URL makes it work. You need to have the certificate issued for all subdomains you want to use it for (or for a wildcard subdomain).
nothing is wrong with your certificate, it's just self signed and browsers don't support that correctly. They just show the same unsecure usual message.
You're correct, but I seem to remember that I configured a letsencrypt certificate for nginx, which should be recognized as fully verified as far as I know.
It's amazing this little project shows up again here. So far, I received a lot of very positive and friendly feedback about this little pet project of mine.
The whole project would not have been possible without the work of Rene Stange, who created the circle bare-metal library for the Raspberry Pi (https://github.com/rsta2) and Dan Banay, who created a C++ implementation of the Smalltalk-80 VM (https://github.com/dbanay/Smalltalk). I mostly hacked together some glue code...
If you want to dig deeper, the Blue Book by Adele Goldberg and David Robson (scan provided by Stephane Ducasse, thanks a lot!) is _the_ reference on both the language and the structure and implementation of the underlying bytecode VM: http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook....
Beware, though it's fully functional, crosstalk is still limited by constraints of the original Smalltalk 80 system - e.g. in terms of color (black and white only), possible screen resolution (2^20 pixels, the system crashes if you try to increase the resolution beyond this) and available memory (~1 MB!).
Nevertheless, I think it's a rather authentic reproduction of a more than 40 year old system and I learned (in a comment thread on a completely different topic) that one of our fellow hackernews regulars used it to teach his kid Smalltalk programming - love it! I haven't tried to optimize it significantly, so there's no JIT compiler or bitblit acceleration using the Raspberry Pi GPU.
There's a more modern bare-metal Smalltalk implementation based on Squeak (https://squeak.org) for the Raspberry Pi by Pablo Marx, though this seems to have some stability problems according to the author: https://github.com/pablomarx/RaspberrySqueak
Finally, if you are interested in alternative bare-metal language/OS environments for the Raspberry Pi, you could also give Lukas Hartmann's (of MNT Reform notebook fame) Interim OS a try: http://interim-os.com