[squeak-dev] [ANN] SqueakJS

Bert Freudenberg bert at freudenbergs.de
Fri Dec 20 21:52:15 UTC 2013


On 20.12.2013, at 22:35, Jeff Gonis <jeff.gonis at gmail.com> wrote:

> Bert,
> 
> This is fantastic work! I didn't know you were going to announce it so soon,

It is still early, yes, just one month into the project, but it is usable and at a point where I think others could contribute.

> I was playing around with Dan Ingalls' Alto simulator the other day and stumbled onto your work and I thought it was very cool.  

Thanks :)

> Have you given any thought to continuing the Slang approach and adding a translator to LLJS, a subset of JS designed to emulate C? It was something I had been thinking of toying with because it seemed to offer a lot of leverage with the current Slang approach.

There are various ways to go about this, indeed. Using Emscripten to compile the C sources to asm.js should work fairly well, as well as doing a NaCl VM (as Yoshiki demonstrated already). These would give you a higher-performance VM, faster. 

However, asm.js is only supported on Firefox so far, and NaCl is exclusive to Chrome. I don't expect the browser vendors to agree on a particular technology any time soon.

A pure Javascript VM has the potential to work equally well on all browsers with the same code base. Besides, it's more fun to work on ;)

The Slang code is not too useful for making a real Javascript VM, because it really is just C with Smalltalk syntax. Had I used the Slang sources, I would have ended up having to change them, and the translator, quite a lot. Instead, I opted for a very different object model and garbage collection scheme that is much better suited to Javascript.

The nicest thing about Slang is that you can emulate it in Squeak, so you can use Squeak's debugging tools. However, I used the Lively Kernel for developing SqueakJS, and some of my tools are even nicer than what we have in the simulator. So there really was little incentive for me to try making use of the Slang sources. 

- Bert -




More information about the Squeak-dev mailing list