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 681CE7EE49 for ; Thu, 19 Sep 2013 18:54:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dapilki@gmail.com) identity=pra; client-ip=209.85.160.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dapilki@gmail.com"; x-sender="dapilki@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dapilki@gmail.com designates 209.85.160.50 as permitted sender) identity=mailfrom; client-ip=209.85.160.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dapilki@gmail.com"; x-sender="dapilki@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-pb0-f50.google.com) identity=helo; client-ip=209.85.160.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dapilki@gmail.com"; x-sender="postmaster@mail-pb0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroCAAgrO1LRVaAylGdsb2JhbABbgz9ShGqqH4ldiWAIFg4BAQEBBwsLCRIqgiUBAQQBQAE4AQMBCwEFBQsDCi4hARIBBQEcBhOHcQMJBgybfY9YhDwnDYlcAQUMjG+HEQOWE4FpgS+LE4NKGCmBYYMHIA X-IPAS-Result: AroCAAgrO1LRVaAylGdsb2JhbABbgz9ShGqqH4ldiWAIFg4BAQEBBwsLCRIqgiUBAQQBQAE4AQMBCwEFBQsDCi4hARIBBQEcBhOHcQMJBgybfY9YhDwnDYlcAQUMjG+HEQOWE4FpgS+LE4NKGCmBYYMHIA X-IronPort-AV: E=Sophos;i="4.90,937,1371074400"; d="scan'208";a="27443865" Received: from mail-pb0-f50.google.com ([209.85.160.50]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Sep 2013 18:54:16 +0200 Received: by mail-pb0-f50.google.com with SMTP id uo5so8647394pbc.9 for ; Thu, 19 Sep 2013 09:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=xeIcCrA8kpnt72Gx0/H2HAbDrbivTMTM8+FwfWoecpc=; b=OE0NImI+jW5vj9LtHHYpLhhUZh7aXrZyuFTpnFGRSAnsHeFtDvTT8AC9q5UFTakCkx g2AjwLJk98g0lHYs/wu3ygAVtk+TJXZ2eaidHfmMM7ekNLroE3I4iqVg7dYqQLcXtasf rq51ShQo89lUq+zj1tVlB1R42XB9dpZV8EDYmF6RH2PV+eXUnbHuJ3d56YoHdAwIF4Ib yg22xffRz/IjCx1QTCID+MLWNqGKgTDdqKj2N1kuiNzyHQbac04Ukk7IaLfNHG3HDZ+z DyaKz+O+6pjJuM5S0GqUFDPx7hHt1cacq1Q3To/0DqNhA4NRJqOag4c2q8m7M5eFZnWY Ht1g== X-Received: by 10.66.145.132 with SMTP id su4mr3885789pab.11.1379609655114; Thu, 19 Sep 2013 09:54:15 -0700 (PDT) MIME-Version: 1.0 Sender: dapilki@gmail.com Received: by 10.68.170.195 with HTTP; Thu, 19 Sep 2013 09:53:55 -0700 (PDT) In-Reply-To: References: <036501ceb3e5$bcd7b920$36872b60$@ffconsultancy.com> <87bo3pqy9o.fsf@golf.niidar.ru> From: Alexandre Pilkiewicz Date: Thu, 19 Sep 2013 12:53:55 -0400 X-Google-Sender-Auth: Wm5xh_Hg979VyRcFaR86Nn0GDBE Message-ID: To: Kristopher Micinski Cc: "forum@x9c.fr" , Ivan Gotovchits , Jon Harrop , Caml List Content-Type: multipart/alternative; boundary=047d7b6dc4d26c04fa04e6bf677f Subject: Re: [Caml-list] OCaml on Android --047d7b6dc4d26c04fa04e6bf677f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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 ha= rd >> 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 ev= en >> 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 > > --047d7b6dc4d26c04fa04e6bf677f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Thu, Sep 19, 2013 at= 11:18 AM, Kristopher Micinski <krismicinski@gmail.com>= wrote:



On Thu, Sep 19, 20= 13 at 2:19 AM, forum@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 breake= r. =A0That fell under the technical points of ocaml-java with which I wasn&= #39;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 c= lass. =A0This does, in fact, permeate the framework.

kris
=A0

--047d7b6dc4d26c04fa04e6bf677f--