[e-lang] New E implementation: E-on-JavaScript

Kevin Reid kpreid at mac.com
Thu Jan 1 13:38:07 CST 2009

I have begun an E implementation which compiles to JavaScript code,  
suitable for running in web browsers.

The source is at

It is designed to interoperate with Caja: If cajita.js is also loaded,  
E code can call Cajita-tamed objects; also, the output of the compiler  
should be within the Cajita subset (I have not tested this).

It is as yet quite incomplete; especially, the compiler does not  
implement all of Kernel-E, and generates inefficient and verbose code.

Trivial demo:

It supports converting an Updoc document into a HTML document such  
that the tests are executed. An example:

Not-yet-executed tests have dashed bars to the left, successful tests  
have light gray bars, and unsuccessful tests have red bars and show  
the expected and actual values (which are not differentiated except by  
color; this is to be fixed).

As this Updoc was borrowed from E-on-CL, many of the tests fail  
because they are specific to E-on-CL in some way. Many other tests  
fail because there is no printing subsystem yet, so everything uses  
JS .toString() and thus the wrong syntax.

Kevin Reid                            <http://homepage.mac.com/kpreid/>

More information about the e-lang mailing list