Thursday, May 16, 2013

Open Software: What You Get For Free And What You Don't

The First Computer Bug
Back in 1947, a year before I was born, when early computer wizard Rear Admiral Grace Hopper (USN) found a moth fouling a relay in the Harvard Mark II electromechanical computer, she removed the moth and taped it in the project log book, where I presume it is still preserved for posterity. In other words, it's not my fault: computer bugs have been around quite literally all my life. I'll be polite and not speculate on what Adm. Hopper said when the bug got into the relay; I assume that since she was Navy, she knew how to curse.

Fast-forward (now there's an increasingly antiquated term!) to 2013, where I am in the middle of my n'th attempt to become even minimally competent at programming for a *nix (i.e., UNIX or Linux) system, n being a regrettably large integer. With great deliberation over each choice, I have chosen to learn the programming language Python (yes, it's named after Monty Python), the lightweight integrated development environment Geany (perhaps the only piece of developer software with which I've felt instantly comfortable; on the n-1'th attempt I used Eclipse on an old, slow machine and came to regret it), the graphical interface library Tcl/Tk (also known for historical reasons as Tkinter) and the visual form design tool PAGE. I don't know how common these things are out in the real world of *nix because I never had a contract in that world; I just have to start somewhere.

Things went swimmingly up to a point. I managed to construct manually a few simple programs using Tcl/Tk, tapping the code by hand, copy-pasting bits and pieces from examples provided by other people. That all worked pretty well.

Then, after the aforementioned deliberation, I set out to install PAGE. The author of PAGE claims it rests on version 8.5.4 (or newer) of Tcl/Tk. The version installed on this box by the original Ubuntu installation is 8.5.11, so I should have been OK.

I installed PAGE with no significant error messages, I attempted to run it from a command prompt. It quit with a complaint (presumably from the Python runtime) that the program (i.e., PAGE) was attempting to use calls to Tcl/Tk version 8.6, the latest version... NOT 8.5.4, as advertised in the documentation. Thus entered the dark side of free software.

ActiveState, one of the major commercial software and support companies in the Tcl/Tk world, offers a prebuilt freebie version 8.6 package of Tcl/Tk, with no support. I can see the advantages of their doing so: programmers that grow up using the freebie version could very likely influence the subsequent purchase of commercial licenses by their employers or clients. Freebies are pretty much traditional in the Linux world, and the market of people who use them would be a good market to tap into.

I downloaded the Tcl/Tk 8.6 freebie package and attempted to install it... three times, using three different install tools. I got hundreds of error messages, which I could not redirect to a file (due to my ignorance, I'm sure). I ran a few of the handmade programs using 8.5.11 to make sure I hadn't destroyed that; apparently it's OK. But after an entire evening of my life spent on this project, I am back to square one. Even for a guy who used to do this stuff for a living, that's pretty frustrating.

And like Adm. "Amazing" Grace, I know how to curse!


  1. You can redirect to a file from the command line using the > [greater than symbol]. You can store errors [stderr] or regular output [stdout].

    command stderr > file1

    - takes the errors from the execution of 'command' and stores them in 'file1'.

    without seeing the errors there's no way of telling what the problem may be, possibly a lib incompatibility, or permissions ... Dog knows.

    1. Thanks, Bryan. In Ubuntu, the default shell is bash. In bash, you can redirect stderr by preceding it... not by > alone... but by &> .

      runmyapp &> mytemp

      I learned a lot this evening, and actually managed to get Tcl/Tk installed and apparently working, though not yet hooked up to anything I need it for. Tomorrow (today, as I note the time), after four METROLift trips and a PT workout, I'm sure I'll be in great shape to push things a little bit further on the computer. %-}

    2. I'm used to using & with the handle numbers, i.e.

      command &2> file vice command stderr > file, but not alone. Then I go back to a time when Unix was only available from AT&T.



• Click here to view existing comments.
• Or enter your new rhyme or reason
in the new comment box here.
• Or click the first Reply link below an existing
comment or reply and type in the
new reply box provided.
• Scrolling manually up and down the page
is also OK.

Static Pages (About, Quotes, etc.)

No Police Like H•lmes