Version 6 of incr Tcl in Javascript

Updated 2011-05-15 20:10:35 by apw

An enhanced version of Tcl in Javascript

This is work in progress and is the attempt to have a more complete version of the above reference running interpreted by Javascript. There now exist a lot of Tcl 8.6/8.5 features like namespaces, dicts, the {*} operator and a lot of missing features in the original like upvar, uplevel, switch, variable and an expr command which can expand its arguments (variables, braced commands etc.) on the fly and array names and array variables.

Enhancements for regexp, string, return command

Based on that I am trying to add an itcl version completely written in Tcl based on itclng where the TclOO part and the remaining C part is implemented in Javascript too.

I hope this makes it possible to run a (subset) of Tcl and itcl in every browser that implements Javascript.

This will be more than 3 times slower than perl :) or is that comparable? I do not know of a perl implementation running in Javascript.

The project started about February 2011.

I started with the existing about 1000 LOC in Javascript.

Stay tuned.

apw 2011-05-08: today I finally succeeded to parse and create the first simple itcl class and instantiate an object. Using the object to call a class method works too, but there is no class resolving/protection check yet. The mechanism for that is foreseen, but not yet completely implemented (to be done next).

The source files now have about 7000 LOC in Javascript including comments.

apw 2011-05-15: parsing of itcl class constructor, destructor and variable/common parts now working, inheritance for classes working, variable and command resolution for itcl classes working. (working here means the first tests are running successfully, still a lot of work to make that completely running ok).

I have decided to implement a simple version of a test framework like the Tcl tcltest command (a small subset thereof) to be able to run for example itcl test suite parts (i hope most of them should work when implemented, which means the corresponding code for itcl can be implemented). First (very small) version of ::tcltest and some of the sub commands thereof as ensemble commands are implemented and running.