caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "forum@x9c.fr" <forum@x9c.fr>
To: Kristopher Micinski <krismicinski@gmail.com>
Cc: "forum@x9c.fr" <forum@x9c.fr>, Ivan Gotovchits <ivg@ieee.org>,
	jon@ffconsultancy.com, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml on Android
Date: Thu, 19 Sep 2013 08:19:05 +0200	[thread overview]
Message-ID: <F3868A24-CA31-46AD-8434-01149C71FAC9@x9c.fr> (raw)
In-Reply-To: <CAF1Sy-EJXAHq=J8GVT_O7sz2CZMegXwU8VsSiBhFFdb4W6tLXA@mail.gmail.com>


Le 19 sept. 2013 à 06:35, Kristopher Micinski a écrit :

> With a little bit of hacking it'd probably work, but I'm not sure of the status of ocaml-java and haven't looked into the implementation details.  Since ocaml-java outputs class files (afaik) you'd have to sort of hack the android build pipeline yourself, but that wouldn't be the hard part: all the tools are there.  The harder part is that the Android SDK is very Java oriented, and it just feels awkward as hell to use in OCaml even if you were to write a thin wrapper around the SDK.

In theory, you are right that it wouldn't be hard.
In practice, the problem is that OCaml-Java emits classes
for Java 1.7 while (to the best of my knowledge) Android
only accepts Java 1.6 classes. As far as I know, there is no
other pending problem.

From this point, the question would be: is it better to wait
for Android to update to Java 1.7 (or even 1.8...), or to
modify OCaml-Java? Honestly, I would need quite a bit
of encouragement to modify OCaml-Java in this direction...

Regarding interaction with the classes of the Android SDK,
one may be interested in the typer extension allowing to
manipulate Java instances from pure OCaml code:
    http://ocamljava.x9c.fr/preview/javaext.html
The main potential problem with this approach is that the
extension currently allows only to implement interfaces, but
not to extend classes. It may be a problem if for example the
event system of Android is based on abstract classes.
Another problem may be the "linking", i. e. the way Android
expects to execute an application: is it a bare main method,
or is there a need to implement/extend a given interface/class?


Hope this helps,

Xavier Clerc



  reply	other threads:[~2013-09-19  6:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 20:37 Jon Harrop
2013-09-18 10:02 ` Anil Madhavapeddy
2013-09-18 10:06   ` Paolo Donadeo
2013-09-18 10:06 ` Thomas Sibut-Pinote
2013-09-19  3:13 ` Kristopher Micinski
2013-09-19  3:35   ` Ivan Gotovchits
2013-09-19  4:35     ` Kristopher Micinski
2013-09-19  6:19       ` forum [this message]
2013-09-19 15:18         ` Kristopher Micinski
2013-09-19 16:53           ` Alexandre Pilkiewicz
2013-09-19 20:57             ` Kristopher Micinski
2013-09-19 23:14               ` Jon Harrop
2013-09-20  6:20           ` forum
2013-09-19 12:46 ` Richard Mortier
2013-09-20  6:17   ` forum
  -- strict thread matches above, loose matches on Subject: below --
2012-01-13  6:05 Mihamina Rakotomandimby
2012-01-16  7:39 ` Andrej Bauer
2012-01-16  8:59 ` Kakadu

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=F3868A24-CA31-46AD-8434-01149C71FAC9@x9c.fr \
    --to=forum@x9c.fr \
    --cc=caml-list@inria.fr \
    --cc=ivg@ieee.org \
    --cc=jon@ffconsultancy.com \
    --cc=krismicinski@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).