6 ms·
> 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
by VWWHFSfQ 2y ago
> 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 2y agoThere 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 2y agoThat is absolutely not how Python works. Python values are typed.
- apgwoz 2y ago> "a dynamically typed language is a statically typed language with only one static type." — Bob Harper
- remram 2y agoYes but we are not talking about static types...
- apgwoz 2y agoYou’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 2y agoThe runtime values have tags that denote their runtime type. They are not of a single type. You are talking about static types.
- apgwoz 2y agoAnd 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.
- remram 2y agoWhat you said above is correct but is not related to what was being discussed before.
- apgwoz 2y agoHow 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…
- eadmund 2y ago> Python values are typed. So are Tcl values.
- 7thaccount 2y agoDoes it still do this? I thought they changed this many years ago?
- smj-edison 2y agoYep! 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.
- cjbgkagh 2y agoA lot of old GUIs are built on Tcl/Tk, lots of people use matplotlib which I think uses it by default.
- timewizard 2y agoTCL 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_programmed_in_Tcl 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 2y agoFor 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 2y agoFlightaware, at one point, had a lot of Tcl code https://www.flightaware.com/about/code/ https://www.flightaware.com/about/code/
- benburwell 2y agoThis is still very much the case. Although most new code is written in other languages, Tcl still has a substantial presence.
- fuzztester 2y agowhat is your definition of non trivial?
- Treblemaker 2y agoSearch upthread for "Klines" and "80s"
- ks2048 2y agoWavesurfer 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 https://en.wikipedia.org/wiki/WaveSurfer
- 7thaccount 2y agoSqlite started as a tcl extension. That isn't exactly your question, but I thought it was closely related.
- mdaniel 2y agoAnd, AIUI, the monstrous test suite of SQLite is all in Tcl (which totally jives given your fact; they're obviously fans)
- jhayward 2y agoFor 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.
- bigbuppo 2y agoI 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.
- jhayward 2y agoI 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.
- bigbuppo 2y agoCNN.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.
- ZeWaka 2y agoTCL/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.
- buescher 2y agoSomeone 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?
- ZeWaka 2y agoNot my codebase, but they were SVN (still migrating, lol). No clue about before then, though.
- spacechild1 2y agoThe GUI of Pure Data (https://en.m.wikipedia.org/wiki/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.)
- spacechild1 2y agogit-gui and gitk are also written in Tcl/Tk.
- bsder 2y ago> 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?
- _mlbt 2y agoIn the same vein, Lazarus/FreePascal is an excellent open source and cross platform Delphi clone.
- graemep 2y agoI have been looking at using both of those. I have used TCL before but it was a while back, but 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.
- _mlbt 2y agoLazarus 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.
- bch 2y agoCisco iOS[0], F5 iRules[1], Tealeaf network monitoring/processing[2][3], Fidessa[4][5], … [0] https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/12-4t/ios-tcl-12-4t-book/nm-script-tcl.html https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/co... [1] https://community.f5.com/kb/technicalarticles/irules-concepts-tcl-the-how-and-why/275910 https://community.f5.com/kb/technicalarticles/irules-concept... [2] https://www.acoustic.com/tealeaf https://www.acoustic.com/tealeaf [3] https://help.goacoustic.com/hc/en-us/articles/360043279654-Configuration-settings https://help.goacoustic.com/hc/en-us/articles/360043279654-C... [4] https://www.cmegroup.com/solutions/market-tech-and-data-services/technology-vendor-services/fidessa.html https://www.cmegroup.com/solutions/market-tech-and-data-serv... [5] http://www.services.fidessa.com/brochures/_training/VF043.pdf http://www.services.fidessa.com/brochures/_training/VF043.pd...
- AdieuToLogic 2y ago>> 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 https://github.com/macports/macports-base 1 - https://github.com/macports/macports-ports https://github.com/macports/macports-ports
- Treblemaker 2y ago100'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.
- pjmlp 2y agoA 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.