From: Christian Kellermann <ck...@pestilenz.org> Subject: Re: [Chicken-users] git rm write-line? Date: Wed, 21 Sep 2011 10:37:51 +0200
> * Sascha Ziemann <cev...@gmail.com> [110921 10:33]: >> 2011/9/21 Christian Kellermann <ck...@pestilenz.org>: >> > 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 _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users