caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Christopher L Conway <cconway@cs.nyu.edu>,
	caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Camlidl questions
Date: Sat, 27 Oct 2007 17:45:53 +0100	[thread overview]
Message-ID: <20071027164553.GA26579@furbychan.cocan.org> (raw)
In-Reply-To: <3596AC1F-C054-44AC-96E6-2C95E1072F23@erratique.ch>

On Sat, Oct 27, 2007 at 10:43:46AM +0200, Daniel Bünzli wrote:
> Le 26 oct. 07 à 22:36, Christopher L Conway a écrit :
> >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.

-- 
Richard Jones
Red Hat


  reply	other threads:[~2007-10-27 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 20:36 Christopher L Conway
2007-10-27  8:43 ` [Caml-list] " Daniel Bünzli
2007-10-27 16:45   ` Richard Jones [this message]
2007-10-27 23:27     ` Chris Conway
2007-10-28 21:48       ` Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071027164553.GA26579@furbychan.cocan.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=cconway@cs.nyu.edu \
    --cc=daniel.buenzli@erratique.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).