[cwn] Attn: Development Editor, Latest Caml Weekly News

Alan Schmitt alan.schmitt at polytechnique.org
Mon Sep 3 23:12:58 PDT 2007


Hello,

Here is the latest Caml Weekly News, for the week of August 28 to  
September 04, 2007.

1) Camlp5 4.08 released
2) Suffix trees
3) is there any computer algebraic systems library in ocaml?
4) virt-top

========================================================================
1) Camlp5 4.08 released
Archive: <http://groups.google.com/group/fa.caml/browse_frm/thread/ 
f65de1a5efdda05c/76b7629e609c8168#76b7629e609c8168>
------------------------------------------------------------------------
** Daniel de Rauglaudre announced:

I am happy to announce the release 4.08 of Camlp5.

   Camlp5 is a preprocessor-pretty-printer of ocaml.
   It is the continuation of the *classical* camlp4 with new features.
   It is compatible with OCaml versions from 3.08.1 to 3.11 included.

Source and documentation (is several formats) available at:
      <http://pauillac.inria.fr/~ddr/camlp5/>

New features since version 4.07:
   * Big effort done for documentation (160 pages)
   * Extensible printers with new statement EXTEND_PRINTER
   * Left factorization of consecutive rules in stream parsers
   * ... and other small improvements and bug fixes ...

See the file CHANGES for all features since previous versions.

Documentation in live (as long as I update it):
      <http://pauillac.inria.fr/~ddr/camlp5/doc/html/>
			
========================================================================
2) Suffix trees
Archive: <http://groups.google.com/group/fa.caml/browse_frm/thread/ 
b91341799c4edaf7/f4c8a415957561b0>
------------------------------------------------------------------------
** Jon Harrop asked and Sébastien Ferré answered:

 > Anyone got any high-performance suffix tree implementations in  
OCaml? (I've
 > seen Jean-Christophe's)

you can find the implementation I made for my
own needs at <http://www.irisa.fr/LIS/ferre/software.en.html> .
I hope it will fit your needs. I thrived to make it
efficient.

It is possible to make it more efficient by
removing the code for the computation of maximal substrings
that makes the computation of the suffix tree in O(n.ln(n))
instead of O(n).
The motivation for the computation of these maximal substrings
can be found in the following paper:
<http://www.springerlink.com/content/a2p06g831821054g/>

Do not hesitate to ask me explanations about the interface
as the comments are rather limited :-).
			
========================================================================
3) is there any computer algebraic systems library in ocaml?
Archive: <http://groups.google.com/group/fa.caml/browse_frm/thread/ 
b8f7c231fc064f2e/48090b75f725907e#48090b75f725907e>
------------------------------------------------------------------------
** guanhua he asked and Dário Abdulrehman answered:

 > Does anyone know any good computer algebraic systems library in  
ocaml? I
 > need a such library to deal with polynomial problem. The library  
should
 > offer functions like "expand((x+y)^3)", "factor(x^2 - 1)", "gcd 
(p1,p2)"
 > as Mathematica or Maxima does.

See Ocaml Mathematical Framework here <http:// 
osp2007.janestcapital.com/>
			
========================================================================
4) virt-top
Archive: <http://groups.google.com/group/fa.caml/browse_frm/thread/ 
013d669f8a9165bc/cbc06ac33f561cdb#cbc06ac33f561cdb>
------------------------------------------------------------------------
** Richard Jones announced:

<http://et.redhat.com/~rjones/virt-top/>

Virt-top is a practical measurement tool for monitoring the
performance of virtual machines.  Unix users can think 'top' for Xen,
QEMU, etc.

At some point I want to write a paper about my experiences with
writing this in OCaml, but in brief:

Pros:

* I've had several comments about how easy the binary is to install --
it doesn't require lots of runtime infrastructure like an equivalent
Python program might.  It's just a native binary which is dynamically
linked to libvirt.so & ncurses.so.  People who aren't paying close
attention probably think I've written a C program.

* The program is incredibly short considering the amount of stuff
which it does -- just 1000 LoC.

* The program takes a tiny fraction of processor / memory than people
are used to.  And it doesn't leak memory.  (Believe me, these are
baffling new "features" compared to similar Python programs).

* Not having to worry about the usual C hassles (memory management,
strings, errors etc.) makes programming much simpler.  I know because
today I mistakenly started another project using C, and realised what
a grind it was -- a quick rewrite of that one in OCaml was necessary.

And now for the CONS:

* I have to provide binaries for most people, because compiling the
program is practically impossible for most users.

* Porting it to new platforms is hard, because of lack of
comprehensive OCaml support on things like FreeBSD / Solaris/  
Gentoo /...
[I'm working on rectifying this and the above, but could do with help
from any FreeBSD and _especially_ Solaris users out there].

* Lack of library support is so acute that I've had to structure the
program in several "layers" so that, for example, only extlib &
ocaml-curses is absolutely required (it'd be hard to imagine a
top-like program which didn't use ncurses), but users can still build
from source with other OCaml libraries missing, although they will get
reduced functionality.
[See:  <http://hg.et.redhat.com/virt/applications/virt-top--devel? 
f=81bcc3563dc7;file=virt-top/README>]

* Most people look at the code in confusion.  I still haven't had a
single patch from anyone, and that is disappointing (and more
importantly, against the kind of open involvement which Red Hat
requires).

* Tools: Common text editors don't know what to do with the .ml files.
Even emacs doesn't have tuareg-mode by default.  This extends
throughout the whole toolchain.  For example source control tools
can't annotate the code
(<http://hg.et.redhat.com/virt/applications/virt-top--devel? 
f=2f31261c9437;file=virt-top/virt_top.ml> - q.v.),
and automake doesn't understand what to do with .ml files.

So do we want to make functional programming available to the masses?
It's all the "stupid" stuff like the above which needs the effort to
fix.
			
========================================================================
Using folding to read the cwn in vim 6+
------------------------------------------------------------------------
Here is a quick trick to help you read this CWN if you are viewing it  
using
vim (version 6 or greater).

:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'<1':1
zM
If you know of a better way, please let me know.

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

If you happen to miss a CWN, you can send me a message
(alan.schmitt at 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20070904/903a265a/attachment.pgp 


More information about the caml-news-weekly mailing list