From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA30848; Fri, 10 Sep 2004 08:54:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA29341 for ; Fri, 10 Sep 2004 08:54:26 +0200 (MET DST) Received: from outbound28-2.lax.untd.com (outbound28-2.lax.untd.com [64.136.28.160]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id i8A6sPit029646 for ; Fri, 10 Sep 2004 08:54:25 +0200 Received: from outbound28-2.lax.untd.com (smtp02.lax.untd.com [10.130.24.122]) by smtpout04.lax.untd.com with SMTP id AABAWCV6KAJ9Q9GA for (sender ); Thu, 9 Sep 2004 23:54:01 -0700 (PDT) Received: (qmail 8802 invoked from network); 10 Sep 2004 06:53:22 -0000 Received: from unknown (HELO vangogh) (66.52.243.191) by smtp02.lax.untd.com with SMTP; 10 Sep 2004 06:53:22 -0000 From: "Brandon J. Van Every" To: Subject: RE: [Caml-list] best way to implement c/c++ FFI for ocaml ? Date: Fri, 10 Sep 2004 00:04:25 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <16705.12413.117015.377883@soggy.deldotd.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-ContentStamp: 10:5:2773255288 X-MAIL-INFO: 2dafab7733eaf7ab7ecade07af5ebe9faa3aeed3d3c3ea931a9a63dbda4a6a47caca0b02c7f35f938e5f5bc79e4bceb3a39e6f571e6eebd7a3fecf6e23332beb1b7be7d70abfaf47472eab4b8ffb2bbafb034be36337073be35efb7ec32abacfef5a9b33af177777db8a079a7eaa97273a4a976b631aab6aca1ade9a17cbfaca6fca9e8af38bbf0bae8bfeba834bba5a2e9bcf9b83cfcfcf8f33bbaf337e13f77e2aaf13db975e1f033e2f2e3e231fa73a8733fba72ab7c38bb7934fea936b8b4fae0b9a0b5f575f8eebd78e6efefe6eebebd7 X-UNTD-OriginStamp: CI84cOLHFqh7Zd2QWkwvEFvwyO3T/pIsFsCrOjjLH86eNuRxSBPnyJCD3HLgflDi X-Miltered: at nez-perce with ID 41414FA1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brandon:99 caml-list:01 ffi:01 swig:01 swig:01 2004:99 caml-list:01 bayesian:01 crap:01 crap:01 unboxed:01 alloc:01 alloc:01 val:01 val:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian wrote: > > Is the swig implementation for ocaml in useful shape ? As of April 2004, the OCaml support in SWIG http://www.swig.org was only being used by the author of said support. http://mailman.cs.uchicago.edu/pipermail/swig/2004-April/009508.html I have not followed up on it since then, but I keep almost finding a reason to do so. My interest is tied to the issue of Ocaml-ifying the Nebula2 3D engine, http://nebuladevice.cubik.org . It is a C++ engine so this is a big job. Cheers, www.indiegamedesign.com Brand*n Van Every S*attle, WA Praise Be to the caml-list Bayesian filter! It blesseth my postings, it is evil crap! evil crap! Bigarray! Unboxed overhead group! Wondering! chant chant chant... Is my technical content showing? // return an array of 100 packed tuples temps int $[tvar0][2*100]; // what the c function needs value $[tvar1]; // one int value $[tvar2]; // one tuple int $[tvar3] // loop control var oncePre eachPre $[cvar0]=&($[tvar0][0]); eachPost $[lvar0] = alloc(2*100, 0 /*NB: zero-tagged block*/ ); for(int $[tvar3]=0;$[tvar3]<100;$[tvar3]++) { $[tvar2] = alloc_tuple(2); $[tvar1] = Val_int($[cvar0][0+2*$[tvar3]]); Store_field($[tvar2],0,$[tvar1]); $[tvar1] = Val_int($[cvar0][1]); Store_field($[tvar2],1,$[tvar1+2*$[tvar3]]); Array_store($[lvar0],$[tvar3],$[tvar0]); } oncePost ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners