Hi Michael,
I recommend Attoparsec when parsing raw data into custom data types.
There aren't as many examples and tutorials as there are for Parsec,
but the API is very similar, and some of the important differences are
listed on Attoparsec's Hackage entry. There are also helpful examples
of its
Hello all,
I am currently working on parser for some packets received via the
network. The data structure currently is like that:
data Value = ValUInt8 Int8
| ValUInt16 Int16
| ValUInt32 Int32
-- more datatypes
data Parameter = Parameter {
paramName ::
* Tony Finch wrote:
http://erlang.org/doc/programming_examples/bit_syntax.html#4
The IP header example in the latter is a brilliant real-world example.
Unfortunly this example does not handle bit and byte order.
Take a look at Ada's representation clauses for such topics.
On Wed, 22 Aug 2007, Lutz Donnerhacke wrote:
* Tony Finch wrote:
http://erlang.org/doc/programming_examples/bit_syntax.html#4
The IP header example in the latter is a brilliant real-world example.
Unfortunly this example does not handle bit and byte order.
Take a look at Ada's
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
dot:
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
On 8/19/07, Matthew Sackman [EMAIL PROTECTED] wrote:
But it's vastly harder to do that for floats / non-integers. Now I know
that the number classes in the Prelude are basically broken anyway and
all really need rewriting, but it does seem completely arbitrary that
Words somehow are only
On 8/18/07, Matthew Sackman [EMAIL PROTECTED] wrote:
Also, one thing to watch out for is the fact the existing Get and Put
instances may not do anything like what you expect. For example, for
some reason I expected that the instances of Get and Put for Float and
Double would send across the
Hi all,
Recently I am considering doing part of my job using Haskell.
My duty is writing a network server which talks to another server through a
binary based private protocol.
As the old version of this component is written in C, it's very natural that
this protocol is base on C structure
As I am a newbie to Haskell, I am not sure how to handle this problem
with less work. Do you have any ideas about this problem?
Thanks in advance!
Have a look at
http://haskell.org/haskellwiki/Applications_and_libraries/Data_structures
section 3 (IO) -
10 matches
Mail list logo