* [Caml-list] Native OCaml iPhone app now in iTunes Store
@ 2011-01-04 19:38 Jeffrey Scofield
2011-01-04 20:16 ` Paolo Donadeo
2011-01-04 20:19 ` [Caml-list] " Joel Reymont
0 siblings, 2 replies; 10+ messages in thread
From: Jeffrey Scofield @ 2011-01-04 19:38 UTC (permalink / raw)
To: caml-list; +Cc: jeffsco
I'm happy to say that our iPhone app written in OCaml is now available
in the iTunes store. It plays the classic card game Cassino, which is
actually quite fun. But it also shows that you can use OCaml to build
native iOS apps.
You can check out the app here:
http://itunes.apple.com/us/app/cassino/id411381417?mt=8&uo=4
I posted about our OCaml-to-iOS cross compiler a while back on this
list. It's based on OCaml 3.10.2 and uses patches from Toshiyuki Maeda
and us (Psellos). Since I last posted about it, I've fixed at least one
bug, so if you're interested you might want to try the newest version.
I created a web page that describes how to build it, here:
http://psellos.com/ocaml/compile-to-iphone.html
It's really enjoyable to work with the power and flexibility of OCaml on
the iPhone. OCaml offers excellent leverage for building iPhone apps,
once the lower layers are in place.
I'd be very happy to answer questions about our experiences and methods,
either on- or off-list.
Regards,
Jeffrey Scofield
Seattle
jeffsco@psellos.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Native OCaml iPhone app now in iTunes Store
2011-01-04 19:38 [Caml-list] Native OCaml iPhone app now in iTunes Store Jeffrey Scofield
@ 2011-01-04 20:16 ` Paolo Donadeo
2011-01-04 20:24 ` Yitzhak Mandelbaum
2011-01-05 7:43 ` [Caml-list] " Jeffrey Scofield
2011-01-04 20:19 ` [Caml-list] " Joel Reymont
1 sibling, 2 replies; 10+ messages in thread
From: Paolo Donadeo @ 2011-01-04 20:16 UTC (permalink / raw)
To: OCaml mailing list
This is a *really* interesting and very good news for the OCaml
community, congratulations!
> I'd be very happy to answer questions about our experiences and methods,
A non technical question: how you bypassed the Apple control over
source code? Is OCaml an allowed language for development on iPhone.
--
Paolo ⠠⠵
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Native OCaml iPhone app now in iTunes Store
2011-01-04 20:16 ` Paolo Donadeo
@ 2011-01-04 20:24 ` Yitzhak Mandelbaum
2011-01-04 20:49 ` Paolo Donadeo
2011-01-05 7:43 ` [Caml-list] " Jeffrey Scofield
1 sibling, 1 reply; 10+ messages in thread
From: Yitzhak Mandelbaum @ 2011-01-04 20:24 UTC (permalink / raw)
To: Paolo Donadeo; +Cc: OCaml mailing list
Apple recently dropped that infamous clause from their developer agreement. As far as I know, any language is fine at this point.
On Jan 4, 2011, at 3:16 PM, Paolo Donadeo wrote:
> This is a *really* interesting and very good news for the OCaml
> community, congratulations!
>
>> I'd be very happy to answer questions about our experiences and methods,
>
> A non technical question: how you bypassed the Apple control over
> source code? Is OCaml an allowed language for development on iPhone.
>
>
> --
> Paolo ⠠⠵
>
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
-----------------------------
Yitzhak Mandelbaum
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Caml-list] Re: Native OCaml iPhone app now in iTunes Store
2011-01-04 20:16 ` Paolo Donadeo
2011-01-04 20:24 ` Yitzhak Mandelbaum
@ 2011-01-05 7:43 ` Jeffrey Scofield
1 sibling, 0 replies; 10+ messages in thread
From: Jeffrey Scofield @ 2011-01-05 7:43 UTC (permalink / raw)
To: caml-list
Paolo Donadeo <p.donadeo@gmail.com> writes:
> This is a *really* interesting and very good news for the OCaml
> community, congratulations!
Thanks, we're pretty happy it worked out so well.
> A non technical question: how you bypassed the Apple control over
> source code? Is OCaml an allowed language for development on iPhone?
On September 9, 2010, Apple dropped their restrictions on languages
used to develop iOS apps. The press release is available here:
http://www.apple.com/pr/library/2010/09/09statement.html
The only restriction now is that your app can't download code (i.e.,
it can't be a platform). It was a good day for us, for sure.
Regards,
Jeffrey Scofield
Seattle
jeffsco@psellos.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Native OCaml iPhone app now in iTunes Store
2011-01-04 19:38 [Caml-list] Native OCaml iPhone app now in iTunes Store Jeffrey Scofield
2011-01-04 20:16 ` Paolo Donadeo
@ 2011-01-04 20:19 ` Joel Reymont
2011-01-05 16:14 ` [Caml-list] " Jeffrey Scofield
1 sibling, 1 reply; 10+ messages in thread
From: Joel Reymont @ 2011-01-04 20:19 UTC (permalink / raw)
To: Jeffrey Scofield; +Cc: caml-list
Jeffrey,
Are you bundling OCaml code as a library and putting a GUI layer of ObjC on top?
Thanks, Joel
On Jan 4, 2011, at 7:38 PM, Jeffrey Scofield wrote:
> I'm happy to say that our iPhone app written in OCaml is now available
> in the iTunes store. It plays the classic card game Cassino, which is
> actually quite fun. But it also shows that you can use OCaml to build
> native iOS apps.
---
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Caml-list] Re: Native OCaml iPhone app now in iTunes Store
2011-01-04 20:19 ` [Caml-list] " Joel Reymont
@ 2011-01-05 16:14 ` Jeffrey Scofield
2011-01-05 17:06 ` Joel Reymont
0 siblings, 1 reply; 10+ messages in thread
From: Jeffrey Scofield @ 2011-01-05 16:14 UTC (permalink / raw)
To: caml-list
Joel Reymont <joelr1@gmail.com> writes:
> Are you bundling OCaml code as a library and putting a GUI layer of
> ObjC on top?
All the code is in OCaml; there's no ObjC except in the (thin)
wrappers around the native iOS libraries. We wanted to write as
much in OCaml as possible.
As we say on the website, the OO subsystem of OCaml is very helpful
for this. We have essentially a one-to-one correspondence between
native iOS (Cocoa Touch) classes and OCaml classes.
Even though we follow the Cocoa Touch design, we find that OCaml still
has advantages in the GUI implementation. It's nice not to have to
worry so much about object lifetimes, for example. We use idiomatic
OCaml values for the low-level objects (like points and rectangles)
and for small collections (where ObjC often uses rather cumbersome
class instances). Often you can use the powerful parts of OCaml on
the components of your GUI.
Regards,
Jeffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Re: Native OCaml iPhone app now in iTunes Store
2011-01-05 16:14 ` [Caml-list] " Jeffrey Scofield
@ 2011-01-05 17:06 ` Joel Reymont
2011-01-05 22:05 ` Andrei Formiga
2011-01-06 23:32 ` Jeffrey Scofield
0 siblings, 2 replies; 10+ messages in thread
From: Joel Reymont @ 2011-01-05 17:06 UTC (permalink / raw)
To: Jeffrey Scofield; +Cc: caml-list
Jeffrey,
On Jan 5, 2011, at 4:14 PM, Jeffrey Scofield wrote:
> All the code is in OCaml; there's no ObjC except in the (thin)
> wrappers around the native iOS libraries. We wanted to write as
> much in OCaml as possible.
How did you wrap the native libraries then?
I've been meaning of writing a Cocoa bridge for OCaml but haven't gotten to it yet.
Are your wrappers available?
Thanks, Joel
---
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Re: Native OCaml iPhone app now in iTunes Store
2011-01-05 17:06 ` Joel Reymont
@ 2011-01-05 22:05 ` Andrei Formiga
2011-01-06 23:32 ` Jeffrey Scofield
1 sibling, 0 replies; 10+ messages in thread
From: Andrei Formiga @ 2011-01-05 22:05 UTC (permalink / raw)
To: Joel Reymont; +Cc: caml-list
On Wed, Jan 5, 2011 at 2:06 PM, Joel Reymont <joelr1@gmail.com> wrote:
> Jeffrey,
>
> On Jan 5, 2011, at 4:14 PM, Jeffrey Scofield wrote:
>
>> All the code is in OCaml; there's no ObjC except in the (thin)
>> wrappers around the native iOS libraries. We wanted to write as
>> much in OCaml as possible.
>
> How did you wrap the native libraries then?
>
> I've been meaning of writing a Cocoa bridge for OCaml but haven't gotten to it yet.
>
Have you looked at this project?
http://code.google.com/p/objective-c-caml-bridge/
It seems abandoned and incomplete, but maybe it can provide a better
starting point.
--
[]s, Andrei Formiga
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Caml-list] Re: Native OCaml iPhone app now in iTunes Store
2011-01-05 17:06 ` Joel Reymont
2011-01-05 22:05 ` Andrei Formiga
@ 2011-01-06 23:32 ` Jeffrey Scofield
1 sibling, 0 replies; 10+ messages in thread
From: Jeffrey Scofield @ 2011-01-06 23:32 UTC (permalink / raw)
To: caml-list
Joel Reymont <joelr1@gmail.com> writes:
> > All the code is in OCaml; there's no ObjC except in the (thin)
> > wrappers around the native iOS libraries. We wanted to write as
> > much in OCaml as possible.
>
> How did you wrap the native libraries then?
We went through a few iterations of plans for generating wrappers
automatically. But we determined that automatically generated
wrappers that follow Objective C idioms are too cumbersome to use from
OCaml. An automatic tool is going to require a lot of human input on
data structure choices, at the very least.
What we did in the end was to design a basic framework with an OCaml
class for each ObjC class. The method APIs use idiomatic OCaml types
for values and collections. The support code uses Cocoa foundation
classes to do dynamic method invocation, so the amount of ObjC code in
each wrapper is kept to a minimum (typically there is none). The
framework lets us build individual wrappers quickly and keeps things
coherent and consistent. We code up wrappers by hand as we need them.
> I've been meaning to write a Cocoa bridge for OCaml but haven't
> gotten to it yet.
It would be a big project.
> Are your wrappers available?
We'll be happy to release source to our Cocoa wrapper layer once we
recoup some of our investment in it. In the meantime we can offer
advice on things that worked and didn't work for us.
Regards,
Jeffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-06 23:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 19:38 [Caml-list] Native OCaml iPhone app now in iTunes Store Jeffrey Scofield
2011-01-04 20:16 ` Paolo Donadeo
2011-01-04 20:24 ` Yitzhak Mandelbaum
2011-01-04 20:49 ` Paolo Donadeo
2011-01-05 7:43 ` [Caml-list] " Jeffrey Scofield
2011-01-04 20:19 ` [Caml-list] " Joel Reymont
2011-01-05 16:14 ` [Caml-list] " Jeffrey Scofield
2011-01-05 17:06 ` Joel Reymont
2011-01-05 22:05 ` Andrei Formiga
2011-01-06 23:32 ` Jeffrey Scofield
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).