Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!columbia!vail.cs.columbia.edu!djk From: djk@vail.cs.columbia.edu (David Kurlander) Newsgroups: comp.lang.lisp Subject: Bugs in Lucid? Message-ID: <6150@columbia.edu> Date: 31 Jan 89 19:33:40 GMT Sender: news@columbia.edu Reply-To: djk@vail.cs.columbia.edu (David Kurlander) Organization: Columbia University Department of Computer Science Lines: 43 This past week I started to use some of Common Lisp's advanced array features, sometimes achieving quite unexpected results. I think that I've stumbled upon two bugs in Lucid Common Lisp, but there's a small chance that I might be using displaced offsets incorrectly. I would appreciate it if a CommonLisp guru could tell me whether the former or latter is true. Bug1: (setq *print-circle* t) (setq *print-array* t) (setq a (make-array 100)) (setq b (make-array 3 :displaced-to a :displaced-index-offset 10)) (setq c (make-array 3 :displaced-to a :displaced-index-offset 25)) (setq text (list b c)) Now, when I type "text" to the interpreter, I get the following result: (#1=#(NIL NIL NIL) #1). Yet the (car text) is not eq to (cadr text)! Bug2: (setq u (make-array 400 :element-type 'string-char :fill-pointer t)) (replace u "Common Lisp") (setf (fill-pointer u) 11) (setq y (make-array 10 :element-type 'string-char :fill-pointer t :displaced-to u :displaced-index-offset 6)) (setf (fill-pointer y) 5) (vector-push #\* y) I would expect the asterisk to be placed at position 5 of y, but instead it appears at 5 of u! By the way, I'm running HPCL II A.02.01, a repackaged version of Lucid 2.1 by Hewlett-Packard. The first bug also appears on a Sun 4 running Sun Development Environment 2.1, another repackaged version of Lucid. I didn't get a chance to test out bug #2 on the Sun. David Kurlander djk@columbia.edu