Tcl/Tk 8.5.0 Released
dkf writes "Tcl/Tk 8.5 has been released for all major platforms after 5 years of development. There are many new goodies in it, including significant speedups through an advanced bytecode engine, stronger localization of applications, integrated arbitrary-precision arithmetic, a whole bunch of brand new skinnable widgets, anti-aliased text support on all platforms, and a new code-module management system to make maintenance of installations a snap. More in-depth information about the features of both this release and Tcl/Tk in general is available at the official Tcl/Tk website. Mark Roseman's blog has a first-look review."
Tkinter is the de-facto python windowing kit.
I think Gtk is becoming more and more the "de-facto python windowing kit", in particular as Gtk's cross platform support is improving.
Will the Tk widgets now integrate with the rest of the desktop, in terms of using the same theme settings that other programs use?
Yes
Forget thrust, drag, lift and weight. Airplanes fly because of money.
It works well with MacOS X and Windows, but what about Linux? Most Linux apps use GTK, or gtk bindings to some other language, or the GTK theme (like Swing in Java 6). And these screenshots show nothing more than a nicer theme on Linux. And no font antialiasing or hinting!
Tcl is too stable for many who think the bleeding edge is cool, and too different for those who think C is the pinnacle of language design - so it's left to a large number of people who just get on with using it because it works. Of course, if you're not interested in cross-platform GUIs, event driven I/O, Internationalization, extensibility, portability, rapid prototyping, easy interfacing to C and other languages and automated test environments then perhaps Tcl isn't for you.
There's some great new stuff for Tcl in this release. Built-in dict type http://wiki.tcl.tk/dict, Functional Application http://wiki.tcl.tk/apply, built-in arbitrary precision integers http://wiki.tcl.tk/10942, at last a sanctioned OO framework http://wiki.tcl.tk/TclOO.
New Tk looks beautiful.
Tcl runs webservers, robotic manufacturing equipment, and even monitors spacecraft. Odds are that you have probably used a Tcl/Tk application and never even knew it. (If you've watched NBC since 1998, you've seen the results of a Tcl application on screen.)
I'm an unabashed Tcl fanboy, and this release is great.
"There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
Here are some detailed, relevant links:
Cross platform: http://wiki.tcl.tk/1110
Events: http://wiki.tcl.tk/3448
Internationalization: http://wiki.tcl.tk/6789
Easy C interface: http://wiki.tcl.tk/2523
Oh, did I mention a thriving wiki? http://wiki.tcl.tk/
"There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
The policy is that major version is bumped only when significant backward incompatibility is expected. New features don't do it unless they break old code.
Eval isn't as necessary since the new {*} syntactic element was added.
Unfamiliar syntax - every syntax is unfamiliar until you're familiar with it.
I don't find []-as-command-substitution-operator too vexing. If you have a syntax-aware editor. It's almost as expressive as lisp, but with less of the nesting hell.
Upvar/Uplevel are <b>fantastic</b> when you understand what they're used for. Uplevel enables tcl to be completely extensible - you can write new tcl language elements within tcl. For example, one can write a brand new <i>transaction</i> command which wraps its contents in a db transaction open/close pair, and catches errors to abort transactions. I really miss that when I have to code in other languages.
Tcl isn't for everyone. You need to be able to remember the difference between a function application, a quoted and an unquoted string. There are precisely 13 syntactic rules. It's surprising how many peoples' brains just don't work that way.
"There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
"There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
> at last a sanctioned OO framework http://wiki.tcl.tk/TclOO.
Fantastic indeed, and the syntax looks nice. But you still have to manually destroy objects. Basically, writing Tcl like any other high level language in existence means having crippling memory leaks. So you learn to avoid objects like the bolted-on kludge that they still are. Even perl at least got the memory management part right.
Python tkinter ought to look nice, but Tcl continues to be a non-starter.
Done with slashdot, done with nerds, getting a life.
I think there may be one other speech analysis package that did spectrograms and used TCL/TK at one point, but I don't think it has an active distribution the way WaveSurfer does.
What the WaveSurfer people did is that about half their code base is C-language for implementing speech-specific TK widgets, such as a spectrogram Canvas elaboration of the TK Canvas widget. Their C-language routines call down to low-level X to draw things, and if you build on Windows you need some implementation of X. The WaveSurfer Windows distribution, however, is a single .exe file that has WaveSurfer and whatever support libraries all rolled in, so there is a very simply install.
Their TCL part, however, is a big ball of goo, or at least to someone who doesn't know TCL. Instead of pushing a lot of the functionality into the speech toolkit widgits, they implement a lot of stuff in the TCL layer -- it is not simply a thin scripting layer over a largely C code base. You find that out when you try to customize your own speech app using their speech widgets -- there is tons of functionality that you need to reproduce in your own app as the widgets are pretty bare bones. Not that there is anything wrong with it, but using the WaveSurfer app and hearing about rolling-your-own speech app with their toolkit, you kind of get the wrong impression about how much is in the widgets. I found this out when playing with Python scripting to display their widgets.
The one thing that appeals to me about TK is the Canvas widget, which was apparently inspired by someone's Scheme graphics or some such thing. No worrying about paint messages and invalid regions -- you just give the Canvas a scene graph of line, text, even 3-color bitmap or even overlaying buttons, and the Canvas takes care of all of that. I would like to see such a high-function widget in other environements.
I was never bothered by the non-Windows look to WaveSurfer (OK, the lame Files Open dialog of GTK under Windows bothers me, but not most stuff as Windows is not that uniform a GUI experience to begin with).
Just some side information. I read Coccinella will already switch to Tcl/Tk 8.5 in a few months (12 March). See comment at the end of the announcement of the latest release: http://coccinella.im/coccinella-0.96.4 Oh yes, and Coccinella is already using an older version of Tile for Tcl/Tk 8.4. This is some sexy theme proof that Tcl/Tk shouldn't be ugly: http://coccinella.im/stuff/sexy.png
Ya know, Common Lisp bindings to Tk already exist.http://www.peter-herth.de/ltk/ltkdoc/node6.html