[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] git rm write-line?
From: |
Felix |
Subject: |
Re: [Chicken-users] git rm write-line? |
Date: |
Wed, 21 Sep 2011 05:43:48 -0400 (EDT) |
From: Christian Kellermann <address@hidden>
Subject: Re: [Chicken-users] git rm write-line?
Date: Wed, 21 Sep 2011 10:37:51 +0200
> * Sascha Ziemann <address@hidden> [110921 10:33]:
>> 2011/9/21 Christian Kellermann <address@hidden>:
>> > On a second thought, here is what write-line does:
>> >
>> > (define write-line
>> > (lambda (str . port)
>> > (let ((p (if (##core#inline "C_eqp" port '())
>> > ##sys#standard-output
>> > (##sys#slot port 0) ) ) )
>> > (##sys#check-port p 'write-line)
>> > (##sys#check-string str 'write-line)
>> > (display str p)
>> > (newline p) ) ) )
>> >
>>
>> Ah I see. write-line is only a quick hack. I thought it would do
>> something fast like fwrite.
>
> Well, now the choice is manyfold. One can whine about the slowness
> or improve the current situation or something completely different
> like shopping...
>
> I prefer improvement.
>
> Either way thanks for the nice test case, let's see if we can speed
> up thing in a way that makes it nicer. I am not sure why we check
> the string here, or why we check the port for being a port, since
> display will do it all over again.
>
> Can someone enlighten me on this?
It is intended to provide a more useful error message.
Strange that this calls "display". It could directly invoke
the "write-string" port method (slot #3).
cheers,
felix