Re: [squeak-dev] [ANN] SqueakJS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [ANN] SqueakJS

Bert Freudenberg

On 20.12.2013, at 22:35, Jeff Gonis <[hidden email]> 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 -


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [ANN] SqueakJS

Jeff Gonis-2
 

Hi Bert,

Thanks for the reply. Just wanted to make a quick comment from my phone so excuse the brevity. Asm.js is just a constrained subset of javascript and so works in every browser just at varying speeds. Chrome has begun optimizing it and is close to firefox in speed and ie will also be optimizing for it going forward. So it could offer a very nice way to get universal coverage and great speeds out of slang transpiled code.

Again though, fantastic work so far!

Jeff

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [ANN] SqueakJS

David T. Lewis
In reply to this post by Bert Freudenberg
 
On Fri, Dec 20, 2013 at 10:31:35PM +0100, Bert Freudenberg wrote:
> Hi all,
>
> I'm proud to announce SqueakJS, a new Squeak VM that runs on Javascript:
>
> http://bertfreudenberg.github.io/SqueakJS/
>
> It was inspired by Dan's JSqueak/Potato VM for Java, and similarly only runs the old Squeak 2.2 mini.image for now. But I developed it inside the Lively Kernel, which allowed me to make a nice UI to look inside the VM (in addition to all the Lively tools):
>

Woohoo! This looks wonderful, thank you for the early Christmas present :-)

Dave