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 37A30800DB for ; Wed, 8 Mar 2017 14:10:31 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=andre@digirati.com.br; spf=Pass smtp.mailfrom=andre@digirati.com.br; spf=Pass smtp.helo=postmaster@mta114.f1.k8.com.br Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of andre@digirati.com.br) identity=pra; client-ip=187.73.32.186; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre@digirati.com.br"; x-sender="andre@digirati.com.br"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of andre@digirati.com.br designates 187.73.32.186 as permitted sender) identity=mailfrom; client-ip=187.73.32.186; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre@digirati.com.br"; x-sender="andre@digirati.com.br"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@mta114.f1.k8.com.br designates 187.73.32.186 as permitted sender) identity=helo; client-ip=187.73.32.186; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre@digirati.com.br"; x-sender="postmaster@mta114.f1.k8.com.br"; x-conformance=sidf_compatible; x-record-type="v=spf1" IronPort-PHdr: =?us-ascii?q?9a23=3AV9NqSRD41/BWPaRksS8AUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP76ocbcNUDSrc9gkEXOFd2CrakV1qyK7+u8ByRAuc/H6y9SNsQUFlcsso?= =?us-ascii?q?Y/oU8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0Iu?= =?us-ascii?q?frymUqabtcm81viz9pvPeE0IwWPlOfIhZCmx+CfcrMQTgIYqBqc0yx3O6i9Kd+?= =?us-ascii?q?VTxGVvDVCamRvn+t298YIl+CNV7aEP7clFBIz8c741BZpREDQvNShh7cvnrxTr?= =?us-ascii?q?QQqA52EVTmRQmR1NRQLfukKpFqztuzf347IukBKROtf7GPVtAWyv?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BUQACMAcBYa7ogSbtdHAEBBAEBCgEBF?= =?us-ascii?q?QEBAQECAQEBAQgBAQEBgyZhAydgg2CbOR+QZIRUgg0qhE2BKwKCOEEWAQEBAQE?= =?us-ascii?q?BAQEBAQESDQsKLy+CMwQBHQEEgjsBAQEBAgEjHQEBNwEPCw4KKgICIAsCASkGD?= =?us-ascii?q?AEGAgEBiXMKDK8oaIImgwgBAQWHbwEBAQEBAQEDAQEBAQEBAQERBwMFiFMIgmK?= =?us-ascii?q?EPoJiOoJfnDuDeIIJdYtcT4lTE4EShT9IknYmDoEmIhUIFhY/hEWCKVuIRIFPA?= =?us-ascii?q?QEB?= X-IPAS-Result: =?us-ascii?q?A0BUQACMAcBYa7ogSbtdHAEBBAEBCgEBFQEBAQECAQEBAQg?= =?us-ascii?q?BAQEBgyZhAydgg2CbOR+QZIRUgg0qhE2BKwKCOEEWAQEBAQEBAQEBAQESDQsKL?= =?us-ascii?q?y+CMwQBHQEEgjsBAQEBAgEjHQEBNwEPCw4KKgICIAsCASkGDAEGAgEBiXMKDK8?= =?us-ascii?q?oaIImgwgBAQWHbwEBAQEBAQEDAQEBAQEBAQERBwMFiFMIgmKEPoJiOoJfnDuDe?= =?us-ascii?q?IIJdYtcT4lTE4EShT9IknYmDoEmIhUIFhY/hEWCKVuIRIFPAQEB?= X-IronPort-AV: E=Sophos;i="5.36,264,1486422000"; d="asc'?scan'208";a="263684335" Received: from mta114.f1.k8.com.br ([187.73.32.186]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 14:10:27 +0100 Received: from [10.200.12.21] (unknown [201.76.188.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtpz.f1.k8.com.br (Postfix) with ESMTPSA id 30C672009C; Wed, 8 Mar 2017 13:10:22 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.6.8 smtpz.f1.k8.com.br 30C672009C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digirati.com.br; s=default; t=1488978623; bh=VzCsKbIJEtQzAB1VmbH//n0T6ynVJRDTLXXOLLPz8rg=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=u0Hf9COFii7v0IYtRGYGoTrlYipKi3xoJAGGyhreF/9nQ+l8RU8LQl4xc7ZfHh1sS 6Jn37E6qZl3PGmxI4JIeXeZXINWmURD0CVKqySlnsbhqchiDrUhXWWUD2z7vxLO+sy pUUPw58sNEEmTfOITmRMAhzpqI1sqymO/1EvU30E= To: Jeremie Dimino References: Cc: caml users From: Andre Nathan Message-ID: <53cdcae3-c946-4624-a89f-40de68b7ef30@digirati.com.br> Date: Wed, 8 Mar 2017 10:10:18 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jTSNwEBErrH23vgHAUXO0U10eWT7drnfK" Subject: Re: [Caml-list] [ANN] libbin_prot, php-bin_prot, ppx_bin_prot_interop This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jTSNwEBErrH23vgHAUXO0U10eWT7drnfK Content-Type: multipart/mixed; boundary="XM5VKlqxIV65HBtJm9xgUCwGSfqCMWdEJ"; protected-headers="v1" From: Andre Nathan To: Jeremie Dimino Cc: caml users Message-ID: <53cdcae3-c946-4624-a89f-40de68b7ef30@digirati.com.br> Subject: Re: [Caml-list] [ANN] libbin_prot, php-bin_prot, ppx_bin_prot_interop References: In-Reply-To: --XM5VKlqxIV65HBtJm9xgUCwGSfqCMWdEJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable That's great timing :) I've updated the libbin_prot README to describe the RPC functions and added a simple example code with an OCaml server and a C client. Cheers, Andre On 03/08/2017 04:08 AM, Jeremie Dimino wrote: > Hi Andre, >=20 > This is really cool! Just a few days ago someone asked me if we could > talk to a RPC server from C, so it looks like we could use libbin_prot > right now. >=20 > BTW, I've submitted a PR for the 1.0+beta1 of jbuilder yesterday, so > it should reach opam soon. >=20 > Jeremie >=20 > On Tue, Mar 7, 2017 at 7:13 PM, Andre Nathan wrot= e: >> Hi >> >> We have plans to make use of Jane Street's bin_prot-based RPC libraries >> for some future projects, but one requirement is that we must >> interoperate with clients written in other languages, namely PHP. >> >> So I've been working on these 3 projects to make this possible: >> >> * libbin_prot [1] is a C port of (most of) bin_prot, with added support >> for RPC clients. This was written to avoid having to implement bin_prot >> multiple times in other languages - one can just write bindings to the C >> library. >> >> * php-bin_prot [2] is a PHP extension binding libbin_prot. It supports >> both PHP 5 and 7. >> >> * ppx_bin_prot_interop [3] is a PPX rewriter that generates PHP code >> from OCaml type definitions. It's written in a way that it should be >> easy enough to add support for other languages, as it builds a >> sort-of-AST that just has to be converted to strings in the proper >> language syntax. It's a bit hackish but gets the job done. The >> repository includes an example with an OCaml RPC server and a PHP client. >> >> ppx_bin_prot_interop is not on OPAM yet because I'm relying on the >> latest jbuilder version that is only available on Jane Street's >> repository [4] as of now. You should still be able to use it via "opam >> pin" if you want to give it a try. >> >> [1] https://github.com/andrenth/libbin_prot >> [2] https://github.com/andrenth/php-bin_prot >> [3] https://github.com/andrenth/ppx_bin_prot_interop >> [4] opam repo add janestreet >> https://github.com/janestreet/opam-repository.git >> >> Now that OCaml can talk to PHP, world domination should not be too far. >> >> Cheers, >> Andre >> >=20 >=20 >=20 --XM5VKlqxIV65HBtJm9xgUCwGSfqCMWdEJ-- --jTSNwEBErrH23vgHAUXO0U10eWT7drnfK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJYwAK6AAoJED4JW1qwFY2c8m4IAKZjWx32RX48I7BV+sQn8uv3 3NyWR6oy7eDCE74JOBUhUZj8k6INVeqOc1eYk9oyhHq6xTF5Gu8p4jKvn9M0hbaM rRzpadzaHeIVbWP6v2+1MAShQIEDiQvRCdJmH2/3slk6J/Hq7sQQhx0yY8falgWG A+NOFqvbXIL1qwoyn5za42mtr6nWkPs7l3JbEmMie6gXfC9THmfka5CVKKYDVI8l +n3O2CHRiA34HM4usgHZsIaVkeVqy4VVznx+lii4XXXTM9gHgf1YQGJzPsToxgAN d2pctiun1MipD2zLSFliCehgPm2/ZEp+1O4HtAX8Jm6WXq2f7x/DBWrl/frd2LE= =eFvC -----END PGP SIGNATURE----- --jTSNwEBErrH23vgHAUXO0U10eWT7drnfK--