unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 10627@debbugs.gnu.org
Subject: bug#10627: char-ready? is broken for multibyte encodings
Date: Mon, 25 Feb 2013 09:55:44 +0100	[thread overview]
Message-ID: <87ehg493hr.fsf@pobox.com> (raw)
In-Reply-To: <87a9qt6yux.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 24 Feb 2013 19:06:30 -0500")

Hi Mark,

Are you proposing that `char-ready?' do a nonblocking read if
the buffer is empty?  That could work.

On Mon 25 Feb 2013 01:06, Mark H Weaver <mhw@netris.org> writes:

> However, is seems to me that implementing this in terms of read-byte and
> unget-byte is simpler, because it avoids duplication of the logic
> regarding putback buffers and refilling of buffers.

Could work, if the port is nonblocking to begin with.

> I agree that 'char-ready?' is an antiquated interface, but it is
> nonetheless part of the R5RS (and Guile since approximately forever),
> and it is the only way to do a non-blocking read in portable R5RS.  It
> seems to me that we ought to try to implement it as well as we can, no?

Do what you like to do :)  But if it were my time, I would simply
document that it checks for a byte and not a character and move on.

Andy
-- 
http://wingolog.org/





  parent reply	other threads:[~2013-02-25  8:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 10:21 bug#10627: char-ready? is broken for multibyte encodings Mark H Weaver
2013-02-24 19:11 ` Andy Wingo
2013-02-24 20:14   ` Mark H Weaver
2013-02-24 22:15     ` Andy Wingo
2013-02-25  0:06       ` Mark H Weaver
2013-02-25  1:23         ` Daniel Hartwig
2013-02-25  8:55         ` Andy Wingo [this message]
2013-02-26 19:50           ` Mark H Weaver
2013-02-26 19:59             ` Andy Wingo
2016-06-20 19:23               ` 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=87ehg493hr.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=10627@debbugs.gnu.org \
    --cc=mhw@netris.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).