News for hackers. Stuff that matters.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by VWWHFSfQ on Friday April 04, 2025 @05:46PM (#43587954)
> 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.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by spacechild1 on Friday April 04, 2025 @07:25PM (#43588797)
The GUI of Pure Data (https://en.m.wikipedia.org/wiki/Pure_Data) is written in Tcl/Tk. In the 90s this was a popular and sensible choice, but not so much in 2025 :) I still have hopes that one day we'll manage to replace it with something better.

(There are alternative implementations of Pd, such as PurrData or PlugData, that use different UI frameworks.)

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by spacechild1 on Friday April 04, 2025 @07:36PM (#43588869)
git-gui and gitk are also written in Tcl/Tk.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by bsder on Friday April 04, 2025 @09:28PM (#43589593)
> In the 90s this was a popular and sensible choice, but not so much in 2025 :)

Infuriatingly, Tcl/Tk (and other things which use Tk) is still light years easier for doing basic GUI programming than anything that exists in 2025.

How the hell can decades have elapsed and Tcl/Tk, Hypercard and VB6 are still vastly better for GUI development than anything we currently have?

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by dlachausse on Saturday April 05, 2025 @12:19AM (#43590705)
In the same vein, Lazarus/FreePascal is an excellent open source and cross platform Delphi clone.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by graemep on Saturday April 05, 2025 @07:29AM (#43592529)
I have been looking at using both of those. I have used TCL before but it was a while back, and Lazarus does have a visual designer which I have played with a bit.

I am not sure which makes producing cross platform binaries easier. I ran into a few issues the last time I tried TclKit I ran into problems so Starkits may not be an easy solution anymore.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by dlachausse on Monday April 07, 2025 @10:40AM (#43612065)
Lazarus is excellent. It is very user friendly once you get the hang of it, and you can use Delphi books to learn the language. It also produces static binaries that make it easy to distribute your software.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by Karrot_Kream on Saturday April 05, 2025 @03:59AM (#43591782)
Yes, both Tcl/Tk and Python/Tk are great in 2025 for doing simple GUI programming and this fact does make me sad. Or perhaps we've found the global minimum? Who knows.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by ZeWaka on Friday April 04, 2025 @07:05PM (#43588671)
TCL/tk is used for the vast majority of integrated circuit verification tools. This is used by all the large manufacturers, even competitors use each others tools.

Absolutely huge codebases, there's git blames that go back to the 80s.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by buescher on Friday April 04, 2025 @07:29PM (#43588825)
Someone did a nice job of porting your revision control data. It would be fascinating to know what the previous systems were - probably svn or cvs, maybe both in chronological order, but before that?
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by ZeWaka on Wednesday April 09, 2025 @02:18PM (#43635444)
Not my codebase, but they were SVN (still migrating, lol). No clue about before then, though.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by davidw on Friday April 04, 2025 @06:30PM (#43588413)
Flightaware, at one point, had a lot of Tcl code

https://www.flightaware.com/about/code/

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by benburwell on Saturday April 05, 2025 @07:12AM (#43592468)
This is still very much the case. Although most new code is written in other languages, Tcl still has a substantial presence.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by coliveira on Friday April 04, 2025 @05:52PM (#43588017)
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.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by 7thaccount on Friday April 04, 2025 @06:48PM (#43588555)
Does it still do this? I thought they changed this many years ago?
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by smj-edison on Friday April 04, 2025 @07:32PM (#43588841)
Yep! It's called shimmering. The way it works is it has a string and internal representation. When the internal representation is modified it invalidates the string version. If the string version is needed later it'll regenerate the string representation. That way it can always be used as a string, but internally it is pretty efficient when it stays as the same type.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by remram on Friday April 04, 2025 @06:00PM (#43588096)
That is absolutely not how Python works. Python values are typed.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by apgwoz on Friday April 04, 2025 @06:11PM (#43588232)
> "a dynamically typed language is a statically typed language with only one static type."

          — Bob Harper
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by remram on Friday April 04, 2025 @06:18PM (#43588300)
Yes but we are not talking about static types...
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by apgwoz on Friday April 04, 2025 @06:26PM (#43588374)
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.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by layer8 on Friday April 04, 2025 @06:56PM (#43588628)
The runtime values have tags that denote their runtime type. They are not of a single type. You are talking about static types.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by apgwoz on Friday April 04, 2025 @09:26PM (#43589560)
And in Tcl the runtime type is computed at time of use. An optimized Tcl could cache an integer with a string that represents an int to avoid that cost.

Nevertheless, a runtime type tag is an optimization. That doesn’t make Bob’s statement any less true.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by remram on Friday April 04, 2025 @11:09PM (#43590326)
What you said above is correct but is not related to what was being discussed before.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by apgwoz on Saturday April 05, 2025 @02:45AM (#43591433)
How is it not related?

Because Python is “strong typed” vs “weak typed” for Tcl?

    $ tclsh8.6
    % expr 1 + 2
    3
    % expr 3 + “hey there”
    invalid bareword “hey”
    in expression “1 + hey there”;
    should be “$hey” or “{hey}” or “hey(…)” or …
vs.

    $ python3.11
    >>> 1 + 2
    3
    >>> 1 + “hey there”
    Traceback (most recent call last):
       File “<stdin>”, line 1, in <module>
    TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
I don’t really see a difference. Both checked types at runtime. Clearly Tcl can check types at runtime, even though it represents everything as a string. Whether all commands do so is another story. But, not all functions in Python check types before trying to do things that don’t make sense, either. So…
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by bombarolo on Saturday April 05, 2025 @11:41AM (#43594303)
I can see a difference that I can understand the Python’s error message, the Tcl’s one not so much.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by apgwoz on Saturday April 05, 2025 @01:28PM (#43595062)
Error message usefulness is not a strict requirement of type systems.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by eadmund on Saturday April 05, 2025 @06:28AM (#43592332)
> Python values are typed.

So are Tcl values.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by wildzzz on Friday April 04, 2025 @06:03PM (#43588136)
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.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by 7thaccount on Friday April 04, 2025 @06:49PM (#43588572)
Sqlite started as a tcl extension. That isn't exactly your question, but I thought it was closely related.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by mdaniel on Friday April 04, 2025 @10:17PM (#43590001)
And, AIUI, the monstrous test suite of SQLite is all in Tcl (which totally jives given your fact; they're obviously fans)
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by ks2048 on Friday April 04, 2025 @06:45PM (#43588529)
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

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by cjbgkagh on Friday April 04, 2025 @05:58PM (#43588084)
A lot of old GUIs are built on Tcl/Tk, lots of people use matplotlib which I think uses it by default.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by timewizard on Friday April 04, 2025 @05:59PM (#43588089)
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."

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by wildzzz on Friday April 04, 2025 @06:09PM (#43588212)
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.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by sigzero on Friday April 04, 2025 @09:38PM (#43589689)
It's Tcl now not TCL. No longer an acronym. It hasn't been TCL for years.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by jhayward on Friday April 04, 2025 @06:55PM (#43588622)
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.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by bigbuppo on Friday April 04, 2025 @08:57PM (#43589302)
I know in the late 90s, early 2000s they were Vignette shop, back when it was a Tcl application. Can only imagine their relief getting to carry over their tcl knowledge while no longer having to suffer with Vignette. I don't think I've ever heard anyone that actually liked Vignette.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by jhayward on Saturday April 05, 2025 @01:33PM (#43595100)
I don't recall any groups using Vignette at AOL during that time. It may be that one of the acquisitions used it prior to being acquired, but again, I never heard about it.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by bigbuppo on Monday April 07, 2025 @01:04AM (#43607911)
CNN.com was definitely using the StoryBuilder part up until the 2005 redesign as it's noted in the source of each and every article, and there were some tell-tale droppings on the home page as well.
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by fuzztester on Friday April 04, 2025 @06:33PM (#43588426)
what is your definition of non trivial?
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by Treblemaker on Saturday April 05, 2025 @03:56AM (#43591765)
Search upthread for "Klines" and "80s"
Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by AdieuToLogic on Friday April 04, 2025 @09:21PM (#43589511)
>> 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.

Both MacPorts CLI client[0] and ports tree[0] have used it successfully for many years.

Regarding:

  "everything is a string" philosophy
That can be said for the vast majority of Unix-like OS user-space programs.

0 - https://github.com/macports/macports-base

1 - https://github.com/macports/macports-ports

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by Treblemaker on Saturday April 05, 2025 @03:52AM (#43591745)
100's of Klines of code in continuous development over the last 10 years, still currently maintained and continually adapted for new use cases in Electronic Design Automation (EDA) for logical and physical chip design and verification.

Of course it's possible to create "write-only" code in tcl. But tcl is hardly unique in that respect. Good code design and coding practices help to avoid most issues just as in many other languages.

"Everything is a string" (EIAS) is not what leads to a complete mess; it's failing to go beyond an initial, superficial understanding of the syntax and language capability and general lack of discipline that lead to un-fixable messes.

Re:The Tcl Programming Language: A Comprehensive Guide (2nd ... by pjmlp on Sunday April 06, 2025 @05:10AM (#43600042)
A whole company, with our in-house version of AOLServer, using Apache and IIS plugins for the Tcl interpreter, running across AIX, HP-UX, Solaris, Windows 2000/NT, Red-Hat Linux, with our own ActiveRecord like approach (a decade before Rails happened), with connectors for Sybase SQLServer, MS SQLServer, Informix, Oracle, DB2, Access, doing code generation from Oracle based ER diagrams, and an IDE written in VB 6.

Which became a business unit from Altitude Software, eventually due to our MSFT partnership level we got access to .NET builds before it was known to the world, as one of the key Portuguese partners, and started to replicate our stack in .NET, based on the learnings from our Tcl based product.

The founders and core devs, from the original startup, eventually left to create their no code/low code platform, based on the learnings from both technology stacks, what they managed to achieve, and what was not done quite right, out of that OutSystems was born, one of the most successful Portuguese IT companies from the last 20 years.

I think using Tcl for that startup on a tiny Lisbon basement back in the late 1990's, turned out quite alright.