caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Francois Berenger <berenger@riken.jp>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Coherent Graphics Product Updates
Date: Fri, 13 Jul 2012 09:27:24 +0900	[thread overview]
Message-ID: <4FFF6B6C.3080901@riken.jp> (raw)
In-Reply-To: <CAC3Lx=bdcu_RHKeDjCmHFMhvR=rhsBvSv3=oCpTxt5UvjxVsbQ@mail.gmail.com>

On 07/13/2012 01:44 AM, David MENTRE wrote:
> 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.

Can't you generate the bindings to C code automatically?

Aren't there tools for this?

>> 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-13  0:27 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
2012-07-13  0:27       ` Francois Berenger [this message]

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=4FFF6B6C.3080901@riken.jp \
    --to=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    /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).