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 7A1E77FCCB for ; Mon, 27 Apr 2015 23:17:00 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of helmut.brandl@gmx.net) identity=pra; client-ip=212.227.17.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="helmut.brandl@gmx.net"; x-sender="helmut.brandl@gmx.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of helmut.brandl@gmx.net designates 212.227.17.22 as permitted sender) identity=mailfrom; client-ip=212.227.17.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="helmut.brandl@gmx.net"; x-sender="helmut.brandl@gmx.net"; 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@mout.gmx.net) identity=helo; client-ip=212.227.17.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="helmut.brandl@gmx.net"; x-sender="postmaster@mout.gmx.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CbAQDTpj5VnBYR49Rch1XIJ4JdAoE1OxEBAQEBAQEBEQEBAQEBBg0JCSEuhCABAQEDASMPAQVAEQsYAgIFFgsCAgkDAgECAUUTCAEBiBIBDAoCp16Lao4IAYYJAQoBAQEegSGKF4UMFoJSgUUFi12XaoRmiUKENYMVAQEB X-IPAS-Result: A0CbAQDTpj5VnBYR49Rch1XIJ4JdAoE1OxEBAQEBAQEBEQEBAQEBBg0JCSEuhCABAQEDASMPAQVAEQsYAgIFFgsCAgkDAgECAUUTCAEBiBIBDAoCp16Lao4IAYYJAQoBAQEegSGKF4UMFoJSgUUFi12XaoRmiUKENYMVAQEB X-IronPort-AV: E=Sophos;i="5.11,659,1422918000"; d="scan'208";a="113725332" Received: from mout.gmx.net ([212.227.17.22]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Apr 2015 23:16:59 +0200 Received: from [192.168.1.77] ([187.233.97.43]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M7UUd-1ZXo7R1ccJ-00xJOb; Mon, 27 Apr 2015 23:16:58 +0200 Message-ID: <553EA747.8020105@gmx.net> Date: Mon, 27 Apr 2015 16:16:55 -0500 From: Helmut Brandl User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <553E9CD0.5040203@gmx.net> <553EA3E2.8060104@chimrod.com> In-Reply-To: <553EA3E2.8060104@chimrod.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:cJGBE2Zkk/othIEtb7srUDj/CVOwB3I6TW6sx5xE/IJvoF06ji2 vDIrZXuRVkJm8QLqqztTeLwc/pRgA9NQpbDAWgYD+H88H1/OPjVAhlsVhCLir4JZG4w8uIG 614+KxlcqrKvqdM8ZEQDVF8lXhrTMpHOj4GoYInxNzrjbTrWAeDu/PPQ+xavB714os0gZA+ 6s51ST5o+1sN5YKbZDnTg== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] js_of_ocaml with node On 04/27/2015 04:02 PM, Sébastien Dailly wrote: > Le 27/04/2015 22:32, Helmut Brandl a écrit : > >> I achieved the compilation to javascript which can run under nodejs as >> long as I don't use anything from the unix library. Unfortunately I need >> two functions from the unix library: 1. Get the last modification time >> of a file. 2. Create a directory. I cannot find anything equivalent in >> the standard library. > > This a javascript limitation, not a js_of_ocaml one. I think (and > hope) there is no such possibilities with standard javascript to > create directories on the client fs. (and this would be a great > security flaw if browsers would allow that). Maybe I have been misunderstood. I am not trying to run my code in a browser and access the client fs from the browers. My software package is compiled to bytecode of native using the ocam compiler. All I want to do is to create a javascript version and run it under nodejs (which runs on the client machine) to provide user which don't have an installed ocaml compiler suite on their machine to run my software package. Note that nodejs has full access to the filesystem like any other program written in any programming language like C, ocaml, java, scala,... > > Regards, >