Version 5 of Small Tcl

Updated 2002-02-21 15:25:05

Do you want a particularly small version of Tcl to embed in a hardware-constrained device? You're not the first. Here are a few possibilities:


Karl Lehenbauer has implemented a ROMable "Tiny Tcl" [L1 ] based on 6.8, to be particularly small.

2001-05-07: Tiny Tcl 6.8 is a rommable, minimal Tcl for embedded applications.

Derived from the venerable Tcl 6.7 release, Tiny Tcl 6.8 has a solid Tcl feature set, excluding newer capabilities of Tcl 7 and 8 such as the bytecode compiler, namespaces, sockets, and async event handling, among others. (Still, major applications have been written in Tcl 6.)

Excluding C library functions, Tiny Tcl compiles down to less than 60 Kbytes on most machines, far smaller than any Tcl 7 or Tcl 8 derivatives. On an embedded DOS system with 640K of RAM, programs of up to several thousand lines of code can be executed.

http://tinytcl.sourceforge.net/


Jean-Claude Wippler re-implemented most of a modern (7.6-like?) Tcl in a particularly compact C++ coding he calls TinyTcl [L2 ].


Larry Smith wrote "Tinker" [L3 ] as a "tiny little interpreter" reminiscent of Tcl. He and Richard Suchenwirth co-authored the "Lightweight Object System for Tcl" [L4 ] which is small, but on top of regular Tcl's.


While John Ousterhout originally created Tcl as exactly an embeddable extension language [include some history here], it's grown into a general-purpose programming language. That growth has, of course, increased its demands on memory and the C run-time library. Key transitions along the way include ... the introduction of socket (7.5 or 7.6) ... the new object system (8.0), and Unicode (8.1-8.3). Versions such as 6.7, 7.2, 7.3, and 7.4 are popular among those content with a minimalistic Tcl. More on these transitions is available in a page called "Advantages and disadvantages of different Tcl versions".


There are many other less well-known languages especially targeted for embedding. Lua [L5 ] is probably the most prominent of these (and a subject of several experiments by JCW, for example). Another that interests CL is Ficl [L6 ]. All such languages generally fit in under 100K--quite a bit smaller than recent Tcl.


Donal Fellows and others have thought about this opportunity in terms of MicroTcl for Tcl9. A "modularized Tcl" is a goal that's inspired several project starts, none of which are particularly accessible in 2001. Tcl9 might still turn out to be a modularized Tcl, that is, one for which compile-time code and functionality choices are reasonably easy.


Jon Hall's port of 7.4 to PalmOS [L7 ] is still another instance of a "small Tcl".


Marshall Rose also had intentions of porting Tcl to PalmOS, but was able to devote little time to the project.


Ashok Nadkarni has written Palm TCL at http://home.earthlink.net/~ashoknadkarni/ (now moved to http://palm-tcl.sf.net/ ) ; based on Tcl 7.6, it provides support for many Palm widgets and rudimentary support for the Palm databases.


See also MicroTcl for Tcl9 and Tcl-To-Go.


ETLinux [L8 ] is a small-footprint LINUX (2MB RAM, 2 MB disk) for embedded systems with a small Tcl interpreter built in.


aku (and tclguy) are working on Modular Tcl, specifically to fulfill an IOS-related contract with Cisco.