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 67BE57F0AF for ; Mon, 14 Mar 2016 08:27:38 +0100 (CET) IronPort-PHdr: 9a23:XVXodxL1BMzxPqnORtmcpTZWNBhigK39O0sv0rFitYgUIvjxwZ3uMQTl6Ol3ixeRBMOAu60C2red6vq4EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35vxhr35oseLKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ6jiR6WfAyT735UeGwMlB1ZS1zU6w3zW534qC39p8Jy3SCbOYv9SrViChq46KI+bRbyi288Nz8/72zTjoQkiblboRS+qhh764zdZoyOKOBzc7+bdtQfEzkSFv1NXjBMV9vvJ7AECPAMaKMB99Hw Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mshinwell@janestreet.com; spf=Pass smtp.mailfrom=mshinwell@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mshinwell@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mshinwell@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DLAACVZ+ZWjnDIaSZdhQUGvCaGDQKBHAc7EQEBAQEBAQEBEAEBAQEHFglQgi2CFQEBBBIRHQEBKQ4BDwsLDQICJgICIQESAQUBHAYTIodtAxIDnXSBMT4xik9nhEEBBIVlDYREAQEBAQEFAQEBAQEBARMGCnKFHINEfoI9gViDJYE6l1CMC4F1jwWHKoYVER6BDzaCIh6BUGqJKYE6AQEB X-IPAS-Result: A0DLAACVZ+ZWjnDIaSZdhQUGvCaGDQKBHAc7EQEBAQEBAQEBEAEBAQEHFglQgi2CFQEBBBIRHQEBKQ4BDwsLDQICJgICIQESAQUBHAYTIodtAxIDnXSBMT4xik9nhEEBBIVlDYREAQEBAQEFAQEBAQEBARMGCnKFHINEfoI9gViDJYE6l1CMC4F1jwWHKoYVER6BDzaCIh6BUGqJKYE6AQEB X-IronPort-AV: E=Sophos;i="5.24,334,1454972400"; d="scan'208";a="207578755" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2016 08:27:28 +0100 Received: from tot-qpr-mailcore2.delacy.com ([172.27.56.106] helo=tot-qpr-mailcore2) by mxout1.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1afMuW-0004ME-58 for caml-list@inria.fr; Mon, 14 Mar 2016 03:27:28 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore2 with JS-mailcore (0.1) (envelope-from ) id BW5mfg-AAACkt-Dg; 2016-03-14 03:27:28.113513-04:00 Received: from mail-ob0-f180.google.com ([209.85.214.180]) by mxgoog2.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1afMuV-0001Kn-Un for caml-list@inria.fr; Mon, 14 Mar 2016 03:27:28 -0400 Received: by mail-ob0-f180.google.com with SMTP id m7so167195739obh.3 for ; Mon, 14 Mar 2016 00:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=Acx+bdNWF3bpf7R84MpslvQYtzex3HQp/w/16AE/Qig=; b=2KXCyUagEwLYDK4pi+cDjXjfxvuqMwPuAEysz9lGwaL5u863DyROfJ03Neq6igiGnw 769pIlm/eoR9quwqz3zgaWSIYPvkRocGqSadEBY/SUYQ5r6/zyTOxhlOponxoJF0BZ2r lIEFOkiYTtHRoLiAF7Lg49wf+MwtnBoM9QpHU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Acx+bdNWF3bpf7R84MpslvQYtzex3HQp/w/16AE/Qig=; b=kK3pxjmAgSniSx3oGYiQ2ep1prahAa0bgj3VsX/DEVKy/0vp7hBbzEqd6X6uSgQvRN icssPyarOSeuxH+UqhLZHPklrMWnxpvTFsv/aa3OpY4npwMPB1RxDYMOeySXUhdBbjhu FczEwpdythSbskwx78jPF0f2Dyeyc8l9cwXeWyDHXdvJ/FAXDMKIZCcT1QTnt56rAzqA Spc/BErio3zJDymDQdQg3EMtlGpRcaMI5zS01zTpIDVBPqYUByyx5mtkwxSbuj6Saa86 Bgj5KlQVt1+MMcw+2YapreNDzknK3FhLhNzMXgZQkOrB3C+O7Dfe7RlnRKYEn3jKHAQa wfdQ== X-Gm-Message-State: AD7BkJLV9Q8r4+xKZoJynlfkxDyh7DBnVTqqPEg/pFsRUs+hCAtiFEG7UlZj2qq9BcYWRmPxRKeScWQxoEGmYKCJIrrZVKMHB3KAkywzExcjFD/RKQYIJr5t80Eg5CCZ8MVGXY5h52bKoL12SM+6 X-Received: by 10.182.196.37 with SMTP id ij5mr12833211obc.24.1457940447573; Mon, 14 Mar 2016 00:27:27 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.196.37 with SMTP id ij5mr12833207obc.24.1457940447459; Mon, 14 Mar 2016 00:27:27 -0700 (PDT) Received: by 10.202.216.214 with HTTP; Mon, 14 Mar 2016 00:27:27 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Mar 2016 07:27:27 +0000 Message-ID: From:Mark Shinwell To:Yotam Barnoy Cc:Ocaml Mailing List Content-Type: text/plain; charset=UTF-8 X-JS-Processed-by: mailcore X-Validation-by: mshinwell@janestreet.com Subject: Re: [Caml-list] Flambda/compiler walkthrough + modularity Adding a new optimisation to Flambda can be straightforward, in particular if it's a stand-alone global pass. However, this doesn't relieve you from problems associated with phase ordering, which can be problematic to deal with. If, however, the optimisation relies on something (just to pick an example) such as the approximations computed during simplification then it may be harder. Things like this probably need to hook directly into the simplifier, which is rather more involved. We've had some initial thoughts about returning the approximations as the "types" of Flambda terms, which might make things more easily modular in this area. The idea of a talk is an interesting one, although I think for the moment it would be a better use of our time to improve the documentation within the code (which we are planning to do before the release). Also, given this is the first version, it's quite likely there will be significant changes in the next couple of releases which might make such a talk get out of date quite quickly. It's perhaps something we should consider doing after that. Mark On 11 March 2016 at 17:04, Yotam Barnoy wrote: > Thank you so much to everyone involved with Flambda (OcamlPro, Jane Street, > and all the people who labored to make it happen). I'm so excited to have > such an awesome framework arrive in OCaml. > > I have a question, and then a suggestion. > > Is Flambda organized in such a modular way that we can add optimizations > over time? It seems to me that now that we have set the precedent for having > the AST in cmx files and have an interface for using that AST, the sky is > the limit in terms of optimizations. > > The bigger issue I have is the following: I have long struggled with > grokking the codebase. A shortage of time has made it difficult, especially > because most of the codebase isn't as well documented as Flambda is. Some > parts, such as byte_run's C files, are quite simple, but other parts (in > particular the typechecker) are definitely trickier. > > While thinking about the best way to learn the new Flambda code in the > minimal amount of time, I thought to myself, "wouldn't it be amazing to have > Pierre Chambart and Mark Shinwell just do a video walkthrough of their > code". And then I thought about the rest of the codebase, about Jacques > Garrigue doing a walkthrough of the typechecker code, and each expert(s) > talking about the parts they know really well, and about how amazing it > would be if we had this resource on youtube. It would be the ultimate form > of documentation by the foremost experts on aspects OCaml, welcoming > programmers to contribute to the OCaml compiler in the easiest way possible. > > A step further would be if this was done on Twitch or some similar live > broadcasting platform, so people could actually ask live questions as the > session took place. The resulting video would be posted to youtube. > > What do you guys think? > > -Yotam