From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] LLVM: A native-code compiler for MiniML in ~100LOC
Date: Sun, 2 Dec 2007 16:21:19 +0000 [thread overview]
Message-ID: <200712021621.19711.jon@ffconsultancy.com> (raw)
In-Reply-To: <47528225.5040802@inria.fr>
On Sunday 02 December 2007 10:00, Xavier Leroy wrote:
> Your language has first-order, second-class functions, while Mini-ML
> has higher-order, first-class functions. A runtime code generator for
> Mini-ML would be significantly more complex, since it has to deal with
> first-class functions either through closure conversion or
> defunctionalization, meaning in both cases dynamic allocation and
> garbage collection.
Yes, it was a little cheeky of me to call it MiniML. Adding first-class
functions turned out to be trivial but making them higher-order will take
more work.
I would like to build a new language implementation that draws mostly upon
OCaml and F#. In particular, I'd like to augment OCaml with run-time types,
something akin to type classes, operator overloading, high-performance
numerics (built-in types for complex numbers and low-dimensional vectors and
matrices, and 32-bit floats as a storage format) and a commerce-friendly
intermediate representation.
Although I would like to build a platform suitable for commercial
applications, I would like the whole thing to be open source and other
contributions and ideas are most welcome!
There are some important design decisions to make first so I've got a lot of
benchmarking to do before I'll start implementing any production-quality
code.
> Which brings us back to Basile's original question about LLVM and the
> Caml garbage collector. The following page suggests that they can
> already work together:
>
> http://llvm.org/docs/GarbageCollection.html
To the best of my knowledge there are no working demos of any GCs using LLVM's
API for this. Chris Lattner (the lead developer of LLVM) did implement a CLR
on top of LLVM but the results are owned by Microsoft. He assures me that it
is perfectly feasible and, I believe, Gordon Henriksen already has something
working and it is in the pipeline but not yet in SVN LLVM.
They were only recently discussing whether or not an external front-end is
even theoretically capable of generating OCaml-friendly native-code in order
to reuse OCaml's GC.
Still, LLVM is an awesome project and, once someone makes the breakthough of a
first working tutorial GC on it, I think it will snowball into a great
alternative to Mono for creating new languages.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e
prev parent reply other threads:[~2007-12-02 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 20:52 Jon Harrop
2007-11-27 16:57 ` [Caml-list] " Tom Primožič
2007-12-02 10:00 ` Xavier Leroy
2007-12-02 16:21 ` Jon Harrop [this message]
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=200712021621.19711.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