From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 978C3BC88 for ; Sun, 6 Feb 2005 22:04:55 +0100 (CET) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.70]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j16L4r9C016608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 6 Feb 2005 22:04:55 +0100 Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/MantshX 4.0) with ESMTP id j16L4iXa014854; Sun, 6 Feb 2005 13:04:44 -0800 (PST) Received: from [192.168.1.100] (dsl081-080-123.lax1.dsl.speakeasy.net [64.81.80.123]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id j16L4ge1025505; Sun, 6 Feb 2005 13:04:43 -0800 (PST) In-Reply-To: References: <20050205000208.GB1364@first.in-berlin.de> <3a2f4a1305020508377ec6ddaf@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <617f41a9a7ef08a96d3bd59b00a9ae47@mac.com> Content-Transfer-Encoding: 7bit Cc: ml-labo@epimac.org, Julien Roussel , Oliver Bandel , caml-list@yquem.inria.fr, tipoix@free.fr From: Paul Snively Subject: Re: [Caml-list] OCaml && COCOA-Environment (Mac-OS-X/GUI) Date: Sun, 6 Feb 2005 13:04:20 -0800 To: Mike Hamburg X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619.2) X-Miltered: at concorde with ID 42068675.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 hash:01 wrote:01 o'caml:01 invocation:01 o'caml:01 parsing:01 bindings:01 resurrect:01 ffi:01 bindings:01 cocoa:98 cocoa:98 forklift:98 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Feb 5, 2005, at 11:51 AM, Mike Hamburg wrote: > Additionally, I developed a very rudimentary binding. It allowed the > user to call Cocoa methods from O'Caml, but it had an enormous > overhead: each method invocation from O'Caml had the overhead of about > 5 method calls from the C glue. There was a (somewhat more efficient) > Cocoa-to-O'Caml call method, but I don't remember if I ever finished > it. > > Paul Snively, Nick Burlett and I were working on a more efficient > bridge, by means of parsing Cocoa headers to automatically generate > typed bindings which would look like objects to O'Caml, but the > project fizzled without any real results. Perhaps someone with more > FrontC knowledge could resurrect it. The existing code is not > strongly typed: you can attempt to pass the wrong number or type of > arguments to a method, and it will raise an O'Caml exception instead > of rejecting it at compile time. > > The O'Caml-to-Cocoa bridge is not online, but I can send you what code > we have if you want. > Mea culpa. I'm still very interested. I can't help but think that extending Jeff Henrikson's Forklift FFI to handle Objective-C and marrying that to an (improved? revised?) version of your bindings wouldn't be a big win, but I confess to having no real roadmap for how to get there, and my Copious Free Time(tm) is rather torn between wanting to get O'Caml going natively on OS X and wanting to plow through TAPL and now ATITAPL and master MetaPRL and concentrate on learning how to design modern programming languages. But at the very least, I'd love to see the current state of your code. :-) > Mike Hamburg > Many thanks and best regards, Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin) iEYEARECAAYFAkIGhmIACgkQO3fYpochAqJ17QCdFUWvJ3ul5nvsqb7wp/GZ8khp fVcAniTDjb+ksXRgsxAT/ty9qwCyNdR2 =bSuT -----END PGP SIGNATURE-----