How to build an interpreter VM from source on a typical Linux or Unix system:
Install development tools for your Linux system (32-bit libraries are not required).
Install CMake, either from your Linux distribution or from www.cmake.org
Install Subversion, either from your Linux distributiion or from https://subversion.apache.org/
Make a new, empty, directory for your work.
In that directory, download the full platforms sources from the Subversion repository. Download everything, whether you need it or not. The Subversion directory information will be used in the build process, so do not cut corners to save space.
$ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to date copy of source files generated from the Smalltalk source code in VMMaker. You can generate them yourself by loading VMMaker, but using the files from the Subversion repository is a faster way to get started.
$ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source code for the VM. Make another subdirectory called ./build that you will use to build the VM.
$ mkdir build
Change to the build directory.
$ cd build
Copy the example Makefile into your build directory.
$ cp ../platforms/unix/cmake/Makefile.example Makefile
Build the VM
$ make
Install the VM
$ sudo make install
You now have a VM that runs that classic Squeak image formats, including the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%20image/).
This is a traditional context interpreter VM. It will not run the latest high performance Spur image formats. Please refer to the Cog and Spur VM development at http://www.mirandabanda.org/cogblog/ and http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur VM development, and for VMs that support the new Spur image formats.
Dave
Hi,
On 13.04.2015, at 04:57, David T. Lewis lewis@mail.msen.com wrote:
How to build an interpreter VM from source on a typical Linux or Unix system:
Install development tools for your Linux system (32-bit libraries are not required).
Install CMake, either from your Linux distribution or from www.cmake.org
Install Subversion, either from your Linux distributiion or from https://subversion.apache.org/
Make a new, empty, directory for your work.
In that directory, download the full platforms sources from the Subversion repository. Download everything, whether you need it or not. The Subversion directory information will be used in the build process, so do not cut corners to save space.
$ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to date copy of source files generated from the Smalltalk source code in VMMaker. You can generate them yourself by loading VMMaker, but using the files from the Subversion repository is a faster way to get started.
$ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source code for the VM. Make another subdirectory called ./build that you will use to build the VM.
$ mkdir build
Change to the build directory.
$ cd build
Copy the example Makefile into your build directory.
$ cp ../platforms/unix/cmake/Makefile.example Makefile
Build the VM
$ make
Hang on, I thought this was all CMake now. Wouldn't I just do
cmake .. # or ccmake for that matter make # and so on
Install the VM
$ sudo make install
You now have a VM that runs that classic Squeak image formats, including the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%20image/).
This runs _both_ 32 bit images and 64 bit images? Nice!
This is a traditional context interpreter VM. It will not run the latest high performance Spur image formats. Please refer to the Cog and Spur VM development at http://www.mirandabanda.org/cogblog/ and http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur VM development, and for VMs that support the new Spur image formats.
Dave
On Mon, Apr 13, 2015 at 07:54:39AM +0200, Tobias Pape wrote:
Hi,
On 13.04.2015, at 04:57, David T. Lewis lewis@mail.msen.com wrote:
How to build an interpreter VM from source on a typical Linux or Unix system:
Install development tools for your Linux system (32-bit libraries are not required).
Install CMake, either from your Linux distribution or from www.cmake.org
Install Subversion, either from your Linux distributiion or from https://subversion.apache.org/
Make a new, empty, directory for your work.
In that directory, download the full platforms sources from the Subversion repository. Download everything, whether you need it or not. The Subversion directory information will be used in the build process, so do not cut corners to save space.
$ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to date copy of source files generated from the Smalltalk source code in VMMaker. You can generate them yourself by loading VMMaker, but using the files from the Subversion repository is a faster way to get started.
$ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source code for the VM. Make another subdirectory called ./build that you will use to build the VM.
$ mkdir build
Change to the build directory.
$ cd build
Copy the example Makefile into your build directory.
$ cp ../platforms/unix/cmake/Makefile.example Makefile
Build the VM
$ make
Hang on, I thought this was all CMake now. Wouldn't I just do
cmake .. # or ccmake for that matter make # and so on
It is all CMake. I just added a makefile to drive the overall process.
The CMake build process is described in platforms/unix/README.CMake
Install the VM
$ sudo make install
You now have a VM that runs that classic Squeak image formats, including the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%20image/).
This runs _both_ 32 bit images and 64 bit images? Nice!
Yes, this builds the executables for those image types (but not Spur of course). The /usr/local/bin/squeak script selects the correct executable based on image format number. If you look in your /usr/local/lib/squeak/ directory, you will see one subdirectory for the 32-bit images, and another subdirectory called <version>_64bit for running 64-bit images. From the user point of view, it looks like a single VM.
Dave
This is a traditional context interpreter VM. It will not run the latest high performance Spur image formats. Please refer to the Cog and Spur VM development at http://www.mirandabanda.org/cogblog/ and http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur VM development, and for VMs that support the new Spur image formats.
Dave
On 13.04.2015, at 14:19, David T. Lewis lewis@mail.msen.com wrote:
On Mon, Apr 13, 2015 at 07:54:39AM +0200, Tobias Pape wrote:
Hi,
On 13.04.2015, at 04:57, David T. Lewis lewis@mail.msen.com wrote:
How to build an interpreter VM from source on a typical Linux or Unix system:
Install development tools for your Linux system (32-bit libraries are not required).
Install CMake, either from your Linux distribution or from www.cmake.org
Install Subversion, either from your Linux distributiion or from https://subversion.apache.org/
Make a new, empty, directory for your work.
In that directory, download the full platforms sources from the Subversion repository. Download everything, whether you need it or not. The Subversion directory information will be used in the build process, so do not cut corners to save space.
$ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to date copy of source files generated from the Smalltalk source code in VMMaker. You can generate them yourself by loading VMMaker, but using the files from the Subversion repository is a faster way to get started.
$ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source code for the VM. Make another subdirectory called ./build that you will use to build the VM.
$ mkdir build
Change to the build directory.
$ cd build
Copy the example Makefile into your build directory.
$ cp ../platforms/unix/cmake/Makefile.example Makefile
Build the VM
$ make
Hang on, I thought this was all CMake now. Wouldn't I just do
cmake .. # or ccmake for that matter make # and so on
It is all CMake. I just added a makefile to drive the overall process.
The CMake build process is described in platforms/unix/README.CMake
Okee. :)
Install the VM
$ sudo make install
You now have a VM that runs that classic Squeak image formats, including the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%20image/).
This runs _both_ 32 bit images and 64 bit images? Nice!
Yes, this builds the executables for those image types (but not Spur of course). The /usr/local/bin/squeak script selects the correct executable based on image format number. If you look in your /usr/local/lib/squeak/ directory, you will see one subdirectory for the 32-bit images, and another subdirectory called <version>_64bit for running 64-bit images. From the user point of view, it looks like a single VM.
AAh I thought it actually was a bi-bit binary. (which would actually be usefull………)
Best -Tobias
Dave
This is a traditional context interpreter VM. It will not run the latest high performance Spur image formats. Please refer to the Cog and Spur VM development at http://www.mirandabanda.org/cogblog/ and http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur VM development, and for VMs that support the new Spur image formats.
Dave
David,
On Sun, 2015-04-12 at 22:57 -0400, David T. Lewis wrote:
How to build an interpreter VM from source on a typical Linux or Unix system:
How does the interpreter VM differ from the stack VM in the Cog branch? I'm familiar with what Cog and Spur bring to the table, but not how these older VMs differ. (or for that matter if I should even be considering these VMs 'older'... are there situations where they are still recommended on platforms where Cog, and now Spur, are supported?)
Thanks, Phil
Install development tools for your Linux system (32-bit libraries are not required).
Install CMake, either from your Linux distribution or from www.cmake. org
Install Subversion, either from your Linux distributiion or from https://subversion.apache.org/
Make a new, empty, directory for your work.
In that directory, download the full platforms sources from the Subversion repository. Download everything, whether you need it or not. The Subversion directory information will be used in the build process, so do not cut corners to save space.
$ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to date copy of source files generated from the Smalltalk source code in VMMaker. You can generate them yourself by loading VMMaker, but using the files from the Subversion repository is a faster way to get started.
$ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source code for the VM. Make another subdirectory called ./build that you will use to build the VM.
$ mkdir build
Change to the build directory.
$ cd build
Copy the example Makefile into your build directory.
$ cp ../platforms/unix/cmake/Makefile.example Makefile
Build the VM
$ make
Install the VM
$ sudo make install
You now have a VM that runs that classic Squeak image formats, including the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%2 0image/).
This is a traditional context interpreter VM. It will not run the latest high performance Spur image formats. Please refer to the Cog and Spur VM development at http://www.mirandabanda.org/cogblog/ and http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur VM development, and for VMs that support the new Spur image formats.
Dave
"How does the interpreter VM differ from the stack VM in the Cog branch? I'm familiar with what Cog and Spur bring to the table, but not how these older VMs differ. (or for that matter if I should even be considering these VMs 'older'... are there situations where they are still recommended on platforms where Cog, and now Spur, are supported?)
Thanks, Phil "
IIRC the difference is how Blocks are implemented with the Stack VM improving on the Interpreter VM. Block Closures vs Block Contexts are the terms you are looking for.
I have been away from it too long to comment on the matter, but that should point you in the right direction.
Hi,
2016-02-07 1:21 GMT+01:00 gettimothy gettimothy@zoho.com:
"How does the interpreter VM differ from the stack VM in the Cog branch? I'm familiar with what Cog and Spur bring to the table, but not how these older VMs differ. (or for that matter if I should even be considering these VMs 'older'... are there situations where they are still recommended on platforms where Cog, and now Spur, are supported?)
Thanks, Phil "
IIRC the difference is how Blocks are implemented with the Stack VM improving on the Interpreter VM. Block Closures vs Block Contexts are the terms you are looking for.
I have been away from it too long to comment on the matter, but that should point you in the right direction.
I am not sure this is correct. BlockClosures were introduced in the Interpreter first, before the StackVM was created. I don't know the current status but I think the interpreter VM either supports BlockClosures or both BlockContext and BlockClosures.
The main difference between the Stack VM and the Interpreter VM is that the contexts are mapped to a call stack in the stack VM for execution instead of being executed as context, the name Stack VM comes from this mapping (Btw I built a tutorial in smalltalk explaining both execution stack management if you are interested pm me). There are also little differences that Eliot introduced while building the StackVM such as nil, true and false are fixed at the beginning of the heap or primitive are cached in the global lookup cache by caching the function pointer instead of the primitive numbers. Is the gnuification part of the Interpreter VM too ? If not that's also a difference.
Anyway, today I think the Stack VM can run on any platform the Interpreter VM can. There are maybe cases where it can still make sense to use the Interpreter VM, but they are very specific and uncommon. Understanding the VM is perhaps the most notable case as the StackVM introduces quite some complexity.
Cheers
Clement
On Sat, Feb 06, 2016 at 05:21:32PM -0500, Phil (list) wrote:
David,
On Sun, 2015-04-12 at 22:57 -0400, David T. Lewis wrote:
?? How to build an interpreter VM from source on a typical Linux or Unix system:
How does the interpreter VM differ from the stack VM in the Cog branch? ??I'm familiar with what Cog and Spur bring to the table, but not how these older VMs differ. (or for that matter if I should even be considering these VMs 'older'... are there situations where they are still recommended on platforms where Cog, and now Spur, are supported?)
Thanks, Phil
Cl??ment's reply gives an excellent explanation of the difference, and Eliot's blog at http://www.mirandabanda.org/cogblog/ provides a wealth of in-depth information and explanations.
Functionally, you will not see much difference between a context interpreter VM and a stack interpreter VM. They are the same with respect to supporting closures and all of the latest primitives and plugins. The stack interpreter (and Cog and Spur, which are build upon the stack interpreter) provides support for high performance profiling. The context interpreter provides support for older image formats, and can be easily compiled as a 64-bit executable. But these are probably not important differences for most people. So in a nutshell - the interpreter VM is simpler, and Cog and Spur VMs provide higher performance. All of them work very well.
I assume that you are compiling your own VM (based on earlier questions on the Cuis list), so here is my advice: Try compiling both Cog and an interpreter VM. Once you get the 32-bit build environment set up, the Cog build should be problem free. Then install CMake and follow the "recipe" for an interpreter VM. That should be simple on a 64-bit platform, and will give you the 64-bit VM for 32-bit images that you were asking about in the earlier thread.
Dave
vm-dev@lists.squeakfoundation.org