Subject: [clisp-list] CLISP printing hundreds of symbol-names

From: Oliver Scholz <[email-masked]>
Date: Tue Aug 13 15:12:02 2002

Hello!

I have just started to learn Common Lisp. Sometimes CLISP reacts in a
way that i can not explain to myself. I am using: GNU CLISP 2.28
(released 2002-03-03) together with the lisp-mode of GNU Emacs
21.2. The value of `inferior-lisp-program' is "clisp -q -L deutsch".

In some (sic!) cases when I send a function to the inferior-lisp
process, CLISP suddenly starts print hundreds of
symbol-names. As it seems the printing becomes slower the more often
this happens.

I have no idea if this is due to some serious mistakes I make in my
code or if CLISP is to blame. I tried the same code with CMUCL, where
it works as intended. But I want to use CLISP.

I was recently able to find a way to reproduce something similar: I
sent the following function-definition to the inferior lisp process:

(defun find-region (x)
  "Return an region (as an object).
X is either the ID of a region or the region-object itself, in which
latter case this function returns it unmodified."
  (when x
    (if (symbolp x)
	(let ((region (gethash x (regions *world*))))
	  (assert region (region) "Not an existing region: ~S" region)
	  region)
      (progn
	(assert (typep 'region) (region)
		"Start/destionation of a passage must be a region or a symbol: ~S" x)
	x))))

And then I get this error message, which is totally incomprehensible
for me:

,----
| [13]> 
| Display all 1259 possibilities? (y or n)
| 
| *** - READ von #<INPUT CONCATENATED-STREAM #<IO SYNONYM-STREAM *TERMINAL-IO*>>: Eine Package mit dem Namen "SYMBOL" gibt es nicht.
| 1. Break [14]> 
`----

[The German text translates to: A package with the name "SYMBOL" does not exist.]

As I see know this does happen, when I start CLISP in a shell and
enter this `defun' at the prompt, too.

Am I missing something? Is this a known issue?

BTW, is this the right place to ask newbie-ish questions about CLISP?

    -- Oliver

-- 
27 Thermidor an 210 de la Révolution
Liberté, Egalité, Fraternité!

---

From: "Claudio Bley" <[email-masked]>
Date: Tue Aug 13 16:09:08 2002

>>>>> "os" == Oliver Scholz <[email-masked]> writes:

    os> Hello!  I have just started to learn Common Lisp. Sometimes
    os> CLISP reacts in a way that i can not explain to myself. I am
    os> using: GNU CLISP 2.28 (released 2002-03-03) together with the
    os> lisp-mode of GNU Emacs 21.2. The value of
    os> `inferior-lisp-program' is "clisp -q -L deutsch".

    os> In some (sic!) cases when I send a function to the
    os> inferior-lisp process, CLISP suddenly starts print hundreds of
    os> symbol-names. As it seems the printing becomes slower the more
    os> often this happens.

This happens because you're sending CLISP tab characters. Use the -I
switch to prevent CLISP from interpreting tabs when you're using
lisp-mode in Emacs.

    os> ,---- | [13]> | Display all 1259 possibilities? (y or n) | |
    os> *** - READ von #<INPUT CONCATENATED-STREAM #<IO SYNONYM-STREAM
    os> *TERMINAL-IO*>>: Eine Package mit dem Namen "SYMBOL" gibt es
    os> nicht.  | 1. Break [14]> `----

    os> [The German text translates to: A package with the name
    os> "SYMBOL" does not exist.]

    os> As I see know this does happen, when I start CLISP in a shell
    os> and enter this `defun' at the prompt, too.

It works (for me) when I strip the leading tab characters (or when
using the -I switch).

    os> BTW, is this the right place to ask newbie-ish questions about
    os> CLISP?

Yeah, I think it is.

Claudio

---

From: Sam Steingold <[email-masked]>
Date: Tue Aug 13 16:12:04 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] CLISP printing hundreds of symbol-names"
> * Sent on Wed, 14 Aug 2002 01:42:44 +0200
> * Honorable Oliver Scholz <[email-masked]> writes:
>
> ,----
> | [13]>

your source code contains "^I" control characters, AKA TAB.
this confuses readline which is used by CLISP for input.
TABs are anachronistic.  do not use them.

RTFM: <http://clisp.cons.org/clisp.html#opt-ilisp>
FAQ: <http://www.gnu.org/software/clisp/faq.html#rl-tab>

--
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
char*a="char*a=%c%s%c;main(){printf(a,34,a,34);}";main(){printf(a,34,a,34);}

---

From: Oliver Scholz <[email-masked]>
Date: Wed Aug 14 04:55:02 2002

Sam Steingold <[email-masked]> writes:

[...]
> this confuses readline which is used by CLISP for input.
[...]

Ah! I see now. This makes it pretty clear. Thank you very much.

> RTFM: <http://clisp.cons.org/clisp.html#opt-ilisp>
[...]

My apologies that I did not read this carefully enough. I skipped this
part probably because I thought, it refers to ILISP only, which I do
not use.

    -- Oliver