[racket] design and rationale of ports

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Nov 10 13:42:30 EST 2010

I know it doesn't replace good guide documentation, but there are a
few uses of make-input-port and make-output-port in the standard
libraries. One of the most complex ones is the implementation of the
IO ports that drracket uses as part of the implementation of the
interactions window.

Robby

On Wed, Nov 10, 2010 at 12:38 PM, Taylor R Campbell
<campbell+racket at mumble.net> wrote:
>   Date: Wed, 10 Nov 2010 00:12:13 -0800
>   From: YC <yinso.chen at gmail.com>
>
>   On Wed, Nov 10, 2010 at 12:00 AM, Taylor R Campbell <campbell+racket at mumble.net <campbell%2Bracket at mumble.net>> wrote:
>
>   > I am completely lost in the documentation and implementation of ports.
>   > Is there a document giving a high-level overview of the design of the
>   > port abstraction in Racket, and its rationale, ideally with motivating
>   > examples of tasks requiring all the various bizarre knobs and buttons
>   > of the abstraction (not necessarily all at once, of course)?
>
>   Don't know of any such documentations, but if you have a specific questions
>   it might be easier to answer.
>
> The documentation describes the contract of MAKE-INPUT-PORT and
> MAKE-OUTPUT-PORT.  That doesn't tell me how the pieces fit together,
> though, or say what one can do with them, or give any guidance on how
> to make them.  For example, given the pieces of an input port, how do
> I implement PEEK-BYTE or READ-BYTE?  Conversely, suppose I have a file
> descriptor and some way to do a non-blocking read on it, or an
> asynchronous (aio) read on it; how do I make the pieces of an input
> port?
>
> (All of this is already implemented in Racket, of course, but it's
> implemented in an enormous pile of cpp-conditionalized C that I find
> very hard to follow and that doesn't tell me anything about the
> abstraction as Scheme sees it.)
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.