From: Matt
Subject: Format bug in CLisp?
Date: 
Message-ID: <OUIFf.11523$rH5.368@newsread2.news.atl.earthlink.net>
I think I found a bug in CLisp's (format) function.  In this case,
when there's a newline at the end of the string, it prints it at
the beginning and I've tried it with Lispworks and Lispworks
doesn't do it:

--test.lisp--

(defconstant nl "goodbye
")
(defconstant nonl "goodbye")
(format t "hello") (format t "~a" nl)
(format t "hello") (format t "~a" nonl)

--test.lisp--

CLisp prints this:
hello
goodbye
hellogoodbye

Lispworks prints this (like I was expecting):
hellogoodbye
hellogoodbye


What should I do?  Tell them on the mailing list or file
a Sourceforge bug report?  Or is it not a bug at all?
I think it's gotta be a bug.

Thanks!
Matt

From: Matt
Subject: Re: Format bug in CLisp?
Date: 
Message-ID: <OWIFf.11524$rH5.7677@newsread2.news.atl.earthlink.net>
Matt wrote:
> I think I found a bug in CLisp's (format) function.  In this case,
> when there's a newline at the end of the string, it prints it at
> the beginning...

Actually, it's printing both at the beginning and the end.

Matt
From: Matt
Subject: Re: Princ bug in CLisp?
Date: 
Message-ID: <2JJFf.11537$rH5.2243@newsread2.news.atl.earthlink.net>
Matt wrote:
> Matt wrote:
>> I think I found a bug in CLisp's (format) function.  In this case,
>> when there's a newline at the end of the string, it prints it at
>> the beginning...
> 
> Actually, it's printing both at the beginning and the end.

I guess the problem is with (princ) not (format).  I'm looking at
format.lisp and (format) seems to be calling (princ) for "~a"'s and
(princ) is doing it too.  Here's the updated test:

--test.lisp--

(princ "hello") (princ "goodbye
")
(princ "hello") (princ "goodbye")

--test.lisp--

Matt
From: Pascal Bourguignon
Subject: Re: Format bug in CLisp?
Date: 
Message-ID: <87zml44jsj.fsf@thalassa.informatimago.com>
Matt <·····@invalid.net> writes:

> I think I found a bug in CLisp's (format) function.  In this case,
> when there's a newline at the end of the string, it prints it at
> the beginning and I've tried it with Lispworks and Lispworks
> doesn't do it:
>
> --test.lisp--
>
> (defconstant nl "goodbye
> ")
> (defconstant nonl "goodbye")
> (format t "hello") (format t "~a" nl)
> (format t "hello") (format t "~a" nonl)
>
> --test.lisp--
>
> CLisp prints this:
> hello
> goodbye
> hellogoodbye
>
> Lispworks prints this (like I was expecting):
> hellogoodbye
> hellogoodbye
>
>
> What should I do?  Tell them on the mailing list or file
> a Sourceforge bug report?  Or is it not a bug at all?
> I think it's gotta be a bug.

I think it's a bug that's been reported recently.
You should check it is listed in sourceforge.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Specifications are for the weak and timid!"
From: Matt
Subject: Re: Format bug in CLisp?
Date: 
Message-ID: <qMJFf.11538$rH5.8503@newsread2.news.atl.earthlink.net>
Pascal Bourguignon wrote:
> Matt <·····@invalid.net> writes:

>> What should I do?  Tell them on the mailing list or file
>> a Sourceforge bug report?  Or is it not a bug at all?
>> I think it's gotta be a bug.
> 
> I think it's a bug that's been reported recently.
> You should check it is listed in sourceforge.

Oh, you're right, I should have done that.  Sorry about that.

Matt
From: Pascal Bourguignon
Subject: Re: Format bug in CLisp?
Date: 
Message-ID: <87vevs4dxn.fsf@thalassa.informatimago.com>
Matt <·····@invalid.net> writes:

> Pascal Bourguignon wrote:
>> Matt <·····@invalid.net> writes:
>
>>> What should I do?  Tell them on the mailing list or file
>>> a Sourceforge bug report?  Or is it not a bug at all?
>>> I think it's gotta be a bug.
>> I think it's a bug that's been reported recently.
>> You should check it is listed in sourceforge.
>
> Oh, you're right, I should have done that.  Sorry about that.

No problem. Now I think I remember it was said the problem is with the
pretty printer, and disabling it avoids the bug:

[93]> (progn (setf *print-pretty* nil)
(princ "hello") (princ "goodbye
") (princ "hello") (princ "goodbye"))

hellogoodbye
hellogoodbye
"goodbye"
[94]> 

this must be commented in the bug report no?

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
You're always typing.
Well, let's see you ignore my
sitting on your hands.
From: Matt
Subject: Re: Format bug in CLisp?
Date: 
Message-ID: <boLFf.6905$Nv2.4610@newsread1.news.atl.earthlink.net>
Pascal Bourguignon wrote:
> Matt <·····@invalid.net> writes:
> 
>> Pascal Bourguignon wrote:
>>> Matt <·····@invalid.net> writes:
>>
>>>> What should I do?  Tell them on the mailing list or file
>>>> a Sourceforge bug report?  Or is it not a bug at all?
>>>> I think it's gotta be a bug.
>>> I think it's a bug that's been reported recently.
>>> You should check it is listed in sourceforge.
>>
>> Oh, you're right, I should have done that.  Sorry about that.
> 
> No problem. Now I think I remember it was said the problem is with the
> pretty printer, and disabling it avoids the bug:
> 
> [93]> (progn (setf *print-pretty* nil)
> (princ "hello") (princ "goodbye
> ") (princ "hello") (princ "goodbye"))
> 
> hellogoodbye
> hellogoodbye
> "goodbye"
> [94]> 
> 
> this must be commented in the bug report no?

Yeah, I got it.  Thanks!
Matt