
Interpreter for the original Xerox Smalltalk-80 virtual image (C++/Qt) - Rochus
https://github.com/rochus-keller/Smalltalk#a-smalltalk-80-interpreted-virtual-machine
======
Rochus
Author here. This bytecode interpreter is the continuation of my already
published Class Browser and Virtual Image Viewer (see
[https://news.ycombinator.com/item?id=22451077](https://news.ycombinator.com/item?id=22451077)
and
[https://news.ycombinator.com/item?id=22584364](https://news.ycombinator.com/item?id=22584364)).
The interpreter is able to directly run the original Xerox Smalltalk-80 v2
VirtualImage file (i.e. the unmodified file as provided by Xerox in May 1983);
it complies with the Blue Book part 4 implementation and reproduces the trace
files and screen output according to the manual. I use it to study the dynamic
behavior of the VM; the goal is still to have an implementation based on
LuaJIT, if feasible; a Win32 binary is available for download (Linux and Mac
versions can be provided if need be).

~~~
jecel
Great job!

After Squeak changed its license from the original Apple one to Apache it
still wasn't accepted as free software by Debian because of a lack of C based
tools to examine the image. A Virtual Image Viewer like yours would have
solved that (specially if it could compare two images).

~~~
Rochus
Thanks. It's work in progress since I currently implement a transpiler from ST
to LuaJIT bytecode which will hopefully result in a substantial speedup. The
current interpreter runs decently fast on modern machines though and looks and
feels like ST80 in the old days.

Also note that Squeak is not compatible with ST80 in both the bytecode and
object memory format. If I succeed with my LuaJIT based implementation (i.e.
if it performs better than Cog or the Graal or RPython version) I might try to
make it compatible with Squeak or Pharo.

~~~
jecel
The evolution from Apple Smalltalk to Squeak did change the object memory
quite a bit but only added a few bytecodes. The Cog project added even more to
the bytecodes in several steps (specially with the change of blocks into
proper closures) and more recently moved to a very different object memory
called Spur.

~~~
Rochus
Do you happen to have specifications of the bytecodes, primitives and object
memory format compared to the Blue Book? I only have a plethora of (outdated)
papers and presentations, nothing systematical.

~~~
jecel
The best documentation is inside Squeak itself, specially very early ones. In
later version the VM code was spun off as an external VMMaker package that you
have to explicitly load.

This 2008 post in Eliot's blog shows the first changes he made to Squeak's
bytecodes:
[http://www.mirandabanda.org/cogblog/category/cog/page/15/](http://www.mirandabanda.org/cogblog/category/cog/page/15/)

~~~
Rochus
Thanks.

~~~
jecel
Here is a 2016 paper about the changes to the OpenSmalltalk bytecodes:

[https://rmod.inria.fr/archives/papers/Bera14a-IWST-
BytecodeS...](https://rmod.inria.fr/archives/papers/Bera14a-IWST-
BytecodeSet.pdf)

------
xkriva11
Is it legal to distribute this Smalltakl-80 V2 image and sources or do you
expect it to be just an abandonware?

~~~
Rochus
Good question. I assume this is a proper application of the "fair use"
principle, since the use of the image and sources is of non-commercial,
nonprofit nature and for educational purpose (preserving and studying the
historical Smalltalk-80 implementation). And the copyright owner's ability to
profit from his original work is not harmed. Otherwise I'm sure the copyright
owner would complain.

------
jcelerier
smalltalk implemented in c++, Alan Kay isn't even in his grave yet and still
must already be spinning :)

~~~
Rochus
They implemented their VM even in Assembler and microcode in the seventies, so
C/C++ was a step forward.

~~~
jcelerier
yes, just referring to his famous quote : "I invented the term Object-
Oriented, and I can tell you I did not have C++ in mind." :p

~~~
igouy
10:33 actually I made up the term

10:35 object-oriented and I can tell you I did

10:38 not have C++ in mind

10:41 [Applause]

10:49 so the important thing here is I have

10:54 many of the same feelings about small

10:57 talk

[https://www.reddit.com/r/node/comments/a02suz/the_forgotten_...](https://www.reddit.com/r/node/comments/a02suz/the_forgotten_history_of_oop/eahi1zi/)

