1

Is there an archive somewhere that hosts the Slang sources for SqueakVM as a zip of .st sources? I want to just download them rather than attempting to coerce VMMaker to load into a running ST image and filing them out myself? I'm not trying to avoid this out of laziness, but because finding a set of instructions that actually work on a modern ST like Pharo amongst 30 years of archived discussions and dead links is apparently beyond me.

I have the bluebook, but it's pre-squeak, and not OCR'd either so I'd have to type it all in by hand.

To clarify: I don't want to run VMMaker. I don't want to build a new SqueakVM, I just want to be able to open the Slang sources for SqueakVM not Cog in a text editor and read them.

Sophistifunk
  • 4,742
  • 4
  • 28
  • 37

4 Answers4

4

All Slang source bar recent releases of the Pharo fork is in the VMMaker package on http://source.squeak.org/VMMaker, project page http://source.squeak.org/VMMaker.html. Source packages consist of zip archives named .mcz, e.g. http://source.squeak.org/VMMaker/VMMaker.oscog-eem.839.mcz:

Archive:  package-cache/VMMaker.oscog-eem.839.mcz
  Length     Date   Time    Name
 --------    ----   ----    ----
       16  07-30-14 19:41   package
   724852  07-30-14 19:41   version
  7186510  07-30-14 19:41   snapshot/source.st
  7562064  07-30-14 19:41   snapshot.bin
 --------                   -------
 15473442                   4 files

However, as Nicolas Cellier says, accessing the source through Monticello is easier; for that you'll need to build a Squeak or Pharo image containing the loaded VMMaker and supporting packages. You'll also be able to run the VM simulator there-in to really explore it properly.

Scripts to build VMMaker images for the Cog branch are in the following svn directory, a part of the Cog svn source tree which contains generated sources from Slang, platform support code and build directories, in addition to the image directory:

http://www.squeakvm.org/svn/squeak/branches/Cog/image/
    BuildSqueakTrunkVMMakerImage.st

The Cog VM is the fast JIT VM for Squeak. I am its principal author. My web site for Cog is http://www.mirandabanda.org/cogblog/. The site contains several blog posts that describe the VM, download directories for VM builds, an overview of the project, etc.

HTH

Eliot Miranda
  • 291
  • 2
  • 5
2

I can't help you with the sources directly but I can give you a recipe on to how to build the PharoVM for OS X (10.9). To get the Slang sources you probably don't even need to build the VM fully but only need to do what the README on github says to generate the sources (which is equivalent to step 1 in what follows).

  1. follow instructions on https://github.com/pharo-project/pharo-vm
  2. in the image, uncomment the debug line in PharoVMBuilder>>buildMacOSX32
  3. in the image, remove all the occurrences of the compiler flag -fno-cse-follow-jumps
  4. in the build files, change OS version number (two places) on the first 10 lines of build/CMakeLists.txt
  5. change the line //#import <OpenGL/CGLMac ro.h> to #import <OpenGL/GL.h> in platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
  6. follow the instructions on github

That's how I build my VM anyway. These instructions worked back in March 2014 and should still be valid by the time of writing.

Update

The above does not work anymore. I've written a script for building the PharoVM on 10.9 which can be found in my github repo. Feel free to use, copy, modify to your heart's content.

Community
  • 1
  • 1
Max Leske
  • 5,007
  • 6
  • 42
  • 54
1

The question is which VMMaker? classical interpreter VM, or COG (JIT)?

If it's from Pharo, it will be COG, and the answer from Max is perfect, I have nothing to add.

If it's from Squeak, I don't recommend using a .st file, Monticello is really superior.

  • For classical VM, you might try one of the answers at How to load VMMaker in Squeak?

  • For COG, it's constantly changing, there's no more a prebuilt image, but if you load svn source from http://squeakvm.org/svn/squeak/branches/Cog then you'll find some startup script for loading all necessary package in a Squeak image, see end of README or image/Build*.st files.
    Somehow, the recipe for building an image is better than a prebuilt image, so it's progress.

Community
  • 1
  • 1
aka.nice
  • 9,100
  • 1
  • 28
  • 40
1

By far the easiest thing would be to load VMMaker into an image and read the code in the browser(s). That is, after all, the tool(s) intended for reading Smalltalk code. Slang is just Smalltalk with some restrictions and fudges to make it simple (hah! Have you read how the codegen classes do the transform?) to output C code and thus build the vm with 'normal' tools.

If you're trying to learn about the vm you could potentially gain some help from http://www.rowledge.org/resources/tim's-Home-page/Squeak/OE-Tour.pdf which is generally considered the standard work on the Squeak vm for now.

timrowledge
  • 151
  • 4