Last call Takashi Kato (30 Jun 2013 07:00 UTC)
Re: Last call Per Bothner (30 Jun 2013 07:46 UTC)
Re: Last call Takashi Kato (30 Jun 2013 08:35 UTC)
Re: Last call Per Bothner (30 Jun 2013 15:47 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:01 UTC)
Re: Last call Per Bothner (30 Jun 2013 17:19 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:47 UTC)
Re: Last call Per Bothner (30 Jun 2013 18:04 UTC)
Re: Last call Takashi Kato (30 Jun 2013 18:29 UTC)
Re: Last call Per Bothner (30 Jun 2013 23:11 UTC)
Re: Last call John Cowan (01 Jul 2013 20:01 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 09:02 UTC)
Re: Last call Takashi Kato (30 Jun 2013 09:30 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 09:54 UTC)
Re: Last call Takashi Kato (30 Jun 2013 10:27 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 11:44 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:02 UTC)

Re: Last call John Cowan 01 Jul 2013 20:01 UTC

Per Bothner scripsit:

> What is a binary input/output port?  There is no such thing in R7RS.

Well, there is no way to create one, but their potential existence is
allowed for.  In particular, the opening paragraph of 6.13.1 says

    Whether the input and output port types are disjoint is
    implementation-dependent.

What is more, the discussion of `close-port` and friends says explicitly:

    Scheme implementations may provide ports which are simultaneously
    input and output ports, such as sockets; the close-input-port
    and close-output-port procedures can then be used to close the
    input and output sides of the port independently.

Common Lisp already has the functions `make-two-way-stream` and
`make-echo-stream` to achieve this at the Lisp level, so you will have
to solve the problem eventually.

And speaking of `make-echo-stream`:

> No, the issue is not Java, but what a "port" conceptually is
> (or should be): A "port" is a sequence of values, along with a current
> position in that sequence.

The trouble with that definition is that the position isn't necessarily
reifiable.  A TTY can be seen as one stream or two, but in neither case
does it make sense to ask "What is the value of the position?"  Instead,
I think it makes sense to think of a port as a (SRFI 41) stream (which in
fact is the terminology of CL): a lazy sequence (or cosequence) of values.
In some cases it's possible to rewind the stream to an earlier point,
in other cases not.

--
A rose by any other name                            John Cowan
may smell as sweet,                                 http://www.ccil.org/~cowan
but if you called it an onion                       xxxxxx@ccil.org
you'd get cooks very confused.          --RMS