john at repetae.net
Wed Feb 8 19:19:30 EST 2006
On Wed, Feb 08, 2006 at 12:03:54PM +0300, Bulat Ziganshin wrote:
> JM> If we had a good standard poll/select interface in System.IO then we
> JM> actually could implement a lot of concurrency as a library with no
> JM> (required) run-time overhead. I'd really like to see such a thing get
> JM> into the standard. Well, mainly it would just be a really useful thing
> JM> to have in general. If others think it is a good idea I can try to come
> JM> up with a suitable API and submit it to the repo.
> i have delayed answering to this letter until i announced my Streams
> library. now i can say that such API already exists - in terms of my
> library you need just to write an transformer that intercepts
> vGetBuf/vPutBuf calls and pass them to the select/poll machinery. so
> you can write such transformer just now and every program that uses
> Streams will benefit from its usage. Converting programs that use
> Handles to using Streams should be also an easy task.
I was actually asking for something much more modest, which was the
routine needed to pass them to the select/poll machinery. but yeah, what
you say is one of my expected uses of such a routine. Once a standard IO
library settles down, then I can start working on the exact API such a
routine would have.
> of course, Streams library is not some standard just now, and moreover
> - it is not compatible with JHC. the greatest problem is what i using
> type classes extensions available in GHC/Hugs what is not in H98
> standard. so, i'm interested in pushing Haskell' to accept most
> advanced possible extensions in this area and, of course, in actual
> implementing these extensions in the Haskell compilers. alternative
> way to make Streams available to wider range of Haskell compilers is
> to strip support of streams working in monads other that IO.
Don't take the absence of a feature in jhc to mean I don't like or want
that feature. There are a lot of things I don't have but that I'd
definitly want to see in the language simply because I was only shooting
for H98 to begin with and was more interested in a lot of the back end
stuff. You should figure out the nicest design that uses just the
extensions needed for the design you want. it could help us decide what
goes into haskell-prime to know what is absolutely needed for good
design and what is just nice to have.
> if you can make select/poll transformer, at least for testing
> purposes, that will be really great.
Yeah, I will look into this. the basic select/poll call will have to be
pretty low level, but hopefully it will allow interesting higher level
constructs based on your streams or an evolution of them.
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-prime