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 2C83EBC88 for ; Wed, 9 Feb 2005 20:41:56 +0100 (CET) Received: from us25.unix.fas.harvard.edu (us25.unix.fas.harvard.edu [140.247.35.201]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j19JftW7017214 for ; Wed, 9 Feb 2005 20:41:55 +0100 Received: from [140.247.161.153] (roam161-153.student.harvard.edu [140.247.161.153]) by us25.unix.fas.harvard.edu (8.12.11/8.12.11) with ESMTP id j19JffHw014834; Wed, 9 Feb 2005 14:41:46 -0500 In-Reply-To: <20050207022449.GB1631@first.in-berlin.de> References: <20050205000208.GB1364@first.in-berlin.de> <3a2f4a1305020508377ec6ddaf@mail.gmail.com> <617f41a9a7ef08a96d3bd59b00a9ae47@mac.com> <20050207022449.GB1631@first.in-berlin.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <242511bf0bc385223e9dbea5bca82195@fas.harvard.edu> Content-Transfer-Encoding: 7bit Cc: ml-labo@epimac.org, Paul Snively , Julien Roussel , caml-list@yquem.inria.fr, tipoix@free.fr From: Mike Hamburg Subject: Re: [Caml-list] OCaml && COCOA-Environment (Mac-OS-X/GUI) Date: Wed, 9 Feb 2005 14:41:41 -0500 To: Oliver Bandel X-Mailer: Apple Mail (2.619.2) X-Miltered: at concorde with ID 420A6783.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 oliver:01 bandel:01 wrote:01 garbage:01 verbose:01 higher-order:01 o'caml:01 wrote:01 o'caml:01 ocaml:01 nextstep:01 bindings:01 kde:01 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: On Feb 6, 2005, at 9:24 PM, Oliver Bandel wrote: > Hi, > > I had looked shortly at the code... but it seems I have to learn a lot > more of OCaml-C-Binding-stuff as well as Objective-C. > So I started to learn again Objective-C in more detail. > > As far as I can see, the Classes of the Cocoa-Lib are very > powerful!!! They are certainly quite powerful, but their garbage collection is reference-counted, which makes it rather painful. The language is also extremely verbose, and has little support for higher-order functions. That's why I prefer to write in O'Caml, and largely why I wrote the O'Caml to Cocoa bridge in the first place. > I will start to write some small Applications in Objective-C under OS-X > as soon as possible. But bigger stuff I would prefer to write in OCaml. > > If I maybe will have enough experience with ObjC and COCOA, > I will try to marriage it with the Ocaml-C-binding (but this > is new to me too). > > If I may have some time to visit the code, or to test it with > expermimental programs, I can look into it. > But now it seems to me, that I have to learn the basics of these > different worlds in more detail. > > I came from ANSI-C and have done the most work on Linux. Then I have > done > a lot of Perl-programming on Linux too. > > But the Mac-OS-World is different (but very impressing, what they are > doing > there... they seem to have a lot of that NeXt-Step-Stuff integrated > into OS-X!) Yes, OS X is essentially an improved NeXTSTEP, running on a Mach kernel with BSD bindings. I've been quite impressed at what they managed to build on a UNIX, though... it blows KDE out of the water in most respects (in my opinion). > I hope that there are some more people out there who are > interested to - maybe - start a project to integrate > COCOA and OCaml. It seems to me, that a powerful library for > OS-X-GUI (COCOA) for OCaml could be a nice thing for many people. Agreed. What the project would need would be people familiar with FFI tools such as Forklift, as the existing bindings are not type-checked and are slow. > Are there more OS-X developers or are there more OCaml-developers? > And how many OCaml-developers are working at OS-X? > And if there woule be such a binding... ?! > > Best regards.... > ... I hope to have enough time for doing more ObjC... > > > Ciao, > Oliver Mike Hamburg > > On Sun, Feb 06, 2005 at 01:04:20PM -0800, Paul Snively wrote: >> -----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----- >> > > -- > "Here at michigan state university, my computational linguistics > professor > had us learn ocaml for the class and we used it exclusively. I like > it so > much better than c++! Hope this helps." (Jeff Shaw on caml-list) > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >