Wait... System.Posix.IO.ByteString reads data into a *String*?

Ryan Newton rrnewton at gmail.com
Tue Feb 21 16:04:24 CET 2012


Here's one more point for a unix-bytestring like behavior:

Brandon above mentioned that the ByteString already provides IO routines,
which is true.  But the reason I went looking for
System.Posix.IO.ByteString was that I was writing a named pipes backend for
"distributed-process".

     https://github.com/haskell-distributed/distributed-process

This was a pain in the ass because of the tricky blocking / erroring
semantics of named pipes and the only way I ended up getting it working was
by using the System.Posix.IO "raw system calls", not with any layer above
that.

But without unix-bytestring I've implemented a pretty silly low performance
transport!

Cheers,
  -Ryan


It's worth mentioning that the unix-bytestring package grew out of my
> attempts at making System.Posix.IO efficient. Before releasing that
> package I sought inclusion into unix proper, however I was rebuffed because
> (other than the use of ByteStrings) I kept the same API--- but it turns out
> that noone liked the original API! Thus, I spun the package off in order to
> redevelop the API into something nicer; hoping that it would be included in
> the future.
>
> The issue about using ByteStrings for file names came about in a separate
> discussion because of some concerns about roundtripping file names on GHC
> 7.2. Given that the aforementioned unix-bytestring discussion happened on
> this list and in recent memory, I am *very* disappointed that the new
> version of unix has decided to steal the namespace that was specifically
> set aside for unix-bytestring.
> ~wren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20120221/05dfe941/attachment.htm>


More information about the Libraries mailing list