Hi Lispers, I'm a total Lisp newbie working my way through the new Practical Common Lisp book and I've encountered an odd problem. Using these functions:
(defun prompt-read (prompt) (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*))
(defun prompt-twice() (prompt read (prompt-read "hello"))
Running this on the REPL: (prompt-twice)
Gives me the following output: hello: hi hi:
"" NIL
The program exits before I have a change to enter anything on the hi: line. Any Lisp guys out there wanna set me straight? I'm using Lisp in a Box on Suse 9.2 Pro.
Thanks, PJ
On Sun, Apr 17, 2005 at 09:37:21PM -0500, PJ Hyett wrote:
I'm a total Lisp newbie working my way through the new Practical Common Lisp book and I've encountered an odd problem. Using these functions:
(defun prompt-read (prompt) (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*))
(defun prompt-twice() (prompt read (prompt-read "hello"))
Running this on the REPL: (prompt-twice)
Gives me the following output: hello: hi hi:
"" NIL
The program exits before I have a change to enter anything on the hi: line. Any Lisp guys out there wanna set me straight? I'm using Lisp in a Box on Suse 9.2 Pro.
I think somebody reported a similar problem on slime-devel. Apparently the solution was to update Slime.
I'm copying Peter on this this so he can test it and update his Slime in LispBox as appropriate.
-bcd
----- Original Message ----- From: PJ Hyett To: chicago-lisp@common-lisp.net Sent: Sunday, April 17, 2005 9:37 PM Subject: [chicago-lisp] Working through Practical Common Lisp
Hi Lispers, I'm a total Lisp newbie working my way through the new Practical Common Lisp book and I've encountered an odd problem. Using these functions:
(defun prompt-read (prompt) (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*))
(defun prompt-twice() (prompt read (prompt-read "hello"))
Running this on the REPL: (prompt-twice)
Gives me the following output: hello: hi hi:
"" NIL
The program exits before I have a change to enter anything on the hi: line. Any Lisp guys out there wanna set me straight? I'm using Lisp in a Box on Suse 9.2 Pro. Works fine on Allegro and LispWorks.
??
AKW