[ANN] ST2JS - Smalltalk to Javascript translator

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

[ANN] ST2JS - Smalltalk to Javascript translator

Diego Gomez Deck
Hi folks,

To take full benefit of current internet browsers, tons of lines of
Javascript have to be written.

We (the Smalltalkers) don't like to edit files to program, we want to
code in the refactoring browser!

This project is an attempt to generated Javascript from plain-normal
Smalltalk code.

You can find an entry for the project at SqueakMap and SqueakSource...
Most of the times the newer version resides on Squeaksource.

http://map.squeak.org/account/package/11637941-682d-4ce3-bd4c-ba67afef47b5/default


The current version allows to host a TestRunner on browsers, full
written in Smalltalk code (and translated to JS).  It also includes a
set of "base" classes to simulated an small Smalltalk environment.
Inspectors are also available.

You can see how the TestRunner looks at:

http://photos1.blogger.com/blogger/8166/525/1600/St2jS%20-%20Test%20Runner.png


Also, just in case you don't want to install the package, you can see an
HTML (full generated from Squeak) including the generated JS code at:

http://minnow.cc.gatech.edu/squeak/uploads/5851/St2jS%20-%20Test%20Runner.html

More information (in Spanish) is available from:

http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html
http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk_28.html

Most of the Smalltalk semantic is respected in the translator, the
current absences are:
- Support for class variables.
- Support for instance-class variables.
- Support for "super" in class-methods. (super works fine in instance
methods)

All these points can be solved, and they will as soon as I need them.
BTW any collaboration is accepted ;-)

The generated code runs fine in Firefox 1.5, IE and Konqueror (May be it
also works on Safari).  It doesn't work on Opera.


My next goal is to create a set of widgets, for the browsers, using
ST2JS for the JS production and my previos Comet project to mount an
Observer-pattern distributed between Squeak and the internet browsers.

I think there are a good set of interesting things to try, like:

- Port the Spoon minimal set of objects to JS.  (I mean, translate ST to
JS).  The performance will be awful, but every internet-browser can be
converted in a Smalltalk environment!


Enjoy it!

-- Diego.st


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside