[HN Gopher] The Tcl Programming Language: A Comprehensive Guide ...
___________________________________________________________________
The Tcl Programming Language: A Comprehensive Guide (2nd Edition)
Author : teleforce
Score : 47 points
Date : 2025-04-04 19:13 UTC (3 hours ago)
(HTM) web link (www.magicsplat.com)
(TXT) w3m dump (www.magicsplat.com)
| VWWHFSfQ wrote:
| > this immensely flexible and versatile language
|
| I would be interested to know if anyone ever built anything non-
| trivial that didn't turn into a complete mess due to TCL's
| general type-flimsyness and "everything is a string" philosophy.
| coliveira wrote:
| There is no big difference between TCL and other languages like
| Python in this respect. Yes, TCL stores everything as a string,
| but it also assigns a type when the data is used. If you need a
| defined type, you can use structures; there are even
| classes/objects available as packages.
| remram wrote:
| That is absolutely not how Python works. Python values are
| typed.
| apgwoz wrote:
| > "a dynamically typed language is a statically typed
| language with only one static type."
| -- Bob Harper
| remram wrote:
| Yes but we are not talking about _static_ types...
| apgwoz wrote:
| You're misunderstanding. Dynamic languages inherently
| have a single type that is checked _at runtime_. Store it
| in a string, store it in a struct. It doesn't matter.
| layer8 wrote:
| The runtime values have tags that denote their runtime
| type. They are not of a single type. You are talking
| about static types.
| 7thaccount wrote:
| Does it still do this? I thought they changed this many years
| ago?
| cjbgkagh wrote:
| A lot of old GUIs are built on Tcl/Tk, lots of people use
| matplotlib which I think uses it by default.
| timewizard wrote:
| TCL stands for "tool command language." In terms of non trivial
| tools that have been built with it there have been several.
| AOLServer, MacPorts, tons of CAD and engineering software.
| There's a whole wikipedia category just for this:
|
| https://en.wikipedia.org/wiki/Category:Free_software_program...
|
| Aside from that there was Tk which was used to create many UIs
| in an era where scripted UIs were otherwise painful to create
| and maintain. A prominent example here is 'xconfig' from the
| linux kernel.
|
| Like any good environment a little bit of practice with it can
| see you overcome it's apparent shortcomings and see you
| producing reliable and useful software in far less time that
| you might have in a more traditional way.
|
| Programming is about trade offs. It's not a checklist of "good
| ideas."
| wildzzz wrote:
| My big project at work uses pytk only because it was already
| included with the anaconda distribution. It works fine, it's
| not pretty but it's just an internal engineering tool.
| wildzzz wrote:
| For FPGA IDEs, a lot of the background is just tcl scripts so
| you can easily write your own build scripts. You could
| theoretically put them into your CI pipeline but I don't know
| if anyone actually does this.
| davidw wrote:
| Flightaware, at one point, had a lot of Tcl code
|
| https://www.flightaware.com/about/code/
| fuzztester wrote:
| what is your definition of non trivial?
| ks2048 wrote:
| Wavesurfer was a great program written Tcl/Tk, with an audio
| processing library called "snack" in C with Tcl wrappers.
|
| https://en.wikipedia.org/wiki/WaveSurfer
| 7thaccount wrote:
| Sqlite started as a tcl extension. That isn't exactly your
| question, but I thought it was closely related.
| jhayward wrote:
| For many years every web page at CNN and all web email at AOL
| was hosted by AOLserver and coded in TCL. It was not a mess.
| usr1106 wrote:
| I have known about Tcl since the 1990s. I remember Stallman
| advising not use it. Maybe he did not like the license?
|
| Yesterday, over 30 years later I was forced to write my first
| code. Noticed that a Cisco switch had an incredibly bad ssh
| implemtation, so to automate some commands I needed expect
| scripting. Expect is based on Tcl.
| 7thaccount wrote:
| If I recall correctly, I think he was just more of a lisp fan
| and promoted something like Guile or E-Lisp. It may have been
| license as well. I'm not very sure about it though.
| 7thaccount wrote:
| I own the first edition of this book and it's really good. I've
| written a few tcl scripts with it, but nothing major. Python just
| has the better ecosystem now for my needs. I might use tcl if I
| needed something really small though.
___________________________________________________________________
(page generated 2025-04-04 23:00 UTC)