caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Robert Muller <muller@cs.bc.edu>
To: Jeffrey Scofield <dynasticon@mac.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OCaml on iPhone (was: arm backend)
Date: Sun, 3 May 2009 08:34:10 -0400	[thread overview]
Message-ID: <2B39A17A-8D66-4A7E-A465-22A0D69ECF6C@cs.bc.edu> (raw)
In-Reply-To: <m2ab5vt7uz.fsf_-_@mac.com>

This sounds great.  I will be teaching an iphone programming course  
next year and I would
very much like to use the course as an opportunity to introduce  
students to caml. I know that
there are others gearing up for iphone programming courses who aren't  
thrilled with the idea
of teaching Objective C.

If you were to post your resources on a web site it might lower the  
barrier to entry for more
people to use ocaml + your wrappers rather than Objective C.

Bob Muller


On May 2, 2009, at 7:15 PM, Jeffrey Scofield wrote:

> Nathaniel Gray <n8gray@gmail.com> writes:
>
>> Ok, I'm glad I left this to people who are familiar with ARM
>> assembly programming.  :-)
>
> We've done a lot of assembly programming, but none of us is an
> ARM expert.  We looked at ARM documents and the assembly (.s)
> files generated by ocamlopt and gcc, and spent some long sessions
> with gdb.
>
>> Awesome, but now I'm confused because the arm.S you included
>> has lots of .global pseudo-ops.  Do you not compile it with
>> Apple's as?
>
> At around line 36, you'll see:
>
>  #define global globl
>
> As I said in private mail, you could call this a hack, but it's a
> way to avoid making lots of small changes everywhere in the file.
>
>> What's your app?
>
> We're working on a collection of card games for casual play.
>
>> How are you managing the interface between Cocoa and OCaml?
>
> This is a big topic.  The summary is that we model Cocoa objects
> as OCaml objects.  We have a layer that wraps OCaml objects in
> smallish ObjC objects for use on the ObjC side, and wraps ObjC
> objects in smallish OCaml objects for use on the OCaml side.  The
> layer then translates between these representations as required
> for calls into iPhoneOS and Cocoa Touch from OCaml (asking for
> iPhone OS services) and into OCaml from iPhoneOS (for event
> handling).
>
>>> We also made a small fix to the ARM code generator
>>
>> I am very interested in any and all information needed to get a
>> correct OCaml port suitable for use in App Store applications.
>> Please share!
>
> OK, I'll gather up our patch and send it to the list.  I want to
> separate out our changes from those of Toshiyuki Maeda [1].
>
> As I said, our patch fixes calls to external C float functions
> such as floor(), sin(), and so on.  There is special handling in
> ocamlopt to allow them to be unboxed, but the ABI of the existing
> ARM code generator doesn't match the iPhone ABI.
>
> Regards,
>
> Jeff Scofield
> Seattle
>
> [1] http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone/
>
> _______________________________________________
> 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


  reply	other threads:[~2009-05-03 12:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30 12:14 arm backend Joel Reymont
2009-04-30 13:28 ` Sylvain Le Gall
2009-04-30 18:03   ` [Caml-list] " Stéphane Glondu
2009-04-30 19:19     ` Nathaniel Gray
2009-05-01 12:02       ` Mattias Engdegård
2009-05-01 18:27         ` Nathaniel Gray
2009-05-01 19:24           ` Mattias Engdegård
2009-05-01 22:12       ` Jeffrey Scofield
2009-05-02  0:07         ` [Caml-list] " Nathaniel Gray
2009-05-02 23:15           ` OCaml on iPhone (was: arm backend) Jeffrey Scofield
2009-05-03 12:34             ` Robert Muller [this message]
2009-05-05  4:59               ` OCaml on iPhone Jeffrey Scofield
2009-05-05  9:43 ` [Caml-list] arm backend Xavier Leroy
2009-05-05 18:21   ` Nathaniel Gray
2009-05-06  3:56   ` Jeffrey Scofield

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=2B39A17A-8D66-4A7E-A465-22A0D69ECF6C@cs.bc.edu \
    --to=muller@cs.bc.edu \
    --cc=caml-list@inria.fr \
    --cc=dynasticon@mac.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).