Re: Strange behaviour of *standard-output* in sbcl
- From: Haiwei <highfly22@xxxxxxxxx>
- Date: Wed, 30 Jul 2008 06:38:12 -0700 (PDT)
On Jul 30, 9:20 pm, p...@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
wrote:
Haiwei <highfl...@xxxxxxxxx> writes:
Hi,
When executing following expression, the output file only has part of
contents. The size of this file is 12281.
(let ((*standard-output* (open "/home/haiwei/tmp/tmplog"
:if-exists :rename-and-delete
:if-does-not-exist :create
:direction :output)))
(judydl-enumerate root je))
You don't close the file, so some bytes remain in the buffer.
Thanks. I got all the output after closed the stream.
But I wrote another function which open a file and write data into
it. Then I got all the contents.
Is there any buffer or size limit on *standard-output* in sbcl?
My OS is ubuntu 8.04. The version of sbcl is 1.0.11.debian.
No, just be sure to close the file. WITH-OPEN-STREAM makes sure
stream is closed, which is why JUDYDL-ENUMERATE-FILE works.
By the way, isn't there anything choking you?
WITH-OPEN-STREAM
JUDYDL-ENUMERATE-FILE
Use rather WITH-OPEN-FILE, in JUDYDL-ENUMERATE-FILE.
Or implement a JUDYDL-ENUMERATE-STREAM.
In general, you will use WITH-OPEN-FILE.
Yes. I will. But when to use WITH-OPEN-STREAM?
--
__Pascal Bourguignon__
.
- Follow-Ups:
- Re: Strange behaviour of *standard-output* in sbcl
- From: Joshua Taylor
- Re: Strange behaviour of *standard-output* in sbcl
- References:
- Strange behaviour of *standard-output* in sbcl
- From: Haiwei
- Re: Strange behaviour of *standard-output* in sbcl
- From: Pascal J. Bourguignon
- Strange behaviour of *standard-output* in sbcl
- Prev by Date: Lisp based DSL for bio on Ars Technica
- Next by Date: Re: The Fundamental Confusion of Xah
- Previous by thread: Re: Strange behaviour of *standard-output* in sbcl
- Next by thread: Re: Strange behaviour of *standard-output* in sbcl
- Index(es):