I am writing a password input function, I would make it like Unix/Linux password input style, input but without print anything on the screen. Or, print "*" on the screen is fine too.
I found this question "common lisp, how to mask keyboard input", it is what I want, but the functions answer given echo-on
and echo-off
give me panic when I run them in my slime. (However, they passed compiling).
I code in emacs/slime, and the panic happens in slime (error messages below). In my plan, I will run this single script in the terminal by sbcl --load ./this-script.lisp
.
The error message is:
#<TWO-WAY-STREAM
:INPUT-STREAM #<SB-SYS:FD-STREAM for "standard input" {1004AA8933}>
:OUTPUT-STREAM #<SB-SYS:FD-STREAM for "standard output" {1004AA8A63}>>
fell through ETYPECASE expression.
Wanted one of (FILE-STREAM FIXNUM).
[Condition of type SB-KERNEL:CASE-FAILURE]
Does anyone know how to make it now?
Thank you.
sbcl version: SBCL 2.0.0 macOS: 10.15.2
sbcl --load ...
)? – coredumpsbcl —load
works fine. So do I have any way to run it in slime? Or don’t run echo-off/on when it running in slime? Thank you. – ccQpein#-swank
to detect the running env. If in slime, do not run echo-on/off. Are there any better ways. – ccQpein