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.
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...
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
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.
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.
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
Will it work on (64 bit) Windows 7?
The Detours method won't work on Win95,98,ME
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
Good to hear. Hope to see something working emerge (whenver it happens!)
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 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.
On 8/30/2025 3:57 PM, Kenny McCormack wrote:
(Yes, this parallels that other thread)...
Not sure if you mean me and my post from a couple of months ago on this >subject but it sounds similar.
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.
I think at one point he was trying to change ActiveState's mind as well
about fixing it for them.
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?
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (3 / 13) |
| Uptime: | 156:16:14 |
| Calls: | 12,093 |
| Calls today: | 1 |
| Files: | 15,000 |
| Messages: | 6,517,729 |