From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: read-all ? Date: Tue, 22 Jan 2013 10:15:37 +0100 Message-ID: <877gn5zih2.fsf@pobox.com> References: <87hammwbj0.fsf@pobox.com> <87y5fyt7tn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358846145 13695 80.91.229.3 (22 Jan 2013 09:15:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2013 09:15:45 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 22 10:16:04 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxZxa-00021I-If for guile-devel@m.gmane.org; Tue, 22 Jan 2013 10:16:02 +0100 Original-Received: from localhost ([::1]:40636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxZxJ-0002RN-Ci for guile-devel@m.gmane.org; Tue, 22 Jan 2013 04:15:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxZxG-0002RH-Kq for guile-devel@gnu.org; Tue, 22 Jan 2013 04:15:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxZxF-00034z-79 for guile-devel@gnu.org; Tue, 22 Jan 2013 04:15:42 -0500 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:40770 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxZxF-00034s-2B; Tue, 22 Jan 2013 04:15:41 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 9246D9DFA; Tue, 22 Jan 2013 04:15:40 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=CLN+2+0CrQEx 2kMHqoT+NfdfT1w=; b=OD6LSqyH4dJ1RtUQZu2b+3w/ZcoT3c0vVoVJR6H9w2T6 1bz+GXaAx3H2U4rgRAC+xfCnW0qt7ao/uo/f1wPG4i1s/MgtZNJsTCTzNl4Hy99D Xc3o4hMrnaF5+/HdB2KNPYKJlIjWE+8zjePljUoeHDnezLiXRU67PlyJKYNUXFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=caij3g Ee6WX3bZZVEJb7/GPMgVWHdiTehsB8XOL7eWb2AkAxTK6Y/G5f2ZHBUiuPybpas7 lan3urLhsIwDrt2/0niD1pbOL4mgJhQ5BBlyF6Sn9AOnY80Mhl8XSMSWLDgJsi9v 9Nh/a8co9NyetOcU7hSRCGe1fHsKOgN9ArpcQ= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 8651D9DF9; Tue, 22 Jan 2013 04:15:40 -0500 (EST) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 0E95B9DF8; Tue, 22 Jan 2013 04:15:39 -0500 (EST) In-Reply-To: <87y5fyt7tn.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 12 Jan 2013 22:22:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 4A690B02-6474-11E2-B28B-0A4F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15524 Archived-At: Hi, On Sat 12 Jan 2013 22:22, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo skribis: > >> I find myself writing (read-delimited "" p) to slurp in a file as a >> string, but it's not a very straightforward way to say that. >> >> What about `read-all'? We could add it to `(ice-9 rdelim)', I guess. >> R6RS calls this `read-string-all'. > > Sounds like a good idea. Patch attached. I didn't update the docs because it wasn't clear to me that (ice-9 rdelim) is actually the right place to put it. What do you think? Should we perhaps put it in a new (ice-9 ports)? Are the names right? I started by writing it in C but I noticed the C was doing a very stupid get-and-set algorithm, so I figured it got no advantage and we should just write it in Scheme from the get-go. Andy --=20 http://wingolog.org/