Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: David MENTRE <dmentre@linux-france.org>
To: John Whitington <john@coherentgraphics.co.uk>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Coherent Graphics Product Updates
Date: Thu, 12 Jul 2012 18:44:51 +0200	[thread overview]
Message-ID: <CAC3Lx=bdcu_RHKeDjCmHFMhvR=rhsBvSv3=oCpTxt5UvjxVsbQ@mail.gmail.com> (raw)
In-Reply-To: <4FFEFB0F.5080506@coherentgraphics.co.uk>

Hello,

2012/7/12 John Whitington <john@coherentgraphics.co.uk>:
> It's entirely one-way. Objective C calls OCaml. OCaml never calls Objective
> C.
[...]
> Similarly, no complicated OCaml data structures cross the boundary - it's
> all direct ints, floats, strings, and the occasional void*. The possibility
> for programmer error in building big OCaml data structures directly in C
> seems to outweigh the annoyance of a slightly flat interface, at least for
> this particular application. FFI Masters may disagree :-)

OK, thanks. I immediately thought at more complicated things (e.g. two
processes with a protocol between them) and I did not thought at
OCaml's C interface.

> The multiple PDF files representing different undo/redo states of a document
> are held in memory in OCaml (with most of the data shared between them
> automatically, of course). When the PDF is updated or undone/redone, it's
> flattened to disk, and the PDFKit component in Cocoa picks it up and renders
> it - surprisingly, this is quick enough - it's all in the memory cache
> rather than the actual disk usually, of course.

That's an interesting way to bypass simple FFI approach.

> PDFKit (The cocoa PDF component) is only used for rendering - almost every
> other piece of functionality is dealt with by CamlPDF via the FFI.

Thank you for your detailed and quick answer,
Best regards,
david

  reply	other threads:[~2012-07-12 16:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 13:04 John Whitington
2012-07-12 15:51 ` David MENTRE
2012-07-12 16:27   ` John Whitington
2012-07-12 16:44     ` David MENTRE [this message]
2012-07-13  0:27       ` Francois Berenger

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='CAC3Lx=bdcu_RHKeDjCmHFMhvR=rhsBvSv3=oCpTxt5UvjxVsbQ@mail.gmail.com' \
    --to=dmentre@linux-france.org \
    --cc=caml-list@inria.fr \
    --cc=john@coherentgraphics.co.uk \
    /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