On Fri, Aug 9, 2019 at 12:26 PM <xxxxxx@ancell-ent.com> wrote:
 Except, wait a second, when you do that, it stays after you've exited!

Yes!  That's where the with-* stuff shines, because Scheme programs are guaranteed to run their dynamic-wind thunks, unless you call emergency-exit or get killed by an external signal you can't trap.
Which if you'd just allow setting timeouts to 1/10 second or so granularity I suspect I'd come to really like.

Okay.  How about this:  Change seconds to deciseconds in the existing description of with-raw-mode, add (with-rare-mode port thunk).  Seconds was just a brain fart on my part: I had forgotten that VMIN Is measured in deciseconds.

 Is there any circumstance where you'd like raw or rare mode not echoing?

Probably not.  Okay, make with-raw-mode and with-rare-mode turn off and restore echoing.
  Many web user interfaces and e.g. Gnu Emacs "echo" password characters with "."  Which does give an attacker looking over your shoulder a very important piece of information,

I have seen versions that output a random (1-3, say) number of dots.  This is useful for knowing whether or not your keystroke registered at all, often an issue on modern crappy keyboards.
Is there any other (non-evil :-) use case for no echo than typing in a password or pass phrase??

Not that I can think of, but that's just me.  Nevertheless, managing a tty in cooked mode is simpler (basically just another file, no timeouts or rubouts to manage), and if you don't want this sort of magic echo (which would be a great thing for a higher-level procedure to provide) you can just wrap with-no-echo around your read-line or whatever and have done with it.

John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
With techies, I've generally found
If your arguments lose the first round
Make it rhyme, make it scan / Then you generally can
Make the same stupid point seem profound!           --Jonathan Robie