`#2a((1.0))

From: Nicolas Neuss (my.name_at_iwr.uni-heidelberg.de)
Date: 05/25/04


Date: 25 May 2004 18:20:10 +0200

Hello,

Using CMUCL:

1. (let ((x 1)) `#(,x)) => #(1)

2. The following does not yield #2a((1)) but

(let ((x 1)) `#2a((,x))) => #2A((((LISP::|,|) . X)))

(CLISP gives an error here)

Questions: Is the code in (1) or (2) legal? Should (2) work?

My actual problem is the following: I have written a reader macro #m for
reading in matrices as follows

  (set-dispatch-macro-character
   #\# #\m
   #'(lambda (stream char n)
       (declare (ignore char n))
       (let ((list (read stream nil (values) t)))
         `(make-real-matrix ',list)))))

#m((1.0)) returns an 1x1-matrix with entry 1.0. Now it would sometimes be
practical to be able to say

  (let ((x 1)) `#m((,x)))

Unfortunately, I have not succeeded to modify my code such that this works.

Thank you for any information.

Nicolas



Relevant Pages

  • Re: `#2a((1.0))
    ... > Using CMUCL: ... > (CLISP gives an error here) ... > reading in matrices as follows ...
    (comp.lang.lisp)
  • Re: CLISP vs. CMUCL vs. SBCL
    ... > CMUCL: Good, fast compiler. ... What are the best points of CLISP other than portability? ... Between CMUCL and SBCL, how would one choose between these? ... > support CMUCL also seem to support SBCL, ...
    (comp.lang.lisp)
  • Re: TERPRI
    ... at least one CMUCL process running all the time (started at boot time ... CMUCL mmap's its core image MAP_PRIVATE, that is, "copy on write", ... English comments in the CLISP code it *looks* like it's doing the ...
    (comp.lang.lisp)
  • CLISP vs. CMUCL vs. SBCL
    ... Linux: CLISP, CMUCL, and SBCL. ... What are the best points of CLISP other than portability? ...
    (comp.lang.lisp)
  • Re: CLISP vs. CMUCL vs. SBCL
    ... What are the best points of CLISP other than portability? ... > first reaction is that I'd like something speedy, ... It is also a /lot/ smaller than CMUCL or SBCL. ...
    (comp.lang.lisp)