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 984037F25C for ; Fri, 25 Oct 2019 19:18:11 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-lf1-f48.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=209.85.167.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mmatalka@gmail.com designates 209.85.167.48 as permitted sender) identity=mailfrom; client-ip=209.85.167.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@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-lf1-f48.google.com) identity=helo; client-ip=209.85.167.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-lf1-f48.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AclrNKRMUaZ3sl0TGDn0l6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0LfT8rarrMEGX3/hxlliBBdydt6sfzbuN+Pm5ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9HiTagb75+NhG7oAveusULnIduNrs6xwfUrHdPZ+?= =?us-ascii?q?lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRne?= =?us-ascii?q?VgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gy?= =?us-ascii?q?oBKjU38nzYitZoga1VoByvuQFxzYDXbo6aKPVzZb/dcc8ASGZdQspcTTBND4Wh?= =?us-ascii?q?ZIUPFeoBOuNYopH6qVQUqRuxGQ6sBOfqyjRVgXH5x7E63P4lEQHFxgMrAtUDsH?= =?us-ascii?q?HRrNrvKKcdS+S1zKrSwjjYYPNW3C3y6InMchw7vf6MWrdwfNPXxEIyGQ3FiVCQ?= =?us-ascii?q?ppbkPzOTzukMs2+b7/d8VeKykGEotRt9rSSoxscpjITCm4Ebykjc+Cln3Io4Ic?= =?us-ascii?q?e0RU17bNK+DZddtiOXO5F5T84hW21kpTo2x7kctZKlciUHy44rywPRZvGGaYSF?= =?us-ascii?q?4x3uWeCMKjlinn1lYqiwhxOq/Eig1OL8Us603U5PriVfk9nMsmkB1xjd6sSaU/?= =?us-ascii?q?d98Eis1DWV2wDc7eFEJk80la7FJJI73rEwkZ8TvVzCHi/whkr2kLebels49uWs?= =?us-ascii?q?8ejqYbXrqoWBO4J1iAzyKKsjl8+nDeQ9KAcOXmyb+eqm1L3k+E30WLBKjvgsna?= =?us-ascii?q?nFqp/aIccbqbSiDg9a14Ys8Re/DzO83NsEmnkHKUpJeAibgIjxJ1HOPPf4AO+j?= =?us-ascii?q?jFu2lTdrw+nKPrngApXWMnjOi6zhfLZ4605E0gU/19Ff55ROCrEAOv3/QEHxtM?= =?us-ascii?q?aLRiM+Zge9xuKiDNRmystKUmuKBuqdMbjOmV6O/OMmZeeWMtw7ojH4ft0s4/Xp?= =?us-ascii?q?iXpxvFYBdK2q1NNDbXWxAv1iIEyxbn/lg9NHGmAP6FltBNf2gUGPBGYAL025WL?= =?us-ascii?q?gxs2liVNCWSLzbT4Xou4SvmT+hF8QPNG9DA1GIV3zvctfcAqZeWGepOsZk1wc8?= =?us-ascii?q?e/2kQo4l2wupsVajmbViJ+vQvCYfsMC6jYUn16jojRg3sAdMIYGd3mWKFTwmm2?= =?us-ascii?q?oJQ3oy0vk6rxAtjFiE1qd8jrpTEtkBv/4=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BzBQB6LbNdhjCnVdFlhDCBHVRcjSyGA?= =?us-ascii?q?Y0FkDkJAQMBCgEBBR4KAgEBiAEcBwEENBMCDAEBBAEBAQIBAgMEARMBAQEICws?= =?us-ascii?q?IKYU+DII6IoMNLgEbHgMSEBY0ARMRAQUBIi4HgwABgkUBAy4EC6YDgQM8jDsFA?= =?us-ascii?q?ReCfwWCSoF5ChknDWMDgTwCAQYJAQiBJIwPGIFAP4dDAgIYhzUEjR2gSEaBaAO?= =?us-ascii?q?CMIl4iQIbjgaLTagIAgoHBg8jgUaBejMaCBsVbII7UBAUgyCDWYpVPzOBAyYTj?= =?us-ascii?q?yUBAQ?= X-IPAS-Result: =?us-ascii?q?A0BzBQB6LbNdhjCnVdFlhDCBHVRcjSyGAY0FkDkJAQMBCgE?= =?us-ascii?q?BBR4KAgEBiAEcBwEENBMCDAEBBAEBAQIBAgMEARMBAQEICwsIKYU+DII6IoMNL?= =?us-ascii?q?gEbHgMSEBY0ARMRAQUBIi4HgwABgkUBAy4EC6YDgQM8jDsFAReCfwWCSoF5Chk?= =?us-ascii?q?nDWMDgTwCAQYJAQiBJIwPGIFAP4dDAgIYhzUEjR2gSEaBaAOCMIl4iQIbjgaLT?= =?us-ascii?q?agIAgoHBg8jgUaBejMaCBsVbII7UBAUgyCDWYpVPzOBAyYTjyUBAQ?= X-IronPort-AV: E=Sophos;i="5.68,229,1569276000"; d="scan'208";a="324362111" X-MGA-submission: =?us-ascii?q?MDHzSQ+aaumVmsUueoKO9XGufhKRm/+UzpThyX?= =?us-ascii?q?rh4sqk2DVSohIElIGmudAXtvHg2ux58vlG5IqAx8TwQ/Gy4v27+Bvsbs?= =?us-ascii?q?AOUJZP4dgIV+1fJTTm1zW+UnK+epZImYAL5qS/ZS0LpTI5RL5wSktwll?= =?us-ascii?q?VGPyiMDomXAdV5V702thFOGw=3D=3D?= Received: from mail-lf1-f48.google.com ([209.85.167.48]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 25 Oct 2019 19:18:09 +0200 Received: by mail-lf1-f48.google.com with SMTP id u16so2369744lfq.3 for ; Fri, 25 Oct 2019 10:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=Gz6Lo609JKKmYYq53piEFu7J9TBC6cGxj13RSWZI7co=; b=cxzuKy1zKGtiMAFqnq6nczriSS92yF3knKv5++BiX4X3/vt+HAf+nWrxQvc8W+hx9X PGXfg4GOSof9p5Hf5TmS5BpaRTMGSKnttEDOGoN1wwC8qtBJbhcmr06yq+J70cinCxlA yfpwCbth8LKGm0qUlM4fky6rGRRIuIAj3lscSNceOaa2NoozkWxEp4Up/i7WgbGMM0Ly W1e/Cpm8OE1rnPxJMjS9zWdOi/mLp8y2PPSMWIy9Idkhr8nhoKJ2yb2vA/SY9YWr4wdS +ildZKLwQYryvS+HDbB8ZHct+cH9axlZbcRE+nl08edfEyVzuytL91iYE75EeRChODVH GM/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=Gz6Lo609JKKmYYq53piEFu7J9TBC6cGxj13RSWZI7co=; b=noweAtNuWR1VoQFVqm8SEsgrj4auX5nhjtSzUzHqUmDtaeRfCpKD0+Tyk2Ju+kzbOX ljCg7F/XTQdV4bOukROyhisjwOUXXNiDpjb5gPbBKEdi78Au35YTJo0oS2bU2vdYQ8UD vD0vpuVZw66lyMxzbU6A7mKlNzVeuwUd9b855SAlPHV2j/jSyaMPDJCCFNH/m61BlHg6 n0z3a94stP7tMpSq/C+U0Nv5Z3bDzqpUvkS8n1168yvVB7/tbJB5VAZibWUqFGHeMD/w qI3IgQxcSYeklIqSw1C6PosZRLjUvRDeagPygTU+KQXeUR/83ei2VZxYjOEy0MRuFFmY /RGA== X-Gm-Message-State: APjAAAVS1KRxOBbgA8yoPlNbt0BQd5pvdIO0CVvWY3my9lrUcbXx28aR Y+4YfjN5LR2aPupI3zBpka7OMZmP X-Google-Smtp-Source: APXvYqwl5RkUIIMos8m4GJYuIr4Ev3gFxbwlGf4YxAaJDPnWaRjodNEvYO/ibnggia1LI0sBRdGALw== X-Received: by 2002:a19:5517:: with SMTP id n23mr3179060lfe.139.1572023887918; Fri, 25 Oct 2019 10:18:07 -0700 (PDT) Received: from localhost (customer-109-238-136-64.stosn.net. [109.238.136.64]) by smtp.gmail.com with ESMTPSA id p18sm1111349lfh.24.2019.10.25.10.18.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:18:06 -0700 (PDT) User-agent: mu4e 1.0; emacs 26.3 From: Malcolm Matalka To: caml-list Date: Fri, 25 Oct 2019 19:18:04 +0200 Message-ID: <86wocsrbg3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Caml-list] Unboxed types in Ocaml I just watched the following video[0] given by Stephen Dolan, and I really enjoyed it. I think performance is something that most anybody can appreciate the value of and has been effected by. I have a few questions/thoughts: - Given the content of the talk I don't disagree (nor feel qualified to disagree) with the proposed solution. I wonder though: are the range of layouts so numerous to support an additional syntax? The three layouts shown are value, immediate, and bit#, and tuples of them, are there other ones though? Is there a clear logical extreme this has? Are there other types information that will cleanly fit into this way of expressing meta information things (maybe linear typing?)? Also, I look at ATS which has a whole lot of type modifiers and seems kind of zany, is there anything we should keep in mind to keep Ocaml from going nuts with the modifiers? - One reason I really liked this approach is because it touches on something that has been bothering me in high-level languages for awhile, and that is in order to get a high-level language to have certain performance characteristics you often have to do these incantations that are pretty related to how the optimizer works. Ocaml has plenty of these if one reads the Jane St doc on it. And while it's nice to be able to get code to be performant, it's also really fragile. The next programmer to come along in that code may not be aware it's structured in a particular way for performance reasons. They also might need to make a change and not have the knowledge of how to change the code in a way that maintains those characteristics. Or the compiler could change and invalidate that pattern. What's great here is instead of structuring code in a way that you feel pretty sure the compiler will unbox the values, you tell the compiler and, most importantly, you get a compilation error if you do something wrong. There is no ambiguity. I know that is different than if one gets the performance characteristics they expect, but at least they know that what they intended to happen to the values actually happened. This seems like a first step in moving knowledge that is meaningful to people about performance into the compiler, are there other opportunities for this in the language as well? I think Ocaml already does a great job of being high-level, performant, and having a run-time that you can understand, so I wonder if it is well positioned as a language where these sort of changes could come into it and be impactful. - Any idea on when this might be coming to a release near me? /Malcolm [0] https://www.youtube.com/watch?v=RV-4Xddk0Yc