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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 84CAB7FD06 for ; Tue, 15 Dec 2015 08:07:02 +0100 (CET) IronPort-PHdr: 9a23:uc32wBah3A9FqhmkfZdDzYL/LSx+4OfEezUN459isYplN5qZpcqzbnLW6fgltlLVR4KTs6sC0LqI9fi4EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35rxj7j60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jMnhDGSUOq73oYU2MZ2j5JGBSNuBrzW5O0tirhqsJ83jObNIv4V+Zndy6l6vJTQQLswB8KMyw9uDXPh8hiiLpZiB2krh17hYXTZdfGZ7JFYqrBcIZCFiJ6VcFLWnkEW9vkYg== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pelzlpj@gmail.com; spf=Pass smtp.mailfrom=pelzlpj@gmail.com; spf=None smtp.helo=postmaster@mail-lf0-f48.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of pelzlpj@gmail.com) identity=pra; client-ip=209.85.215.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pelzlpj@gmail.com"; x-sender="pelzlpj@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of pelzlpj@gmail.com designates 209.85.215.48 as permitted sender) identity=mailfrom; client-ip=209.85.215.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pelzlpj@gmail.com"; x-sender="pelzlpj@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lf0-f48.google.com) identity=helo; client-ip=209.85.215.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pelzlpj@gmail.com"; x-sender="postmaster@mail-lf0-f48.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+AACxum9WlDDXVdFehAxtBqtukUwBDYFjIYVsAoEtBzgUAQEBAQEBAQEQAQEBAQcLCwkfMIItgggBAQMBEhEdARseAwELBgUEAQY3AgIhAQERAQUBHAYTIod3AQMKCA6dPIExPjGLSIFqgnmIIwoZJw1Wg1wBAQEBBgEBAQEBGAEBBA6LRYJTgjWCb4FJBY4siEQKhTmGF4F4gVyTYYNngicSJIEXHwEBgkYjgX4dNAGEdQEBAQ X-IPAS-Result: A0A+AACxum9WlDDXVdFehAxtBqtukUwBDYFjIYVsAoEtBzgUAQEBAQEBAQEQAQEBAQcLCwkfMIItgggBAQMBEhEdARseAwELBgUEAQY3AgIhAQERAQUBHAYTIod3AQMKCA6dPIExPjGLSIFqgnmIIwoZJw1Wg1wBAQEBBgEBAQEBGAEBBA6LRYJTgjWCb4FJBY4siEQKhTmGF4F4gVyTYYNngicSJIEXHwEBgkYjgX4dNAGEdQEBAQ X-IronPort-AV: E=Sophos;i="5.20,431,1444687200"; d="scan'208";a="192132650" Received: from mail-lf0-f48.google.com ([209.85.215.48]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 15 Dec 2015 08:06:52 +0100 Received: by lfed137 with SMTP id d137so87316175lfe.3 for ; Mon, 14 Dec 2015 23:06:47 -0800 (PST) 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 :content-type; bh=HRau/DuivEih6pHqQuDE6E74SddYktBdhugghhpwBaU=; b=aM84aDF50WNOXVD1vYA8uxZ45rGxMU0pI6UuX2QYLkalA/aMhkqq5z+r2Lf+83RrPd CR5CZnsm2UsNjT1nbi6eQtLX46xcIqXW3CWoZTJ9SC7lNnUf4iwsdAsEKSnSVhmiQ2cv g1UGsYtYW7Dyhd3lV1NwL8rlXv9nE6dcTTX983O/bzis51Ihqfuue8faZ/Q03p3x7uOQ CoIwRd0D82DYoAS537EqH3395NCNeaUgKQqB7fUxpL3Gi/tTFoS1HkdHgcDzDyd871M+ JH5Zlb3w3QWcFsWFMuQawNeRNLXC3XkS7qOkkoiI2JRUjeRXFtuJz5OjzutwJ76rhoGl Szsw== MIME-Version: 1.0 X-Received: by 10.25.141.70 with SMTP id p67mr14945802lfd.151.1450156871477; Mon, 14 Dec 2015 21:21:11 -0800 (PST) Received: by 10.25.87.13 with HTTP; Mon, 14 Dec 2015 21:21:11 -0800 (PST) In-Reply-To: <8D722630-1CB1-413B-9F90-1F975FA5B64B@gmail.com> References: <8D722630-1CB1-413B-9F90-1F975FA5B64B@gmail.com> Date: Mon, 14 Dec 2015 21:21:11 -0800 Message-ID: From: Paul Pelzl To: OCaml Mailing List Content-Type: multipart/alternative; boundary=001a114037443171730526e8f5c2 X-Validation-by: pelzlpj@gmail.com Subject: Re: [Caml-list] Invoking Java programs from an OCaml program --001a114037443171730526e8f5c2 Content-Type: text/plain; charset=UTF-8 On Mon, Dec 14, 2015 at 9:25 AM, Chan Ngo wrote: > An alternative, if you want to do as follows: > - Compile Java program to an executable (not jar file) > - Call this executable and get the return values from it > > So you can think about Unix module in OCaml, you can use the standard I/O > to realize a communication channel between your OCaml code and the > executable Java. > https://ocaml.github.io/ocamlunix/ocamlunix.html > > If the data to be exchanged is structurally complex, then this technique becomes difficult; a cross-platform serialization library can be very helpful for generating appropriate serialization code in multiple languages. As one example, Cap'n Proto has bindings for both Java and OCaml: https://capnproto.org/otherlang.html Paul --001a114037443171730526e8f5c2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Dec 14, 2015 at 9:25 AM, Chan Ngo <chan.ngo2= 203@gmail.com> wrote:
An alternative, if you want to do as follows:<= div>- Compile Java program to an executable (not jar file)
- Call= this executable and get the return values from it

So you can think about Unix module in OCaml, you can use the standard I/O = to realize a communication channel between your OCaml code and the executab= le Java.


If the data to = be exchanged is structurally complex, then this technique becomes difficult= ; a cross-platform serialization library can be very helpful for generating= appropriate serialization code in multiple languages.=C2=A0 As one example= , Cap'n Proto has bindings for both Java and OCaml: https://capnproto.org/otherlang.html
<= br>
Paul

--001a114037443171730526e8f5c2--