From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A5C2D7FA5F for ; Mon, 16 Jan 2017 14:26:04 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-qk0-f174.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.220.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.220.174 as permitted sender) identity=mailfrom; client-ip=209.85.220.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@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-qk0-f174.google.com) identity=helo; client-ip=209.85.220.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-qk0-f174.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AFsV/vxPgUnPK8YMkchAl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0I//8rarrMEGX3/hxlliBBdydsKMYzbGL+Pm/AiQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9GiTe5br5+Nhu7oAXeusULg4ZvJLs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jUiBIKiDIfDXZytjaea3Ca7G51WfnpJBkqNEXfubYWEWu0DZDicIs97wXQ4?= =?us-ascii?q?Uu2MUYYwnTa8txLgwr4veufE8ygRvpLi0tVd6OjalBV0/jtxWZezyWaIGk59lH?= =?us-ascii?q?kJSjt+56t/rFZw0B/X3qFymf1VEZpI7PNESAogHZHZxu1+Tdv1X1SSLZ+yVF+6?= =?us-ascii?q?T4D+UnkKRdUrzopLPh9w?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BHAgARyXxYhq7cVdFdGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBgw4BAQEBAUA+eBEHg0qcHII2knaCCyqFeAK?= =?us-ascii?q?CGgdAFwEBAQEBAQEBAQEBEgEBAQgLCwodMIIzG4IcAQUjHQEbEgYFAQMMBgULA?= =?us-ascii?q?woCAgkdAgIhAQERAQUBChIGEwgKiFUBAxgOog4/jAOCAwUBHIMJBYNRChknAwp?= =?us-ascii?q?VgXcBAQEBAQUBAQEBARsCBhJ5hTqEZ4JQG4Rjgl4FhyQMk1I4gXuEYoZ+hASBd?= =?us-ascii?q?1GEPYNNhhuKGIcOFB6BFCEBgUoSHU8UhBQggWs9NYhuAQEB?= X-IPAS-Result: =?us-ascii?q?A0BHAgARyXxYhq7cVdFdGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBgw4BAQEBAUA+eBEHg0qcHII2knaCCyqFeAKCGgdAFwEBAQEBA?= =?us-ascii?q?QEBAQEBEgEBAQgLCwodMIIzG4IcAQUjHQEbEgYFAQMMBgULAwoCAgkdAgIhAQE?= =?us-ascii?q?RAQUBChIGEwgKiFUBAxgOog4/jAOCAwUBHIMJBYNRChknAwpVgXcBAQEBAQUBA?= =?us-ascii?q?QEBARsCBhJ5hTqEZ4JQG4Rjgl4FhyQMk1I4gXuEYoZ+hASBd1GEPYNNhhuKGIc?= =?us-ascii?q?OFB6BFCEBgUoSHU8UhBQggWs9NYhuAQEB?= X-IronPort-AV: E=Sophos;i="5.33,239,1477954800"; d="scan'208";a="209311261" Received: from mail-qk0-f174.google.com ([209.85.220.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 16 Jan 2017 14:26:03 +0100 Received: by mail-qk0-f174.google.com with SMTP id s140so118843724qke.0 for ; Mon, 16 Jan 2017 05:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4ybNkH+T/3k+91E6Eo3TK33wLp/LyAQLph0S8/KviWk=; b=iTJ1KRSoo4Pz42zsIefdTqdQAyHnlR+ZUpKlRNjqrvskTKI8BgqIPAtF1h78bQooR5 H3+VNyCRSjNvL1aUkb5extByulTvtZj3rPdz0X+nl8bEqeWBH2PoPg4fK71a9YOcH+k3 8tx3xFC6PYEQxhAsrwuFyRtwWiSpeu/55gSzLBIwPX2sjjqnITqX4wdKyb8aWPtCJpjA 0JEa4dGc2KQeK06kET/HE78CgeIkcI9y23fkMY1I3NsVufWkF78CRehiTvvBdyQndLtT kQakX6OUZnSxXy3eFQUC5yz0ms5cD/pvG17TF9hFstdGMKLd/OQ+R1Qa1WAHP3g24KzM e+Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4ybNkH+T/3k+91E6Eo3TK33wLp/LyAQLph0S8/KviWk=; b=MHJbObXPGIboAdVudsPfwgYb0+kmQ19HD0lCr/PEsYNJ3uBSruOJJ9bIQ8T70vgS9d YdZOpq7W0qhUm8fpsO3clPWQIx4Y8YFcMuOnKt1xjMZ2gVSy1es0nb800Y9SZBZd7yGu aFp3GMz1MnPs+Eo2sHY9GKu6mP+b2RRerUxYCVG0yE6uTRS8W3OB6iGE2SXIQ4Ute1vK XqxLyiWPvsido/eVEk33Ch+G4Q/ybzYQiIFMMO/uxklG92zRmTU+z9ci7ySz7R+O+vCT lE7qJcIJ9rx3XvbUHjQXru5gaCmS8Jx9Jz0n2GYD7TPz8QKioHyF3IzitG4NkXXrxREv xAcg== X-Gm-Message-State: AIkVDXJc9hRxcG59fk8urzI+DEQ3B5DHgFM5BnO/DV8Dnnc/zQOkJ7lyNDl5K06njHUvRsv5UoUmPkbHVE+4og== X-Received: by 10.55.152.69 with SMTP id a66mr30495218qke.172.1484573162294; Mon, 16 Jan 2017 05:26:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.177.154 with HTTP; Mon, 16 Jan 2017 05:25:21 -0800 (PST) In-Reply-To: References: <20170101152022.GA1291@Magus.localnet> From: Gabriel Scherer Date: Mon, 16 Jan 2017 14:25:21 +0100 Message-ID: To: Eray Ozkural Cc: Caml List Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] ANN: BER MetaOCaml N104, for OCaml 4.04.0 For fast just-in-time compilation of OCaml code, you may be interested in Benedikt Meurer's work on OCamlJit2 (the article is well-written and easy to read): Just-In-Time compilation of OCaml byte-code Benedikt Meurer, 2010 https://arxiv.org/abs/1011.6223 On Mon, Jan 16, 2017 at 2:18 PM, Eray Ozkural wrote: > Hi Oleg, > > I have a question. Have you ever designed at length how to implement a super > fast *interpreted* version of metaocaml, or let me put it this way: do you > think if that is possible at all? > > Best, > > Eray > > On Sun, Jan 1, 2017 at 6:20 PM, Oleg wrote: >> >> >> BER MetaOCaml N104 is a strict superset of OCaml 4.04.0 for ``writing >> programs that generate programs''. BER MetaOCaml adds to OCaml the >> type of code values (denoting ``program code'', or future-stage >> computations), and two basic constructs to build them: >> quoting and splicing. The generated code can be printed, stored in a >> file -- or compiled and linked-back to the running program, thus >> implementing run-time code optimization. A well-typed BER MetaOCaml >> program generates only well-scoped and well-typed programs: >> The generated code shall compile without type errors. >> Staging-annotation-free BER MetaOCaml is identical to >> OCaml; BER MetaOCaml can link to any OCaml-compiled library (and >> vice versa); findlib and other tools can be used with BER MetaOCaml as >> they are, in their binary form. >> >> BER MetaOCaml N104 comes with one minor and two notable improvements. >> The minor improvement is the availability of the native MetaOCaml. If >> the generator is compiled in native mode (using metaocamlopt), the >> dynamically generated and run code will be natively-compiled as >> well. The lack of native mode was the most frequently heard criticism >> of MetaOCaml, although in my experience it hardly even >> matters. Off-line code specialization seems to be far more prevalent >> and useful than online one. Anyway, here we have it. >> >> The notable new features -- not seen in MetaOCaml (or MetaML, for that >> matter) -- are generating pattern-matching expression with the >> statically unknown number of clauses, and let-insertion as a >> primitive. To wit, |genlet exp| inserts |let freshname = exp in ...| >> somewhere in the generated code and returns |..| (unless |exp| >> is already syntactically a value such as a variable reference). >> The let-statement is inserted at the most appropriate place. >> >> BER MetaOCaml N104 should be available though OPAM, hopefully soon. >> In the meanwhile, it is available as a set of patches to the >> OCaml 4.04.0 distribution. >> http://okmij.org/ftp/ML/ber-metaocaml-104.tar.gz >> See the INSTALL document in that archive. You need the source >> distribution of OCaml 4.04.0, see the following URL for details. >> >> For more explanations, please see >> http://okmij.org/ftp/ML/MetaOCaml.html >> as well as ChangeLog and NOTES.txt in the BER MetaOCaml distribution. >> >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs > > > > > -- > Eray Ozkural, PhD. Computer Scientist > Founder, Gok Us Sibernetik Ar&Ge Ltd. > http://groups.yahoo.com/group/ai-philosophy