News for hackers. Stuff that matters.
Re:The Birth of Tcl by AceJohnny2 on Thursday April 21, 2022 @03:55PM (#31114433)
Interesting 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.

Re:The Birth of Tcl by wrenky on Thursday April 21, 2022 @07:29PM (#31116445)
Aw 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

Re:The Birth of Tcl by jrapdx3 on Thursday April 21, 2022 @06:14PM (#31115834)
Expect 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.
Re:The Birth of Tcl by AceJohnny2 on Thursday April 21, 2022 @03:58PM (#31114476)
Furthermore, 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.
Re:The Birth of Tcl by nomel on Thursday April 21, 2022 @06:34PM (#31116002)
I 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.

Re:The Birth of Tcl by kazinator on Thursday April 21, 2022 @07:30PM (#31116456)
I use expect out of cgit's syntax-highlighting.sh script, to ... invoke Vim on the input do proper syntax highlighting and save it with :TOhtml.

Good thing cgit caches, eh?