Comment by geocar

8 hours ago

> as such they are composable in the sense that they can be used in a way the author(s) didn't think of. It's been a while since I've done any of that personally,

I do this all the time.

One of my favourite applications is a tool called "autoexpect" and I use it every time I try a new program.

What it does is this: I run a program in it's virtual terminal, and it writes a TCL script that does what I did, and puts little regex tests in for the output of that program for me. I can then edit that program (or not: sometimes the first output is fine).

Once upon a time I used to use a program called DESQview: It had a "learn" feature that allowed you to record and playback even DOS programs, so it was very easy to pick up autoexpect.

DESQview/X was their X11 server, and it also had the "learn" feature, but unless the application could be driven entirely by the keyboard, it didn't work; most similar applications I've seen over the decades since need such care for reliable "scripts".

Yes sometimes you also have the possibility of using the GUI accessibility framework to "script" the app. This is barely ok if it works, but most GUIs that I want to script were designed so that would not work at all, and it is coding that requires me work with the app instead of asking a domain expert for a recording.

autoexpect on the other hand is just text, easy to read and modify, and easy to send by email. It is hard to make a terminal application hostile to autoexpect without a great deal of work that (in the text based environment) can usually be undone just by using tmux and mosh on loopback.

> What I don't understand is why that must happen inside a terminal window where (for instance) all text must have the same font and size.

Modern (as in, since the 1980s) terminals are very capable of multiple fonts and font-sizes. I usually use a non-proportional font for coding myself.

> Modern (as in, since the 1980s) terminals are very capable of multiple fonts and font-sizes. I usually use a non-proportional font for coding myself.

Is that really true? Can I, in one terminal window, have prose with a serif font and code with a monospaced font at the same time? If I hover over something with my mouse, can I have a TUI tooltip at a smaller font size?

  • Yes such-a-thing-is-possible: The DEC VT330 (for example) allowed font upload, had multiple font sizes, and even mouse support.

    There once was a program called https://en.wikipedia.org/wiki/ManaGeR which appears at first blush to be some kind of X11-competitor, except it was using the VT330's regular terminal capabilities to do those fancy pixel-patterns and fonts, and so there's just some weird VT escape sequences you've never heard of in there.

    You can also use SIXELs if you want even more control, and you can readily see such things in action because qemu can (in 2026) send its graphical VGA display into a sixel terminal, but in the 1980s such a thing would not have been performant (probably something like 3 frames per minute) because the VT330 was slow, and such a thing would not be popular you would "lose the text" at some layer which would be as inconvenient as using any other graphical application.