[Haskell-cafe] Parsing binary data.

Tony Finch dot at dotat.at
Tue Aug 21 20:25:50 EDT 2007


On Sun, 19 Aug 2007, Peter Cai wrote:
>
> My duty is writing a network server which talks to another server through a
> binary based private protocol.

Haskell needs something like Erlang's bit syntax.

http://erlang.org/doc/reference_manual/expressions.html#6.16
http://erlang.org/doc/programming_examples/bit_syntax.html#4
The IP header example in the latter is a brilliant real-world example.

It has recently been upgraded to support arbitrary bit streams.
See http://www.it.uu.se/research/group/hipe/papers/padl07.pdf

Tony.
-- 
f.a.n.finch  <dot at dotat.at>  http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.


More information about the Haskell-Cafe mailing list