[Haskell-cafe] Re: Haskell poker server
Andre Pang
ozone at algorithm.com.au
Tue Aug 30 20:49:37 EDT 2005
On 31/08/2005, at 7:37 AM, Miles Sabin wrote:
> I've been using parsec for binary parsing (Java class files in my
> case)
> as a first exercise with both Haskell and combinator parsing, with a
> view to applying same to network protocols.
I've also been experimenting with using Parsec to parse binary
files. The biggest problem with is that it's a slow, because you're
working with types of [Char] rather than e.g. UArray Word8. This is
usually fine if you're doing on-the-fly processing or are working
with small files, but in my case, I was working with 1GB+ video
files. Having over 1,000,000 list cells of one character each gets a
tad slow :).
I did a little bit of work (with emphasis on 'little') to start
refactoring Parsec so it can work with generic sequences instead of
just lists (so you can make it work with arrays), but haven't gotten
too far. Having Parsec work speedily with binary files would
absolutely rock -- I suspect there are a lot of people who've never
thought about using parser combinators to process binary data, and if
it's a feasible option ...
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
More information about the Haskell-Cafe
mailing list