Tcl Sources

Tcl/Tk Programs

tclshar
An extremely rudimentary version of shar, the unix shell archive maker, which works with tclsh. A tclshar is a tcl program which when executed extracts itself into the current directory and recreates the directories and files it archives. This is the obvious way to distribute pure tcl programs so they can be downloaded onto windows and macs as well as unix systems.
An updated tclshar now produces archives which behave somewhat reasonably when executed by wish, as might happen if one was double clicked on Windoze.
good-time
A tcl script which fetches the correct time via telnet from time.nist.gov and prints it out in standard format. Several other time sources on the internet and their formats are also documented in the script.
mankala
An ancient game of stones in pits programmed in Tcl/Tk. Play with your friends, play against the computer, or just let the computer play against itself.
subtile 0.2
A Tcl/Tk (4.0 or 4.1) program for generating Penrose, Ammann, and other aperiodic tilings through substitution or composition rules, displaying them, taking their fourier transforms, and generating postscript you can print for the kids to color.
subtile 0.3
A Tcl/Tk (8.0 or greater) program for generating Penrose, Ammann, and other aperiodic tilings through substitution or composition rules, displaying them, taking their fourier transforms, and generating postscript you can print for the kids to color.
Now packaged with tclshar so it can be unpacked onto the Mac or Windows and using the file pathname constructors so it should run there, too.
Inspired by Marjorie Senechal's Quasicrystals and Geometry (Cambridge UP, Cambridge, 1995), with support from Branko Grünbaum
and G. C. Shephard, Tilings and Patterns, (WH Freeman, New York, 1987).
maze
The maze screensaver from xlockmore converted to a Tk program so you can amuse yourself and your small children by solving the maze instead of pretending to be a potato while your computer does it. Or you can push the solve button and be an interactive potato.

Tcl/Tk Procedures

palette.tcl
A reworking of Eric Grosse's rainbow color palette generator from netlib. This allows you to generate a variety of color palettes in Tcl. I happen to like the "iron" palette which looks like a black body temperature scale.
A version old-palette.tcl for the namespace challenged.
random.tcl
George Marsaglia's mother of all random number generators, written in Tcl. This is a very long period pseudorandom number generator.
A version old-random.tcl without namespaces.
time.tcl
A collection of time and date computations written in Tcl. This solves the problem of converting Unix julian time (seconds since January 1, 1970 0h UT) into calendar date in Tcl-7.4 and earlier.
Note that the difference between the year 95 and the year 1995 is 19 centuries, and though you may have a vested interest in the current century, the algorithm does not.
xpm-to-image.tcl
A Tcl procedure for converting xpm format pixmaps into Tk photo images.