Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Operators for Int64 and Int32
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Operators for Int64 and Int32
On Fri, Apr 04, 2008 at 07:58:00PM +0200, Adrien wrote:
> As for my library (I'm sure someone will ask about it), it is
> basically used like Bitmatch. When I saw the Bitmatch release, I
> translated Richard's examples to my library. I took me a few minutes.
> It would benefit from some sugar but I don't know camlp4 (yet).
> 
> If you want you can have a look at the examples here :
> http://ocaml.yaxm.org/wiki/doku.php?id=binary_parse#examples

I guess the advantage of bitmatch is matching against several cases.
In fact the pa_bitmatch extension generates a really large amount of
code in some cases.  The EXT3 case generates this:

http://www.annexia.org/tmp/ext3.txt

1814 lines of code from just 76 lines of source, ouch :-)  Well, most
of it is optional debugging statements ...

> I'll probably make some release this week-end if I find enough time (I
> already have to get a new ID card as mine has just been stolen).

But our Home Secretary "Wacky" Jacqui Smith assured us that we'll all
be safe with ID cards and all crime will cease!?!

Rich.

-- 
Richard Jones
Red Hat