From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D66A3BBCA for ; Fri, 4 Apr 2008 03:48:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAFUl9UfAXQIm/2dsb2JhbACsFQQ X-IronPort-AV: E=Sophos;i="4.25,601,1199660400"; d="scan'208";a="11048019" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Apr 2008 03:48:01 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m341m1rK010248 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 4 Apr 2008 03:48:01 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoEAACYm9Ufa1uFiomdsb2JhbACRTQEBAQEBAQcFBwkWmhUE X-IronPort-AV: E=Sophos;i="4.25,601,1199660400"; d="scan'208";a="9171862" Received: from smtp.syd.people.net.au ([218.214.225.98]) by mail2-smtp-roc.national.inria.fr with SMTP; 04 Apr 2008 03:47:47 +0200 Received: (qmail 20750 invoked from network); 4 Apr 2008 01:47:46 -0000 Received: from unknown (HELO hendrix.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 4 Apr 2008 01:47:46 -0000 Received: from hendrix (hendrix [192.168.200.99]) by hendrix.mega-nerd.net (Postfix) with SMTP id 8E2C8AB180 for ; Fri, 4 Apr 2008 11:47:34 +1000 (EST) Date: Fri, 4 Apr 2008 12:47:29 +1100 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Operators for Int64 and Int32 Message-Id: <20080404124729.460bc323.mle+ocaml@mega-nerd.com> In-Reply-To: <20080403221704.GA31402@annexia.org> References: <906164100804030708p3e2788a0p29b69f4d46600622@mail.gmail.com> <20080404071729.154e130e.mle+ocaml@mega-nerd.com> <20080403221704.GA31402@annexia.org> Reply-To: caml-list@inria.fr Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed 2.4.5 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 47F588D1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 variants:01 unpacking:01 pointer:01 wrote:01 caml-list:01 arithmetic:01 int:01 int:01 data:02 encoding:02 redhat:03 programming:03 erik:04 Richard Jones wrote: > I know that libsndfile is written in C, but I'd be interested to know > how much bitmatch > (http://et.redhat.com/~rjones/bitmatch/html/Bitmatch.html) might or > might not make a putative OCaml version easier to write. The hard bit has almost nothing to do with programming language and almost everything to do with WAVE (and AIFF and all the other formats) being extremely poorly and/or loosely specified, with over 100 data encoding variants and dozens of broken implementations in the field. Very early in the libsndfile development process I came up with a good way of packing and unpacking the headers (ie effectively the same functionality as bitmatch) and everything has been built on top of that. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "You can have quality software, or you can have pointer arithmetic; but you cannot have both at the same time." -- Bertrand Meyer, 1989