[Haskell-cafe] ANN: A triple of new packages for talking to the
outside world
Bryan O'Sullivan
bos at serpentine.com
Wed Jan 9 02:57:43 EST 2008
Adam Langley wrote:
> Ok, see http://www.imperialviolet.org/IncrementalGet.hs
That's excellent! This is just the sort of thing one wants if getting
dribs and drabs of information instead of a steady stream. For example,
I need to reconstruct TCP streams from individual packets captured off
the wire, and this is a much easier mechanism to use than playing tricks
with the direct-mode Get monad.
> Questions:
> 1) Should Finished include the remainder of the ByteString (e.g.
> that which wasn't used by that parser)
Yes, definitely. I had to add a runGetState to the existing Get monad
so that I could recover the unparsed residual, so I'm sure it will be
necessary here.
> 2) I've no idea what I've done to the parse speed
Getting the API right is the appropriate thing to be doing first.
Afterwards, the rewrite rule ninjas can stage a night attack on
performance problems.
> But if this is useful to you, make any requests. I'll (hopefully) do
> them, clean it up and push a new release of binary-strict.
I'm lobbying for Don and company to include this stuff in the regular
binary distribution. A proliferation of almost-identical packages
doesn't serve the community all that well.
Thanks for the nice work! I'll try to put that code to use in perhaps a
few days, and let you know how the API works out in practice.
<b
More information about the Haskell-Cafe
mailing list