caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kristopher Micinski <krismicinski@gmail.com>
To: Alexandre Pilkiewicz <alexandre.pilkiewicz@polytechnique.org>
Cc: "forum@x9c.fr" <forum@x9c.fr>, Ivan Gotovchits <ivg@ieee.org>,
	Jon Harrop <jon@ffconsultancy.com>,
	 Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml on Android
Date: Thu, 19 Sep 2013 16:57:43 -0400	[thread overview]
Message-ID: <CAF1Sy-FV5MfJ3WsHQ3pOWjXkds00UEJH9hMGKUn+rULkwt7qaA@mail.gmail.com> (raw)
In-Reply-To: <CAH2fdNZqUvehaLTXwA4vEpOMu5kEq9P9Au-bqEtLsGMWL0v6FA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]

Yes, so this is what happens if you want to just run an ocaml binary on
your Android device.  If you actually want to do anything android related
at all (other than running a binary in the shell, treating your device like
it's a linux computer) then you have to run inside a VM, so you can
actually talk to the GUI, SDK, etc...

Kris



On Thu, Sep 19, 2013 at 12:53 PM, Alexandre Pilkiewicz <
alexandre.pilkiewicz@polytechnique.org> wrote:

> http://gallium.inria.fr/blog/ocaml-on-a-nexus-7/
>
>
> On Thu, Sep 19, 2013 at 11:18 AM, Kristopher Micinski <
> krismicinski@gmail.com> wrote:
>
>>
>>
>>
>> On Thu, Sep 19, 2013 at 2:19 AM, forum@x9c.fr <forum@x9c.fr> wrote:
>>
>>>
>>> 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...
>>>
>>>
>> Yes, that would be a deal breaker.  That fell under the technical points
>> of ocaml-java with which I wasn't familiar.
>>
>> 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?
>>>
>>
>> Yes, it does rely on extending an abstract class.  This does, in fact,
>> permeate the framework.
>>
>>  kris
>>
>>
>
>

[-- Attachment #2: Type: text/html, Size: 4204 bytes --]

  reply	other threads:[~2013-09-19 20:57 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
2013-09-19 15:18         ` Kristopher Micinski
2013-09-19 16:53           ` Alexandre Pilkiewicz
2013-09-19 20:57             ` Kristopher Micinski [this message]
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=CAF1Sy-FV5MfJ3WsHQ3pOWjXkds00UEJH9hMGKUn+rULkwt7qaA@mail.gmail.com \
    --to=krismicinski@gmail.com \
    --cc=alexandre.pilkiewicz@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=forum@x9c.fr \
    --cc=ivg@ieee.org \
    --cc=jon@ffconsultancy.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).