caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mark Shinwell <mshinwell@janestreet.com>
To: Yotam Barnoy <yotambarnoy@gmail.com>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Flambda/compiler walkthrough + modularity
Date: Mon, 14 Mar 2016 07:27:27 +0000	[thread overview]
Message-ID: <CAM3Ki74AoqPpxdoOy2QAkrnBm+J+ZkMu-J_G=nL8f=Aj3oXXzQ@mail.gmail.com> (raw)
In-Reply-To: <CAN6ygOn162G1rV7bv=UvgyCAt8VxhzRNoVKubWd1_Ws8cCLOLw@mail.gmail.com>

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 <yotambarnoy@gmail.com> 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

  reply	other threads:[~2016-03-14  7:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 17:04 Yotam Barnoy
2016-03-14  7:27 ` Mark Shinwell [this message]
2016-03-14 10:36 ` Goswin von Brederlow
2016-03-14 12:30   ` Gabriel Scherer
2016-03-14 13:51     ` Yotam Barnoy
2016-03-14 20:31       ` Hendrik Boom
2016-03-14 21:00         ` Yotam Barnoy
2016-03-14 21:05       ` Junsong Li
2016-03-15  1:02         ` Gabriel Scherer
2016-03-16  2:12           ` Junsong Li
2016-03-18 15:15       ` [Caml-list] <DKIM> " Pierre Chambart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM3Ki74AoqPpxdoOy2QAkrnBm+J+ZkMu-J_G=nL8f=Aj3oXXzQ@mail.gmail.com' \
    --to=mshinwell@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=yotambarnoy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).