Live data from Hacker News

Expect – A tool for automating interactive applications

expect.sourceforge.net

31–40 of 52 posts

Re: Expect – A tool for automating interactive applications

#31

It's very frustrating to see something like this that claims to be very useful, but shows no examples on the page. >Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. How? >Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable t…

Here's an example: https://github.com/nfriedly/Meteor-ODB-II/blob/master/deploy...

This script runs the meteor deploy command as part of my CI loop every time new code gets pushed to github. The deploy command expects me to type in a bunch of information, and expect does that for me.

Re: Expect – A tool for automating interactive applications

#33
post #24

Wow, a blast from the past. I still have some expect tools I wrote long ago that I use and maintain to this day. Not so much new stuff since scripting languages have gotten better at doing what expect does -- often calling their modules "expect" and using the exact same syntax. I once wrote a webserver in Expect. No, it's not a good language for writing a webserver.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

IIRC, AOLServer is also the inventor of database connection pooling.

Re: Expect – A tool for automating interactive applications

#36
post #26
post #25

Earlier quoted context omitted.

My understanding was that AOLserver was the NCSA (pre-Apache httpd) server, with TCL as an extension language, not that AOLserver was written in TCL. Weird.

Yes, it's a mixture of the two, which makes eminent sense if you consider the speed of computers 20 years ago. It's Tcl, by the way, not TCL.

Having spent time working on a million line Tcl codebase (for my sins) I can assure you that it is possible, but not in the least bit pleasant!

Re: Expect – A tool for automating interactive applications

#38
Expect is great, however if you ever determine that using it is the best way to solve your problem, then you are probably approaching the problem the wrong way in the first place (the best way to proceed from that point may very well be to continue using expect though).

I used it a few years ago to create a test suite for some dedicated VoIP hardware (controlling the boxes over telnet). It worked great, but if I had had more time, that definitely would not have been my approach.

Re: Expect – A tool for automating interactive applications

#39
post #25
post #24

Earlier quoted context omitted.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

My understanding was that AOLserver was the NCSA (pre-Apache httpd) server, with TCL as an extension language, not that AOLserver was written in TCL. Weird.

Pairing with C is the whole point of Tcl; in its heyday, Tcl was known for having one of the easiest extension APIs of all the scripting languages. The idea of using a scripting language to knit C code together was one of Ousterhout's key goals.

Also: no other scripting language with the possible exception of JS has evented I/O so fundamentally baked into the core of the language.

Re: Expect – A tool for automating interactive applications

#40
post #24

Wow, a blast from the past. I still have some expect tools I wrote long ago that I use and maintain to this day. Not so much new stuff since scripting languages have gotten better at doing what expect does -- often calling their modules "expect" and using the exact same syntax. I once wrote a webserver in Expect. No, it's not a good language for writing a webserver.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

AOLServer is mostly C, is it not?

When you say it was one of the best systems for doing dynamic websites, would you use it on its own, or was it more popular to use OpenACS on top of it? (Which is what one of the codebases I still work on today does)

Post reply on HN