Wiki summary - 25 july 2020

We see spammers active on the Wiki from time to time, but usually their efforts are quickly erased. That is one of the nice features of the Wiki and its community :). Another one is that if you run into oddities, like your chronicler did the other day, where he made a mistake in the formatting of a code block, you get help in a jiffy. And now on to the goodies that appear on the Recent Changes page!

Bag of tricks

We have all been there, I guess, hacking together a small program or a procedure, just because we can. It is useful for the task at hand and fun to put together. Sometimes you may just want Another Way to Implement a Stack and let's face it: there is usually more than one way to skin a cat.

If you run out of ideas, or just want a quick answer and not be bothered, a Oneliner's Pie in the Sky may hold that answer ...

While Tcl's adagium is "everything is a string", you may find yourself - without too much fuss - Working with binary data directly. (Talking of binary data, \u001a is an end-of-file character in scripts. On all platforms for consistency, not just Windows)

And talking of characters besides the ones found on an ASCII-based keyboard, the utf-8 encoding used by Tcl is more accessible than you might think, as witnessed by the cited page.

What about this little gem? The Wiki holds a page on a highly appreciated utility like diff in Tcl.

Basic commands

The manual pages explain what commands like expr and lsort are all about. But sometimes that is not enough. For instance the Wiki page on lsort illustrates a number of useful things you can do with it, and demonstrates why it has a plethora of options.

Likewise, the expr command, which has been the subject of discussion on the Tcl core mailing list, has its own collections of explanations and demonstrations.

Even more basic than these commands is [ - a syntactical element, not a command, but surprisingly, you can use it for splitting long text and embedding comments.

A picture tells more ...

Interested in high-quality graphical displays? Check out the Blend2d package - it comes pre-built for several operating systems and the demos are remarkable!

While your chronicler is not much of a gamer, he does enjoy this online version of the Gem Game enabled by the CloudTk server.

And CloudTk has also been used to make the venerable Tcl Tutor interactive via the Wiki.

Another form of interactivity: check out this effort to bring Jupyter notebooks to the Tcl world - aptly called tcljupyter.

Even venerable pages surface from time to time, when someone finds a way to enhance them. This page from the early years of this century shows that A little stopwatch can be endowed with a dainty new feature.

And what to think of those venerable checkbutton widgets? Use themed widgets to display them, mix in modern images and you get Checkbuttons variations!