[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MIT-Scheme-devel] Forcing (read) to read a given character from the ter
[MIT-Scheme-devel] Forcing (read) to read a given character from the terminal once?
Sun, 18 Oct 2009 13:40:59 -0700
My goal is to replace the non-Edwin debugger's "v" command with something
a little more like an ordinary REPL:
- The user presses "(" at a debugger prompt.
- The debugger runs a variant of command/eval-in-current-environment
which has the effect of passing the "(" to the reader. If the user
kills the line, then the "(" is erased. That's why the subject says
command/eval-in-current-environment calls prompt-for-expression which calls
read. They all communicate via an I/O port which, in this scenario, I am
assuming is the terminal. Hopefully I can operate on the port. The UNIX
ould be a call to ungetc, but the Scheme documentation doesn't seem to say
anything about ungetting characters. Did I miss something?
This may turn out to be a useless optimization, but I can only find out
after I try. With the debugger commands changed to control characters,
letters can also be passed to the reader and the idea may have more
My real goal is to make a series of simple common operations easier and more
consistent to type (or do without typing). Perhaps we should talk about what
changes would be useful to people who use MIT Scheme in real life. And yes,
any LISP Machine users will recognize that I'm starting on paths the LM has
already gone down. Except the LM has more modifier keys!
- [MIT-Scheme-devel] Forcing (read) to read a given character from the terminal once?,
Derek Peschel <=