6 ms·
TCL: The Tool Command Language – Lisp for the Masses [video]
- cmacleod4 5y agoI just watched this. Karl Lehenbauer gives a basic intro to the language, making comparisons with Lisp, talks about his own development as a software engineer, and how his company FlightAware uses Tcl for most of their code. I found his personal history the most interesting part, there were lots of things there that made me think: yes, been there, done that :-)
- spdegabrielle 5y agoTCL never got the love it deserves.
- deleted 5y ago[deleted]
- Jtsummers 5y agoAt least outside the electronics and embedded software development space. It's all over this area.
- mleo 5y agoI spent 4 years back around 2000 developing on a CMS that used TCL as the underlying language. It was mostly a hate/hate relationship. More for the CMS than TCL itself, but that can be said about any CMS.
- jgrahamc 5y agoVignette?
- jeffmc 5y agoI worked for a startup in the late 1990s that had a reseller agreement with Vignette. If I recall Vignette was going for something like a million dollars a site license. I took one look at it and ended up rolling our own TCL-based CMS in case the Vignette deal went south. Well I left, Vignette went south and the company ended up using my CMS.
- guenthert 5y agoThe TCL interpreter, unlike other scripting languages, doesn't perform any checks at the start of a program. That is, even silly syntax errors are found not before that very line is reached. If that happens to be in a lesser trodden error path, you might find it only at a very inconvenient time. I learned to hate TCL with a passion.
- hulitu 5y agoWhat checks shall it perform ? It's an interpreter.
- tails4e 5y agoI use TCL as I use EDA SW a lot, but I found the most horrible feature of TCLs language design, comments are not comments. A comment is a command to ignore the line. However a comment with a curly brace in it can break control flow, as its partially interpreted. I found this by commenting out some code (that was malformed) and my tcl program failed to run. I ended up commenting out the entire program save one line and still I got errors. Then I realised to my horror the comments with braces were actually affecting control flow! That said, in EDA in general it works well for the most part.
- _blz2 5y agoI use it daily at work. (EDA space)
- bsder 5y agoTcl (like Perl) shot itself in the foot right as the DotCom/DotBomb went off. Python was effectively completely stable through all this and gained a critical mass following.
- bch 5y ago> Tcl (like Perl) shot itself in the foot right as the DotCom/DotBomb went off. I don’t know what you mean “shot itself in the foot“ here. Some examples? > Python was effectively completely stable through all this and gained a critical mass following. I don’t know how much more “effectively stable” Python was than Tcl. Can you expand on this? I personally see this largely as “luck of the draw”. It seems to me there’s a lot to complain about with Python - the low-fruit classic is the GIL. Despite that huge impediment, it came to be a scientific computing go-to language. Who would have guessed that? We can see things now and say “popular languages are popular”, and that’s about it.
- bsder 5y agoPerl and Tcl carved themselves into incompatible versions (Perl 6 and Tcl 8) at a critical moment. Python, on the other hand, felt like it was at version 1.5.2 absolutely forever. > It seems to me there’s a lot to complain about with Python - the low-fruit classic is the GIL. Except that, in the late-1990s/early-2000s, it didn't matter. Scripting languages were slow relative to compiled languages. Multiple-threads effectively didn't exist. Hyperthreading didn't hit until 2003--after the DotBomb. > Despite that huge impediment, it came to be a scientific computing go-to language. Who would have guessed that? Gee, who could have guessed that a whole lot of scientists and engineers kinda liked Matlab the program but hated Mathworks the company and that providing somewhere for them to jump ship to would be popular? Like ... absolutely everybody? Of course, just the idea isn't enough. The alternative has to be sufficiently capable. Thus ... Enthought. Enthought personnel put in a lot of elbow grease and work to make Python a scientific computing go-to language. As always, the best way to predict the future is to make it.
- bch 5y agoI wasn’t actually maintaining software across this divide, but I do still occasionally see Tcl 7.x installations in the wild and find it quite recognizable. It seemed to me the biggest changes from 7->8 were byte code interpreter and “dual ported” Tcl_Obj to store values vs naive C strings(which should have only exposed themselves as “improved performance”). The release notes[0] for Tcl 8 seem to list minor-ish annoyances, but perhaps you did have to support something across the 7-8 divide; I won’t argue against your experience in that case. > As always, the best way to predict the future is to make it Truth. [0] https://www.tcl.tk/software/tcltk/8.0.html#incompatibilities https://www.tcl.tk/software/tcltk/8.0.html#incompatibilities
- BiteCode_dev 5y agoAmusingly, any windows or mac python program comes with a TCL interpreter, thanks to the tkinter GUI: >>> import tkinter as tk >>> tk.Tcl().eval('puts {hello, world}') hello, world ''
- Topgamer7 5y agoNooope, not on linux at least >>> import tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.9/tkinter/__init__.py", line 37, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
- kbr2000 5y agoOn Debian GNU/Linux Tkinter is provided by the python-tk package (might differ in other distros).
- BiteCode_dev 5y agoI specifically stated "any windows or mac python program". Indeed, most linux distro packaging teams decided to split tk in a separate package that is not installed by default. Same for pip and setuptools. Of course, this made getting a congruent python experience extra hard, on a platform with already plenty of gotchas for python setup, but hey, they saved a few Mo.
- sandos 5y agoI have fond memories from school in the 90s, I think, where I found an irc client which had Tcl scripting. I didn't do anything spectacular but I do remember loving the language at the time.
- jasonjayr 5y ago"tac" or "tik"? ? Client for AOL Instant Messenger? I used the console version on a Mac SE 30 running BSD, and shared a serial tty w/ brother at the same time. Had to use a readline wrapper for it, but it worked great! http://users.tmok.com/~smike/ http://users.tmok.com/~smike/
- deleted 5y ago[deleted]
- kbr2000 5y agoEggdrop [0] and BitchX [1] come to mind. Irssi [2] has a plugin that enables Tcl scripting. I'm currently fiddling with TkCAD [3] in order to put a small CNC machine to use here, it needs some small adaptations to work on Linux, but I think it's a nice find! [0] https://eggheads.org/ https://eggheads.org/ [1] http://bitchx.sourceforge.net/ http://bitchx.sourceforge.net/ [2] https://irssi.org/ https://irssi.org/ [3] https://github.com/revarbat/TkCAD https://github.com/revarbat/TkCAD
- mkovach 5y agoTCL was a popular scripting language for IRC bots. Eggbot was done really nicely.
- deleted 5y ago[deleted]
- brundolf 5y agoWatching the first 30 minutes of this video, TCL has one more thing in common with Lisp: the fact that I appreciate it as an artifact and a testament to how simple a language core can be, but I would never ever want to maintain a production system in it
- phyrex 5y agoThere’s a huge difference between a minimal lisp interpreter you may have written in university and something industrial strength like Common Lisp or Clojure
- dmux 5y agoEver since I came across a Tcl programming book in my college library I've always been fascinated with it. I return to it every couple of years to play around with meta-programming ideas that I've come up with. For example, here is a really naive example of implementing a DSL that allows you to write something like SELECT name age FROM person INTO name age and have the values of the selected columns be placed in variables specified after the INTO keyword. Implementing that isn't too difficult: # a pretend database set language(name) Tcl set language(created) 1988 set language(created_by) "John Ousterhout" set language(stable_release) 8.6.11 proc SELECT {args} { ### Lowercase all the args to make things easy set args [string tolower $args] set from_index [lsearch $args from] set cols [lrange $args 0 [incr from_index -1]] set table [lindex $args [expr $from_index + 2]] # Get access to the global variable with the value contained in $table global $table set into_index [lsearch $args into] set vars [lrange $args [incr into_index] end] foreach c $cols v $vars { upvar $v local_var set val [lindex [array get $table $c] 1] set local_var $val } } After that, you could "SELECT created name created_by FROM language INTO x y z" and then puts "$y was created by $z in $x" >Tcl was created by John Ousterhout in 1988
- fithisux 5y agoShould have an alternative lisp or scheme syntx (r7rs-small)