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 263707EFCD for ; Thu, 16 Oct 2014 10:08:49 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of kennethadammiller@gmail.com) identity=pra; client-ip=209.85.218.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of kennethadammiller@gmail.com designates 209.85.218.46 as permitted sender) identity=mailfrom; client-ip=209.85.218.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@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-oi0-f46.google.com) identity=helo; client-ip=209.85.218.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="postmaster@mail-oi0-f46.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArwBAKp8P1TRVdoulGdsb2JhbABbhDkEgwLRYwcWAREBAQEBBwsLCRIwhBsRHQEbHgMSCQc3AiQBEQEFAVeIBwEDEaUUgx1uizCBcoMQiHwKGScNZ4V8AQUOkz6BVAWdVZQpGCmCeIJMIS+CSgEBAQ X-IPAS-Result: ArwBAKp8P1TRVdoulGdsb2JhbABbhDkEgwLRYwcWAREBAQEBBwsLCRIwhBsRHQEbHgMSCQc3AiQBEQEFAVeIBwEDEaUUgx1uizCBcoMQiHwKGScNZ4V8AQUOkz6BVAWdVZQpGCmCeIJMIS+CSgEBAQ X-IronPort-AV: E=Sophos;i="5.04,730,1406584800"; d="scan'208";a="83441249" Received: from mail-oi0-f46.google.com ([209.85.218.46]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 Oct 2014 10:08:48 +0200 Received: by mail-oi0-f46.google.com with SMTP id h136so2272665oig.19 for ; Thu, 16 Oct 2014 01:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2HolNC8IqjALFEBSBvfOrwBX01PHP6mdMTHoj74tUEQ=; b=xu+yQk8GTQYTq05tyCjoR3799djyCtToxVK04CMROQZIGLoexKkl07Qu6lIg4dnreE rq/X1hOmzr3Ef4OXyP2oTClV8T+Ijz0gSKn3GGfuVrtFmSF8bxdIxJK8y0bIkF/qxXj/ XW8pMzH1WryoT+jw/THufQmVg1NB+ulmUzMCCAOaqLXgAkKOJYTcliGn8Mo82kid4FJY ZPQgElX1Uj87hEg4W7/XZbbViurKz4jCBBj+zSZ91qWYT1a7jhxxyWnBBYY3uaZjvD1F 4D7RcLx49jjAleJ0EPHGKyKSYWb2h0IDDIm0NOmx/XQo6B89k/NF95m/2vFPZZwKVEmv 6RKw== MIME-Version: 1.0 X-Received: by 10.182.105.135 with SMTP id gm7mr15444234obb.3.1413446927100; Thu, 16 Oct 2014 01:08:47 -0700 (PDT) Received: by 10.182.97.137 with HTTP; Thu, 16 Oct 2014 01:08:47 -0700 (PDT) Date: Thu, 16 Oct 2014 04:08:47 -0400 Message-ID: From: Kenneth Adam Miller To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=089e0149d2a8ffb22c050585c126 Subject: [Caml-list] Library recompilation with OCamljava --089e0149d2a8ffb22c050585c126 Content-Type: text/plain; charset=UTF-8 So, I'm attempting a large library recompile with ocamljava. It's pretty audacious, because some people in my workplace are rather unwilling to learn ocaml, yet a very well respected and needed library is authored in it. Everyone knows java, so we hope very much to recompile the library just with ocamljava. Two important things that make me nervous in pursuing this effort are: 1) once fully recompiled, will the library work in java as it did with native/ocaml byte code? I've already started modifying the popular OCamlMakefile project to add a java-byte-code target, and I've found that a threaded example is admitted by the compiler produces an uncaught exception when run on the JVM... That example may fall out of what the ocamljava docs has been safely implemented under ocamljava, I'm not sure... 2) I've noticed that the rather large library that I need to compile, as my final target, and aside from the toy targets I'm testing ocamljava with, actually consumes some other C libraries and functions in it's dependency path... This is difficult; the traditional OCamlMakefile builds traditional c stubs to .o files, correctly compiled with ocamlc. But when put on the ocamljava command line, but ocamljava doesn't know what to do about it. Would there be any way that I can have support for this ocaml feature as well, or facilitate some way to link in or enable ocaml code that calls into C being compiled down to java? 3) What if the answer to 2) is no/no? If I can't use ocamljava, which is the most desired and elegant way, allowing beautiful language inter-operation, how can I *best* facilitate calls to the ocaml library? Is there a fast way to generate callbacks to ocaml in java or any other language? It's very highly preferable not to have to delegate back through the JNI due to type safety and fragility. Alternatively, I looked at the OCaml library Restful, and wondered to myself if there could be any kind of fast definition between ocaml types and an exchange language, like json or something. Ideally, I'd like to be able to generate a url per function in a very very simple declarative manner, so that I can take ocaml libraries, and make them operate as a service, where ocaml library functions correspond to URLs. --089e0149d2a8ffb22c050585c126 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So, I'm attempting a large library recompile with ocam= ljava. It's pretty audacious, because some people in my workplace are r= ather unwilling to learn ocaml, yet a very well respected and needed librar= y is authored in it. Everyone knows java, so we hope very much to recompile= the library just with ocamljava.=C2=A0

Two important th= ings that make me nervous in pursuing this effort are:

=
1) once fully recompiled, will the library work in java as it did with= native/ocaml byte code?
I've already started modifying the popular= OCamlMakefile project to add a java-byte-code target, and I've found t= hat a threaded example is admitted by the compiler produces an uncaught exc= eption when run on the JVM... That example may fall out of what the ocamlja= va docs has been safely implemented under ocamljava, I'm not sure...

2) I've noticed that the rath= er large library that I need to compile, as my final target, and aside from= the toy targets I'm testing ocamljava with, actually consumes some oth= er C libraries and functions in it's dependency path...
This is dif= ficult; the traditional OCamlMakefile builds traditional c stubs to .o file= s, correctly compiled with ocamlc. But when put on the ocamljava command li= ne, but ocamljava doesn't know what to do about it. Would there be any = way that I can have support for this ocaml feature as well, or facilitate s= ome way to link in or enable ocaml code that calls into C being compiled do= wn to java?=C2=A0

3) What if the answer to= 2) is no/no?
If I can't use ocamljava, which is the most desired a= nd elegant way, allowing beautiful language inter-operation, how can I b= est facilitate calls to the ocaml library? Is there a fast way to gener= ate callbacks to ocaml in java or any other language? It's very highly = preferable not to have to delegate back through the JNI due to type safety = and fragility. Alternatively, I looked at the OCaml library Restful, and wo= ndered to myself if there could be any kind of fast definition between ocam= l types and an exchange language, like json or something. Ideally, I'd = like to be able to generate a url per function in a very very simple declar= ative manner, so that I can take ocaml libraries, and make them operate as = a service, where ocaml library functions correspond to URLs.
--089e0149d2a8ffb22c050585c126--