Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of January 12 to 19, 2010.

  1. OCaml Meeting 2010 in Paris
  2. C++ parser
  3. Batteries Included 1.0.0
  4. A syntax extension to simplify List manipulation
  5. [jobs] Citrix Systems (Cambridge, UK)
  6. Other Caml News

OCaml Meeting 2010 in Paris

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/b69339424c173ccd#

Sylvain Le Gall announced:
For the third time, I am proud to invite all OCaml enthusiasts to join
us at OCaml Meeting 2010 in Paris.

This year event takes place in Paris and tries to avoid collision with
all other events. It will be on Friday 16th April 2010. Subscription is
opened today and will be closed on Friday 2nd April 2010.

As last year, participants are invited to give a talk on what they are
doing with OCaml, submit a description of your talk on the wiki or
contact me.

The meeting is sponsored by INRIA CAML Consortium and OCamlCore.
Participation for lunch is covered by the Consortium, you just need to
subscribe. The facility can only host 80 people, so we will have to
filter the list of participants if there are more people. We will give
priority to people giving a talk and coming from abroad.

Volunteers to help before/during the event can contact me directly. We
are particularly looking for a video team. You can also forward this
invitation to any groups that can be interested in (Haskell user group,
CUFP mailing list...)

Further information:
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

For people who need further information, you can contact me (see
wiki.cocan.org for contact details).

The day after OCaml Meeting, Mehdi Dogguy from PPS helps me to organize
an informal day where OCaml teams can meet to work. There will be
internet access and a blackboard in each room. We will have 2 classrooms
(each classroom can host 45 persons). Inscription will is free, stay
tuned.
			

C++ parser

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/c095df26d271bafe#

Kihong Heo asked and Yoann Padioleau replied:
> Is there anybody knowing about existing C++ parser that is not so big?
>
> I've already know EDG and ELSA.
> But they are so big and hard to see.
> I don't want a perfect C++ parser.
> If it can parse common and simple C++, that's OK.

There is one here:
 http://padator.org/software/project-yacfe/yacfe-light-0.3.tgz
but it's not really complete.
Once built, you can test it with
 ./yacfe -parse_c++  foo.cpp
			
Guillaume Yziquel suggested and Yoann Padioleau replied:
> The perfect C++ parser: GCC XML. 

From the FAQ they say: 
"Why are C++ function bodies not dumped in XML? 
The original sponsors of the project had no need for function bodies. So far
the authors have not had time or funding to implement the support. Contact the
mailing list if you are interested in contributing this support or providing
funding to have it implemented. "

is it still true ? 

Also do they maintain comments, space, positions, cpp directives ? 
If you need to do source-to-source transformation, e.g. refactoring, 
you need those things. 

> I thing that there is an OCaml binding to it. 

is it this one?: 
http://qt-caml.crapulion.org/trac/browser/trunk/src/gccxml/lib 
			
Basile Starynkevitch added:
[[sorry for this reply, which is barely related to Ocaml, but may be of
interest to several Ocaml fans interested in C++ analysis]]

There is however a small caveat. AFAIK, GCC XML is not much maintained, and
depends upon an old GCC version (but I might be wrong on both points). Latest
release of GCC XML seems to be 0.6 from february 2004.

Next (4.5.0) release of GCC will provide two major new features: link time
optimization [=LTO] & plugins.

Both features are useful for any kind of C++ static analysis programs; a
plugin can define new passes, and the LTO feature enable them to be run at
"link" time, that is to merge information from several compilation units. And
indeed GCC have powerful & common internal representations of the compiled
source code, which is the same for C, C++, Fortran, Ada, Java .. source inputs
to GCC.

So one could consider coding a plugin for GCC which extracts the exact
information required by your (Ocaml) static analyser. In addition (sorry for
the shameless self-promotion), if you like functional programming, you might
even code your plugin as a MELT module. MELT is a plugin (written by me) which
enables you to express your GCC pass in a higher-level Lisp-like mostly
dynamic language (with closures, powerful pattern matching [in particular
pattern matching on GCC internal representations like Gimple], objects - but
unfortunately no static typing with type inference).

Feel free to ask me more (preferably off list, or preferably on the
gcc@gcc.gnu.org list) about MELT.
			

Batteries Included 1.0.0

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/7cc127a065cca224#

Edgar Friendly announced:
The Batteries Included project has come under new management since David
Teller moved on. The project has gone through a process of reorganization and
is finally ready for a release. We've rethought a lot of the structure
decisions of the old codebase to make it easier to use and develop.

Major changes:
* Builds in 10 seconds, plus 10 seconds for documentation (on my system)
* Depends only on Camomile and Findlib
* Syntax Extensions now optional
* Less magic in build system
* Allows smaller executable creation

We're using OMake instead of ocamlbuild and a much more stock ocamldoc for
documentation generation. All the modules we provide are standard modules, no
[module Array = struct include Array ... end] magic except in batteries.ml
which ties everything together for convenience. Of course there's a bunch of
bug fixes and additional functions.

We're using Semantic Versioning (http://semver.org/) for version numbers,
meaning we're taking backwards compatibility very seriously. This is our 1.0.0
release, but we don't expect to stay at it very long. We're looking forward to
fixing any bugs you find.

To use:
Download:
https://forge.ocamlcore.org/frs/download.php/346/batteries-1.0.0.tar.gz
Documentation: http://thelema.github.com/batteries-included/hdoc

To contribute:
Mailing list:
https://lists.forge.ocamlcore.org/cgi-bin/listinfo/batteries-devel
Issue Tracker: http://github.com/thelema/batteries-included/issues
Code: git://github.com/thelema/batteries-included.git


[1] Like the small batteries used in TV remote controls
			
Dario Teixeira asked and Stefano Zacchiroli replied:
> A big thanks to you and the entire Batteries team is definitely in order!

FWIW, the merits of this release are almost entirely Edgar's, he took up
the whole refactoring work from the previous Batteries design on his
shoulders.

> - Is AAA Batteries definitely the new Batteries?

Yes, this has been discussed extensively on the batteries-devel archive.
That's why this release is called "Batteries Included 1.0.0" and not
"AAA batteries" as initially thought.

On this, I also have a very brief public service announcement: the
Debian package ocaml-batteries-included will, obviously, migrate to this
1.0.0 release. If any of the readers has good reason to want to keep
both this and the old-style Batteries please mail me, but note that the
old code is currently unmaintained, so I'd support that at worst for a
single release cycle (so you better be convincing).
			
Edgar Friendly added:
Mauricio Fernández helped in fundamental ways to make this release what it is.
It would be much less featureful if it weren't for him.
			
Dario Teixeira asked and Stefano Zacchiroli replied:
> - What is the relation between the development of ExtLib and AAA Batteries?
>   A first glance at the AAA Batteries API suggests it to be a superset of
>   ExtLib's.  If both development teams are on board, I would suggest an
>   explicit deprecation of ExtLib in favour of AAA Batteries.
  
This is up to the ExtLib team - our intention is to do much more than ExtLib.

> - Please provide also a GODI package.

This is high on the list of TODO, if anyone can help, in theory it should be
easy. But I'm not a GODI user, so it's hard for me.
			

A syntax extension to simplify List manipulation

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/49a6b506bbf2ccdd/13c7fa0d1849f6a5#13c7fa0d1849f6a5

Alexander Voinov announced:
This is a syntax extension I've been using since 2003:

http://www.voinov.org/FP/spbSyntax.tgz

It defines a number of constructs, which make List traversals look like
loops over arrays/sequences in popular languages like Python:

map [1;2;3] with e -> e + 1

filtermap [1;2;3] with e when e mod 2 == 0 -> Some e | _ -> None

foldl [1;2;3] from 0 with s0, e -> s0 + e

iterate [1;2;3] with e -> printf "%d\n" e done

and some more like this.

It relies upon camlp5 instead of (new) camlp4. It maps those constructs into
the corresponding functions of ExtLib (not the standard List module), so
that one can use tail recursion optimization.

The motivation to this syntax extension was as follows. I've been working in
bioinformatics and we have had ~10000000 lines of Python code in our CVS.
I've started to use OCaml for some applications where I needed more runtime
speed than Python could deliver and still didn't want to dive into C++. Also
I tried to promote OCaml among my Pythonic colleagues. That is why I enjoyed
a possibility to make list processing constructs looking like Python loops
over lists (that is, dynamic arrays). I've identified a number of common use
cases and mapped each of them onto an appropriate higher order function from
the Extlib library. On the caml side, these extensions look similar to the
match ... with construct.

An example code, included into the distribution show how I've been and still
am using these extensions in practical applications.
			

[jobs] Citrix Systems (Cambridge, UK)

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/aaf2dbb80d8b3d8e#

Dave Scott announced:
Summary: We (Citrix Systems) are looking for OCaml programmers to join our
team in Cambridge, UK.

We use OCaml extensively in the "xapi tool-stack": the control-plane used in
the Xen Cloud Platform[1] on which the widely used XenServer server
virtualisation product[2] is based. XCP aims to provide a complete open-source
cloud infrastructure platform with a powerful management stack based on
standards-based APIs, support for multi-tenancy, SLA guarantees and detailed
metrics for consumption based charging.

We are looking to recruit top-class engineers to work on the tool-stack;
applicants must have a good knowledge of data structures and algorithms,
experience of programming in the context of large systems and general
aesthetic good taste when it comes to code and architecture. Our code base is
significant and varied: over 130,000 lines of OCaml, solving problems ranging
from the low-level (Xen hypercalls) to the high-level (resource pool
management), to the compiler-driven (generating language bindings for our Xen
datamodel).

Our ideal candidate will have: 

* significant experience of applications programming in high-level languages
  (such as OCaml :-)
* an aptitude for implementing (and reasoning about) complex concurrent, 
  distributed systems 
* the skills required to contribute to both the architectural design and 
  day-to-day development of a large code-base 
* strong communication skills and problem solving ability 
* a determination to deliver great products that perform brilliantly and meet 
  our customers' needs 

So if you want to tackle interesting and challenging programming problems and 
contribute to an innovative, fast-growing product that is already used by tens 
of thousands of customers across the world, please don't hesitate to send me 
your CV. 

[1] http://www.xen.org/products/cloudxen.html 
[2] http://www.citrix.com/English/ps2/products/feature.asp?contentID=1686939 
			

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/.

Macaque Beta 3 released:
  http://forge.ocamlcore.org/forum/forum.php?forum_id=512

Batteries Included 1.0.0:
  http://forge.ocamlcore.org/forum/forum.php?forum_id=511

OCaml Users Meeting, Paris, April 2010:
  http://rwmj.wordpress.com/2010/01/14/ocaml-users-meeting-paris-april-2010/

Quick news: OCaml on Ubuntu Lucid and MapOSMatic:
  http://bentobako.org/david/blog/index.php?post/2010/01/14/Quick-news%3A-OCaml-on-Ubuntu-Lucid-and-MapOSMatic

OSS bug tracking systems all SUCK:
  http://rwmj.wordpress.com/2010/01/12/oss-bug-tracking-systems-all-suck/
      

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.


Alan Schmitt