Smalltalk and Javascript

For decades Smalltalk was the flagship of object and classes ideas implemented in a language, environment and live image. But it would be a case of “too much, too early”. Different Smalltalks, companies, no open community, hardware requirements, its “own way IDE”, all conspired to become it a niche tool. Meanwhile, new languages from the 90s, from Javascript to Ruby, take leverage from Smalltalk ideas and are more mainstream tools than the original. In this century, Javascript, Ruby, Python, CLR (.NET with many languages), JVM (Scala, Groovy, Clojure! (look ma.. lisp for the masses!)) are gaining momentum. With the emergence of different devices, online apps, and operating systems, most of these new programs can run everywhere. And they are backed up by a vibrant community, with lot of open source projects contributing to the popularity and adoption of these technologies. An example: look at Node.js, a reactor pattern implemented in Javascript, running over V8 Google Javascript engine. It has lot of modules mounted over its core implementation.

Classic Smalltalkers will prefer their environments, but it’s a reality that Smalltalk code could take advantage of existing programming languages, virtual machines and libraries. One promising path is: compile Smalltalk to Javascript, and reach the “run everywhere” dream. (Note Clojure (special Lisp over JVM and CLR) and its new branch: ClojureScript and its rationale). This post is an enumeration of projects that use some variation of Smalltalk to Javascript original idea.

There is the ST2JS (Smalltalk to Javascript translator):

ST2JS – Smalltalk to Javascript translator

ST2JS – Traductor de Smalltalk a JavaScript (Parte I) (Spanish)

ST2JS – Traductor de Smalltalk a JavaScript (Parte II) (Spanish)

There is an Smalltalk Web Toolkit based on ST2JS (I couldn’t find any source code, yet):

Smalltalk Web Toolkit (Smalltalks 2009)

Introducción a Smalltalk Web Toolkit (SWT) « CEIBO (with detailed mini examples of Smalltak to Javascript translations, like closures, blocks, etc)

Nicolas Petton has Amber (formerly JTalk), than creates Javascript files from Smalltalk code (it has an example running on NodeJs, interesting):

ST 4U 133: Amber

NicolasPetton/amber – GitHub

Peter Fisk (VistaSmalltak, GWT Smalltalk, and now SilverSmalltalk) was written Smalltalk using Silverlight, Google tools, and now, Javascript:

Implementing Smalltalk’s Non-Local Returns in JavaScript « Silver Smalltalk

Smalltalk Classes in JavaScript « Silver Smalltalk

See the Lively Kernel, Javascript inspired by Smalltalk, and JTalk (now Amber):

InfoQ: Smalltalk IDEs Come to the Browser: Jtalk, tODE, Lively Kernel 2.0

InfoQ: Dan Ingalls on the History of Smalltalk and the Lively Kernel

Lively Kernel

There is an open implementation of Smalltalk to Javascript, named S8, work in progress. See Spanish post:

Blog de Leo De Marco: Lanzamiento de S8 en Smalltalking

And yes! You just guess! There is a Smalltalk to Javascript (and maybe other dynamic language) translator in my pet project AjTalk (WIP) (post is comming). I’m working on returns from inside blocks, and some points, like:

doesNotUnderstand for JavaScript?

Is there an equivalent of the __noSuchMethod__ feature for properties, or a way to implement it in JS?

My links:

Thanks to @garduino for his links about ST2JS and Smalltalk Web Toolkit. And to @leodmarco for his post about S8.

Keep tuned, more Smalltalk to Javascript experience (using AjTalk) is comming 😉

Angel “Java” Lopez

5 thoughts on “Smalltalk and Javascript

  1. Leo De Marco (@leodmarco)

    Great post Angel! I have to say that S8 is intended to not be another SmalltalkToJavascript language, otherwise is the intension to those smalltalkers to survive to their karma: the propietary VM. For that reason, the first approach was to have an Smalltalk running ot the top of V8, but later on we realize that could also have a non-V8 version too, so we open de project to the community. There is no on-line repository yet, wee still have working on it and the page. Anyone interested can write mi al


  2. Pingback: Javascript: Links, News, Resources (2) « Angel “Java” Lopez on Blog

  3. Pingback: AjTalk and Javascript (Part 1) Abstract Model « Angel “Java” Lopez on Blog

  4. Pingback: AjTalk y Javascript (Parte 1) El Modelo Abstracto - Angel "Java" Lopez

  5. Pingback: Smalltalks 2011 Argentina: Your Conference « Angel “Java” Lopez on Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s