From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CEBB77EE49 for ; Thu, 19 Sep 2013 17:18:44 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of krismicinski@gmail.com) identity=pra; client-ip=209.85.214.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of krismicinski@gmail.com designates 209.85.214.174 as permitted sender) identity=mailfrom; client-ip=209.85.214.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f174.google.com) identity=helo; client-ip=209.85.214.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="postmaster@mail-ob0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmACAI8UO1LRVdaum2dsb2JhbABbgz9ShGqqH4ldiEaBGAgWDgEBAQEBBgsLCRQhB4IlAQEEAUABGx0BAwELBgUEBzsiAREBBQEcBhOHcAEDCQYMm2SMUYMHhBUKGScNZIh4AQUMj1sHhB4Dl3yBL45dGCmEaCA X-IPAS-Result: AmACAI8UO1LRVdaum2dsb2JhbABbgz9ShGqqH4ldiEaBGAgWDgEBAQEBBgsLCRQhB4IlAQEEAUABGx0BAwELBgUEBzsiAREBBQEcBhOHcAEDCQYMm2SMUYMHhBUKGScNZIh4AQUMj1sHhB4Dl3yBL45dGCmEaCA X-IronPort-AV: E=Sophos;i="4.90,937,1371074400"; d="scan'208";a="27432245" Received: from mail-ob0-f174.google.com ([209.85.214.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Sep 2013 17:18:43 +0200 Received: by mail-ob0-f174.google.com with SMTP id uz6so9750968obc.19 for ; Thu, 19 Sep 2013 08:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U/MFA5KbRSb52B7QHLTjGpiCaGHzKUb9MvTZVl+qovU=; b=DX5XopIGQR6eAV0IHrV43HVZBWCQ7z7G1kFpVD88kGwUkqWIYwp+5xv2VmDUh4qPsT l+1hHOzvcXB57vvoAkXPl2b+wAgDRwJ6jWi62WE6R3zXnT7MMmRcgUwORtbydxIbJ44L RGcrnkWvqBfDrsIGN4KCtRuGZphwcp++loVcdi71La4DRvb0IlrpGEF6OjndA+XkngQG jcBDmiTlRTCWJKuNYAGc+rP3PU1QCYbsazbTgVe1h0fLievoo13s4QW2bt//wNgRZ2bo Koy2BKrdSvaYDMBcWNvz4lUlOgkJJZ9QbfzcrFhTLakiCs8oXt2pmaTQKH/CNwdrxhBW 2r0Q== MIME-Version: 1.0 X-Received: by 10.182.81.99 with SMTP id z3mr259943obx.64.1379603922328; Thu, 19 Sep 2013 08:18:42 -0700 (PDT) Received: by 10.182.96.34 with HTTP; Thu, 19 Sep 2013 08:18:42 -0700 (PDT) In-Reply-To: References: <036501ceb3e5$bcd7b920$36872b60$@ffconsultancy.com> <87bo3pqy9o.fsf@golf.niidar.ru> Date: Thu, 19 Sep 2013 11:18:42 -0400 Message-ID: From: Kristopher Micinski To: "forum@x9c.fr" Cc: Ivan Gotovchits , Jon Harrop , Caml List Content-Type: multipart/alternative; boundary=047d7b2e48eeb90b4a04e6be116a Subject: Re: [Caml-list] OCaml on Android --047d7b2e48eeb90b4a04e6be116a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Sep 19, 2013 at 2:19 AM, forum@x9c.fr wrote: > > Le 19 sept. 2013 =E0 06:35, Kristopher Micinski a =E9crit : > > > 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 --047d7b2e48eeb90b4a04e6be116a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Thu, Sep 19, 2013 at 2:19 AM, fo= rum@x9c.fr <forum@x9c.fr> wrote:

Le 19 sept. 2013 =E0 06:35, Kristopher Micinski a =E9crit :

> With a little bit of hacking it'd probably work, but I'm not s= ure of the status of ocaml-java and haven't looked into the implementat= ion details. =A0Since 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. =A0The 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.

=46rom 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. =A0= 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:
=A0 =A0 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. = =A0This does, in fact, permeate the framework.

kris
=A0
--047d7b2e48eeb90b4a04e6be116a--