Subject: Re: Implementing REPL... [especially the "read" part]
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 25 Feb 2007 21:09:03 -0600
Newsgroups: comp.lang.lisp
Message-ID: <-cOdnfH28czS0n_YnZ2dnUVZ_qarnZ2d@speakeasy.net>
Vassil Nikolov  <vnikolov+usenet@pobox.com> wrote:
+---------------
| grue@mail.ru (Timofei Shatrov) said:
| | ...a little REPL ... some pretty annoying problems.
...
| There are many ways to skin this proverbial cat, and they vary a lot...
| One extreme, for example, _might_ be to call READ-LINE and then
| READ-FROM-STRING instead of READ...
+---------------

Timofei, what Vassil is obliquely trying to tell you is that
your "problem" has more to do with the terminal driver on your
system and less to do with Common Lisp or CLISP per se [except
that CLISP uses GNU "readline()", which is a separate can of worms].

If you ran some other CL's normal REPL in an environment with
terminal line buffering turned off (e.g., "stty -icanon" on most
Unix systems) you'll get exactly the same "annoying problems"
you're seeing with your application: type in "(+ 1 2) " [that is,
#\( #\+ #\1 #\2 #\) #\Space] and the REPL *immediately* prints "3
" [that is, #\3 #\newline], without waiting for you to type a
newline yourself.

This may also prove helpful:

    http://www.nhplace.com/kent/PS/Ambitious.html
    Ambitious Evaluation: A New Reading of an Old Issue


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607