Tcl/Tk Page
The mathlets I have created are written in a language called Tcl/Tk These mathlets are available in two forms: single file executbles (.exe for windows, .dmg for Macintosh), and platform independent files (which have a .kit extension and are called starkits). Linux/Unix users must use this last approach, which is described below:
Linux/Unix users : You need to download the interpreter program tclkit. You can download it here: tclkit
To run a mathlet using tclkit, download the .kit file for the mathlet that you want to run; you will find examples elsewhere on this website. Put tclkit in the same directory as the downloaded .kit mathlet file (let's call it example.kit). Start a console, navigate to the directory where tclkit and the .kit mathlet file are located, and type:
./tclkit example.kit
Of course make sure that tclkit is executable (use chmod +x tclkit if needed). You can also set it up so that .kit files are automatically opened by tclkit, but I leave that to the Linux/Unix experts.
More Tcl/Tk Information
Tcl is an interpreted computer language; it is also referred to as a scripting language (Perl, Python and Ruby are other scripting languages). Tk is a Tcl package that allows one to write graphical user interfaces (gui’s) very easily. In order to run a Tcl/Tk program, or script as it is called, you need a program called an “interpreter” for each platform (there are interpreters for Windows, Mac, Linux, and Unix). The interpreter program is called Wish. A script is a text file; once the interpreter Wish is installed on a given machine, that machine can execute any Tcl/Tk script. When the script is executed, it looks like a Window program on a Windows computer, like a Mac program on a Mac, like a Linux program when running under Linux, and so on. I will refer to the math programs that I have created using Tcl/Tk as applets, or mathlets.
Tcl/Tk scripts should have a .tcl extension. Tcl/Tk scripts can
“source” other Tcl/Tk scripts (similar to “include”
with C programs). Thus an applet may consist of several .tcl files.
To run the applet you need all of the files in one directory, then
you fire up the interpreter Wish and source the main .tcl file (the
one that sources other needed files). If you are running Windows and
Tcl/Tk is installed on you computer, you can double click on the main
.tcl file to start the applet.
Script files (.tcl files) can
be edited with any text editor such as Windows notepad, or word
processors such as Microsoft Word (make sure you save them as text
files and not Word files). A freeware editor which recognizes Tcl
syntax and has other Tcl specific features is called ASED and is
available at http://www.mms-forum.de/ased/download.
You can also “wrap” all required files into one compressed file with the extension .kit using a program called Tclkit. You cannot read the source code in a .kit file. To run the program from a .kit file (called a Starkit) you basically do the same thing as with the source code file (.tcl file); you start up the interpreter and then source the .kit file. For .kit files, instead of running the interpreter Wish you run a slightly different interpreter; on Windows and Unix/Linux the interpreter for .kit files is called Tclkit (which is also used to create the .kit file in the first place), and on the Macintosh the interpreter for .kit files is called Wishkit. Since I am providing Windows and Macintosh executables, only Linux/Unix users need to run .kit files, as described above.
You can find more information about Tcl/Tk at:
http://www.tcl.tk and at http://wiki.tcl.tk
You can find more installation options for Tcl/Tk at:
Windows, Mac, Linux, Unix Tcl/Tk (ActiveTcl)