caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeffrey Scofield <jeffsco@psellos.com>
To: Christophe Papazian <christophe.papazian@gmail.com>
Cc: Jeffrey Scofield <jeffsco@psellos.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] OpenGL ES for iPhone Simulator; working example app
Date: Wed, 1 Feb 2012 08:30:14 -0800	[thread overview]
Message-ID: <DFDD3B32-8096-4098-82CD-E9EA1BF032AB@psellos.com> (raw)
In-Reply-To: <D5361C37-128E-464C-9A68-EEC079B2C929@gmail.com>

Christophe:

> I found a way to adapt your patch to cross compile ocaml 3.10
> with the last Xcode and IOS SDK. But, I still get alignment
> warnings, AND SEGFAULT if I use some ocaml instructions like
> (+.) (float addition).

I'm glad you made some progress.  I have some earlier reports
of alignment warnings with Xcode 4.1, but things were otherwise
reported as working.  So the really worrying thing is the
segfault.  You kind of need (+.) to do real work!  There's some
chance this is the same alignment problem, though.

I'll pitch in to help get things working as soon as possible; I'd
love to see many people working with OCaml/iOS.

> However, I can get lucky and compile a stable binary (on
> iPhone) if I avoid some instructions..  I tried to adapt your
> patch to the last version of ocaml, but there was so many
> changes in the assembler that I stop. If anyone has an idea to
> help me.

The ARM code generator was completely rewritten for OCaml 3.12.
In fact our patches are based on the 3.12 version in some sense.
In particular, we adopted the 3.12 register assignment conventions
(which are consistent with iOS conventions).

I would expect almost all the patches to the code generator to
be unnecessary with 3.12.

There is an issue with native floating point.  As I understand
the situation, Xavier's 3.12 ARM generator uses function calls
to implement floating operations rather than in-line native
instructions.

Our patches include some work (by other folks, not us) to emit
native HW floating point instructions.  I haven't done any
testing of the difference, but our apps do some CPU intensive
calculations for short times (a card game, deciding what play to
make next).  So we'd kind of like to use native floating point.

> Question 2 : do you plan to release some general bindings to
> the iOS SDK ?


We don't have plans to release our Cocoa interface code right
now.  The example apps on our website (http://psellos.com/ocaml/)
demonstrate all the basic requirements.  The major differences in
our in-house code are that (a) we hook in to GC to free ObjC
objects when they're collected on the OCaml side; (b) we use
ObjC dynamic method dispatch, so we can write large parts of the
interface in OCaml.

Note that we don't have a system that generates the Cocoa/OCaml
interface automatically.  We add hand-coded classes and methods
to our interface as required.  It's a humble approach, but we
don't have the resources to do anything more elaborate right now.

Thanks for your interest; I'll be able to do more after the
release crunch.

Regards,

Jeffrey


      reply	other threads:[~2012-02-01 16:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 17:40 Jeffrey Scofield
2011-08-24  9:17 ` sashan
2011-08-24 15:09   ` [Caml-list] " Jeffrey Scofield
2012-01-30 16:46     ` [Caml-list] " Christophe Papazian
2012-01-30 16:54       ` Jeffrey Scofield
2012-01-30 17:11       ` Jeffrey Scofield
2012-02-01 13:43         ` Christophe Papazian
2012-02-01 16:30           ` Jeffrey Scofield [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=DFDD3B32-8096-4098-82CD-E9EA1BF032AB@psellos.com \
    --to=jeffsco@psellos.com \
    --cc=caml-list@inria.fr \
    --cc=christophe.papazian@gmail.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).