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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 31315BC69 for ; Sun, 28 Oct 2007 01:27:55 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CACJmI0eAelGc/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.21,337,1188770400"; d="scan'208";a="3735238" Received: from access2.cims.nyu.edu ([128.122.81.156]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Oct 2007 01:27:54 +0200 Received: from access2.cims.nyu.edu (localhost [127.0.0.1]) by access2.cims.nyu.edu (8.13.8+Sun/8.13.8) with ESMTP id l9RNRFSD007811; Sat, 27 Oct 2007 19:27:15 -0400 (EDT) Received: from localhost (cconway@localhost) by access2.cims.nyu.edu (8.13.8+Sun/8.13.8/Submit) with ESMTP id l9RNRF68007808; Sat, 27 Oct 2007 19:27:15 -0400 (EDT) Date: Sat, 27 Oct 2007 19:27:15 -0400 (EDT) From: Chris Conway To: Richard Jones Cc: Daniel =?iso-8859-1?Q?B=FCnzli?= , Christopher L Conway , caml-list Subject: Re: [Caml-list] Camlidl questions In-Reply-To: <20071027164553.GA26579@furbychan.cocan.org> Message-ID: References: <4a051d930710261336r33a4d3aycda32880c1663953@mail.gmail.com> <3596AC1F-C054-44AC-96E6-2C95E1072F23@erratique.ch> <20071027164553.GA26579@furbychan.cocan.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1193527635=:7109" X-Spam: no; 0.00; camlidl:01 unreadable:01 mime-aware:01 0200,:01 bunzli:01 camlidl:01 bug:01 bindings:01 lablgl:01 bindings:01 ocaml's:01 annotations:01 low-level:01 2007,:98 chap:98 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-851401618-1193527635=:7109 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 27 Oct 2007, Richard Jones wrote: > On Sat, Oct 27, 2007 at 10:43:46AM +0200, Daniel B=FCnzli wrote: >> Le 26 oct. 07 =E0 22:36, Christopher L Conway a =E9crit : >>> I'm trying to write an interface to an existing C library using >>> Camlidl and I'm having trouble in just a few cases... >> >> I'd say don't use camlidl. It seems to be unsupported software. There >> is for example a bug the handling of records of floats only that I >> reported a long time ago but was lost in the bugtracker update. I >> guess it wasn't fixed. >> >> Try to understand the caml-c interface (chap. 18 of the manual) and >> then use C pre-processor hacks to streamline the development of your >> bindings, have a look at lablgl to see what I mean by that. > > Absolutely agreed. > > While I think there is room for someone to _really_ tackle the issue > of building interfaces to C automatically (using something like CIL > and a bucket-load of meta-information about how the C library deals > with memory), until that day comes it's just much better to write the > bindings by hand. > > I've used the native interface APIs for several languages including > Java, Perl and Python, but OCaml's is by far the easiest. Well, maybe > apart from C++ :-) > > Rich. I'm afraid I don't understand this position at all. With a few dozen,=20 mostly obvious, annotations to the header files, I have covered 99% of the= =20 library's functionality, automatically generating several thousand lines=20 of low-level boilerplate code. Leaving aside the possibility of known bugs= =20 in Camlidl that might never get fixed... why would I want to code this all= =20 by hand? Regards, Chris ---559023410-851401618-1193527635=:7109--