caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Good book about ML compilation ?
Date: Thu, 20 Aug 2009 23:02:48 +0100	[thread overview]
Message-ID: <200908202302.48363.jon@ffconsultancy.com> (raw)
In-Reply-To: <20090820184052.GA28533@happyleptic.org>

On Thursday 20 August 2009 19:40:52 rixed@happyleptic.org wrote:
> Hello !
>
> Suppose I want to learn how ML is compiled, and especialy how OCaml is
> compiled, it's various internal lambda representations and the like.
> Would this book :
>
> http://www.amazon.com/Modern-Compiler-Implementation-Andrew-Appel/dp/052160
>7647/
>
> be a good one ?
>
> It's hard to tell what this book's worth from the customer advices ; it's
> especialy hard to tell if it fits well to OCaml or not.

I found that book often glossed over aspects of the compiler that I was unable 
to implement myself at the time. That was frustrating. I also found SML 
cumbersome compared to OCaml.

I much preferred another of Appel's books as an introduction to writing a 
compiler:

http://www.amazon.com/Compiling-Continuations-Andrew-W-Appel/dp/052103311X/ref=pd_sim_b_3_img

However, you could probably learn far more efficiently from another resource. 
In particular, you can easily thrash today's ML compilers by using some of 
the excellent tools and libraries like LLVM and more modern techniques like 
monomorphization during JIT compilation. You might also want tuples as 
structs to relieve the stress on the GC. These are some of the techniques I 
am using for HLVM and the results speak for themselves (and I am describing 
them in detail in OCaml Journal articles).

If you want to learn how ML is (or should be) compiled then I think your best 
bet is probably to ask here. I also recommend reading the source code to the 
OCaml and F# compilers. Are you also interested in GCs?

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


  parent reply	other threads:[~2009-08-20 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20 18:40 rixed
2009-08-20 21:47 ` [Caml-list] " Richard Jones
2009-08-21 15:00   ` rixed
2009-08-20 22:02 ` Jon Harrop [this message]
2009-08-21 15:09   ` rixed

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=200908202302.48363.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /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).