Live data from Hacker News

Tcl the Misunderstood (2006)

antirez.com

31–40 of 72 posts

Re: Tcl the Misunderstood (2006)

#31
post #16

Tcl is basically a sloppier Perl with a GUI.

I came into this comment thread thinking "why should I bother with Tcl if I know Perl" but your comment nearly sold me. When I do Perl it's because I can afford to be sloppy, and coming with a GUI sounds like a good deal!

Re: Tcl the Misunderstood (2006)

#32

One thing which I've always not understood about Tcl/TK is why there isn't a standard graphical tool for laying out a GUI program. For a long while, when I might have used Tcl/TK, I instead used Runtime Revolution/Livecode (a cross-platform HyperCard clone) which had a very nice system for interactively drawing programs. I'd really like for there to be an agreed-upon standard option for graphical program development…

Once upon a time (Tcl??/Tk3.6) there was XF by Sven Delmas. It had some issues and really would have needed something like namespaces. AFAIR it took forever to get a stable version for Tk4.0.

Re: Tcl the Misunderstood (2006)

#33
post #5

My favorite obscure line of TCL: https://github.com/athas/EggsML/blob/master/concieggs/hooks/... A line that contains a regex pattern for matching regex patterns. TCL was chosen here because its regex engine isn't too powerful.

>TCL was chosen here because its regex engine isn't too powerful.

Uh, not sure I see the significance but wouldn't that make Tcl less apt for this than something else? Why would you purposely choose a less powerful regex engine?

Re: Tcl the Misunderstood (2006)

#34

One thing which I've always not understood about Tcl/TK is why there isn't a standard graphical tool for laying out a GUI program. For a long while, when I might have used Tcl/TK, I instead used Runtime Revolution/Livecode (a cross-platform HyperCard clone) which had a very nice system for interactively drawing programs. I'd really like for there to be an agreed-upon standard option for graphical program development…

I don't think it is needed. I am a hobby programmer and not even remotely competent but I can whip up GUIs in Tk with little effort and I find it quicker and easier than the graphical UI designers.

Re: Tcl the Misunderstood (2006)

#35
Wish I had this page when messing around with Eggdrop[1] back in the late 90s.

As a self-taught novice programmer that started with QBasic and had moved on to Turbo Pascal, I found Tcl to be very confusing and it left a rather negative impression.

Reading this page now though, it seems a lot more logical and reasonable than it appeared at the time.

[1]: https://docs.eggheads.org/tutorials/firstscript.html

Re: Tcl the Misunderstood (2006)

#36

Another excellent aspect of Tcl I found is extensibility of JO's C implementation. At some point I needed to write some native code for speed and making this visible to the Tcl interpreter was a pleasure. Plus the codebase is so clean and well written.

I'm pretty sure Ousterhout intended for people to write a few deep modules in C and only use Tcl to glue everything together/provide extensibility.

(we did exactly this for networking code about 30 years ago: C for the data plane and Tcl for the control plane. That architecture remained in service for decades.)

Re: Tcl the Misunderstood (2006)

#37

The biggest weakness IMHO is the inability to comment out elements of an array. Even bash lets you do this and it makes testing and dev so much easier. Really wanted to love it, but that got in the way too many times.

TIP 401 proposed a fix for this but has not progressed so far - https://core.tcl-lang.org/tips/doc/trunk/tip/401.md .

Re: Tcl the Misunderstood (2006)

#38
post #11

The biggest problem with Tcl is the fact that C won. This means that "" and {} are expected to work a certain way from C and when you hit Tcl you are HORRIBLY confused. It's especially confusing as {} is simply quoting and has nothing to do with scope . The fact that Tcl is written such that {} is used with indentation in if-statements muddies the issue even further. I suspect that a choice of ` (backtick) for Tcl "…

Sure, the "biggest problem with TCL" is some minor syntactical annoyance that you'd get over within the first hour of using it.

Re: Tcl the Misunderstood (2006)

#40
post #5

My favorite obscure line of TCL: https://github.com/athas/EggsML/blob/master/concieggs/hooks/... A line that contains a regex pattern for matching regex patterns. TCL was chosen here because its regex engine isn't too powerful.

>TCL was chosen here because its regex engine isn't too powerful. Uh, not sure I see the significance but wouldn't that make Tcl less apt for this than something else? Why would you purposely choose a less powerful regex engine?

When you feed the engine regexes supplied by users, you don’t want arbitrary code execution or exponential or infinite running times caused by obscure features.
Post reply on HN