From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id F3E89BB9B for ; Wed, 5 Oct 2005 22:30:54 +0200 (CEST) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j95KUsUj022068 for ; Wed, 5 Oct 2005 22:30:54 +0200 Received: by nproxy.gmail.com with SMTP id x4so101790nfb for ; Wed, 05 Oct 2005 13:30:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CC3m0n84KqXvtbXFA+KYCq+EzKu4E9UrOhKhSH6JRI5+e0MIJWEtqbmaO0NTOJTmXFFzrsftzPgpoO0S517SIJT7nIp3cHOVFxYw27MPnhUoP3rPqTYV6O3fwHILd4wp1gL4JsWzXQQBuyHye4aE5UtJSkh444rRZtr2+MpEcTM= Received: by 10.48.108.1 with SMTP id g1mr70701nfc; Wed, 05 Oct 2005 13:30:54 -0700 (PDT) Received: by 10.48.30.18 with HTTP; Wed, 5 Oct 2005 13:30:54 -0700 (PDT) Message-ID: Date: Wed, 5 Oct 2005 21:30:54 +0100 From: Chris Campbell Reply-To: Chris Campbell To: Jon Harrop Subject: Re: [Caml-list] Automatic interfacing of ocaml to c? Cc: caml-list@yquem.inria.fr In-Reply-To: <200510042256.44671.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200510042256.44671.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 434437FE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 interfacing:01 ocaml:01 caml-list:01 camlidl:01 lablgl:01 bindings:01 camlidl:01 iirc:01 integers:01 lablgl:01 bindings:01 functors:01 ocaml:01 translated:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 On 04/10/05, Jon Harrop wrote: > On Tuesday 04 October 2005 21:43, Chris Campbell wrote: > > Message copied below, I sent it to the caml-list@inria.fr but it > > doesn't show. Which is correct? caml-list@inria.fr or > > caml-list@yquem.inria.fr? > > I received both the original and this duplicate. I think gmail hides the emails the lists sends back until a reply shows up. > > Has anyone done any work on this? > > camlidl > > > I'm in the process of attempting a > > semi autogenerated binding to opengl using the mesa xml specifications > > of the interface and lablgl. > > Have you seen Isaac Trott's idlgl bindings, written using camlidl? I think so, but iirc this used integers for the glEnum values and as such wasn't as safe as the LablGL approach. Can't remember specifics tho. It could be wrapped it in a more typesafe binding. > > I have a good idea of what it will do and am just looking for advice > > from anyone who has done this sort of thing before (if any). > > I have tried and failed to write bindings to the more complicated (read > "hideous") parts of OpenGL and GLU, specifically the GLU tesselator. Heh. > There are also problems with typing, e.g. sets of related functions that > handle polymorphic metadata of the same type between each of the function= s. > This could be implemented using functors, records of functions or objects= . > I'm not sure if it would be better to do more on the OCaml side using Obj= or > to use C. Hmm... can you explain what you mean? > > In fact, I will only > > be generating the mundane stuff as some of this mapping is quite > > tricky and using that as a base. Many of the opengl functions are > > trivially mapped to OCaml but those that don't will be hand coded. > > I'm keen to see your results! :-) Don't expect too much. :) The initial release will only translate a small set of functions automatically and maybe a few hand coded bits to see what people think of it and maybe garner help. :) Once the parts that are easily translated are done, that's when the fun begins.