Tcl and the Tk Toolkit, 2nd edition

I’m not sure what I was expecting, but the news that “my” book is finally out is cause for excitement, anxiety, and relief.

It’s not actually “my” book at all; it was originally written by Dr. John Ousterhout, who created the Tcl programming language, and the Tk toolkit. And Ken Jones is listed as the co author of the 2nd edition, because he’s the guy that pulled everything together and managed to actually bring the project to fruition.

However, I did play a part a part in the project. About 5 years ago, I was doing a lot with Tcl, and then, as now, I thought it was a shame that the language was not promoted as well as it could be. It’s not a perfect language, but at nearly 20 years old, it has stood the test of time, and it has a lot going for it. In any case, at the time, I had noticed that there was no good, publicly available tutorial. Tcl has always had an excellent set of man pages describing all of its various commands and subsystems, but did not ship with a tutorial that would help new users get started.

I thought that that would be a good problem to solve in order to make the language more attractive to newcomers. However, writing a tutorial from scratch is no simple task, so I started looking around for material that might be adapted. One thing that sprung to mind was the first edition of “Tcl and the Tk Toolkit”. At that point the book was nearly 10 years old, which in tech years is practically forever, and indeed, the material in the book, while good, was quite dated for some portions of Tcl. Figuring it couldn’t hurt, I emailed Dr. Ousterhout to see what he thought of open sourcing the book, or at least the first part of it, with the idea of updating and utilizing that as a tutorial. He was actually ok with that idea, but the copyright belonged to the publisher rather than him, so he gave me a contact with the publisher, who I then sent my idea to. They weren’t necessarily against the idea of releasing the material under an open license, but came back with another idea: why not update the book? That sounded like an interesting project in its own right.

I don’t recall all the details (this was in 2004), but the publisher ended up with Ken Jones as the guy to run the project, as he’d participated successfully in updating another popular Tcl book. In the end, there were several of us (Eric Foster-Johnson, Donal Fellows and Brian Griffin, in addition to Ken and myself), that worked on the project, divying things up by sections, with Ken coordinating. I am honored to have my name listed amongst such august company.

Which brings me back to being nervous: the idea of having something I wrote “set in stone” is a source of some anxiety for someone like me used to working with such a malleable world as that of software. Also; I wrote most of my contribution (I focused on the C API) several years ago, and I hope it’s still valid, and of course that there aren’t any huge and glaring errors.

For a while, the book seemed like it was in limbo – just when I thought it was dead, Ken would come back with an update. This was also a cause for concern, as I wanted the thing to either die a dignified death, and get on with my life, or appear in print.

As for the tutorial, I did manage to make that happen as well. Clif Flynt, who authored a Tcl/Tk book of his own, was kind enough to donate some material from a tutorial of his own, which several of us hacked at to get it into shape. It’s available here: http://www.tcl.tk/man/tcl/tutorial/tcltutorial.html

In any case, I sincerely hope that the material I wrote manages to do justice to the years and years of work that have gone into the language and its implementation, and hope you find the book valuable if you pick up a copy.

One thought on “Tcl and the Tk Toolkit, 2nd edition

  1. Pingback: Where Tcl and Tk Went Wrong | DedaSys Journal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s