(let ((stream (make-synonym-stream '*standard-output*))) (write-char #\c stream) (system::stream-charpos stream))
prints
abcabc
(let ((stream (make-synonym-stream '*standard-output*))) (write-char #\c stream) (system::stream-charpos stream)) => 0
On 4/2/16 13:08, Stas Boukarev wrote:
(let ((stream (make-synonym-stream '*standard-output*))) (write-char #\c stream) (system::stream-charpos stream)) => 0
Filed as ticket [408][]. Thanks for the report.
[408]: http://abcl.org/trac/ticket/408
On Sat, Apr 2, 2016 at 2:08 PM, Stas Boukarev stassats@gmail.com wrote:
(let ((stream (make-synonym-stream '*standard-output*))) (write-char #\c stream) (system::stream-charpos stream))
prints
abcabc
(let ((stream (make-synonym-stream '*standard-output*))) (write-char #\c stream) (system::stream-charpos stream)) => 0
Just noticed that the first snippet came out wrong, it was supposed to be (let ((stream (make-synonym-stream '*standard-output*))) (write-string "abc" stream) (fresh-line stream) (write-string "abc" stream)) => abcabc
On 2016/4/3 11:59, Stas Boukarev wrote: […]
Just noticed that the first snippet came out wrong, it was supposed to be (let ((stream (make-synonym-stream '*standard-output*))) (write-string "abc" stream) (fresh-line stream) (write-string "abc" stream)) => abcabc
I was wondering about the repetition; I've updated the ticket.
May I ask what is the point of using a SYNONYM-STREAM in the bug examples? Just using *STANDARD-OUTPUT* directly as the stream argument still evidences the problem, so I don't understand the use of MAKE-SYNOMYM-STREAM. Is the potential problem that something in SLIME or elsewhere might be rebinding *STANDARD-OUTPUT* between calls?
Because using the stream directly works fine:
(let ((stream *standard-output*)) (write-string "abc" stream) (fresh-line stream) (write-string "abc" stream)) => abc abc
On Mon, Apr 4, 2016 at 9:16 AM, Mark Evenson evenson@panix.com wrote:
On 2016/4/3 11:59, Stas Boukarev wrote: […]
Just noticed that the first snippet came out wrong, it was supposed to be (let ((stream (make-synonym-stream '*standard-output*))) (write-string "abc" stream) (fresh-line stream) (write-string "abc" stream)) => abcabc
I was wondering about the repetition; I've updated the ticket.
May I ask what is the point of using a SYNONYM-STREAM in the bug examples? Just using *STANDARD-OUTPUT* directly as the stream argument still evidences the problem, so I don't understand the use of MAKE-SYNOMYM-STREAM. Is the potential problem that something in SLIME or elsewhere might be rebinding *STANDARD-OUTPUT* between calls?
-- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
On 4/4/16 13:52, Stas Boukarev wrote:
Because using the stream directly works fine:
(let ((stream *standard-output*)) (write-string "abc" stream) (fresh-line stream) (write-string "abc" stream)) => abc abc
Under SLIME, the behavior is definitely confusing as both cases look like they succeed. These problems are best reproduced on a standalone ABCL instance.
Thanks again for the information, Mark
armedbear-devel@common-lisp.net