Live data from Hacker News

Tcl 9.0

tcl-lang.org

21–30 of 247 posts

Re: Tcl 9.0

#22

The first major release in 27 years. 64-bit internal structures, so data can be huge. Full unicode with all the funky new emojis. Zip filesystems, etc., etc. There's lots of new stuff, and some old cruft has been dumped, so some programs may need a few updates, but there's still a high level of compatibility. The page above links to release notes with details of what's in and what's out.

The Zip filesystem stuff is wonderful change to see: it takes a number of techniques that were common in the community (if you had the right tools and knew how to use them) for building standalone applications, and makes them part of the basic toolkit in a standard way. It's a truly excellent change, and I'm glad to see it.

Re: Tcl 9.0

#23
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

[deleted]

Re: Tcl 9.0

#24
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

Standard fare:

BigIP iRules in F5 network appliances (and A10 appliances)[0], orchestration in Argonne National Labs super computer[1], Tealeaf[2], Python Tkinter[3] …

I use it day to day because it’s got a great balance of Lispyness and simple scriptyness, and a great C interface. It’s got a fine REPL, and can be built up (by writing in C) with extensions that are 100% first-class canonical Tcl, in good part (wholly?) because Tcl is such a simple language[4], and homoiconic[5]. A joy to develop in and use.

[0] https://community.f5.com/kb/technicalarticles/irules-concept...

[1] https://www.mcs.anl.gov/~wozniak/papers/Swift_Tcl_2015.pdf

[2] https://www.acoustic.com/pdf/Acoustic-Experience-Analytics-%...

[3] https://docs.python.org/3/library/tkinter.html

[4] https://www.tcl-lang.org/man/tcl/TclCmd/Tcl.htm

[5] https://stackoverflow.com/questions/6492704/what-exactly-doe...

Re: Tcl 9.0

#25
post #5

Earlier quoted context omitted.

Why did they remove tilde '~' as a convenient shortcut for the Home directory?

In the long run, special cases like that often turn out to be more trouble than they are worth. If an ordinary file happened to start with '~' it would not be handled correctly. So you either accept or ignore that potential problem, or you have to write extra code to work around it. It's safer to not have such special cases at all.

Should be starts with ~/

Re: Tcl 9.0

#26
post #12

Earlier quoted context omitted.

Tk based GUIs work across pretty much all desktop platforms and are much less resource intensive than electron and friends.

Is Electron really considered a competitor to Tk based GUIs? In my (limited) experience, Tcl/Tk is great for basic stuff but I don't think you could do even a small part of what you can do with an html + css + javascript GUI.

It used to be the other way around. It’s been a while since I did much UI work, but the web always felt incredibly frustrating for layout compared to Tk. (I think CSS finally has something approaching Tk’s grid layout manager?) There are fewer frameworks for Tk, but I think it has most things you’d need. Maybe some of the finer control over fonts etc is lacking.

Re: Tcl 9.0

#27
post #11

For those that are new to Tcl, there's an alternate universe where Tcl is the browser language instead of Javascript: "Interesting footnote: the founding of Netscape occurred at the same time I was deciding where to go in industry when I left Berkeley in 1994. Jim Clarke and Marc Andreessen approached me about the possibility of my joining Netscape as a founder, but I eventually decided against it (they hadn't yet de…

Perhaps. I think one of the main reasons JS caught on is that it had no significant baggage and the designers could take it in any direction it needed to go. Every language used by more than a few people, no matter how good it is, has some baggage. As a result, in that alternate universe, the browser scripting language landscape might have been a lot more fragmented.

> it had no significant baggage and the designers could take it in any direction it needed to go

This is a fantastic insight and put very well. Thank you.

New platforms unlock rare opportunities for new languages that have no baggage and can focus on fully exploiting the new platform.

Re: Tcl 9.0

#28
> New Notifiers: The central event handling engine in Tcl is now constructed on top of the system calls epoll or kqueue when they are available. The select based implementation also remains for platforms where they are not.

This is huge! A big portion of why concurrency in Tcl was so dated and why the language was considered so non-performant was because it relied on `select` despite `epoll` and `kqueue` being available for at least a decade.

Tcl is one of my favorite languages because of how easy it is to get started with and how easy metaprogramming is.

Re: Tcl 9.0

#29
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

Quite common in space industry. It is the script language used in many (all?) SCOS-2000 based mission control systems. Yes, is is actually used to control satellites and spacecrafts.

Re: Tcl 9.0

#30
post #12

Earlier quoted context omitted.

Tk based GUIs work across pretty much all desktop platforms and are much less resource intensive than electron and friends.

Is Electron really considered a competitor to Tk based GUIs? In my (limited) experience, Tcl/Tk is great for basic stuff but I don't think you could do even a small part of what you can do with an html + css + javascript GUI.

I agree with you but a lot of the demand for GUI tools is small tools. Think something like Postman: it's really just a code editor widget to put in some request metadata and a table view storing requests. This is the kind of tool that something like Tcl would be great at and really doesn't need the sophistication of HTML+CSS+JS.
Post reply on HN