Slashdot Mirror


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."

148 comments

  1. Great news by ciaran.mchale · · Score: 1

    I'm tickled pink!

    1. Re:Great news by jd · · Score: 5, Funny

      Yeah, but coders who prefer other languages might be tk'ed off.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    2. Re:Great news by Minix · · Score: 5, Informative

      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
    3. Re:Great news by nuzak · · Score: 2, Informative

      > 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.
    4. Re:Great news by Anonymous Coward · · Score: 0

      Integer arithmetic is already arbitrary precision. Oh wait, I just checked the link. And they really didn't have integer arithmetic. Wow.

    5. Re:Great news by jhol13 · · Score: 1

      Odds are that you have probably used a Tcl/Tk application and never even knew it. I'd say the odds for this are minimal. Tk creates (created?) so ugly and hard to use interfaces it is impossible not to notice.
    6. Re:Great news by nibelung · · Score: 1
      A non-starter? You're wrong!

      Tcl is great!

      I've used Python extensively and i still prefer Tcl (8.4) for many projects. Both have their strengths. I rather liked Python's OO abilities and use of tuples, but the way Tcl works magic with data is just so much more convenient to me (i do a lot of test automation). Now with the addition of the OO framework and dicts in 8.5, it makes a significant improvement in the areas i liked python for (less I/O intensive programming) and maybe i will just stick to Tcl now.

      The OO stuff in 8.5 is not a bolted on kludge. A great deal of thought and experience went into this. Note though that the while the OO framework is done, it needs some supporting structure to make it easier to use. I think some are already done. For now i will just add my own. It should be possible to create XOTcl like OO programs with TclOO, and that ought to be superior to Python in terms of flexibility.

      Memory management: i am pretty sure that objects that go out of scope are cleaned up automatically. Memory management in Tcl is bound to work a little bit different because the concept of references is not mappable to Tcl. But i'm not convinced that memory management will be really more difficult than in Python. You're probably confusing *can* manually destroy with *have to* manually destroy.

  2. OMG Coolies! Python devs get to work! by The_Dougster · · Score: 1

    Tkinter is the de-facto python windowing kit. This in itself is enough for a new python release. Faster==better, and python always wants to be a bit faster. Tcl/Tk by itself is kind of clunky IMO, but python Tkinter makes good use of it. Thanks Tck/Tk guys!

    --
    Clickety Click ...
  3. Skinnable Widgets? OMFG :) by heretic108 · · Score: 1

    Tk has been so in need of a makeover for many years. The widgets in their default state have looked like crusty relics on our grandparents' computers, and even make Windows 3.1 look contemporary. Well done guys. I can't wait to check it out.

    --
    -- In the beginning was the WORD, and the WORD was UNSIGNED, and the main(){} was without form and void...
  4. Skinnable Widgets? OMFG :)-Hunting the widget. by Anonymous Coward · · Score: 0

    Tk has sort of been the Motiff of the Linux world.

    1. Re:Skinnable Widgets? OMFG :)-Hunting the widget. by Anonymous Coward · · Score: 0

      That's because Tk was originally built on Motif (then later, just emulated it. badly.)

  5. Re:If Tcl/Tk can do it then so can Perl 6 by Anonymous Coward · · Score: 0

    perl6 will be the portable runtime for DNF anyway.

  6. Tcl language vs. Tcl environment by ElMiguel · · Score: 3, Interesting

    From what I've seen, the internals of the Tcl environment (the interpreter, libraries and so on) are pretty solid and nicely done. Unfortunately the Tcl language itself is peculiar, dated and just not very good. I wish the Tcl people would consider a thorough backward-incompatible revamp of the language into something a bit less off-putting.

    1. Re:Tcl language vs. Tcl environment by Colin+Smith · · Score: 1

      Unfortunately the Tcl language itself is peculiar, dated and just not very good. Really? For what purpose?
      --
      Deleted
    2. Re:Tcl language vs. Tcl environment by chthon · · Score: 1

      Well, by replacing {} by () and judicious use of eval(), they might yet end up with a version of Common Lisp with a decent GUI environment.

    3. Re:Tcl language vs. Tcl environment by Minix · · Score: 3, Interesting

      Tcl's internals are well done, and the QA is exemplary - a Tcl alpha is as good as anybody else's beta.

      I've noticed that some people don't like Tcl as a language, but can't personally understand why. Tcl seems to be a favorite of a lot of well experienced people who can make it stand up and sing.

      I used to think that Tcl-aversion was due to extreme syntactic simplicity, but now I think the simplicity is deceptive, and Tcl is just too hard for some programmers: you need a deep stack to write Tcl well.

      --
      "There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
    4. Re:Tcl language vs. Tcl environment by dskoll · · Score: 1

      Unfortunately the Tcl language itself is peculiar, dated and just not very good.

      Realy? What shortcomings do you feel Tcl has? I find it to be a wonderful, simple, expressive language. It's certainly a lot less "peculiar" than Perl, no more "dated" than C, and really good for what I need.

    5. Re:Tcl language vs. Tcl environment by It'sYerMam · · Score: 1

      I understand what you mean. I have a minor Tcl-aversion, and I'm not sure why. Perhaps its the eval[]s you have to put everywhere, or the masses of square brackets, or the unfamiliar syntax in general. One particular quibble I remember is the use of upvar, which, to me at least, seems somewhat clumsy.

      --
      im in ur .sig, writin ur memes.
    6. Re:Tcl language vs. Tcl environment by Jimmy+King · · Score: 1

      I've noticed that some people don't like Tcl as a language, but can't personally understand why. Tcl seems to be a favorite of a lot of well experienced people who can make it stand up and sing.
      In my first job where I got to do any development work I worked with Tcl. I hated how it handled lists, those gave me fits because if I split them wrong I'd get { and } in my output that Tcl inserted into the lists to break them up. And below is a link to something that gave me fits the first time I came across it. What other language will let you have errors in a comment? I'm sure someone here is going to give me huge list of languages that behave like that now.

      I used to think that Tcl-aversion was due to extreme syntactic simplicity, but now I think the simplicity is deceptive, and Tcl is just too hard for some programmers: you need a deep stack to write Tcl well.
      This is probably true. When I worked with Tcl I was still just learning to really think like a developer and understand the process on top of learning Tcl, which really is a fairly complicated language. I'm sure I would have far less trouble with it now that I've got a few years of full time, non-hobby development under my belt but I don't see any reason that I'd want to use it and find out.
    7. Re:Tcl language vs. Tcl environment by Minix · · Score: 2, Informative

      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
    8. Re:Tcl language vs. Tcl environment by Minix · · Score: 2, Informative

      When I worked with Tcl I was still just learning to really think like a developer and understand the process on top of learning Tcl, which really is a fairly complicated language. I'm sure I would have far less trouble with it now that I've got a few years of full time, non-hobby development under my belt but I don't see any reason that I'd want to use it and find out.
      Perhaps to see if you're missing something? It's significant that a lot of Tclers are old and battle-hardened. Perhaps there's something of enduring value to be found in Tcl, but it takes a while to recognise. Your problem with lists, yeah, perhaps your problem is Quoting Hell? It can be easily avoided with simple good habits, but you have to learn them first.
      --
      "There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
    9. Re:Tcl language vs. Tcl environment by ConceptJunkie · · Score: 2, Insightful

      Really, no one seems to think Perl is "peculiar", when it's practically a write-only language, pre-obfuscated for your convenience. Tcl is incredibly simple once you understand it.

      --
      You are in a maze of twisty little passages, all alike.
    10. Re:Tcl language vs. Tcl environment by nuzak · · Score: 2, Interesting

      > Tcl is incredibly simple once you understand it.

      I've never seen a language that actually parses comments, the way Tcl does. There's nothing simple about that.

      --
      Done with slashdot, done with nerds, getting a life.
    11. Re:Tcl language vs. Tcl environment by Bearhouse · · Score: 1

      You're probably right, kids these days are taught badly / learn bad habits since they're spoiled by 'limitless' hardware and flashy coding tools. Then they're surprised when all the memory leaks away. (I guess you're an old fart like me - yeah, IDs can be deceptive, I started on an RM 380Z then an IBM System 3). Sounds a little arrogant telling people that they "have to learn good coding habits" - but I'm sure that's not how you meant it. You can get a huge lot done with Tcl, and I quite like it, but its not for everybody. Very good in scientific environments - I find researchers and engineers 'get it' quite quickly, and find it useful to represent their ideas.

    12. Re:Tcl language vs. Tcl environment by ColinMacleod · · Score: 1

      Tcl is simple in the way that maths is simple - it starts from a small number of clean consistent abstractions which can be combined to achieve many things. People who see the possibilities of this tend to think it's easy and powerful, but many others just don't get it.

    13. Re:Tcl language vs. Tcl environment by poopdeville · · Score: 1

      Upvar/Uplevel are fantastic 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 transaction 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.

      Sounds a lot like Perl's Ties. Are you familiar with them? If so, how do they compare?

      --
      After all, I am strangely colored.
    14. Re:Tcl language vs. Tcl environment by Anonymous Coward · · Score: 1, Insightful

      About the only people who are truly befuddled by the way the interpreter parses comments are people who don't use Tcl on a regular basis, or haven't had their programming horizons expanded much. In the real world, in every practical sense, it just doesn't matter. Sure, maybe you'll get bit once or twice if that over the course of a decade of using Tcl, but the reason for how the interpreter handles comments is what gives Tcl its power.

      I suspect it's a lot like the whitespace-represents-nesting feature of Python. It looks like a totally brain-dead non-starter that no self respecting programmer would subject themselves to (no offense python folk!), yet from what I've heard from Python programmers, it's really just not an issue.

      If you're more worried about how the language treats your comments than you are about how it treats your code, your data, and your productivity, Tcl is not for you. But that's cool. Nobody in the Tcl community wants to convert you. In fact, we encourage you to choose the right tool for the job no matter what it is. It's just that once you are a bit more open minded about your tool set, we think you'll find that Tcl and Tk continues to be an extremely viable solution for many real world problems.

    15. Re:Tcl language vs. Tcl environment by m50d · · Score: 1

      So you'll dismiss the whole language because of one wart? Yes, the parsing of comments is a stupid mistake, but the language is actually good, really.

      --
      I am trolling
    16. Re:Tcl language vs. Tcl environment by dkf · · Score: 1

      Upvar/Uplevel are fantastic 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 transaction 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.Sounds a lot like Perl's Ties. Are you familiar with them? If so, how do they compare? They're not at all the same. Tcl actually does provide facilities very much like a Perl tie (i.e. traces and linked variables) but uplevel and upvar are something else. The uplevel command is actually much more closely related to the 'sub foo(&)' syntax of Perl as normally used (though of course each is different to the other in important ways) and the upvar command is rather like passing a reference to a variable (except again not the same except in how normally used).

      BTW, Perl ties aren't suitable for transaction handling really, because it's often a good idea to process multiple operations on a database within one transaction, and a tie doesn't capture that notion. Instead, you should wrap a transaction round the outside and use the tie inside the body. Easy! As it happens, this notion of a transaction command is already used by the Tcl binding to SQLite (and is more elegant than the equivalent code in Perl DBI...)
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    17. Re:Tcl language vs. Tcl environment by Anonymous Coward · · Score: 1, Informative

      Ya know, Common Lisp bindings to Tk already exist.http://www.peter-herth.de/ltk/ltkdoc/node6.html

    18. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      Tcl 8.5 eliminates the most common situation in which upvar used to be necessary. The problem was that Tcl (associative) arrays were not first class objects and could not be passed by value, so if you wanted to manipulate an array in a procedure, you had to pass the name of the array and use upvar to make it accessible within the procedure, like this:

      proc foo {bar} {
      upvar \#0 $bar baz
      ...
      }

      This makes baz an alias for the array whose name is contained in the variable bar. Within the procedure, bar is a variable whose value is the name of an array in the caller's environment, so there is no way to access its members. upvar is essentially a way to provide dynamic scope in a language whose default is local lexical scope.

      This was indeed a bit of a wart on the language. You shouldn't need to mess with scoping mechanisms just to access an array from within a procedure. Tcl 8.5 adds dicts, which are similar to the old arrays but are first class objects and are passed by value. From now on, upvar should become much less frequent and be needed only for relatively sophisticated tasks. Most programmers won't need it.

    19. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      If you want LISP, use LISP. You have my blessing. I think of Tcl as a variant of LISP with about the right amount of syntactic sugar. The use of {} and [] provides a useful amount of visual structure that makes Tcl much more readable than LISP.

    20. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      Most languages strip comments and then parse what remains. In Tcl, everything is parsed; the comment marker is actually a procedure whose argument is the remainder of the line, which it discards. This has the result that comments must be syntactically well-formed or they will screw up the parse. This is one of the few things that I don't like about the language because it makes it impossible to place comments as freely as I would like to. However, I don't think that it is unique. As I recall, some dialects of LISP work this way. Isn't this the way the Scheme used in The Structure and Interpretation of Computer Programs works? I don't have my copy to hand, but I think that I remember a discussion of how this feature can be used to advantage by redefining comments as functions that do something other than discard their arguments.

    21. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      To clarify a little, the Tcl comment character is not actually treated exactly like a procedure that does nothing. If it were, procedure calls embedded in the comment would be executed, which is not the case. So, it is parsed like ordinary code, but it has some special properties rather than simply being a no-op.

    22. Re:Tcl language vs. Tcl environment by ElMiguel · · Score: 3, Insightful

      For what is worth, a lot of experienced people are fans of obscure antique technologies, because that's what they specialized on and they don't want to learn some "new-fangled" substitute from the start. There's still people that swear by VMS, it's just human nature.

      As for what I don't like about the Tcl language, it's mostly just a collection of small things, such as:

      • Operators can only be used if you have an implicit or explicit expr, and no assignment operators. You've got "set" and "incr", but it isn't as readable. Using "$" for variable substitutions but not for variable references is also not very readable.
      • Loads of naming inconsistencies. Just in the predefined commands, you've got words together with no separations ("msgcat"), words together separated by underscores ("auto_load"), mixed case *and* underscores ("tcl_endOfWord"), double colons ("pkg::create"). Then, string operations are grouped together in the "string" command, but you've got separate commands for list operations.
      • The -something options are ugly, in addition to a potential gotcha, because if you have something like "switch $var" everything will work fine until the content of var is, say, "-glob".
      • The "everything can be treated as a string" philosophy sometimes leads to strange results if your program logic has errors. I quite often had to use trial and error to fix this sort of problems.
    23. Re:Tcl language vs. Tcl environment by ElMiguel · · Score: 1

      For what is worth, I would make exactly the same comment about Perl.

    24. Re:Tcl language vs. Tcl environment by Anonymous Coward · · Score: 0
      With Tcl you can write a complex user-interface in the same no-nonsense, easy and quick-n-dirty way you're writing a complex text-parsing program in Perl.

      Unfortunately, Tcl/Tk would probably win a prize for the most underrated language/toolbox ever invented.

      Most people will have Qt/gtk/etc and ruby/java/etc shoved down their throat by instructors/marketing astro-turfers/etc before even considering that could be done in a less horrid way, and maybe you could write a simple UI wrapper without PAIN, SUFFERING and having to loathe yourself in the end.

    25. Re:Tcl language vs. Tcl environment by shutdown+-p+now · · Score: 1
      It's precisely how REM in BASIC has worked since the very first versions in the 60s.

      One could also remember the "comment" statement in Algol-60.

    26. Re:Tcl language vs. Tcl environment by belmolis · · Score: 2, Insightful

      a lot of experienced people are fans of obscure antique technologies, because that's what they specialized on and they don't want to learn some "new-fangled" substitute from the start.

      That is true, but I don't think that it explains the popularity of Tcl within the Tcl community. There are plenty of people who have come to Tcl recently after long experience with other languages. I am one of them. I started programming in Fortran, on punch cards, in 1973. I first used Tcl in 2003, at which point I used mostly C, AWK, and Python. My initial reason for using Tcl was that I needed to write a GUI, had done no graphics programming for quite some time, and had heard that Tcl/Tk was good. I tried it, and indeed my initial reaction was that Tk was really nice but that for programs of some complexity I didn't really like Tcl. With greater experience, though, Tcl grew on me, to the point that it has almost completely replaced both AWK and Python.

    27. Re:Tcl language vs. Tcl environment by Machtyn · · Score: 1

      My beginnings with Tcl/Tk. My software engineering teacher wanted to teach the Linux OS, and that was the class for which I signed up. It turned out that he was attempting to teach us Linux like a programmer (use a language in the OS) rather than Linux itself. He drastically changed the format the next semester.

      But, boy, did I run with it. I suppose I should learn some of the other scripting languages, but I really like Tcl/Tk and my ability to quickly frame a GUI with all the basic functionality (Tcl) I need. Although, I'm really liking the BWidgets use of a dropdown.

      The main thing I like about Tcl is the ability to write a simple text file of code that can be interpreted on any platform; be it Windows, Linux, or Mac OS. It will all look relatively similar, yet native.

    28. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      The -something options are ugly, in addition to a potential gotcha, because if you have something like "switch $var" everything will work fine until the content of var is, say, "-glob".

      With regard to ugliness, I guess tastes vary, but the potential gotcha is well known, addressed in the documentation, and easily avoided. There is a special "--" argument to "switch" which indicates that the remaining arguments are not options and that any leading hyphens are therefore to be taken literally. Experienced Tcl programmers therefore write any switch that doesn't operate on restricted input as: "switch -- $var".

    29. Re:Tcl language vs. Tcl environment by Tablizer · · Score: 1

      I used to think that Tcl-aversion was due to extreme syntactic simplicity, but now I think the simplicity is deceptive, and Tcl is just too hard for some programmers: you need a deep stack to write Tcl well.

      One has to visualize the many layers and priorities of substitution that go on. It's string-orientation is a very interesting concept, but the way its done in TCL is difficult to get one's head around, at least over a short term. Perhaps if it was easier to see the intermediate forms (better tools to x-ray the run-time engine) it may be easier to learn and debug rather than be a bunch of nested black boxes.

    30. Re:Tcl language vs. Tcl environment by belmolis · · Score: 1

      That's interesting. I didn't find Tcl substitution very difficult to Grok. On the other hand, although I appreciate its typographic quality, I find the TeX macro language very difficult both to read and write and don't understand why such an abortion has not been replaced. (Yes, I know about lout, which is much like Tex but with a dialect of Lisp as the language, but it hasn't caught on very widely.)

    31. Re:Tcl language vs. Tcl environment by nonsequitor · · Score: 1

      People underestimate Tcl.

      When I was using it at work for scripting tests, I could spawn threads from the interpreter command line to dynamically write multi-threaded scripts. Thats right, managing thread synchronization, effortlessly from a command line. Since I was running threads on a half dozen boxes on a test network, spawning threads and rejoining them was important.

      Maybe its not that impressive, but from the dozen or so other languages I've used this is the first where I felt comfortable writing multi threaded scripts interactively.

      Say what you will about its technical merits, its main strengths have always been in its licensing. It is as intended, very industry friendly, and very extendable with proprietary modules without any licensing worries. This is why many products, specifically in the test and measurement area, will have Tcl bindings for their devices.

    32. Re:Tcl language vs. Tcl environment by schlenk · · Score: 1

      Actually there is now a command in unsupported:: namespace to inspect the bytecodes produced by a proc and better support for finding the line number of a defined proc, which helps debugger writers. Michael

    33. Re:Tcl language vs. Tcl environment by nuzak · · Score: 1

      Why yes, that was the entire treatise of every objection I've ever had with Tcl.

      Here's a couple others I have just off the top of my head:

      * OOP still requires manual destruction of objects.

      * Events execute only in the global scope.

      I'm sure there will be hundreds who will leap to the "defense" of Tcl against these "attacks", but really don't bother. Since I've joined the very large crowd who doesn't actually use it anymore, and it's not like there's any jobs that require me to even use it -- the closest it gets is tweaking an Expect script or two -- there's no reason anyone should actually have to care.

      Yes, it's possible to "get used to" Tcl, and I did for some years. It's not the worst language I've ever programmed in, but that's unfortunately what has to pass for praise as well.

      --
      Done with slashdot, done with nerds, getting a life.
  7. less and less by m2943 · · Score: 3, Informative

    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.

    1. Re:less and less by Anonymous Coward · · Score: 1, Interesting

      No, that would be wxWindows, though recently Qt has been gaining some popularity as well.

    2. Re:less and less by BLAG-blast · · Score: 1

      Although a little more restrictive than straight Tk, I prefer Tcl/Gnocl (Tcl/Gnome/Gtk): http://www.dr-baum.net/gnocl/

      --
      M0571y H@rml355.
    3. Re:less and less by kripkenstein · · Score: 2, Interesting

      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. Well, the GP is probably basing that claim on that Tkinter is included in Python. Which has made it a sort of default for quick-and-dirty GUI hacking, especially cross-platform.

      However, you are correct about GTK. While there are other alternatives - WxWidgets and Qt both have nice Python bindings - PyGtk seems to be the nicest and most popular, and for good reason, it is an excellent platform. In fact GObject in C (or even C++, via gtkmm) seems clunky after you see how nicely GObject maps into Python classes in PyGtk. Add to that the fact that all major Linux distros include GNOME by default, and that Ubuntu in particular favors GNOME and Python, and you have quite a lot of people coding in PyGtk.
    4. Re:less and less by Anonymous Coward · · Score: 0

      Unfortunately Tkinter is also broken at the moment with Tcl/Tk 8.5.

      The bug is assigned to me (on tcl.sf.net under the Tk project)), and waiting on some input from the Python people.

    5. Re:less and less by Marcion · · Score: 1

      Are you talking about this bug 1851526?

    6. Re:less and less by baxissimo · · Score: 3, Insightful

      I know this is Slashdot but there are still a few people out there using Windows, y'know. And GTK on Windows is just so-so at best. It looks and acts un-natural. Don't know about Mac, but I suspect wx is ahead of GTK in terms of not sticking out like a sore thumb there too.

    7. Re:less and less by kestasjk · · Score: 1

      Well the stunning new themeable Tk look is going to change all that, buddy.. Just look at this sample screenshot of how great a Tcl/Tk GUI can now look.

      --
      // MD_Update(&m,buf,j);
    8. Re:less and less by Anonymous Coward · · Score: 0

      Nice try, but you know your own statement is not even remotely true. Please don't infest this thread with GTK-is-dying propoganda.

      Qt for CROSS_PLATFORM applications? I think not! Unless you consider that Cross platform doesn't include Windows.

      A quick Google search will uncover of Py-Tk apps, with PyGTK being the #1 non-default widget set.

    9. Re:less and less by cloakable · · Score: 1

      Except.. that QT is on Windows, under the GPL, now?

      --
      No tyrant thrives when every subject says no.
    10. Re:less and less by Per+Wigren · · Score: 1

      Qt for CROSS_PLATFORM applications? I think not! Unless you consider that Cross platform doesn't include Windows. Are you trolling? Qt supports Windows at least as well as it supports X11 and MacOS X. It's a joy to code for.
      --
      My other account has a 3-digit UID.
    11. Re:less and less by cronot · · Score: 2, Informative

      That's because GTK and WxWidgets are not really on the same league. GTK implements a full Widget engine, as in it does all the job of actually drawing all the widgets. WxWidgets is not really a Widget engine per se, just a wrapper around the underlying platform's own native widget engine - that's why cross-platform applications written using wxWidgets has a native look and feel to them. In the case of Linux, wx wraps around GTK, since there's isn't a standardized widget engine for X11 applications (though IIRC Wx has or had QT bindings too).

      That's not to say I dislike WxWidgets though, to the contrary - I always turn to it when I need cross-platform GUI apps, it is sweet, and it is sad that it has so little recognition, and poorer approaches to the solution are used instead (GTK / QT).

    12. Re:less and less by dkf · · Score: 1

      Don't know about Mac, but I suspect wx is ahead of GTK in terms of not sticking out like a sore thumb there too. The big problem on Macs is that apps behave differently there. There are different conventions about accelerator keys, different ways of using menus, different expectations of you interact with dialogs, etc. And OSX users are much more likely to be picky too. Porting apps from either Linux or Windows to OSX involves rewriting a bunch of stuff; making the widgets look right isn't the worst part.
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    13. Re:less and less by zsau · · Score: 1

      Funnily enough, every time I've seen a wxWidgets app running on my Linux box, it's always stuck out like a sore thumb. They abide by Windows UI design patterns, just using Gtk+ widgets. This is a bad way to do cross-platform applications; instead, you should follow the lead of Pidgin/Adium/libpurple and separate out the front-end and back-end code; the front-end should be maintained by separate platform specific teams. That way, your program looks and feels native. No cross-platform toolkit will do that.

      --
      Look out!
    14. Re:less and less by Ignominious · · Score: 1

      you should follow the lead of Pidgin/Adium/libpurple and separate out the front-end and back-end code; the front-end should be maintained by separate platform specific teams. That way, your program looks and feels native. No cross-platform toolkit will do that.
      GUI separation is a good idea, but in the spirit of code reuse I would say it's still a good idea to use wxWidgets (or similar) for every platform, and the platform specific bits can be abstracted out of common base classes. That way saves a LOT of duplication. The differences between platforms are important, but there is still a lot of commonality. Using different toolkits throughout in most cases is overkill.
    15. Re:less and less by zsau · · Score: 1

      Show me a program that does it right, when using a cross-platform toolkit. I haven't seen any. That doesn't mean none exist, but everyone who uses cross-platform toolkits seems to decide it's just easier just to use the same code without making sure it's got a native look and feel on each platform. My problem is that it becomes to easy to do the wrong thing.

      --
      Look out!
    16. Re:less and less by Anonymous Coward · · Score: 0

      Funnily enough, every time I've seen a wxWidgets app running on my Linux box, it's always stuck out like a sore thumb. They abide by Windows UI design patterns, just using Gtk+ widgets.
      In particular, due to the toolkit's use of absolute positioning, you need to be using a Gtk theme that makes all widgets the same size as the default Windows appearance or risk getting the text clipped into illegibility. (I don't know how well, if at all, it handles non-default text sizes on Windows.)
    17. Re:less and less by schlenk · · Score: 1

      If one did it right you wouldn't notice it. Its impossible to do it right on each platform supported by a toolkit (at least Unix/Linux kills you with the horrible mix of different WMs and Toolkits each with its own strange configuration system thats slightly different from anybody elses). But you can do it on some platforms you care for, usually its windows, OS X and one of the many Unix WMs. And your argument is rather weak, either you care to really match the look and feel of the platform, or you say 80% is enough and stop there. Basically you have choices to make where to distribute your work power, either you enable your program to work 80% in lots of environments and fix the most cruel usuability bugs when they get reported, or you go to support one platform 100% and drop nearly all the others. If you can do both, due to excessive amounts of money, volunteers or other things, your just lucky.

  8. Will Tk Widgets Now Integrate? by RAMMS+EIN · · Score: 2, Interesting

    I am only interested in one thing:

    Will the Tk widgets now integrate with the rest of the desktop, in terms of using the same theme settings that other programs use?

    I like how Tk has been used as a GUI toolkit by many programming lanugages, and I think that says something good about its design and implementation, but the ugly, unthemeable, and out-of-place looking widgets have always been a thorn in my eye.

    Especially because it _did_ work sort of right on proprietary OSes as far as I know.

    --
    Please correct me if I got my facts wrong.
    1. Re:Will Tk Widgets Now Integrate? by BiggerIsBetter · · Score: 4, Informative

      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.
    2. Re:Will Tk Widgets Now Integrate? by zlogic · · Score: 2, Informative

      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!

    3. Re:Will Tk Widgets Now Integrate? by rotohammer · · Score: 1

      Tk has font anti-aliasing built in now, even on Linux. In the past it was a compile time option. Themes on Linux are difficult to coordinate at the application level since there is no one standard desktop environment (I don't use KDE or Gnome myself). Because of this, tying Tk to a specific desktop would typically mean it would only work in that environment. The demand for that has been low up to this point. Most Linux users accept the fact that apps may not follow their desktop theme, unless its designed specifically for their environment. My Tcl/Tk apps run on all desktop environments, but don't match the theme. It will look the same on Windows & OSX if I choose. I prefer the "run everywhere" scenario over the "run themed here, and nowhere else" scenario.

    4. Re:Will Tk Widgets Now Integrate? by dkf · · Score: 1

      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! There's a Qt theme done so integrating with a KDE desktop should be fairly easy. It's not bundled in the standard release due to licensing issues, but would be a superb addon in a Linux vendor customization. I've no idea why nobody's done a GTK one yet (I've been marooned in Windows-land for the past few years and so have focussed on the Tcl scripting side of things; that's my excuse for not doing it myself...)

      The font engine in use should now be the same one as used by everything else on your desktop, i.e. Xft (assuming things are configured right). If you've got antialiased fonts turned on elsewhere, Tk should just pick it up. If there's a problem, it's a reportable bug and we'll want to fix it in a patch release ASAP. (If the problem is just the screenshots, bug someone to do better ones. D'uh!)
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    5. Re:Will Tk Widgets Now Integrate? by rotohammer · · Score: 1

      I learned something new today. Qt support for Tcl: http://wiki.tcl.tk/2181

    6. Re:Will Tk Widgets Now Integrate? by thePsychologist · · Score: 1
      Looks good on Windows and Mac but still looks like classic TK under X11 - i.e. it will _not_ match your GTK / QT themes. From the site:

      New and complementary widgets that make use of platform-specific theming on Mac OS X and Windows to better fit in with those environments, and feature an improved look and feel under X11. (screenshots)
      --
      "What lies behind us, and what lies before us are tiny matters compared to what lies within us." Ralph Waldo Emerson
    7. Re:Will Tk Widgets Now Integrate? by Anonymous Coward · · Score: 0

      You seem to have not read your own quotation.

      Re-read it, something about "improved look and feel under X11"

    8. Re:Will Tk Widgets Now Integrate? by jenglish · · Score: 1

      > Will the Tk widgets now integrate with the rest of the desktop,
      > in terms of using the same theme settings that other programs use?

      Only on Windows and (to a lesser degree) Mac OSX.

      On X11, the situation is unchanged -- Gtk+ apps have one set of theme parameters, Qt apps have another; and the same holds for Tk. So unless someone has taken the time to develop a Tk theme that matches your preferred Gtk+ and/or Qt theme, Tk apps will look different.

      Also note that themability is done using a new collection of widgets; existing Tk applications won't magically become skinnable. However, the default settings for the core widgets on X11 *have* been refreshed, and Tk uses Xft now, so most existing apps *will* look better under X. They just won't necessarily match the desktop.

      Tk's new default look on X11 is very spartan -- it's close to the Gnome "Simple" theme from circa 2003 -- but at least it doesn't look like 1996-era Motif anymore!

    9. Re:Will Tk Widgets Now Integrate? by Anonymous Coward · · Score: 0

      Most Linux apps use GTK, or gtk bindings to some other language, or the GTK theme

      Spoken like a true Ubutu user.

  9. They need to start releasing... by m50d · · Score: 1

    the Tklet browser plugins again, so that I can write in-browser applications in a sensible programming language. Why Java won that market I can't possibly fathom.

    --
    I am trolling
    1. Re:They need to start releasing... by Anonymous Coward · · Score: 0

      Why Java won that market I can't possibly fathom.
      s/Java/Flash
    2. Re:They need to start releasing... by Eryq · · Score: 5, Insightful

      Why Java won that market I can't possibly fathom.

      It didn't. Flash did.

      Java might have won if the original JDK hadn't been so primitive and difficult to work with. Even long after Swing was released, browsers were still shipping with ancient 1.1 JVMs, and installing newer JVMs wasn't an automatic (or even simple) process for some browsers and platforms.

      Still, though, Flash probably would have won out in the end. Swing is designed for desktop applications: standard menubars, dialogs, etc. -- themeable, maybe, but BORING to a web designer's eyes. With Flash, cool weird unique user interfaces are the whole point.

      The engineer and UI-standards-advocate in me appreciates Swing. The artist wants to learn Flash.

      --
      I'm a bloodsucking fiend! Look at my outfit!
    3. Re:They need to start releasing... by Anonymous Coward · · Score: 0

      The artist wants to learn Flash.

      Frankly for the vast majority of web sites Im kinda tired of the "artist" being involved at all. Most web sites are not supposed to be be works of art... they are supposed to deliver me information in a well designed out format. Some of the worst offenders are musicians and bands that think having a arty web site will add something... when all I really want to know is stuff like "when will new album come out" "when are you next touring" etc.. Give me a nice designer and leave the art for specific web sites.

    4. Re:They need to start releasing... by stevel6868 · · Score: 1
    5. Re:They need to start releasing... by dkf · · Score: 1

      Frankly for the vast majority of web sites Im kinda tired of the "artist" being involved at all. Most web sites are not supposed to be be works of art... they are supposed to deliver me information in a well designed out format. That's an engineer speaking, not an artist. OK, I agree with you, but then I'm also an engineer...
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    6. Re:They need to start releasing... by xtracto · · Score: 1

      Some of the worst offenders are musicians and bands that think having a arty web site will add something

      Haha, that reminded me, some months ago I visited the page of a fellow slashdotter because I was interested in whatever he was advertising with his signature (with a link to his homepage) but after trying to guess wtf was the front page about I left bitterly.

      I found outstanding that in 2007 you can still find pages in which each "option" of the homepage menu is depicted as an image which is *supposed* to represent whatever option the designer thought it will represent. The result is a terrible homepage with a bunch of images like collage in which you can not find whatever you are looking for.

      In a similar issue, I am currently administrating the homepage of certain company, this company had a design done by certain designer, but the design is incomplete. Of course now, they need to add several other functionalities to such site but the "style" of the design was not made for that and anything you add seems like a terrible patch. I have already told them that if they want a good looking page, they should 1. Tell ME what is the functionality they want 2. Let me write the specifications of the pages and then 3. Send such specifications to the graphic designer so that he can make a design that considers all those options. But meh, they dont want to pay for a designer again...

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
    7. Re:They need to start releasing... by m50d · · Score: 1

      Oh, cool. Last I knew the only releases were for about IE5/NN4.

      --
      I am trolling
  10. People still use it? by ndogg · · Score: 1

    Wow, didn't know that people used it. Now I know what gramps was talking about when he mentioned "programming tickles!"

    --
    // file: mice.h
    #include "frickin_lasers.h"
    1. Re:People still use it? by Windom+Earle · · Score: 1

      I use a Bittorrent client that runs on curses. No fancy-schmancy Tcl for me!

      (it never crashes, and I have this creeping suspicion from how other clients have been running lately that anti-torrent forces are exploiting bugs in torrent clients to crash them. Like in any thing else, the all-singing all-dancing graphical 'goodies' lead to instability)

    2. Re:People still use it? by Zey · · Score: 1

      I use a Bittorrent client that runs on curses. No fancy-schmancy Tcl for me!

      Not necessarily so. Tcl/Tk has had a Curses extension for years... ;-).

  11. TCL/TK runs the world by Colin+Smith · · Score: 1

    Yahbut tcl/tk is used to run machines, factories. The hint is in the name.

    Whether the widgets look like Windows, Linux, OSX, Motif or whatever is largely irrelevant as long as the start and stop buttons work when you click them.

    --
    Deleted
    1. Re:TCL/TK runs the world by Anonymous Coward · · Score: 0

      But should it be kept in that sandbox forevermore, if it's as good as they say for other uses? Think about it, grandpa.

      GTK is gaining ground over Tcl/Tk among Python devs and that's a sad state of affairs -- GTK programming is like trying to build a functional device out of limp spaghetti. (No offense to Flying Spaghetti Monster though. Although I cannot help suspecting that a noodly appendage intervened in the architecturing of GTK at a critical stage, after drinking heavily.)

      Off to dig in this new goodness now... themability, that's all that was needed, and would alone have warranted a version number bumb into "9".

    2. Re:TCL/TK runs the world by Colin+Smith · · Score: 1

      what it's used for has no relevance in reference to that fact. Course it does you chickenshit little coward. Function defines form.
      --
      Deleted
    3. Re:TCL/TK runs the world by Anonymous Coward · · Score: 0

      Damn straight. If my CNC lathe doesn't have 3D transparent melting windows and semi-transparent buttons that rotate and twist when I click them, then clearly the lathe is useless to me.

      Also, smileys and sound-effects.

  12. Tcl language vs. Tcl environment-Bling. by Anonymous Coward · · Score: 3, Funny

    "Really? For what purpose?"

    Bragging.

  13. I'm a big Tcl/Tk Fan, but... by BLAG-blast · · Score: 1
    These days when I write Tcl/Tk code, I'm normally happy with the results and feel very productive in a short space of time. But I keep getting a strange feeling, kind of like I'm working in a building, but the building is empty of people, and everybody else is in another building across the street.


    Anyway, I better get back to writing my Micro Controller Design handbook in Gaelic - I'm sure this one will be a seller, hardly anybody is writing Gaelic computing text books!

    --
    M0571y H@rml355.
    1. Re:I'm a big Tcl/Tk Fan, but... by stevel6868 · · Score: 5, Informative

      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.

    2. Re:I'm a big Tcl/Tk Fan, but... by Minix · · Score: 3, Informative

      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
    3. Re:I'm a big Tcl/Tk Fan, but... by Minix · · Score: 1

      There's heaps of active community: mailing list comp.lang.tcl http://groups.google.com/group/comp.lang.tcl/topics, a wiki http://wiki.tcl.tk/, a 24x7 chat #tcl (with a jabber chat too.) You're welcome to join in.

      --
      "There are four boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order." Ed Howdershelt
    4. Re:I'm a big Tcl/Tk Fan, but... by Anonymous Coward · · Score: 0

      If you have time, could you please
      write a book about NetBSD in English?
      NOBODY has done this! LOL.

    5. Re:I'm a big Tcl/Tk Fan, but... by mi · · Score: 1

      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.

      My favorite point about Tcl is how easy it is to extend it — in C. Both Perl and Python, and other languages, have similar extendability, but nobody's is as straightforward and, uhm, elegant... In my opinion.

      --
      In Soviet Washington the swamp drains you.
  14. Tk is greater or equal to GTK by Marcion · · Score: 1

    I think Tkinter still has a lot of advantages at this point over GTK. It has plenty of life left in it. At least until someone writes an equally high-level Python interface to a different graphical toolkit and gets it into the standard library.

    If you have a Python application and want to throw a quick GUI onto it, Tkinter is a lot easier. It is also very easy to deploy since it is in the Python standard library. You can write a custom app on your Linux workstation and then the next day put it on a customer's Windows desktop.

    Relative to most Python libraries, PyGTK is rather low level, the Python bindings to TK are a lot more Pythonic. For 80% of people, TK is far more useful for adding a quick and dirty GUI onto an application.

    Even for someone such as me who uses GNOME-based systems and couldn't care less about how ugly it looks on Windows, GTK is far more powerful and better looking than Tkinter, yes. However, you can't just dip in with Python knowledge and get going, you have to learn rather a lot of low level details about how GTK works. You are far more programming to an implementation rather than to an interface.

    So another approach is the WX toolkit. However, I have been looking at a library called Kiwi (
      http://www.async.com.br/projects/kiwi/ ) which attempts to provide a more abstracted Python interface to PyGTK. It is still in some ways lower level than Tkinter though.

    So I don't see Python changing its default graphical toolkit from TK anytime soon.

    P.S. Slashdot does not allow TK >= GTK as the title, perhaps they should re-write the site in Python?

    1. Re:Tk is greater or equal to GTK by Peaker · · Score: 1

      Last time I tried using Tkinter, it wanted me to micromanage the scrollbars in the listboxes I use. This is unheard of in pygtk, where I just create the listbox and it does all the necessary scrollbar stuff on its own.

      I got the feeling Tkinter was way too "low level". So what do you mean when you say it is higher level?

  15. Re:Tcl 9 by kennykb · · Score: 2, Informative

    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.

  16. Using foreign theme engines by DrYak · · Score: 1

    but what about Linux?


    Apparently, some developer are playing with the QT/KDE and GTK theme engine hooks :
    Here's a link to tileqt that I found on tcl's page. This theme uses the QT-theme-egine to make TCL/TK applications look like the rest of the KDE desktop. (It works like the gtk2's qt-engine).

    Probably there's also someone working on using GTK2's theme engine so Gnome people can have their applications look like their desktop too. But I'm a KDE user and too lazy to search for that information.
    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Using foreign theme engines by zsau · · Score: 1

      Will these themes just match the look or also the feel of the toolkit? (e.g. on Gtk+, will it let me remap my keyboard shortcuts on the fly from the menu?). Unless they can match the feel, there's not much point; they should crawl up in a whole and whither away like all suppliers of cross-platform toolkits.

      (The correct approach to writing cross-platform programs is to separate the front-end from the backend; Pidgin/Adium/libpurple are an excellent example.)

      --
      Look out!
  17. It's not necessary anymore by KeithH · · Score: 0, Troll

    Tcl's only redeeming features are Tk, Expect, and the ease with which it can be incorporated as a scripting language for applications. Perl and Python both provide all three along with a richer available library.

    [It's been a *very* long time since I reviewed Osterhout's original draft text for Tcl. The minimalist approach to Tcl appealed strongly to the mathematician in me. A few years later, I tried Perl despite the fact that I was appalled by its philosophy of doing what it thinks I mean. However, after many years of practical use, I've come to appreciate Perl and loath Tcl. CPAN makes my life easier just about every month. I'll give Python a try when there I have a reason not to use Perl.]

    1. Re:It's not necessary anymore by BridgeBum · · Score: 4, Interesting

      TCL is still used in some surprising places. A good example is networking equipment, such as Cisco devices, F5 load balancers, and so on. Many of these have TCL capabilities for one reason or another. A good example for the Cisco case would be their load balancing devices. You can create custom monitoring scripts in TCL and import them into the device.

      --
      My UID is the product of 2 primes.
    2. Re:It's not necessary anymore by rotohammer · · Score: 1

      It is necessary, as you can't embed Perl into anything but a full PC. Thats why I now loath Perl and love Tcl. Power in smaller size.

    3. Re:It's not necessary anymore by RAMMS+EIN · · Score: 1

      You might have a look at Ruby sometime. It has pretty good language design (inspired by Lisp and Smalltalk), many practicalities copied from Perl, it has plenty of libraries available for it (though not nearly as many as Perl), which are easy to manage with Ruby Gems, and it's easy to interface to C code.

      I find that Ruby is the language that nobody wants to look at, because it's just like the language they're currently happy with (usually Python, often also Perl). It was the same for me for many years (and, at the time, English documentation was somewhat lacking). But when I did check out Ruby, I quickly fell in love with it. I'm a programming language freak, so chances are that whatever language you use now is one I've used as well. It would go too far to say that Ruby beats them all...but on many tasks, it does.

      --
      Please correct me if I got my facts wrong.
    4. Re:It's not necessary anymore by Anonymous Coward · · Score: 0

      Complete agreement. TCL has been outmoded for at least 10 years. The only reason I could see ever using it is for simple embedded cross-platform scripting, but Lua has got TCL beat for that.

    5. Re:It's not necessary anymore by rotohammer · · Score: 1

      I'm in complete disagreement. In the last 10 years Tcl has evolved greatly. It's not just for simple cross-platform embedded scripts, but also for complex cross-platform embedded apps.

    6. Re:It's not necessary anymore by 198348726583297634 · · Score: 4, Insightful

      Not so.

      Tcl's strongest redeeming features are its consistency and its sensibility. Tcl very strongly has a principle of least surprise, thanks to these. That alone makes programming in Tcl a joy compared with many, many other things. You'll spend a lot less time wondering how your code will work on a foreign platform, which flags a given widget expects, and so on.

      Tcl of 2007 is also not Ousterhout's Tcl of 1987. A lot has happened in the last 20 years, including totally pervasive unicode support (the [msgcat] library makes internationalization such a breeze, there's absolutely no reason not to make all your programs localizable from the start), some very healthy namespace functionality, an excellent networking library, and of course the relatively recent Tile toolkit.

      There are also new projects being developed with Tcl all the time.

      Far from being an outdated or dying language, Tcl today is just a well-kept secret, sitting out in plain sight.

    7. Re:It's not necessary anymore by Anonymous Coward · · Score: 0

      I find that Ruby is the language that nobody wants to look at, because it's just like the language they're currently happy with
      I get the same reaction when I bang on people's door and try to tell them the good news about Jesus Christ. I wonder if it might possibly be related to my behaviour, rather than the relative merits of my beliefs and theirs?

      Seriously, the #1 problem with Ruby right now is the way Ruby advocacy has literally turned into a kind of religious evangelism. Ruby fans claim that their new favourite programming language will change your life. Even you talk of "falling in love" -- more extreme cases talk of having their eyes suddenly opened to huge new worlds of possibility. They talk about how it makes programming fun again, how you've never really experienced code until you've done it in Ruby, and blather on and on in the same vein for hours, while their victims go kind of glassy-eyed and nod and smile and hope they go away soon.

      I understand this because I've been there and done it (evangelised the One True Language, that is; it wasn't Ruby for me, but I felt the same way about it). You get over it with time, and come to recognise that no language is so good that it matters whether other people use it too or not, and start choosing your languages more pragmatically instead of believing that code blocks are so cool that they make Ruby absolutely the ideal language to write this microcontroller in.
    8. Re:It's not necessary anymore by Anonymous Coward · · Score: 0
      Blocks are merely anonymous functions. You can easily refactor them into named functions if you want. Of course, refactoring in such a manner would break encapsulation.

      Ruby has problems, but the blocks implementation isn't it. Blocks are a fine idea, but Matz didn't take it far enough. I find this is true of Ruby in general. It opened my eyes the possibility of a very nice OO-functional programming system. But it isn't the OO-functional system I'm looking for.

      What I want in my One True Language:
      • First class functions

      •                  
      • Message passing based OO system
                         
      • Easy syntax to "convert" an object into a closure and vice versa
                         
      • SmallTalk blocks and iterators

      •                  
      • More dynamic programming constructs.

      •                  
      • The availability of an interpreter or compiler/runtime pair that is optimized for automatically parallelizing functional code


      Scheme, with a third party object system, would work nicely but fails the last condition as far as I know. Perl has first class functions, and can be coerced into a message passing based object system. But I really dislike its internals. They make dynamic programming very tedious, since there are myriad special cases to consider when a change is made. I'm looking into Erlang next.

      I realize my list isn't appropriate for all domains. But you should not hesitate to use powerful tools if they are appropriate for your domain. They can make the difference between drudgery and fun.
    9. Re:It's not necessary anymore by RAMMS+EIN · · Score: 1

      ``I get the same reaction when I bang on people's door and try to tell them the good news about Jesus Christ. I wonder if it might possibly be related to my behaviour, rather than the relative merits of my beliefs and theirs?''

      Thanks for pointing out that I have gone a bit further over the edge than I wanted to. My post was meant to be a friendly suggestion to try Ruby, because I think the person I replied to might like it, based on what he wrote.

      ``Seriously, the #1 problem with Ruby right now is the way Ruby advocacy has literally turned into a kind of religious evangelism. Ruby fans claim that their new favourite programming language will change your life. Even you talk of "falling in love" -- more extreme cases talk of having their eyes suddenly opened to huge new worlds of possibility.''

      Frankly, depending on what languages you already know, I think this might not be over the top at all.

      ``I understand this because I've been there and done it (evangelised the One True Language, that is; it wasn't Ruby for me, but I felt the same way about it). You get over it with time, and come to recognise that no language is so good that it matters whether other people use it too or not, and start choosing your languages more pragmatically instead of believing that code blocks are so cool that they make Ruby absolutely the ideal language to write this microcontroller in.''

      Oh, I'm all for the right tool for the job. And Ruby definitely isn't fit for all jobs. In fact, I do think I mentioned that in my original post.

      The sentiment I get from that last paragraph of yours, though, is the suggestion that all the features that I (or someone else) like in Ruby don't matter too much. Some sort of "who cares if you have code blocks, just shut up and get the job done". And that's something I vehemently disagree with. What makes programming languages great is not the amount of things that are built in, the amount of library code shipped with them, or even the amount of library code available for them. What makes programming languages great is the productivity you get when developing _new_ things. I find that, here, it matters a lot how well you can abstract from things. Basically, you adapt the programming language to the problem you're solving. In Ruby, this is very easy. In many languages, it isn't. This makes all the difference in the world. Oh, and of course, Ruby isn't the only language like this. But if I start about Lisp, people fall over me, too.

      --
      Please correct me if I got my facts wrong.
    10. Re:It's not necessary anymore by Anonymous Coward · · Score: 0

      > In the last 10 years Tcl has evolved greatly. It's
      > not just for simple cross-platform embedded scripts,
      > but also for complex cross-platform embedded apps.

      One of the things people always criticize C++ for is that it gets applied too generally in areas you could use higher level languages (Lua, Perl). I've seen TCL embedded usefully, but you're saying that we should consider TCL for large, complicated apps for which a low-level language like C++ would be a no-brainer?

      Maybe I don't know what you mean. I can't be alone in being confused by this I can't think of a single major app written from the ground up in TCL in the last 10 years. Are there any? I can name a couple hundred major cross-platform apps written in C or C++ in the l0 years without even thinking much. I can even name a few in Python and Java.

  18. It's Pronounced Tickle by dabbaking · · Score: 2, Funny

    Apparently Tcl is pronounced 'Tickle'. I learned the hard way after someone had pointed out that I named a file test.tcl.

  19. Spoiler by Anonymous Coward · · Score: 0

    Tcl is a scripting language.

  20. Looks like crap by paulatz · · Score: 1

    I will be moderated down for this? Who cares, I have to say it. Why the heck do Tk always looks like total crap on linux? It is the most hideous widgets I have ever seen, the graphic designer should be covered in tar and feathers, and he would still look better than the widgets.

    For the rest tcl/tk is still one of the easier ways to develop some cross-platform mini-apps, useful when you don't want to loose time in programming graphic interfaces but you have to for marketing reasons.

    --
    this post contain no useful information, no need to mod it down
    1. Re:Looks like crap by rotohammer · · Score: 1

      Theres no excuses now to look like crap, unless thats what the programmer intended. Hence the significance of version 8.5.0 .

    2. Re:Looks like crap by schlenk · · Score: 1
      Many reasons:
      • There is no graphic designer involved.
      • Application programmers don't invest time to polish their apps, you can do a lot even with Tk 8.4 but many programmers just don't invest time or don't have some graphics designer at hand to do nice icons and stuff.
      • No antialiased fonts in Tk before Tk 8.5, so fonts look like the standard legacy X11 bitmapped fonts they are.
      • Motif imitating default style. Its dated but was the right thing some decades ago...
      • Tk has to play catch up, because other toolkits try to define the default looks (GTK and QT) on linux, they even try to redefine parts of X, sometimes breaking compatibility with other Toolkits at a whim.
  21. TCL/TK runs speech research by Latent+Heat · · Score: 3, Informative
    The WaveSurfer speech waveform analysis (pitch, formants, sound spectrogram) package is based on TCL/TK and has Python hooks. This is the free speech package out of KTH is Sweden. It is not my package, by the way so I am not shilling for it, but I have taken an in depth look at it to see how they get to be multi-platform and not Windows-bound.

    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).

    1. Re:TCL/TK runs speech research by sskang · · Score: 1

      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. QGraphicsView is available as part of PyQt4 and it's lovely to use from within Python. I've tried it with all sorts of complex canvas items (rich text, SVG etc) and it works great.
    2. Re:TCL/TK runs speech research by Anonymous Coward · · Score: 0

      "I would like to see such a high-function widget in other environements."

      There are. Evas, GTK+ canvas, Qt Canvas for instance.

  22. It looks great now! by rotohammer · · Score: 1

    Most of the negative comments about Tcl/Tk focus on the past versions, missing the point of this new 8.5.0 release! Try it before you bash it.

    1. Re:It looks great now! by Anonymous Coward · · Score: 0

      The more up to date version is called Lisp.

  23. In Soviet Kickyurassistan..... by zogger · · Score: 0, Offtopic

    ...Chuck Norris's law will suit YOU!

  24. TCL/TK was "Java" before there was Java by Latent+Heat · · Score: 2, Interesting
    The funny thing is that TCL/TK was what Sun was promoting before they came out with Java and started pushing that.

    Whenever you have one of these overlapping-window GUI front-ends to an OS, developing apps for it is a hard slog, whether it is Windows, GTK, Motif, raw X, whatever. Just like MS came out with their application programmer-friendly Visual Basic as the go-to way of slapping a GUI together, Sun was at one time promoting TCL/TK as the way of slapping a GUI front end on your C program.

    In commercial apps, your users worry if your widgets are pretty and Mac people are in a huff about ported software or Java not conforming to UI standard, but for internal apps that just have to get a job done, you often don't care. The projected associated with a high-voltage custom x-ray machine had been a Sun shop since the days Sun 2's came out, and the current app running the x-ray machine is TCL/TK running on a SPARC.

    That app makes good use of the Canvas widget to display gray-scale x-ray images and allow you to drag cursors and place measurement markers over those images; apart from that the app is a bunch of buttons to start and stop image collection and motion tracking modes of the x-ray system. I wouldn't have taken note that it was TCL/TK it it were not pointed out, but now that I know, I can see the characteristic widget styles and layouts along with the Canvas that does the x-ray images.

    Given that this was all implemented prior to the release of Java, TCL/TK is what you had, and TCL/TK is what you did unless you wanted to take much more time doing the GUI, and our app has aged well (although try hiring someone to change the TCL code), so yes, it is a good question why Sun in effect abandoned that and jumped on the Java bandwagon of their making.

  25. Ruby Tk? by negated · · Score: 0

    Now if only documentation existed for Ruby Tk...

    -S

  26. skinning not automatic? by radarsat1 · · Score: 1

    I'm happy about this new release because I do use one or two programs that use Tcl/Tk and I'd be very happy to see them ... well.. look nicer. Coincidentally, for this very reason I was looking at Tile the other day, which is the skinning engine available for Tcl/Tk. I compiled and installed it.. and.. nothing changed.

    So, it seems that Tcl/Tk applications have to explicitly use Tile in order to get the skinning, is this correct? In other words, if I install 8.5, it won't change anything (visually) for the applications I'm already using, until they update themselves properly for 8.5, is that right?

    Or is there some flag I can set in some configuration file that will enable the skinning engine?

    1. Re:skinning not automatic? by rotohammer · · Score: 1

      Unfortunately, its not automatic. But there are reasons for it. You loose a lot of control over how each widget is rendered when you use a theme. A lot of apps would break badly if you just swapped in the new ttk versions. I know, as I've done it automatically with a script. On the upside, its really not hard to change the widget references in the code and cleanup any misbehaving widgets . You'll end up with a much better app in the end.

    2. Re:skinning not automatic? by 198348726583297634 · · Score: 1

      The skinning is not automatic. You have to explicitly use the Tile widgets that you want to have appear in the new themed hotness. Not all Tk widgets have a Tile equivalent, either, so your program will end up being a mix of Tile and Tk. Now...this isn't nearly as confusing as you might think, because there are really only a handful of widgets you end up using over and over again, and you learn which is which pretty quickly.

      A good place to start is, of course, the wiki entry on Tile. The Tile documentation is also useful, because Tile widgets do behave differently from their Tk equivalents.

      But in general, the transition to Tile is not a difficult one.

    3. Re:skinning not automatic? by Zey · · Score: 1

      For the themed widgets, instead of:

      package require Tk
      grid [label .l -text "Hello world"]

      ... you'd use:

      package require Ttk
      grid [ttk::label .l -text "Hello world"]
    4. Re:skinning not automatic? by dbcad7 · · Score: 1

      I use aMsn, which is a Tcl/Tk app.. It's kind of a a hit an miss to get it just right.. As to looks, it's great.. It's the damn fonts. I have had them right before, where I could use all the systems fonts.. but it's screwed up since my last upgrade, and I guess I'll have to wait to see if the next version gets the fonts working correctly again. (I am not going to re-compile from source)

      --
      waiting for ad.doubleclick.net
    5. Re:skinning not automatic? by schlenk · · Score: 1

      Lookup the chameleon package from AMSN, it does automatic conversion of most old Tk widgets to new Ttk widgets, or at least eases the transition a lot.

    6. Re:skinning not automatic? by Anonymous Coward · · Score: 0

      That is correct. It used to be that Tile (which was the precursor to Ttk) provided more backwards compatibility and you could do: namespace import ::tile::*, but eventually that was deprecated, and now it doesn't work. So you have to rewrite every application to use the themed widgets, and remove incompatible flags and replace as necessary with ::ttk:: related theme code.

      In some cases it's a hell of a lot of work. See here: http://wiki.tcl.tk/15443

      I disagree with the Tcl Core Team's choice to not provide backwards compatible themed widgets.

  27. Next Coccinella will switch to 8.5 in a few months by ghfttjj124 · · Score: 2, Informative

    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

  28. perl/tk? by bcrowell · · Score: 1

    Does anyone know if this will end up making the widgets in perl/tk apps look better/more modern at some point?

    1. Re:perl/tk? by schlenk · · Score: 1

      Only if someone does the Tk port for Perl/Tk because they stripped Tcl out of the mix the perl/Tk devs need to do a lot more work than necessary. But maybe look at the Perl::Tk module in CPAN...

    2. Re:perl/tk? by IpalindromeI · · Score: 1

      Take a look at Tcl::Tk or Tkx. They provide a wrapper around an existing Tk, so you don't need to wait for the Perl/Tk to be updated.

      --

      --
      Promoting critical thinking since 1994.
  29. Tar and Gunzip by armanox · · Score: 1

    nah. His work was tarred and Gunzipped instead of feathered

    --
    I'm starting to think GNU is the problem with "GNU/Linux" these days.
  30. Way to go! by sigzero · · Score: 1

    I like Tcl (and Tk). It has a nice syntax. It has good libraries. It runs pretty much the same on any OS I care to use. One of the big benefits as well is the community. It is super helpful and very nice to work with.

  31. Boy, did you ever miss the point.... by argent · · Score: 1

    Why the heck do Tk always looks like total crap on linux?

    Because it was based on the state of the art in 1992 or so.

    Who cares?

    Because the new widget set is themable and doesn't have to look like total crap.

    It's not the way I would have solved the problem, personally, but it does solve it.

  32. It's not necessary anymore-Dying. by Anonymous Coward · · Score: 0

    "Far from being an outdated or dying language, Tcl today is just a well-kept secret, sitting out in plain sight."

    Much like LISP, Smalltalk, Forth, and MUMPS.

  33. GObject in C by Ignominious · · Score: 1

    In fact GObject in C [...] seems clunky after you see how nicely GObject maps into Python classes in PyGtk
    GObject in C is the clunkiest, nastiest, cruftiest, most despicable kluge ever devised, and that includes MFC.

    Saying PyGtk is less clunky that GObject in C is like saying Stephen Hawking is slightly more intellectually inclined than George W. Bush ;-)

    P.S. I don't like GObject in C.
  34. Tk >= GTK by IpalindromeI · · Score: 1

    no text

    --

    --
    Promoting critical thinking since 1994.
    1. Re:Tk >= GTK by Marcion · · Score: 1
      Ok right so

      &#89;&#111;&#117;&nbsp;
      &#97;&#114;&#101;&nbsp;
      &#115;&#111;&nbsp;
      &#112;&#114;&#101;&#116;&#101;&#110;&#116;&#105;&#111;&#117;&#115;
      Yup
  35. Re:Tk = GTK by Marcion · · Score: 1

    Yes, okay Plain Text formatting.

  36. Tk >= GTK by IpalindromeI · · Score: 1

    This post has been created as "HTML Formatted" for your angle-bracket viewing pleasure (and note the post subject). If you learn about HTML entities, you'll have no trouble displaying your >s and <s.

    --

    --
    Promoting critical thinking since 1994.