Site icon Averlytics.com

Tcl/Tk – The Magic of Strings (Part I)

Advertisements

Background:

“What language should I learn?” is one of the more commonly asked questions by those who are new to the world of programming.  Of all the languages that wax and wane over the years, it would be rare to find Tcl/Tk at the top of that list.

Tcl, pronounced “tickle”, is an abbreviation for the award-winning Tool Command Language developed by professor John Ousterhout in 1988 at the University at Berkeley.  As both an embeddable and extensible interpreted language, Tcl’s versatility and functionality are often hidden behind the scenes of many popular software projects and seldom receives the notoriety it deserves.

Python programmers may recognize Tk as the installed default GUI (graphical user interface) for applications, while others may also be familiar with Tcl’s close ties to SQLite as noted in the article “SQLite and Tcl” by D.Richard Hipp,

SQLite was designed from the beginning to be used with Tcl.  Tcl bindings have been in the SQLite core since before version 1.0 and almost half of the SQLite source code base consists of regression test scripts written in Tcl.  SQLite wants to be programmed in Tcl, not those other languages.

SQLite and Tcl, D. Richard Hipp

That the most recent release of Tcl/Tk 8.6.8 was announced on December 22, 2017, is a testament to the capabilities Tcl/Tk has to offer to programmers and the software development community alike.

You may very well have one or more instances of Tcl installed on your system.  I performed a simple directory search on my Windows machine and was surprised to learn how many instances of Tcl were actually installed.  Clearly, applications are taking advantage of Tcl’s many capabilities.

As a cross-platform language, Tcl can be used to create a diverse range of robust applications.  Tcl is more complex than it’s strikingly simple syntax may suggest.  It will take a little practice to understand how substitutions and expressions are evaluated when your code is executed.

I purchased a number of programming books on the Tcl Programming Language but few have provided as much information as  The Tcl Programming Language:  A Comprehensive Guide by Ashok P. Nadkarni (CreateSpace Independent Publishing Platform):

I highly recommend this book and suggest reading it from cover to cover and working through the examples presented.  I have several other books listed below, however, “The Tcl Programming Language:  A Comprehensive Guide” has been my primary go to text.  The author’s website also offers and maintains Tcl binaries.

I use ActiveState’s Komodo IDE as my primary IDE for coding applications in Tcl/Tk although it also supports a wide range of programming languages.  I am also using ActiveTcl Pro Studio that provides many additional benefits.  Visit the ActiveState website for more details on the Komodo IDE and ActiveState’s offerings for Tcl/Tk.

Tcl may not be the most popular programming language, however, it can be used to develop extremely powerful applications.  You may be surprised to learn that Tcl may already exist on your machine!

Until Next Time – 

Related Articles, Tutorials, Books, Videos, Websites

Books

Downloads

Tutorials:

Websites:

Compiling from Source

While it is possible to compile Tcl / Tk from source, installing from binaries is the preferred method.

% info commands will list all available commands

Exit mobile version