Tcl/Tk - The swiss knife of scripting and GUI

A simple clock I made using Tck/Tk

This occurred during my second year of engineering. I used to like spending time in the library reading books on ‘off-topic’ subjects. People thought it was unusual that I spent the most of my time reading computer and programming books as an electronics engineer. One afternoon, the book ‘Tcl and the Tk Toolkit‘ by John K. Ousterhout piqued my interest! Nobody seemed to care about Tcl/Tk, and the book was as good as new and had never been borrowed. That was a lucky day for me. Finally, I had discovered what I had been seeking for since I decided to study GUI programming.

I built quite complicated GUI apps with few lines of code using Tcl and Tk, which would operate on both Windows and Linux. The interpreter was only about 5 MB in size, which was incredible. Consider a feature, and this stack had it, such as :

  • the ability to create windows
  • drawing shapes
  • common controls
  • canvas
  • grid system
  • sockets and networking
  • much more

Not only that, but there were tools that could combine your script and interpreter into a single distributable binary. I had a great time working with Tcl/Tk. I took it up in a matter of weeks and began building pretty impressive-looking GUI apps to show off to my friends. Many of my pals were surprised when they saw! They used to ask whether I built such graphical user interface applications in VC++ (and I would grin!)

This is a sample application I built to learn about controls, events and packing semantics in Tcl/Tk:
learn about controls, events and packing semantics

Here is an attempt at creating a webserver with Tcl/Tk:

A program to calculate integrals using Simposon’s Rule:
 calculate integrals using Simposon's Rule