• Status of Expect on Windows

    From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.tcl on Sat Aug 30 19:57:40 2025
    From Newsgroup: comp.lang.tcl

    (Yes, this parallels that other thread)

    A long, long time ago, I used Expect on Windows (either NT4 or XP) and was generally pretty happy with it. This was in a work/production environment.
    I used a version found somewhere on the net that wasn't ActiveState. I
    don't have the details in front of me, but I could probably find it on some backup laying around, if I did enough archaeology. This was all, of
    course, 32-bit only stuff.

    Around the same time, I tried the ActiveState version and didn't like it as much, even though ActiveState was definitely better known and thus more "boss-friendly".

    I don't use Windows much anymore (and haven't done Expect under Windows
    since I left that job), so this is largely moot/academic at this point for
    me, but I have basically 3 questions regarding the state of the world at present:

    1) Does anyone else remember the version that I can't quite remember?
    I liked it and it worked well, but it *was* kind of "off-brand", if you
    know what I mean. Is there any reason this version couldn't be used
    today? Would this satisfy the OP of the other thread?

    2) What is the current status of ActiveState Expect?

    3) The other thread has several posts by David Gav(something)? Is he
    associated with ActiveState or any other company that I may have heard
    of?

    Thanks for any help. As I said, this is mostly curiosity at this point,
    but I'd be happy to have some answers.
    --
    Hindsight is (supposed to be) 2020.

    Trumpers, don't make the same mistake twice.
    Don't shoot yourself in the feet - and everywhere else - again!.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sat Aug 30 13:37:18 2025
    From Newsgroup: comp.lang.tcl

    Hi Kenny,

    The original port of E4W was written by Gordon Chaffee in 1999 for Tcl 8.0 https://web.archive.org/web/19980220232311/http://www.bmrc.berkeley.edu/people/chaffee/expectnt.html

    In 2003, I took his work, modified it quite a lot, and made my own port
    for Active State that partially implements [interact] by keeping the
    debugger in the extension, rather than being external (slave.exe) and
    talking to it over pipes with VT100 escape sequences inserted to emulate
    a stream. Internally, I got close, anyways.

    Conceptually, it could have been merged into the official tree, but
    given the changes for windows, even on the generic side, were rather
    deep. I talked about it with Jeffery, but felt a bit embarrassed to
    even ask Don.

    Today it lingers in "code rot" as I try to hack away at it. I'm
    thankful that Jeffery Hobbs opened E4W in 2009 https://sourceforge.net/projects/expect/files/Expect%204%20Windows/

    I'm not as good at coding these days, but I'm having fun playing around.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.tcl on Sat Aug 30 20:54:01 2025
    From Newsgroup: comp.lang.tcl

    In article <108vne0$2rbct$1@dont-email.me>,
    David Gravereaux <davygrvy@pobox.com> wrote:
    Hi Kenny,

    The original port of E4W was written by Gordon Chaffee in 1999 for Tcl 8.0 >https://web.archive.org/web/19980220232311/http://www.bmrc.berkeley.edu/people/chaffee/expectnt.html

    Thanks for jogging my memory. I was pretty sure it was Gordon <somebody>,
    but couldn't quite remember. But that was definitely the version I used.

    In 2003, I took his work, modified it quite a lot, and made my own port
    for Active State that partially implements [interact] by keeping the >debugger in the extension, rather than being external (slave.exe) and >talking to it over pipes with VT100 escape sequences inserted to emulate
    a stream. Internally, I got close, anyways.

    Yeah, that was the one thing it lacked. It didn't do "interact".
    But I was able to get useful work done even though lacking "interact".

    ...

    I'm not as good at coding these days, but I'm having fun playing around.

    Well, that's the important thing. Old programmers never die, they just ... fade away...
    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/Security
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sat Aug 30 14:38:27 2025
    From Newsgroup: comp.lang.tcl

    On 8/30/2025 1:54 PM, Kenny McCormack wrote:
    Well, that's the important thing. Old programmers never die, they just ... fade away...

    https://www.youtube.com/watch?v=uBxMPqxJGqI
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.tcl on Sat Aug 30 23:04:01 2025
    From Newsgroup: comp.lang.tcl

    In article <108vr0l$2s7gv$1@dont-email.me>,
    David Gravereaux <davygrvy@pobox.com> wrote:
    On 8/30/2025 1:54 PM, Kenny McCormack wrote:
    Well, that's the important thing. Old programmers never die, they just ... >> fade away...

    https://www.youtube.com/watch?v=uBxMPqxJGqI

    Good one!
    --
    So to cure the problem of arrogant incompetent rich people we should turn
    the government over to an arrogant incompetent trust fund billionaire
    who knows nothing about government and who has never held a job in his
    entire spoiled life?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sun Aug 31 11:52:03 2025
    From Newsgroup: comp.lang.tcl

    On 8/30/2025 3:57 PM, Kenny McCormack wrote:
    (Yes, this parallels that other thread)
    ...

    I don't use Windows much anymore (and haven't done Expect under Windows
    since I left that job), so this is largely moot/academic at this point for me, but I have basically 3 questions regarding the state of the world at present:

    1) Does anyone else remember the version that I can't quite remember?
    I liked it and it worked well, but it *was* kind of "off-brand", if you
    know what I mean. Is there any reason this version couldn't be used
    today? Would this satisfy the OP of the other thread?


    Not sure if you mean me and my post from a couple of months ago on this subject but it sounds similar. With this potential misunderstanding,
    there is a wiki page titled "expect usage" that documents our
    experiences on this issue. I say ours because [TWu] and [Jeff Smith]
    were immensely helpful in that process.

    I am not familiar with this other version of Expect (nor with the "real" version, in any meaningful capacity, to be honest). A little bit of
    searching the nets generated some links that describe it but nothing to download or test.



    2) What is the current status of ActiveState Expect?

    The last paragraph on that page summarizes the current status of Expect
    on Windows in some detail. Unfortunately, it seems to be abandon-ware at
    this point.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sun Aug 31 14:33:50 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 8:52 AM, saito wrote:
    I am not familiar with this other version of Expect (nor with the "real" version, in any meaningful capacity, to be honest).-a A little bit of searching the nets generated some links that describe it but nothing to download or test.


    Don's "real" NIST paid-for Expect is @ https://sourceforge.net/projects/expect/files/Expect/

    It only builds on unix-like systems. That is the version you get on
    Ubuntu with 'sudo apt-get install expect'

    Gordon Chaffe made a windows port in 1999 @ https://web.archive.org/web/19980220232311/http://www.bmrc.berkeley.edu/people/chaffee/expectnt.html

    I wrote a port based on Gordon's work, but as a real stubs compatible extension for 8.4 in 2003 for ActiveState that is fully native (not cygwin).

    It was not merged into the official tree.

    In 2009, Jeffry Hobbs made the source public (with all the warts)@ https://sourceforge.net/projects/expect/files/Expect%204%20Windows/

    I put that into my GitHub a number of months ago and have been messing
    around with it toward getting it to work on WIN64 by taking out all the
    warts.

    https://github.com/davygrvy/expect4win

    The amount of bit twiddling involved taking the native windows console,
    at the API call level of a chain of foreign processes and threads, instrumenting it there as an unconditional jmp, and essentially
    converting it into a stream is ludicrous. MS Windows was not meant to
    work this way.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sun Aug 31 14:50:40 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 2:33 PM, David Gravereaux wrote:
    The amount of bit twiddling involved taking the native windows console,
    at the API call level of a chain of foreign processes and threads, instrumenting it there as an unconditional jmp, and essentially
    converting it into a stream is ludicrous.-a MS Windows was not meant to
    work this way.

    Detours looks promising.
    https://github.com/microsoft/Detours/wiki

    I'm working on it now https://github.com/davygrvy/expect4win/blob/b6464e8e9b43bfa2beecba485804e8056cdb7426/win/expWinConsoleDetourer.cpp#L135
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.tcl on Sun Aug 31 22:21:39 2025
    From Newsgroup: comp.lang.tcl

    In article <1092g3j$3g2gh$1@dont-email.me>,
    David Gravereaux <davygrvy@pobox.com> wrote:
    On 8/31/2025 2:33 PM, David Gravereaux wrote:
    The amount of bit twiddling involved taking the native windows console,
    at the API call level of a chain of foreign processes and threads,
    instrumenting it there as an unconditional jmp, and essentially
    converting it into a stream is ludicrous. MS Windows was not meant to
    work this way.

    Detours looks promising.
    https://github.com/microsoft/Detours/wiki

    I'm working on it now >https://github.com/davygrvy/expect4win/blob/b6464e8e9b43bfa2beecba485804e8056cdb7426/win/expWinConsoleDetourer.cpp#L135

    Good to hear. Hope to see something working emerge (whenver it happens!)

    Will it work on (64 bit) Windows 7? I have no interest in any version of Windows after 7.
    --
    Indeed, most .NET developers couldn't pass CS101 at a third-rate
    community college.
    - F. Russell -
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sun Aug 31 15:44:26 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 3:21 PM, Kenny McCormack wrote:
    Will it work on (64 bit) Windows 7?

    The Detours library is NT based only, so yes. It will be able to
    instrument 32-bit apps, too

    The Detours method won't work on Win95,98,ME
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sun Aug 31 16:05:47 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 3:44 PM, David Gravereaux wrote:
    The Detours method won't work on Win95,98,ME

    Tcl won't work on those either. Thank you :) https://core.tcl-lang.org/tips/doc/trunk/tip/487.md
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.tcl on Sun Aug 31 23:18:21 2025
    From Newsgroup: comp.lang.tcl

    In article <1092j8d$3gsmg$1@dont-email.me>,
    David Gravereaux <davygrvy@pobox.com> wrote:
    On 8/31/2025 3:21 PM, Kenny McCormack wrote:
    Will it work on (64 bit) Windows 7?

    The Detours library is NT based only, so yes. It will be able to
    instrument 32-bit apps, too

    The Detours method won't work on Win95,98,ME

    Heh heh. I was a Win98 holdout for a long time, but even I'm not that old (anymore).

    Right now, I have one XP and one Win7 (The rest are all Linux).
    --
    The coronavirus is the first thing, in his 74 pathetic years of existence,
    that the orange menace has come into contact with, that he couldn't browbeat, bully, bullshit, bribe, sue, legally harrass, get Daddy to fix, get his siblings to bail him out of, or, if all else fails, simply wish it away.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sun Aug 31 18:04:35 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 3:21 PM, Kenny McCormack wrote:

    Good to hear. Hope to see something working emerge (whenver it happens!)

    Check this out
    https://learn.microsoft.com/en-us/windows/console/classic-vs-vt

    a pseudo PTY after all?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sun Aug 31 21:44:49 2025
    From Newsgroup: comp.lang.tcl

    On 8/31/2025 5:33 PM, David Gravereaux wrote:

    https://github.com/davygrvy/expect4win

    The amount of bit twiddling involved taking the native windows console,
    at the API call level of a chain of foreign processes and threads, instrumenting it there as an unconditional jmp, and essentially
    converting it into a stream is ludicrous.-a MS Windows was not meant to
    work this way.

    I am sure it is a lot of work. Otherwise ActiveState wouldn't abandon it
    like they did. It seems like a unique solution even after three decades
    since its introduction.

    Thanks for trying to bring it back. Since you are familiar with
    ActiveState community pages, you must know there are many people who
    would appreciate it.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Mon Sep 1 08:15:54 2025
    From Newsgroup: comp.lang.tcl

    David,
    thanks for your very welcomed work!
    Eventually, you may consider to transfer your github to the TCL orphaned repository, were we try to collect half maintained gems:

    https://github.com/tcltk-depot

    You may get a member of the group. Many half retired Tcl gurus are there.

    Take care,
    Harald

    Am 31.08.2025 um 23:33 schrieb David Gravereaux:
    On 8/31/2025 8:52 AM, saito wrote:
    I am not familiar with this other version of Expect (nor with the
    "real" version, in any meaningful capacity, to be honest).-a A little
    bit of searching the nets generated some links that describe it but
    nothing to download or test.


    Don's "real" NIST paid-for Expect is @ https://sourceforge.net/projects/expect/files/Expect/

    It only builds on unix-like systems.-a That is the version you get on
    Ubuntu with 'sudo apt-get install expect'

    Gordon Chaffe made a windows port in 1999 @ https://web.archive.org/web/19980220232311/http://www.bmrc.berkeley.edu/ people/chaffee/expectnt.html

    I wrote a port based on Gordon's work, but as a real stubs compatible extension for 8.4 in 2003 for ActiveState that is fully native (not
    cygwin).

    It was not merged into the official tree.

    In 2009, Jeffry Hobbs made the source public (with all the warts)@ https://sourceforge.net/projects/expect/files/Expect%204%20Windows/

    I put that into my GitHub a number of months ago and have been messing around with it toward getting it to work on WIN64 by taking out all the warts.

    https://github.com/davygrvy/expect4win

    The amount of bit twiddling involved taking the native windows console,
    at the API call level of a chain of foreign processes and threads, instrumenting it there as an unconditional jmp, and essentially
    converting it into a stream is ludicrous.-a MS Windows was not meant to
    work this way.

    --- Synchronet 3.21a-Linux NewsLink 1.2