SqueakJS: A Squeak VM for the Web
- Run a minimal image. This is the simple demo included in this repo.
- Or run Etoys. Everything except the image and template files is in this repo.
- Or similarly, Scratch, also in here.
- Go to the SqueakJS debugger page with the Lively interface.
Run your own Squeak image
- Drag an image from your local files into the launcher.
- You can also drag files into the Lively Debugger page.
- ... and all the other demo pages (see above) accept dropped images, too.
All modern browsers should work (Chrome, Safari, IE, FireFox), though Chrome performs best currently. Safari on iPad works somewhat. YMMV. Fixes to improve browser compatibility are highly welcome!
Without Lively (simpler)
- download and unpack the ZIP archive (or clone the github repo)
serve the SqueakJS directory using a local web server.
TIP: If you have python try out something like
python -m SimpleHTTPServer 9090
- in your web browser, open the SqueakJS/demo/simple.html file
Now Squeak should be running. The reason for having to run from a web server is because the image is loaded with an XMLHttpRequest which does not work with a file URL. Alternatively, you could just open SqueakJS/run/index.html and drop in a local image.
In Lively (nicer for debugging)
- install Lively
- inside the Lively directory, make a "users/bert" folder and put the SqueakJS directory there
- open the blank.html page using your web browser
- get a Squeak morph from the PartsBin
- save the world under a different name
How to modify it
- if you installed with Lively, use that to change the code
- all changes take effect immediately
- use any text editor
- you have to reload the page for your changes to take effect
How to share your changes
- easiest for me is if you create a pull request
- otherwise, send me patches
Contributions are very welcome!
Things to work on
SqueakJS is intended to run any Squeak image. It can already load anything from the original 1996 Squeak release to the latest 2016 release. But various pieces (primitives in various plugins) are still missing, in particular media support (MIDI, 3D graphics). Also, it would be nice to make it work on as many browsers as possible, especially on mobile touch devices.
Better Networking would be interesting, too. The SocketPlugin currently only allows HTTP requests. How about implementing it more generally via WebSockets? Parallelize the VM with WebWorkers?
There's a gazillion exciting things to do :)
-- Bert Freudenberg