Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of July 31 to August 21, 2007.

  1. Status of OCaml in Fedora
  2. Handling include files using ocamllex
  3. Str replacement
  4. Announcing OMake 0.9.8.5 - a substantial feature enhancements release
  5. ocaml-curses 1.0.0 released
  6. New ocaml-jobs@inria.fr mailing list
  7. Unit Testing
  8. If OCaml were a car

Status of OCaml in Fedora

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/e9eefd2ffd750612/b7a5f89edd6d8670#b7a5f89edd6d8670

Richard Jones announced:
I thought people might be interested to know how OCaml in Fedora & Red 
Hat Enterprise Linux (RHEL) is getting along. 

We had the packaging guidelines approved about 6 weeks ago which 
allowed packages to start being reviewed 
(https://fedoraproject.org/wiki/Packaging/OCaml).  Since then we have 
rebased to OCaml 3.10.0 and packaged up the following: ocamlsdl, 
camlimages, ocurl, expat, extlib, findlib, lablgl, lablgtk2, pcre, 
ocaml-ssl and ulex. 

The following packages are still at various stages in the development 
or review process: calendar, ocamlnet, cduce, coq, PXP, ocaml-csv. 

Interested in joining?  Add your name to our SIG: 
http://fedoraproject.org/wiki/SIGs/OCaml 

Want to suggest a package for inclusion in Fedora?  Please email me. 

To use the packages, enable the Fedora Development repository 
(/etc/yum.repos.d/development.repo) and just 'yum install ocaml...' 

The complete list of OCaml packages and their versions is shown below. 

Rich. 

ocaml-3.10.0-1.fc8.x86_64.rpm 
ocaml-SDL-0.7.2-7.fc7.x86_64.rpm 
ocaml-SDL-devel-0.7.2-7.fc7.i386.rpm 
ocaml-SDL-devel-0.7.2-7.fc7.x86_64.rpm 
ocaml-camlimages-2.2.0-8.fc7.x86_64.rpm 
ocaml-camlimages-devel-2.2.0-8.fc7.i386.rpm 
ocaml-camlimages-devel-2.2.0-8.fc7.x86_64.rpm 
ocaml-camlp4-3.10.0-1.fc8.x86_64.rpm 
ocaml-camlp4-devel-3.10.0-1.fc8.i386.rpm 
ocaml-camlp4-devel-3.10.0-1.fc8.x86_64.rpm 
ocaml-curl-0.2.1-3.fc8.x86_64.rpm 
ocaml-curl-devel-0.2.1-3.fc8.i386.rpm 
ocaml-curl-devel-0.2.1-3.fc8.x86_64.rpm 
ocaml-docs-3.10.0-1.fc8.x86_64.rpm 
ocaml-emacs-3.10.0-1.fc8.x86_64.rpm 
ocaml-expat-0.9.1-4.fc8.x86_64.rpm 
ocaml-expat-devel-0.9.1-4.fc8.i386.rpm 
ocaml-expat-devel-0.9.1-4.fc8.x86_64.rpm 
ocaml-extlib-1.5-5.fc8.x86_64.rpm 
ocaml-extlib-devel-1.5-5.fc8.i386.rpm 
ocaml-extlib-devel-1.5-5.fc8.x86_64.rpm 
ocaml-findlib-1.1.2pl1-10.fc8.x86_64.rpm 
ocaml-findlib-devel-1.1.2pl1-10.fc8.i386.rpm 
ocaml-findlib-devel-1.1.2pl1-10.fc8.x86_64.rpm 
ocaml-lablgl-1.02-12.fc8.x86_64.rpm 
ocaml-lablgl-devel-1.02-12.fc8.i386.rpm 
ocaml-lablgl-devel-1.02-12.fc8.x86_64.rpm 
ocaml-lablgtk-2.6.0-8.20060908cvs.fc8.x86_64.rpm 
ocaml-lablgtk-devel-2.6.0-8.20060908cvs.fc8.i386.rpm 
ocaml-lablgtk-devel-2.6.0-8.20060908cvs.fc8.x86_64.rpm 
ocaml-lablgtk-doc-2.6.0-8.20060908cvs.fc8.x86_64.rpm 
ocaml-labltk-3.10.0-1.fc8.x86_64.rpm 
ocaml-labltk-devel-3.10.0-1.fc8.i386.rpm 
ocaml-labltk-devel-3.10.0-1.fc8.x86_64.rpm 
ocaml-ocamldoc-3.10.0-1.fc8.x86_64.rpm 
ocaml-pcre-5.11.4-6.fc8.x86_64.rpm 
ocaml-pcre-devel-5.11.4-6.fc8.i386.rpm 
ocaml-pcre-devel-5.11.4-6.fc8.x86_64.rpm 
ocaml-runtime-3.10.0-1.fc8.x86_64.rpm 
ocaml-source-3.10.0-1.fc8.x86_64.rpm 
ocaml-ssl-0.4.2-3.fc8.x86_64.rpm 
ocaml-ssl-devel-0.4.2-3.fc8.i386.rpm 
ocaml-ssl-devel-0.4.2-3.fc8.x86_64.rpm 
ocaml-ulex-1.0-3.fc8.x86_64.rpm 
ocaml-ulex-devel-1.0-3.fc8.i386.rpm 
ocaml-ulex-devel-1.0-3.fc8.x86_64.rpm 
ocaml-x11-3.10.0-1.fc8.x86_64.rpm
			
Jon Harrop said and Stefano Zacchiroli answered:
> I don't believe the Debian packages for 3.10 have filtered through but I was 

Actually, they are available in experimental. A summary page of what's 
going on in Debian wrt OCaml versions is available at: 
http://sockmel.bononia.it/~zack/ocaml-debian-status/debian-ocaml-status.html

What is stopping a full migration to unstable is that some major OCaml 
related packages haven't yet been ported by the respective author to 
OCaml 3.10 and are experiencing CamlP4-related incompatibilities. 

> so desperate to use the awesome new natdynlink branch that upgraded to that 
> from CVS and rebuilt almost all packages from the existing Debian source 
> packages with: 

FWIW, all OCaml related packages in Debian should have a Vcs-Svn field 
pointing to the subversion repository we are using for maintenance (you 
can see it with "apt-get showsrc"). There you can find the current 
working version of the Debian package.
			

Handling include files using ocamllex

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/feffe4e164d057f4/0597d4a6d67a8475#0597d4a6d67a8475

Late in this thread, Erik de Castro Lopo asked and Jacques Garrigue answered:
> Well the problem was that I wanted to do this: 
>     class lexstack top_filename 
>         object 
>             val mutable filename = top_filename 
>             val mutable chan = open_in top_filename 
>             val lexbuf = Lexing.from_channel chan 
> Oops, error message right there ^^^^^^ trying to use instance 
> variable chan. 


Interesting, because the example you describe here is precisely the 
reason it is not allowed (at least as Jerome Vouillon explained to 
me.) 
That is, you intend the instance variable lexbuf to be the one 
associated to the current (mutable) chan, but if you change chan this 
will no longer be true. 
So, in order to avoid this kind of ambiguity, you have to use let 
defined variables. For instance: 

class lexstack top_filename = 
  let init_chan = open_in top_filename in 
  object 
    val mutable filename = top_filename 
    val mutable chan = init_chan 
    val mutable lexbuf_chan = init_chan 
    val mutable lexbuf = Lexing.from_channel init_chan 
    method lexbuf = 
      if chan == lexbuf_chan then lexbuf else 
      (lexbuf <- Lexing.from_channel chan; lexbuf_chan <- chan) 
    ... 

Note that this restriction applies also to immutable instance 
variables, because you can modify them through functional update 
(the {< chan = ... >} notation.)
			

Str replacement

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/620f316e63714d13/f7141aaaba84d6f1#f7141aaaba84d6f1

John Skaller asked and Xavier Leroy answered:
> When is the Str module going to be extended to provide 
> re-entrant operations?? 

When someone designs a new interface to Str and gets it approved by a 
few respectable members of this community.  A proof-of-concept 
implementation wouldn't hurt either, although I'm OK with writing the 
final implementation.  It's the API for which I don't have ideas. 

> I understand (perhaps incorrectly) that Xavier rewrote the 
> code for this module, and assume the underlying functionality 
> is re-entrant? 

Correct.
			

Announcing OMake 0.9.8.5 - a substantial feature enhancements release

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/46e0ba4444dc542b/d1cce28d183e948e#d1cce28d183e948e

Aleksey Nogin announced:
We are proud to announce the latest release of the OMake Build System - 
OMake version 0.9.8.5. 

OMake is a build system designed for scalability and portability. It 
uses a syntax similar to make utilities you may have used, but it 
features many additional enhancements, including the following. 

   - Support for projects spanning several directories or directory 
     hierarchies. 

   - Fast, reliable, automated, scriptable dependency analysis using MD5 
     digests, with full support for incremental builds. 

   - Fully scriptable, includes a library that providing support for 
     standard tasks in C, C++, OCaml, and LaTeX projects, or a mixture 
     thereof. 

     Often, a configuration file is as simple as a single line 

     .DEFAULT: $(OCamlProgram prog, foo bar baz) 

     which states that the program "prog" is built from the files foo.ml, 
     bar.ml, and baz.ml. This one line will also invoke the default 
     standard library scripts for discovering implicit dependencies in 
     OCaml files. 

   - Full native support for rules that build several files at once. 

   - Portability: omake provides a uniform interface on Linux/Unix 
     (including 64-bit architectures), Win32, Cygwin, Mac OS X, and other 
     platforms that are supported by OCaml. 

   - Built-in functions that provide the most common features of programs 
     like grep, sed, find, and awk. These are especially useful on Win32. 

   - Active filesystem monitoring, where the build automatically restarts 
     whenever you modify a source file. This can be very useful during 
     the edit/compile cycle. 

   - A built-in command-interpreter osh that can be used interactively. 

OMake preserves the style of syntax and rule definitions used in 
Makefiles, making it easy to port your project to OMake. There is no 
need to code in Perl (cons), or Python (scons). However, there are a few 
things to keep in mind: 

  1. Indentation is significant, but tabs are not required. 
  2. The OMake language is functional: functions are first-class and 
     there are no side-effects apart from I/O. 
  3. Scoping is dynamic. 

OMake is licensed under a mixture of the GNU GPL license (OMake engine 
itself) and the MIT-like license (default configuration files). 

Additional information and extensive documentation can be found on OMake 
Home Page at http://omake.metaprl.org/ 

OMake 0.9.8.5 is substantial feature enhancements and bugfixes release. 
The changes in this release include: 

    - Fixed Ctrl-C handling on Windows (with now correctly interrupt 
      OMake) 
    - Added .STATIC and .MEMO rules, allowing defining lazy computations 
      and lazy memoization maps 
    - Added export sections, making it much easier to manage variable 
      scoping 
    - Fields in sub-objects can now be referenced directly 
    - Many new built-in and library functions 
    - Significant bug-fixes 

For a more verbose change log, please visit 
http://omake.metaprl.org/changelog.html#0.9.8.5 . 

Source and binary packages of OMake 0.9.8.5 may be downloaded from 
http://omake.metaprl.org/download.html . In addition, OMake may be 
obtained via the GODI packaging system. 

To try it out, run the command "omake --install" in a project directory, 
and modify the generated OMakefile. 

OMake 0.9.8.5 is still an alpha release.  While we have made an effort 
to ensure that it is bug-free, it is possible some functions may not 
behave as you would expect.  Please report any comments and/or bugs to 
the mailing list omake@metaprl.org and/or at http://bugzilla.metaprl.org/
			

ocaml-curses 1.0.0 released

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/0cf93a231a66af4f/dc49a30460513a2c#dc49a30460513a2c

Richard Jones:
I am pleased to announce the first public release of OCaml Curses, 
which is an OCaml binding to the curses/ncurses library. 

This project was formerly called OCaml TMK, and all the actual work on 
it was done by Nicolas George. 

The project homepage is: http://www.nongnu.org/ocaml-tmk/ 

The released version for download is currently here (until I can work 
out how to make releases on the Savannah site ...) 

http://annexia.org/tmp/ocaml-curses-1.0.0.tar.gz 
http://annexia.org/tmp/ocaml-curses-1.0.0.tar.gz.sig 

Mailing list: http://lists.nongnu.org/mailman/listinfo/ocaml-tmk-devel 

I'd like to add competent and interested developers to the Savannah 
project, particularly the Debian folks who were interested in 
packaging this.  Please mail me privately.
			

New ocaml-jobs@inria.fr mailing list

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/9d3d8d1e38ff6025/91cb814e46e8c414#91cb814e46e8c414

Maxence Guesdon:
A new mailing list, ocaml-jobs@inria.fr, has been created, to post 
announces regarding jobs and internships for OCaml developers. Feel free to 
register at the following address: 
  https://sympa-roc.inria.fr/wws/info/ocaml-jobs 
Do not hesitate to forward this message to interested people who do not 
read the caml-list.
			
Yaron Minsky asked and Maxence Guesdon answered:
> Does this imply that job announcements are no longer welcome on the ocaml 
> list proper?  I'm worried that the new list will not be subscribed to 
> quite as widely as the caml list... 

Job announcements are still welcome on the caml-list. The new list is for 
people not following high-level discussions on the caml-list but are 
interested in job announcements; it is a way to contact people "explicitly" 
interested in job announcements, whether they are employers or "ocaml 
developers for rent".
			

Unit Testing

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/8a4991a0f12a1a0c/fa33d7e3ff0f7c05#fa33d7e3ff0f7c05

Robert Fischer and Edgar Friendly answered:
> Is there an actively supported unit testing library/framework for Ocaml? 

I believe the Iinteractive people actively use TestSimple internally, 
but they haven't updated the project website to show 0.02, which I have 
a copy of, and there may exist more recent versions as well. 

Announcement: 
http://yquem.inria.fr/pipermail/caml-announce/2007-January/000009.html 

Webpage: 
http://www.iinteractive.com/ocaml/ 
Maybe this message will provoke an update.
			
Jeff Meister also answered:
There's OUnit, but I don't know if it's actively maintained. You'd 
have to ask Mr. Zeeman. 

http://www.xs4all.nl/~mmzeeman/ocaml/ounit-doc/OUnit.html
			

If OCaml were a car

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/885db7db4cee064b/3b16577708b8369f#3b16577708b8369f

Richard Jones said, spawning a big thread:
This is on the first page of Digg at the moment ... 

http://www.cs.caltech.edu/~mvanier/hacking/rants/cars.html
			

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}$'?'&lt;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 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