caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: ronniec95@lineone.net
To: "Brandon J. Van Every" <vanevery@indiegamedesign.com>,
	"caml" <caml-list@inria.fr>
Subject: RE: [Caml-list] Efficient C++ interfacing?
Date: Sun, 30 May 2004 12:47:14 +0100	[thread overview]
Message-ID: <40800C10000A6ABC@mk-cpfrontend-4.mail.uk.tiscali.com> (raw)
In-Reply-To: <OOEALCJCKEBJBIJHCNJDCEOAHCAB.vanevery@indiegamedesign.com>

Hi,

I've done a fair amount of C interfacing with Ocaml. Although the auto-conversion
tools are ok, it's usually simpler (and definitely faster in terms of performance)
to roll your own I've found. And it's actually not that complicated for
most things.

Also with handrolling your own interface you'll get something that is more
ocaml like and makes more sense (from a usability perspective) than auto
generated ones most of the time. This is from my experience only, and YMMV.

If you want specific examples, I can send you.

Ronnie
>-- Original Message --
>From: "Brandon J. Van Every" <vanevery@indiegamedesign.com>
>To: "caml" <caml-list@inria.fr>
>Subject: [Caml-list] Efficient C++ interfacing?
>Date: Sun, 30 May 2004 00:41:31 -0700
>
>
>On the subject of C++, the archive is daunting and not terribly
>informative.  If this has been asked before and good answers have been
>given, I'm happy for pointers.  Otherwise, I figure it doesn't hurt to
>ask the same questions at some repeating time interval.
>
>If one wants to interface native OCaml code to native C++ code for
>performance reasons, what is a good way to go about it?  Are there any
>automated binders for this native-native linkage?  I've been looking at
>SWIG but am unsure if it's native-native.  The OCaml SWIG author
>suggested that the performance is more on par with calling a scripting
>language, but maybe I misunderstood.  I'd be interested in optimizing
>that, but only if it's a reasonable architectural approach.  I really
>don't have a handle on what C++ <--> OCaml efforts are out there.
>Anything other than SWIG?
>
>My challenge problem is providing OCaml bindings for The Nebula Device
>2.  http://nebuladevice.cubik.org.  I do not wish to use their script
>server interface.  It looks like a relatively low performance binding -
>adequate for scripts that aren't supposed to be fast, but really not
>intended for native-native communication.  Also, script servers can only
>interface nRoot objects, leaving a whole class of nNode objects that
>must be accessed from C++.
>
>
>Cheers,                     www.indiegamedesign.com
>Brandon Van Every           Seattle, WA
>
>"The pioneer is the one with the arrows in his back."
>                          - anonymous entrepreneur
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.691 / Virus Database: 452 - Release Date: 5/26/2004
>
>
>Attachment: winmail.dat
>


-------------------
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


  reply	other threads:[~2004-05-30 11:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30  7:41 Brandon J. Van Every
2004-05-30 11:47 ` ronniec95 [this message]
2004-05-30 20:17   ` Brandon J. Van Every
2004-06-05 16:45   ` Eray Ozkural
2004-06-05 19:07     ` skaller
2004-06-06  0:31       ` Eray Ozkural
2004-06-06  3:33         ` John Goerzen
2004-06-06  7:00           ` skaller
2004-06-06 16:02             ` David Fox
2004-06-06 18:44             ` Eray Ozkural
2004-06-06 20:41               ` skaller
2004-06-07  3:04                 ` Eray Ozkural
2004-06-07  7:41                   ` Benjamin Geer
2004-06-07 13:38                     ` Eray Ozkural
2004-06-07 14:18                     ` Basile Starynkevitch local
2004-06-07 14:29                       ` Eray Ozkural
2004-06-07 16:29                         ` Eray Ozkural
2004-06-07 15:46                   ` skaller
2004-06-06 16:00       ` David Fox
2004-06-05 21:39     ` Brandon J. Van Every
2004-06-06 16:18       ` David Fox
2004-06-06 18:47         ` Eray Ozkural

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=40800C10000A6ABC@mk-cpfrontend-4.mail.uk.tiscali.com \
    --to=ronniec95@lineone.net \
    --cc=caml-list@inria.fr \
    --cc=vanevery@indiegamedesign.com \
    /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).