Tcl/Tk Developments

From Andy Lack <>

Since I wrote an article for the Linux SIG newsletter last year about Tcl/Tk a lot has happened in this field.

Just to fill-in the background, Tcl (pronounced ``tickle'') is an interpreted `script' language which bears many similarities with Unix shell scripts. Tk is a ``toolkit'' which allows users to easily and quickly write X-windows applications in Tcl.

The language's creator, John Ousterhout, moved to Sun Labs last year as a Distinguished Engineer. Since then he has released Tcl version 7.5 and Tk 4.1, both now in beta release. Among the new features of Tk 4.1 is support for GIF, PPM and PGM images. In fact Ousterhout has added a general-purpose image command which can be fairly easily extended to support any arbitrary graphic format---though this will require C programming to achieve. There is a completely new (and improved) event binding mechanism and support for tear-off pull-down menus.

However, the most significant feature of this release is the availability of interpreters for both Macs and MS-Windows, as well as Unix. This means that you can now run the same Tcl programs on all three platforms without needing any changes to your program.

In the February 1996 issue of Byte, an article by Peter Wayner reviews the future direction for Tcl. Ousterhout and Sun are working on providing a language in which programs can be written and used over the Internet. Tcl is the language being used.

One of the claimed benefits for choosing Tcl is that, being interpreted, it can be made safe. This is achieved by getting the interpreter to watch carefully what the program is doing, since the interpreter is a layer between the program statements and the machine on which it is executing. It is suggested that in future computer programs could be sent in e-mail messages as MIME attachments.

Tcl 7.5 provides a new command, interp, which creates a new interpreter. The programmer can decide which commands may be used in the new interpretor. Ousterhout calls these new interpreters ``padded cells'' which can only access the outside system by a strictly controlled interface.

This concept, claims the Byte article, will allow users to post programs requesting information to airline companies (for example) which will access the seat reservation database via a ``safe'' interpreter and will return the information.

The latest versions of Tcl and Tk can be down-loaded using anonymous ftp from