Robert Krahn from the Hasso-Plattner Institut announced this weekend on the squeak-dev list that he and his colleagues have created a SVN repository for their extended version of JSqueak – named Potato (like Dan Ingall’s original VM) – which includes a lot of improvements:

  • support for 32 bit color depth
  • calling Java (in the moment only for strings and integers)
  • refactored code
  • consistent use of Java libraries
  • removed redundancy
  • added a dynamic object table (for loading big images)
  • support for little and big endianness
  • loading of unzipped images
  • fixed lots of bugs and improved usability.
Their plans include further improvements like:
  • adding support for 8 and 16 bit color depth
  • implementing BitBlt warp functionality
  • enhancing BitBlt implementation (“tryCopyingBitsQuickly”, blending)
  • adding save image functionality
  • implementing additional primitives
  • being able to support current images
  • extending Java access
  • finding and removing bugs.
Anybody interested in viewing the work so far, or contributing to future development, can access the code at the following locations:

Dan Ingalls has released JSqueak, a Squeak interpreter written in Java. 

JSqueak (formerly known as Potato) is less than 5000 lines of code, available under the MIT licence. It runs the Mini2.1 image, which is included for convenience. This image contains a complete Smalltalk development environment, including:

  • Rich text and Text editor
  • File browser (no file access in VM yet)
  • Code browser
  • Decompiler (plus temp-name hints)
  • Compiler
  • Source Code Debugger

Dan wrote JSqueak to teach himself NetBeans and Java in the fall of 2006. Although he developed it as a throw-away project, he notes that

it has features that recommend it for further useful service:

  • It is simple
    • Uses Java objects and storage management
    • Uses Java Integers for SmallIntegers
  • It is general
    • A weak(*) object table enables enumeration and mutation
  • It is efficient
    • Includes a method cache and an at-cache (**)
    • Also a cache of common SmallIntegers
  • (*) – This does not mean wimpy — it’s a good sturdy object table — it just doesn’t hold onto garbage.
    (**) – This is not an automated teller machine, but a device that speeds up array and stream access.

These properties make it a reasonable base for teaching about VM design.

Dan adds that a number of things should be finished or improved if this VM is to see further use – it currently runs between 10 and 30 times slower than the C-based VM! If you wish to track or contribute to such projects, he invites you to add yourself to the (brand new!) JSqueak Interest mailing list.

You can find out more, and run the application as a WebStart Java Application at the JSqueak home page.