From: David Kastrup <dak@gnu.org>
To: guile-devel@gnu.org
Subject: Re: %default-port-conversion-strategy and string ports
Date: Fri, 01 Jun 2012 17:57:06 +0200 [thread overview]
Message-ID: <87k3zrowj1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87sjefvy89.fsf@gnu.org
ludo@gnu.org (Ludovic Courtès) writes:
> Hi!
>
> Mark H Weaver <mhw@netris.org> skribis:
>
>> SRFI-6 (string ports) says nothing about port encodings, and yet
>> portable code written for SRFI-6 will fail on Guile 2.0 unless the
>> string is constrained to whatever the default port encoding happens to
>> be. This is not just a theoretical issue; it has caused trouble in
>> practice, e.g.:
>>
>> http://bugs.gnu.org/11197
>
> Hey, there’s a patch for SRFI-6 there. Could we resume the discussion
> in that bug?
>
> Guile ports are mixed textual/binary ports. Whether this or separate
> binary/textual ports as in R6 is best is an interesting question, but as
> you note, we cannot really change that currently.
I don't understand this distinction. A port transfers characters, like
strings contain characters. The relation is 1:1. The question of
encoding only concerns ports connected to a file, or a terminal, and
then textual/binary is a question of encoding/decoding. A port that
stays within Guile has no business being concerned with encoding. It
has to reproduce the characters from its input to its output without
change.
Things are complicated enough talking to the outside. There is no point
in Guile being confused even when talking to itself.
--
David Kastrup
next prev parent reply other threads:[~2012-06-01 15:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 23:04 %default-port-conversion-strategy and string ports Ludovic Courtès
2012-05-30 23:48 ` Mike Gran
2012-05-31 5:09 ` David Kastrup
2012-05-31 14:05 ` Ludovic Courtès
2012-05-31 14:48 ` David Kastrup
2012-05-31 21:25 ` Mark H Weaver
2012-06-01 15:38 ` Ludovic Courtès
2012-06-01 15:57 ` David Kastrup [this message]
2012-06-01 16:34 ` Ludovic Courtès
2012-06-01 22:40 ` Mark H Weaver
2012-06-02 12:52 ` Ludovic Courtès
2012-06-02 14:55 ` David Kastrup
2012-06-03 14:47 ` Daniel Krueger
2012-06-03 22:22 ` Separate textual/binary ports vs. mixed ports Ludovic Courtès
2012-06-05 9:31 ` Daniel Krueger
2012-06-05 11:57 ` Noah Lavine
2012-06-05 12:47 ` Ludovic Courtès
2012-06-05 12:45 ` Ludovic Courtès
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=87k3zrowj1.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=guile-devel@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).