From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 3B1A3BBAF for ; Thu, 12 Aug 2010 08:57:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsMBAFc4Y0zRVdg0kGdsb2JhbACgMQgVAQEBAQkJDAcRAx+fMokQghKGGS6IVAEBAwWFNQSEXoQbYw X-IronPort-AV: E=Sophos;i="4.55,356,1278280800"; d="scan'208";a="65304838" Received: from mail-qw0-f52.google.com ([209.85.216.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 12 Aug 2010 08:56:59 +0200 Received: by qwj8 with SMTP id 8so1281014qwj.39 for ; Wed, 11 Aug 2010 23:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Qf4VARG4Vh80Y33UKHRgfqBKxi5A6Y299E9AkOcuRnc=; b=KqyNatK9IDCVYeqFKmeqmvkDywiOmpF5nWT/q5LvnIH8w7aZL+I5oGAgxtyTbBX4jd JewSFFU6MEXhrHsz3lXo3JkfPzZz9cOPjAbhHpjrGtKc1SI2BXxEefD6mMNIpSA3eiXa liXedW8iGVw4fTUZ9RWDNeblOkhpCHcHhB3wE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UHD8F6EQbfXU2b8H/gr0ltTKEcgESlJMliQPevwkFWlXRKL3bG6c3QkJ07eHUlEfqD YPGJf8yPZboeNePsNhJ3l9ggDAQvROE6DyiQiGqRLMgppx8Krj+g+5ablZll4WCKauJN nMm6YuEx/JKxJB4ThsKB7ullKBtMhmyCSAOgc= MIME-Version: 1.0 Received: by 10.229.189.211 with SMTP id df19mr10711547qcb.146.1281596218507; Wed, 11 Aug 2010 23:56:58 -0700 (PDT) Received: by 10.229.217.71 with HTTP; Wed, 11 Aug 2010 23:56:58 -0700 (PDT) In-Reply-To: <03fc01cb3957$c79e2800$56da7800$@com> References: <03fc01cb3957$c79e2800$56da7800$@com> Date: Thu, 12 Aug 2010 16:56:58 +1000 Message-ID: Subject: Re: [Caml-list] interest in a much simpler, but modern, Caml? From: ivan chollet To: Jon Harrop Cc: caml-list@yquem.inria.fr, jeremy1@gmail.com Content-Type: multipart/alternative; boundary=0016363b887c5982e2048d9adf44 X-Spam: no; 0.00; bytecode:01 bytecode:01 ocaml:01 runtime:01 runtime:01 ocaml:01 coupling:01 compiler:01 jocaml:01 runtimes:01 kloc:01 compilation:01 native-code:01 cheers:01 coupling:01 --0016363b887c5982e2048d9adf44 Content-Type: text/plain; charset=ISO-8859-1 + HLVM, Moscow ML, MLTon, etc. Not too bad in my opinion. I checked your HLVM and it looks like a really nice project. I had heard about it before but to be honest it's hard to find information about its design. Maybe you should release the design documents publicly. It could be also an good incentive for people to subscribe to your journal. I looked at the source and I have to say i like it for its simplicity. What I dislike is that your bytecode runs on LLVM, which is a general purpose virtual machine, and because it's general purpose, the bytecode and thus the JIT is a lot more complicated than if the whole infrastructure was for ML and ML only. My personal opinion is that the idiosyncrasies of ML deserve more elegant than this complicated piece of code. And what i dislike is to debug big pieces of code like this myself (especially when there is no documentation like with OCaml). So after reading a few things about HLVM, what I have in mind is basically the same thing as you did, with only a few minor differences : - the project should have it's own runtime (with runtime i mean interpreter + garbage collector only) - no need for a JIT at the beginning - less emphasis on performance at the beginning - less emphasis on features (your project looks very ambitious in terms of supported features) - more emphasis on code safety (than ocaml at least, i don't like to see segmentation faults). LLVM is not that strong on debugging and code safety than some other VMs are. (that's just what i've heard and I might be plain wrong here, but i'm unable to check it myself because LLVM source code is too complicated for me) - more emphasis on simplicity and interfaces loosely coupling - a LOT more emphasis on being community friendly and providing design documents (for free...) Now I have to say that LLVM is an amazing project (so is HLVM), and if you need to have an ML implementation up quickly with good performance and lots of features supported, then I would admit that this is the only way to go at the moment. There is no way the community around ML in general and OCaml specifically would ever come up in the next 10 years with such a feature-rich runtime and compiler infrastructure. But now that VMs are becoming a commodity and there is a lot of literature and resources on the topic, it is also not very time consuming to pull something from the ground up. I would be interested to hear your opinion on this. On Wed, Aug 11, 2010 at 11:19 PM, Jon Harrop < jonathandeanharrop@googlemail.com> wrote: > Ivan wrote: > > I have noted that there are now many implementation of OCaml. Namely : > > - caml light > > - jocaml > > - mincaml > > - your implementation ? > > etc. > > > > which means there is a lot of interest in implementing tools and runtimes > for ML. > > I'm not sure 3.5 implementations over 25 years is a "lot" of interest but > maybe if you add HLVM... ;-) > > > Well, now I'm thinking that the community should start a project like > Parrot (with JIT optionally) > > but dedicated to ML. > > I already did something like this called HLVM: > > http://www.ffconsultancy.com/ocaml/hlvm/ > > > The existing ocaml runtime is amazing but it's definitely not very > community friendly and is in my > > opinion a bit hard to understand given the scarcity of design documents. > > Feel free to ask me anything about HLVM's design. We have a dedicated > mailing list: > > https://lists.forge.ocamlcore.org/pipermail/hlvm-list/ > > > A real community project with real documentation might be interesting for > teaching purposes but also > > in production environments. > > HLVM might be interesting for teaching purposes because it is tiny (2kLOC) > and comprehensible whilst providing advanced features like JIT compilation > (for a native-code REPL!) and a multicore-capable garbage collector (in > only > 100LOC!). HLVM should also be suitable for production environments. > > I had actually forgotten about the mincaml project but mincaml's front-end > with HLVM's back-end sounds like a match made in heaven... > > Cheers, > Jon. > > > --0016363b887c5982e2048d9adf44 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable + HLVM, Moscow ML, MLTon, etc.
Not too bad in my opinion.

I check= ed your HLVM and it looks like a really nice project. I had heard about it = before but to be honest it's hard to find information about its design.= Maybe you should release the design documents publicly. It could be also a= n good incentive for people to subscribe to your journal.
I looked at the source and I have to say i like it for its simplicity. What= I dislike is that your bytecode runs on LLVM, which is a general purpose v= irtual machine, and because it's general purpose, the bytecode and thus= the JIT is a lot more complicated than if the whole infrastructure=A0 was = for ML and ML only. My personal opinion is that the idiosyncrasies of ML de= serve more elegant than this complicated piece of code.
And what i dislike is to debug big pieces of code like this myself (especia= lly when there is no documentation like with OCaml).

So after readin= g a few things about HLVM, what I have in mind is basically the same thing = as you did, with only a few minor differences :
- the project should have it's own runtime (with runtime i mean interpr= eter + garbage collector only)
- no need for a JIT at the beginning
-= less emphasis on performance at the beginning
- less emphasis on featur= es (your project looks very ambitious in terms of supported features)
- more emphasis on code safety (than ocaml at least, i don't like to se= e segmentation faults). LLVM is not that strong on debugging and code safet= y than some other VMs are. (that's just what i've heard and I might= be plain wrong here, but i'm unable to check it myself because LLVM so= urce code is too complicated for me)
- more emphasis on simplicity and interfaces loosely coupling
- a LOT mo= re emphasis on being community friendly and providing design documents (for= free...)


Now I have to say that LLVM is an amazing project (so = is HLVM), and if you need to have an ML implementation up quickly with good= performance and lots of features supported, then I would admit that this i= s the only way to go at the moment. There is no way the community around ML= in general and OCaml specifically would ever come up in the next 10 years = with such a feature-rich runtime and compiler infrastructure.
But now that VMs are becoming a commodity and there is a lot of literature = and resources on the topic, it is also not very time consuming to pull some= thing from the ground up.
I would be interested to hear your opinion on = this.


On Wed, Aug 11, 2010 at 11:19 PM, Jon Ha= rrop <jonathandeanharrop@googlemail.com> wrote:
Ivan wrote:
> I have noted that there are now many implementation of OCaml. Namely :=
> - caml light
> - jocaml
> - mincaml
> - your implementation ?
> etc.
>
> which means there is a lot of interest in implementing tools and runti= mes
for ML.=A0

I'm not sure 3.5 implementations over 25 years is a "lot&quo= t; of interest but
maybe if you add HLVM... ;-)

> Well, now I'm thinking that the community should start a project l= ike
Parrot (with JIT optionally)
> but dedicated to ML.

I already did something like this called HLVM:

=A0= http://www.ffconsultancy.com/ocaml/hlvm/

> The existing ocaml runtime is amazing but it's definitely not very=
community friendly and is in my
> opinion a bit hard to understand given the scarcity of design document= s.

Feel free to ask me anything about HLVM's design. We have a dedic= ated
mailing list:

=A0https://lists.forge.ocamlcore.org/pipermail/hlvm-list/

> A real community project with real documentation might be interesting = for
teaching purposes but also
> in production environments.

HLVM might be interesting for teaching purposes because it is tiny (2= kLOC)
and comprehensible whilst providing advanced features like JIT compilation<= br> (for a native-code REPL!) and a multicore-capable garbage collector (in onl= y
100LOC!). HLVM should also be suitable for production environments.

I had actually forgotten about the mincaml project but mincaml's front-= end
with HLVM's back-end sounds like a match made in heaven...

Cheers,
Jon.



--0016363b887c5982e2048d9adf44--