Custom Query (1030 matches)
Results (502 - 504 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #786 | fixed | Read-char-no-hang sometimes hangs | ||
| Description |
Read-char-no-hang is supposed to return NIL if there is no more input available from the stream. But it hangs in the following particular example, when it's trying to read from the output stream of an external program, and that stream is still open but there's nothing on it: ? (defparameter *cat-process*
(run-program "cat" nil
:input :stream
:output :stream
:wait nil))
*CAT-PROCESS*
? (write-line "hi" (external-process-input-stream *cat-process*))
"hi"
? (finish-output (external-process-input-stream *cat-process*))
NIL
? (read-char-no-hang (external-process-output-stream *cat-process*))
#\h
? (read-char-no-hang (external-process-output-stream *cat-process*))
#\i
? (read-char-no-hang (external-process-output-stream *cat-process*))
#\Newline
? (read-char-no-hang (external-process-output-stream *cat-process*))
;; (hangs)
Another strange thing about the same situation is that LISTEN on that stream returns T even when there's no more to be read. |
|||
| #1396 | fixed | Read-time complex simple-arrays not getting stored right (??) | ||
| Description |
It looks to be that arrays of complex double-floats evaluated at readtime aren't being stashed away in the fasl correctly. Test case: (defvar *test* nil)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun v (&rest args)
(let ((a (make-array (length args) :element-type '(complex double-float)
:initial-element #C(0.0d0 0.0d0))))
(loop :for i :from 0
:for x :in args
:do (setf (aref a i) (coerce x '(complex double-float)))
:finally (return a)))))
(defmacro define-foo (name m)
`(setf (getf *test* ',name) ,m))
(define-foo a (v 1 2 3))
(define-foo b '#.(v 1 2 3))
Output: CL-USER> (load (compile-file "test.lisp")) #P"test.dx64fsl" CL-USER> *test* (B #(#C(0.0D0 0.0D0) #C(0.0D0 0.0D0) #C(0.0D0 0.0D0)) A #(#C(1.0D0 0.0D0) #C(2.0D0 0.0D0) #C(3.0D0 0.0D0))) |
|||
| #849 | invalid | Reader tokenization is wrong for +.e2 | ||
| Description |
$ clall -r '(read-from-string "+.e2")'
International Allegro CL Free Express Edition --> +.E2, 4
Clozure Common Lisp --> 0.0, 4
CLISP --> |+.E2|, 4
CMU Common Lisp --> |+.E2|, 4
ECL --> 0.0, 4
SBCL --> |+.E2|, 4
CLHS is clear about it "2.3.1 Numbers as Tokens", the syntax for
floating point numbers is:
float ::= [sign]
{decimal-digit}*
decimal-point
{decimal-digit}+
[exponent]
|
[sign]
{decimal-digit}+
[decimal-point
{decimal-digit}*]
exponent
exponent ::= exponent-marker
[sign]
{digit}+
that is, at least one decimal digit is required before or after the dot. With no digit, the token +.e2 should be read as a symbol. |
|||
