I'm running through Practical Common Lisp using SLIME + clisp, and
I've run into a problem in chapter 3 with the prompt-for-cd function:
(defun prompt-for-cd ()
(make-cd
(prompt-read "Title")
(prompt-read "Artist")
(or (parse-integer (prompt-read "Rating") :junk-allowed t))
(y-or-n-p "Ripped [y/n]: ")))
If I run clisp in a terminal it works as expcted:
[6]> (prompt-for-cd)
Title: La Peste
Artist: Alabama 3
Rating: 5
Ripped [y/n]: (y/n) y
(:TITLE "La Peste" :ARTIST "Alabama 3" :RATING 5 :RIPPED T)
But in SLIME this happens:
CL-USER> (prompt-for-cd)
Title: La Peste
Artist: Rating: 5
Ripped [y/n]: (y/n)
Please answer with y or n : y
(:TITLE "La Peste" :ARTIST "" :RATING 5 :RIPPED T)
CL-USER>
It seems that for every one newline I enter two are sent. Is there
something I can configure to fix it?
Alex
Alex Farran schrieb:
> I've upgraded to the latest version of SLIME from CVS and the problem
> has disappeared.
I experienced the same when I tried the example of chapter 3.
You said you used clisp+slime. Did you install them manually or via
"Lisp in a Box" and under what OS?
Andr�
--
Andr� Thieme writes:
> I experienced the same when I tried the example of chapter 3.
> You said you used clisp+slime. Did you install them manually or via
> "Lisp in a Box" and under what OS?
I'm running Slackware linux 10. I installed slime manually first,
using the version of slime from lisp-in-a-box with my existing
installations of emacs and clisp. Then I built the whole
lisp-in-a-box package in a subdirectory. Then I tried with sbcl
instead of clisp. Finally I tried the latest slime from CVS and that
worked, though I can't get it to start with sbcl.
Alex Farran wrote:
> Andr� Thieme writes:
>
>
>>I experienced the same when I tried the example of chapter 3.
>>You said you used clisp+slime. Did you install them manually or via
>>"Lisp in a Box" and under what OS?
>
>
> I'm running Slackware linux 10. I installed slime manually first,
> using the version of slime from lisp-in-a-box with my existing
> installations of emacs and clisp. Then I built the whole
> lisp-in-a-box package in a subdirectory. Then I tried with sbcl
> instead of clisp. Finally I tried the latest slime from CVS and that
> worked, though I can't get it to start with sbcl.
On your SBCL issue:
Because SLIME doesn't let you pick which Common Lisp implementation to
use by default, I had to change some things around. SLIME defaults to
CMUCL, I believe, and looks for Lisp at /usr/bin/lisp. If you don't
have CMUCL installed, that binary won't be installed. I ended up
aliasing /usr/bin/sbcl to /usr/bin/lisp and things began to work when
starting SLIME.
You could also start SLIME the following (longer)ways:
C-u M-x slime RET sbcl RET
C-u M-x slime RET clisp RET
HTH,
BA
Brad Anderson <····@dsource.org> writes:
> Alex Farran wrote:
>> Andr� Thieme writes:
>>
>>>I experienced the same when I tried the example of chapter 3.
>>>You said you used clisp+slime. Did you install them manually or via
>>>"Lisp in a Box" and under what OS?
>> I'm running Slackware linux 10. I installed slime manually first,
>> using the version of slime from lisp-in-a-box with my existing
>> installations of emacs and clisp. Then I built the whole
>> lisp-in-a-box package in a subdirectory. Then I tried with sbcl
>> instead of clisp. Finally I tried the latest slime from CVS and that
>> worked, though I can't get it to start with sbcl.
>
> On your SBCL issue:
>
> Because SLIME doesn't let you pick which Common Lisp implementation to
> use by default,
That's not really true. Even in olden-days (i.e. 1.0 and before) you
could set inferior-lisp-program. These days (CVS SLIME) you can
include any number of lines like this in your .emacs
(slime-register-lisp-implementation "allegro" "/usr/local/acl/acl70/alisp")
(slime-register-lisp-implementation "clisp" "/usr/local/bin/clisp -K full")
(slime-register-lisp-implementation "sbcl" "/usr/local/bin/sbcl")
(slime-register-lisp-implementation "cmucl" "/usr/local/src/cmucl-18e/bin/lisp")
The first registered lisp will be the default. And the others are
available with M-x slime via the "symbolic" name (e.g. allegro, clisp,
sbcl, and cmucl in this case)
-Peter
--
Peter Seibel ·····@gigamonkeys.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp
Peter Seibel wrote:
> Brad Anderson <····@dsource.org> writes:
>
>
>>Alex Farran wrote:
>>
>>>Andr� Thieme writes:
>>>
>>>
>>>>I experienced the same when I tried the example of chapter 3.
>>>>You said you used clisp+slime. Did you install them manually or via
>>>>"Lisp in a Box" and under what OS?
>>>
>>>I'm running Slackware linux 10. I installed slime manually first,
>>>using the version of slime from lisp-in-a-box with my existing
>>>installations of emacs and clisp. Then I built the whole
>>>lisp-in-a-box package in a subdirectory. Then I tried with sbcl
>>>instead of clisp. Finally I tried the latest slime from CVS and that
>>>worked, though I can't get it to start with sbcl.
>>
>>On your SBCL issue:
>>
>>Because SLIME doesn't let you pick which Common Lisp implementation to
>>use by default,
>
>
> That's not really true. Even in olden-days (i.e. 1.0 and before) you
> could set inferior-lisp-program. These days (CVS SLIME) you can
> include any number of lines like this in your .emacs
>
> (slime-register-lisp-implementation "allegro" "/usr/local/acl/acl70/alisp")
> (slime-register-lisp-implementation "clisp" "/usr/local/bin/clisp -K full")
> (slime-register-lisp-implementation "sbcl" "/usr/local/bin/sbcl")
> (slime-register-lisp-implementation "cmucl" "/usr/local/src/cmucl-18e/bin/lisp")
>
> The first registered lisp will be the default. And the others are
> available with M-x slime via the "symbolic" name (e.g. allegro, clisp,
> sbcl, and cmucl in this case)
>
> -Peter
>
Cool. I stand corrected. My post was from help I got with my Gentoo
system. While the aliasing works, as do the longer SLIME starting
steps, these entries into .emacs seem like the way to go.
Thanks.
On Sun, 17 Apr 2005 22:18:52 GMT, <····@dsource.org> wrote:
>> Peter Seibel wrote:
>> (slime-register-lisp-implementation "allegro" "/usr/local/acl/acl70/alisp")
>> (slime-register-lisp-implementation "clisp" "/usr/local/bin/clisp -K full")
>> (slime-register-lisp-implementation "sbcl" "/usr/local/bin/sbcl")
>> (slime-register-lisp-implementation "cmucl" "/usr/local/src/cmucl-18e/bin/lisp")
>>
>> The first registered lisp will be the default. And the others are
>> available with M-x slime via the "symbolic" name (e.g. allegro, clisp,
>> sbcl, and cmucl in this case)
>
> Cool. I stand corrected. My post was from help I got with my Gentoo
> system. While the aliasing works, as do the longer SLIME starting
> steps, these entries into .emacs seem like the way to go.
Where did you get the Gentoo help? Forums, IRC, bug-report?
--
Everyman has three hearts;
one to show the world, one to show friends, and one only he knows.
GP lisper wrote:
> On Sun, 17 Apr 2005 22:18:52 GMT, <····@dsource.org> wrote:
>
>>>Peter Seibel wrote:
>>>(slime-register-lisp-implementation "allegro" "/usr/local/acl/acl70/alisp")
>>>(slime-register-lisp-implementation "clisp" "/usr/local/bin/clisp -K full")
>>>(slime-register-lisp-implementation "sbcl" "/usr/local/bin/sbcl")
>>>(slime-register-lisp-implementation "cmucl" "/usr/local/src/cmucl-18e/bin/lisp")
>>>
>>>The first registered lisp will be the default. And the others are
>>>available with M-x slime via the "symbolic" name (e.g. allegro, clisp,
>>>sbcl, and cmucl in this case)
>>
>>Cool. I stand corrected. My post was from help I got with my Gentoo
>>system. While the aliasing works, as do the longer SLIME starting
>>steps, these entries into .emacs seem like the way to go.
>
>
> Where did you get the Gentoo help? Forums, IRC, bug-report?
>
>
Nowhere public that is out there for others to trip over...
BA
Brad Anderson writes:
> Alex Farran wrote:
>> Finally I tried the latest slime from CVS and that worked, though I
>> can't get it to start with sbcl.
> On your SBCL issue:
> Because SLIME doesn't let you pick which Common Lisp implementation to
> use by default, I had to change some things around.
That's not my problem. I just set inferior-lisp-program to clisp or
sbcl as appropriate. My problem is that in the cvs version sbcl
errors on startup (the lisp-in-a-box version started sbcl fine). I'm
content to clisp for now as it makes little difference at this stage.