From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: read-all ?
Date: Tue, 22 Jan 2013 10:15:37 +0100 [thread overview]
Message-ID: <877gn5zih2.fsf@pobox.com> (raw)
In-Reply-To: <87y5fyt7tn.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sat, 12 Jan 2013 22:22:44 +0100")
Hi,
On Sat 12 Jan 2013 22:22, ludo@gnu.org (Ludovic Courtès) writes:
> Andy Wingo <wingo@pobox.com> 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
--
http://wingolog.org/
next prev parent reply other threads:[~2013-01-22 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 17:34 read-all ? Andy Wingo
2013-01-12 21:22 ` Ludovic Courtès
2013-01-22 9:15 ` Andy Wingo [this message]
2013-01-22 9:51 ` Andy Wingo
2013-01-22 10:01 ` Ludovic Courtès
2013-01-22 11:04 ` Andy Wingo
2013-01-22 13:32 ` Ludovic Courtès
2013-01-22 15:16 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gn5zih2.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).