10 ms·
The Birth of Tcl
- AceJohnny2 4y ago> The Tcl Conference is also one of the world's premier events for upper body wear: each year there are 5-10 different T-shirt designs given away to recognize various extensions, events, etc. That's funny. Is there a gallery collecting these?
- tpoindex 4y agoI collected many of the T-shirts and other items. I published a list w/ photos, including a few photos others sent me. All done in glorious bare-bones 1990's HTML, photos taken on 35mm and scanned with a cheap scanner. https://www.nyx.net/~tpoindex/tcl-wear/ https://www.nyx.net/~tpoindex/tcl-wear/
- moomin 4y agoIt may be something of a specialised tool now, but in the 90s it’s hard to express how far ahead of the curve the TCL ecosystem was from anyone else. I remember people looking offended at how fast you could slap together a UI compared to the C/C++ nonsense they were used to. Expect redefined the game for all sorts of scripting.
- sedatk 4y agoI like Tcl a lot. The design is simple, extremely easy to learn, and yet the code is still maintainable (((looking at you LISP))). Among the scripting languages I've used, I probably liked Tcl the most. I wish it didn't fall out of favor.
- monetus 4y agoYou're not alone
- mftb 4y agoIndeed as sibling comment mentions there are Tcl fans out there. The guy who created redis has good things to say[0]. With a little evangelism it could maybe stage a comeback. [0]http://antirez.com/articoli/tclmisunderstood.html http://antirez.com/articoli/tclmisunderstood.html
- sigzero 4y agoDr. Hipp of SQLite fame likes Tcl. The ginormous test suite is in Tcl.
- mynameismon 4y agoIn addition, the entire Fossil front-end (the SCM used for hosting SQLite) is also written in Tcl, which makes it incredibly easy to edit and extend.
- deleted 4y ago[deleted]
- smrtinsert 4y agoFellow tcl lover here. When I left my tcl job I felt like I was approaching some next level of productivity that I've never quite found with other languages
- a9h74j 4y agoIs this a classic story, perhaps on the tcl wiki: On site with a customer, the question of creating a GUI interface came up. A few engineers left and, after a bit of time in another room, came back with a proposal already demo'd in tcl/tk.
- andrepd 4y agoOff-topic, but you should be aware that the (((triple parentheses))) are apparently an anti-semitic thing. Just so you know it can be misinterpreted in some contexts x)
- deleted 4y ago[deleted]
- MisterTea 4y agoWhen idiots started using the "echo" tags in tech oriented forums, people would jokingly ask where all these damn lisp programmers were coming from.
- todd8 4y agoI've never heard of this perhaps because HN is about the only social media I use. However, there is an ADL page on this. See https://www.adl.org/education/references/hate-symbols/echo https://www.adl.org/education/references/hate-symbols/echo
- deleted 4y ago[deleted]
- sigzero 4y agoContext is everything. I am pretty sure LISP is not Jewish so (((looking at your LISP))) is perfectly fine.
- curuinor 4y agoJohn McCarthy's mom was Jewish.
- radarsat1 4y agoWhen anti-semites or alt-right people or other hate groups decide to adopt an arbitrary, commonly used sign (like, the "ok" symbol [1]), is the correct reaction to stop using that sign, basically giving it to them, or is the correct reaction to use it as much as possible in non-racist/x-ist contexts, to dilute the intended co-option? Honestly I don't really know the answer. I completely understand avoiding it to not have your comment or action taken out of context, as the risk of personal damage is high, but on the other hand I don't feel that society should just "give away" common symbology just because some hate group decides to take it. How can this be fought? [1]: https://edition.cnn.com/2019/09/26/us/adl-new-hate-symbols/index.html https://edition.cnn.com/2019/09/26/us/adl-new-hate-symbols/i...
- epage 4y agoI've been evaluating different languages for writing plugins and TCL really seems tempting. Unfortunately, I've been leaning towards Lua just due to its pervasiveness (today). I also vaguely remember one of the top contenders having some more esoteric parts that concerned me. I can't remember how much of that was TCL, Lua, or both.
- sigzero 4y agoBoth are good with that kind of usage. It will really end up being your preference.
- pjmlp 4y agoI was a big Tcl user between 1999 and 2002, our startup was an heavy user, however the experience of slowly replacing Tcl with C code, made me never choose languages without either JIT or AOT compiler ever again, other than for scripting tasks.
- occoder 4y agoThat was a long time ago, and computers have come a long way. Maybe now is a good time to re-examine those assumptions and re-evaluate those priorities. At a time when Electron is the cross platform UI toolkit of choice, Tcl/Tk seriously deserves a second look.
- blacksqr 4y agoThere was a commercially available Tcl compiler available at that time. Did you ever take a look at it? https://wiki.tcl-lang.org/page/GE+ICE+Tcl+compiler https://wiki.tcl-lang.org/page/GE+ICE+Tcl+compiler
- p4l4g4 4y agoSame here! Tcl/tk is a lovely little language and much under appreciated by many! Interesting software started in tcl, such as redis, expect and sqlite. Still use some tcl through environment-modules, in my personal work setup. Have to say that lisps are very nice too, in my opinion. Started learning a little common lisp recently and was surprised by its elegance. I think lisps can be very maintainable, when care is taken. It's easy to write unreadable programs, but this also holds for tcl. With great power comes great responsibility.
- dwringer 4y agoI think a lot of programmers as they are first learning their first language go through a phase of trying to count brackets and parentheses and failing miserably (those bugs are horrible to hunt down) before finding editors that help match them for you. Even then, many editors don't do a great job of this so coders develop a certain aversion to using many parentheses or brackets of any type. This is also rooted in the conventional C philosophies that more than two levels of indentation are a bad thing. At least that was how I used to see things, prior to getting familiar with Lisp and emacs. Now I find myself using all kinds of parentheses in every language so as to make order-of-operations more explicit at a quick glance. I even learned to count parentheses and almost enjoy it. I think learning Python's complete-opposite approach of getting rid of brackets in most cases and using indentation-only also clarified my thinking on the matter. I find that this brings back the old problem of mismatched-bracket bug hunting, but worse because indentation levels can get shifted and then there's no amount of paren-matching that will help sort things out. In essence, I think everyone should learn Python and Lisp, then see which philosophy they like better.
- gleenn 4y agoIn my very humble opinion, the parens in lisps are one of the most redeeming qualities as it makes IDE manipulation so much easier and macros are much easier to write. I did enjoy Ruby a lot too though, and you can definitely see some of the clean-syntax similarities.
- jrapdx3 4y agoI've used Tcl extensively over many years. It's a tremendously flexible tool that can be shaped to accomplish many tasks. Tcl was never the most widely used scripting language but it's alive and well, and its development continues with new versions on the horizon. There still is a lot to like about Tcl.
- RHSeeger 4y agoI adore Tcl, and always have. Funny that you mention Lisp, because I've always considered Tcl a kind of "close cousin" of Lisp; both in it's code structure and the ability to build new control structures and the like. It feels more Lisp-y to me than it does C-y.
- sedatk 4y agoYou're absolutely right. But I have bad memories of dealing with parentheses in AutoLISP from the 90's. The trauma remains :)
- antod 4y agoMy only lisp experience was trying to teach myself AutoLISP in notepad in the mid 90s - I remember the parentheses trauma well. This was before I knew any CS or what a functional language was. I did come away impressed though with how it could map to CAD concepts. It reminded me of the RPN stack when programming my HP42 calculator. I could sense there was an underlying elegance I wasn't fully grasping.
- bitwize 4y agoTcl is insane. The language is straight out of The Book (Anathem). By that I mean, the semantics are not just wrong, they're so wrong they risk warping your brain. But the language somehow remains useful, powerful, and flexible. And there is still no faster way to get from zero to working GUI in the 2020s on a conventional computing environment (Windows or some Unix). So it's fantastic for prototyping at the very least.
- monetus 4y agoWhat drives you the most nuts about the syntax?
- bitwize 4y ago1) I realize that Tcl isn't technically stringly typed on the inside anymore, but extensionally it still appears so. 2) Attempting to understand how variable scoping works in Tcl is like attempting to stare into the maw of some eldritch horror, deeper than the earth itself by some trick of other-space, and lined with infinite rows of writhing, fang-tipped cilia. The central tenet of lexical scoping -- that bindings visible outside a set of braces should also be visible inside unless overridden with a specified inner binding, didn't occur to Ousterhout when he designed Tcl and Tcl has to deal with the implications of that. 'upvar' sometimes works, but sometimes doesn't, and in some cases you have to reason through when your code is being called and what's visible then.
- larsrc 4y agoI was thinking exactly in the eldritch horror direction. Thanks for writing that, you have saved me the unpleasantness of finding out exactly what it was that made me loathe Tcl.
- AceJohnny2 4y agoWhat's not to love about `upvar`? /s
- geogra4 4y agoMy first job was writing Tcl code to orchestrate various little c++ apps that were used for data processing to create various terrains for a flight sim training app. Love the language. But that was a long time ago.
- johnisgood 4y agoTcl and Rebol are great. The code is compact, very easy to understand and quick to write, especially Rebol. You can do GUI in both Tcl/Tk and Rebol as well. You might want to check Rebol out as well: http://www.rebol.com/docs/expert-intro.html http://www.rebol.com/docs/expert-intro.html (or http://www.rebol.com/docs/design-objectives.html http://www.rebol.com/docs/design-objectives.html).
- jrapdx3 4y agoYou probably already are aware of it but there's an effort to create an open source successor to Rebol. See the Red Programming Language site [0]. I've played around with Red and it's pretty interesting. Though rather different from Tcl. Red compiles to native code out of the box which is an advantage. Currently Red is limited to 32-bit output. When they get 64-bit working along with self-hosting compiler I think the language could become a major success. [0] https://www.red-lang.org/ https://www.red-lang.org/
- johnisgood 4y agoI know about Red. Unfortunately it requires 32-bit libraries, whereas Rebol 3 does not. I could not get Red to work as easily and nicely as I did get Rebol 3. :/ > When they get 64-bit working along with self-hosting compiler I think the language could become a major success. I agree. I will most likely switch to it (though I have not dig'd deeper, hopefully it follows the philosophy of Rebol). I will check if my Rebol 3 programs work with it, or without much modification. I suppose as long as it supports 64-bit, has libraries for SHA512 (`system/catalog/checksums/sha512` in Rebol 3), along with `random/secure` and `random/seed now/precise`, I suppose it should be fine. In any case, it is a deal-breaker for me. I really want them to get 64-bit working and have a self-hosted compiler. I wish them the best. For the people who are interested: when I say Rebol 3, I am referring to https://github.com/Oldes/Rebol3 https://github.com/Oldes/Rebol3. There is a decent and detailed post on SO about these implementations and their differences. I found Oldes' one to be the most ideal.
- jrapdx3 4y ago
- sokoloff 4y ago25 years ago, I worked on a team that built a full online retail brokerage in Tcl (including web page generation). It made me love the language as a developer, but the runtime performance on late 1990s hardware (especially pre-Tcl8) was pretty poor. I've since reached for Tcl several times per year and enjoy it each time.
- mdaniel 4y agoMy first industry job was almost on Aolserver: https://github.com/aolserver/aolserver#readme https://github.com/aolserver/aolserver#readme but I didn't have the discipline at the time to make it through the tech screen. In retrospect, I dodged a bullet, but I'm still glad I tried it cause it was for sure horizon-broadening
- rudasn 4y agoIf I remember correctly, Tcl was the first language I coded in. That was in late 90s, I asked my dad to pay some hosting company so I could have IRC bots. I don't think I ever understood how thinhs really worked, but I remember I was able to type "commands" in IRC channels and my bots would do stuff, like send private messages, join channels, etc.
- AceJohnny2 4y agoInteresting to read how Expect came so soon out of TCL (TCL: 1988, Expect: 1990) Expect remains an essential tool for dealing with interactive (but not TUI) terminal application, and in usage really fits its TCL roots perfectly. In contrast, I've found the Perl and Python ports of Expect to be somewhat awkward, not fitting those languages paradigms as well. In the 2020s, I still think Expect is TCL's killer app.
- AceJohnny2 4y agoFurthermore, I've been wanting to give our embedded app's CLI some smarts, add some control-flow features, and I can think of no better way to do implement that than make it a TCL shell.
- deleted 4y ago[deleted]
- jrapdx3 4y agoExpect has had remarkable longevity, though I'd say the greatest impact of Tcl has been though *sqlite* which started as a Tcl extension and still uses Tcl in its development. Sqlite is used so very widely, hard to find any major software that doesn't incorporate it. I guess Tcl is nearly everywhere, under the hood anyway.
- nomel 4y agoI think expect is a result of having no programatic interface for command line tools. I ofter wonder how much more useful these command line tools, and how many hundreds of man years would have been saved with buggy text parsers, if there was a programatic stdin/stdout, in addition to the one for humans, from the beginning. But, with the reality we live in, expect helped me many times in the past. These days, I use python's pexpect for the same use cases.
- wrenky 4y agoAw man I love Expect. We have a bunch of legacy stuff and Tcl/Expect powers most of it. Every few years people try to replace it with python and pexpect, there was a nodejs implementation, and perl. They sorta worked, but anytime you had to something more complicated than a single session or simple parsing they fell apart. now I have it wrapped in a starpack and just dont tell them the language unless they ask lol
- AceJohnny2 4y agoThe article doesn't discuss how Sun turned away from Tcl and embraced Java instead (understandable since it focuses on Tcl). It's interesting because Sun had the same goals for Tcl as they did for Java (or vice-versa!): "evolve Tcl into a universal scripting language for the Internet", "allows untrusted scripts to be evaluated safely", "Tcl plugin, so that Tcl scripts can be evaluated in a Web browser". Ousterhout spun Tcl out of Sun in late 1997, which feels like the timeline when Sun was turning to Java. Is there insider history available anywhere on how and why that transition happened? I can certainly imagine that performance and expressivity were a concern.
- jgrahamc 4y agoI was the VP of Engineering of Ousterhout's spinout company, Scriptics, and worked for him. I don't know the story of how Sun made the decision but John has a longer History of Tcl here: https://web.stanford.edu/~ouster/cgi-bin/tclHistory.php https://web.stanford.edu/~ouster/cgi-bin/tclHistory.php "At the same time, it became clear that Sun needed to focus its language evangelism around Java, which was released shortly after I arrived at Sun and had become hugely popular. Though Java and Tcl are very different languages, used for very different purposes, it would have been too hard for Sun to evangelize both of them simultaneously. I came to the conclusion that, overall, Java offered more benefits for Sun than Tcl did." John was a great person to work for. He hired me despite the fact that in the interview with him I told him I'd never used Tcl and when he extolled its virtues he told me that it was "easy to learn and had powerful regular expressions" and I said "Don't those two things contradict each other?" He stopped talking and had a rather surprised expression on his face. I thought I'd blown it. Actually, I'd done the most important thing I could possibly have done: made him think something new.
- rcurry 4y agoI got exposed to TCL/TK while working for a National Lab a long time ago. At the time I was a hardcore C++ developer and after a week or two with TCL/Tk I was almost dying laughing about how easy it was to build really cool applications. I truly miss working with that platform.
- ms4720 4y agoTCL and Scotty there was an awesome nms/SNMP combo
- sigzero 4y agoI love Tcl. I haven't used it in a while as my job scope has changed. I used to write all sort of utilities and throw a little UI on top with Tk. I still keep watch on what happens in that space.
- nzzz 4y agoAnyone know if there is a good visual IDE for TK (like VB6 style)? I researched it a long time ago and they were all glitchy and problematic (considering the numerous TK options and managers). I still develop little applets in the console every few years but its a pain in the ass when you do it so rarely since you forget everything you learned the last time.
- 7thaccount 4y agoI really like Tcl the language and some of the tooling, but certainly not all of it. I kind of wish there was a single reputable website that I could go to for all versions. I don't want something from Source Forge or ActiveState or some random person's website. I'm sure they're all fine, but I'm a lot less sketched out with running Anaconda Python or Java than Tcl. Funny enough, some Python systems include Tcl for the Tk GUI, but I haven't been able to get some of the libraries I'm interested in to work with that version.
- hota_mazi 4y agoTCL has a feature which to me qualifies as a total "What the hell were they thinking?", not unlike the COME FROM command from Brainfuck, except, in a real language. That statement is upvar [1]. Read its description and despair. [1] https://www.tcl.tk/man/tcl/TclCmd/upvar.html https://www.tcl.tk/man/tcl/TclCmd/upvar.html
- macintux 4y agoAs a fan of immutability (edit: I suppose I should say rather referential transparency is more relevant here), that horrifies me, but at the same time I have to commend the ingenuity.
- sokoloff 4y agoAs the decr example at the very bottom suggests, it’s to allow the equivalent of passing a mutable reference into a function in other languages. upvar and uplevel seem scary/strange when you read about them, but once you start using them in code, they feel perfectly suited for the task.
- zvr 4y agoThe upvar (and uplevel) mechanism is essential for the extensibility of the language and tremendously useful for creating new control constructs. Think of it as similar to "passing value by reference", for example when you pass the address of a variable in C/C++.
- cafard 4y ago
- lizknope 4y agoA lot of semiconductor EDA / CAD tools use Tcl as the built in scripting language. Our CAD flows are thousands of lines of Tcl code that are both wrappers around the tools and scripts for the tools to execute that set options and run various commands generate reports
- kwk1 4y agoOpenCASCADE, the C++ CAD library used by FreeCAD and others, has official bindings available in Tcl. (Bindings, for example, in Python, are available from 3rd parties.)
- user3939382 4y agoI wonder in what context the language comes up for others. I remember having to use it to accomplish something maybe once over the last 25 years(?) and it was so long ago I don’t even remember what it was.
- monbis 4y agoWe're using it now (2022) to run some high volume transaction websites. We are not writing new apps in it, but a lot of existing code still uses it, and is actively modified.
- tyingq 4y agoIt pops up in a bunch of different areas. If you used the Orbix Corba ORB, it was there. It's the scripting language for F5 load balancers. A one-time popular monitoring tool called NetCool/Omnibus used it for script extensions. It's also in a few different Electronics Design Automation (EDA) tools. It was also in a few different tools that dealth with Healthcare-specific IT, like HL7 protocol bridging. Just the ones I ran into. Prior to lua it was really the only dead-easy way to link a known, mainstream-ish, scripting language into an existing tool.
- adunsmoor 4y agoI'm a long time user of Tcl. For me, the biggest strength of Tcl is it's C API. It's quite straightforward to implement extensions. That, and the people that were involved in the language early on are incredibly smart and creative. I had the good fortune of working with Michael McLennan and George Howlett for a while (both mentioned in the referenced history). Michael's "Effective Tcl/Tk Programming" is a fantastically written programming reference. He was a prolific creator of interesting applications and toolkits. I recall him creating a GUI for our boring corporate bug database where he added a points system to make fixing bugs "more fun". George managed to avoid incrementing the version number on his BLT toolkit by appending letters of the alphabet to releases. I never did learn why. I just checked and I see he made it all the way to 2.4z!