Last updated at 6:33 pm UTC on 9 July 2018
The virtual machine (VM) is an executable program you need to run the Squeak image.
- It has a Squeak mouse icon in your visual filer or directory viewer
- It is included in the base release
- It constitutes the platform dependent part of a Squeak system (even though most of the different VMs code is the same on all platforms)
- It is the binary executable for Squeak (on Windows platforms, it is the .exe file)
- see The Squeak Virtual Machine for info relating to the application aspects of the VM
Different types of Virtual Machines
image from: http://fast.org.ar/uploads/2016/11/Friday_16h00_Eliot_Miranda_Cog_in_Motion.pdf
An extract from A Tour of the Squeak Object Engine , by Tim Rowledge from Squeak: Open Personal Computing and Multimedia (ed. Mark Guzdial & Kim Rose, Prentice Hall)
"A Virtual Machine is a software layer that provides us with a pretense of having a machine other than the actual hardware in use. Using one allows systems to run as if on hardware designed explicitly for them.
Object Engine is less commonly used but is a useful concept that includes the lowest system areas of the language environment running on the VM. Since there is often some flux in the definition of which components are within the actual VM and which are part of the supported environment, Object Engine is useful as a more inclusive term. In Smalltalk we would usually include classes such as Context, Process, Number, InstructionStream and Class in the definition of Object Engine.
The term Virtual Machine is used in several ways. When IBM refer to VM/CMS they are referring to a way of making a mainframe behave as if it is many machines, so that programs can assume they have total control even though they do not. Intel provide a somewhat similar facility in the x86 architecture, referred to as Virtual Mode. This sort of VM is a complete hardware simulation, often supported at the lowest level by the hardware.
Another sort of VM is the emulator - SoftWindows for the Mac, Acorn's !PC, Linux's WINE are good examples - where another machine and/or OS is simulated to allow a Mac user to run Windows programs, an Acorn RiscPC or a Linux machine to run Windows98 programs and so on. Emulators of games consoles, such as Bleem, are also popular, if a little legally contentious.
Many languages and even applications, such as some popular word processors, are built on a VM. Various implemetations of the BASIC language are probably the most numerous deployed VMs. BASIC interpreters do not just interpret the BASIC language but have to provide a varying amount of runtime support code depending on the precise system. Perl is another popular language that uses a similar form of VM."
In addition to Squeak, almost all other Smalltalks run on top of virtual machines. Some other languages such as Java and even .NET are also based on virtual machines, but the concept goes back for decades. The Java VM supports only the Java language - the java bytecode is only a subset of the Smalltalk bytecode.
.NET supports many different programming languages compiled into a common language (called MSIL). Unfortunately the .NET VM and MSIL are designed for statically typed languages. It's hard to get dynamic languages like Smalltalk and scripting languages to run with reasonable speed on this VM.