LWN.net Logo

Caml Weekly News

From:  Alan Schmitt <alan.schmitt-AT-polytechnique.org>
To:  lwn-AT-lwn.net
Subject:  Attn: Development Editor, Latest Caml Weekly News
Date:  Tue, 30 Jun 2009 09:21:37 +0200
Message-ID:  <46C0BAE3-36EF-4C56-A098-5B3779B177B7@polytechnique.org>
Cc:  cwn <cwn-AT-lists.idyll.org>
Archive-link:  Article, Thread

Hello,

Here is the latest Caml Weekly News, for the week of June 23 to 30,  
2009.

1) New HLVM examples!
2) Other Caml News

========================================================================
1) New HLVM examples!
Archive:
<http://caml.inria.fr/pub/ml-archives/caml-list/2009/06/5b... 
 >
------------------------------------------------------------------------
** Jon Harrop announced:

The HLVM project now includes two examples: a calculator and a tiny  
compiler:

   <http://forge.ocamlcore.org/projects/hlvm/>

The design and implementation of the compiler are described in detail  
in the
latest OCaml Journal article:

   <http://ocamlnews.blogspot.com/2009/06/compiler-developmen... 
 >

The compiler can execute the following OCaml-like program to print the
Mandelbrot set:

# let rec pixel((n, zr, zi, cr, ci) : int * float * float * float *  
float) :
  unit =
      if n = 65536 then print_char ' ' else
        if zr * zr + zi * zi >= 4.0 then print_char '.' else
          pixel(n+1, zr * zr - zi * zi + cr, 2.0 * zr * zi + ci, cr,  
ci);;
  # let rec row((i, j, n) : int * int * int) : unit =
      if i>n then () else
        begin
          let cr = 2.0 * float_of_int i / float_of_int n - 1.5 in
          let ci = 2.0 * float_of_int j / float_of_int n - 1.0 in
          pixel(0, 0.0, 0.0, cr, ci);
          row(i+1, j, n)
        end;;
  # let rec col((j, n) : int * int) : unit =
      if j>n then () else
        begin
          row(0, j, n);
          print_char '\n';
          col(j+1, n)
        end;;
  # let rec mandelbrot(n : int) : unit =
      col(0, n);;
  # mandelbrot 77;;

In particular, our compiler runs this program interactively 50x faster  
than
the OCaml top-level and 60% faster than native-code compiled OCaml!

Check out HLVM's SVN repository including these examples with:

   svn checkout svn://svn.forge.ocamlcore.org/svnroot/hlvm

========================================================================
2) Other Caml News
------------------------------------------------------------------------
** From the ocamlcore planet blog:

Thanks to Alp Mestan, we now include in the Caml Weekly News the links  
to the
recent posts from the ocamlcore planet blog at <http://planet.ocamlcore.org/ 
 >.

Camomile 0.7.2:
   <http://caml.inria.fr/cgi-bin/hump.cgi?contrib=85>

RegSTAB:
   <http://forge.ocamlcore.org/projects/regstab/>

Transition to OCaml 3.11.1 has started in Debian:

<https://bentobako.org/david/blog/index.php?post/2009/06/2... 
 >

========================================================================
Old cwn
------------------------------------------------------------------------

If you happen to miss a CWN, you can send me a message
(alan.schmitt@polytechnique.org) and I'll mail it to you, or go take a  
look at
the archive (<http://alan.petitepomme.net/cwn/>) or the RSS feed of the
archives (<http://alan.petitepomme.net/cwn/cwn.rss>). If you also wish
to receive it every week by mail, you may subscribe online at
<http://lists.idyll.org/listinfo/caml-news-weekly/> .

========================================================================
-- 
Alan Schmitt <http://alan.petitepomme.net/>

The hacker: someone who figured things out and made something cool  
happen.
  .O.
  ..O
  OOO




(Log in to post comments)

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds