Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of 27 July to 03 August, 2004.

  1. Quick update on RT Ocaml
  2. otags 3.08.0.1
  3. Wiki software written in OCaml
  4. release: cf-0.3 (pagoda core foundation)
  5. Update: OCaml-MinGW-maxi 0.2-alpha
  6. ExtLib 1.2 Release
  7. graphics on Mac OS X
  8. Micmatch 0.666 (first release)

Quick update on RT Ocaml

Alex Baretta announced:
Just a second to let you know that our realtime PLC and NC application
is working great. We are currently in the final integration phase for
our first prototype control system: a 2-axis automatic glass cutting
table. We currently support Parker Hannifin SBC servodrives and motors,
but drivers can be written to support any other peripheral. We are
amazed to have achieved a 10ms latency with a 2MB memory usage and a
couple percent CPU usage on a Celeron.
    

otags 3.08.0.1

Cuihtlauac Alvarado announced:
Otags 3.08.0.1 is there:

      http://perso.rd.francetelecom.fr/alvarado/soft/otags-3.08.0.1.tar.gz

Notes:

  1/ Using a kludge to cope with Lexing.postion, will disappear,
  promised ;-)

  2/ Native camlp4 broken

  3/ Feedback wellcome

  4/ Ciao.
    
Cuihtlauac Alvarado added:
Tip:

If (like me) you install ocaml by doing something like

   cp ocaml-3.08.0.tar.gz /usr/local/src
   cd /usr/local/src
   tar -zxvf ocaml-3.08.0.tar.gz
   cd ocaml-3.08.0
   ./configure
   make world opt opt.opt install

Then Otags will break at compile time, because an old plexer.cmx (back
from ocaml 3.07) will still lay in
  
  /usr/local/lib/ocaml/camlp4
  
You'll have to

  rm /usr/local/lib/ocaml/camlp4/lexer.cmx

Then otags will compile fine
    
Cuihtlauac Alvarado then announced:
Installation was bugged in otags 3.08.0.1, this is fixed in 3.08.0.2

    http://perso.rd.francetelecom.fr/alvarado/soft/otags-3.08.0.2.tar.gz
    

Wiki software written in OCaml

Richard Jones announced:
I wrote a Wiki in OCaml.  It took me two days, and was done solely
because I needed a Wiki for an OCaml project, and it would be nice to
have a Wiki actually written in OCaml.  In other words, complete wheel
reinvention :-)
   
You can download source (GPL) here:

http://sandbox.merjis.com/_dist/

You can play with the Wiki here:

http://sandbox.merjis.com/

Enjoy ...
    

release: cf-0.3 (pagoda core foundation)

James Woodyatt announced:
I've been slow to follow through on my threats to release an update to
the Pagoda Core Foundation, and I apologize for that.  My day job
interrupted? in the immortal words of Sascha in the classic film
_Casablanca_, "Yvonne, I love you, but he pays me."
   
Once again, I tuned the existing API somewhat.  Mostly in places where
I hope few people are likely to tread.  I fixed a few bugs, and I made
some performance tweaks to some obscure corners of the library, e.g.
[Cf_gadget].  I also added some new modules (see below).

I upgraded to Ocaml 3.08 recently, and the library works fine with that
version.  It should still compile with 3.07+2, but I can't promise that
the next release won't use the cool new classless object feature in
3.08 (omg! that is totally wizard! thanks, inria!)

As before, the new distribution is available at either of the following
URL's:

        http://www.wetware.com/jhw/src/pagoda/cf-0.3.tar.bz2
        http://www.wetware.com/jhw/src/pagoda/cf-0.3.tar.gz

And the online documentation (generated by ocamldoc) can be found here:

        http://www.wetware.com/jhw/src/pagoda/doc/cf/  (new location!)

There is still no programmer's guide.  If I learn that people are using
this library, then maybe I'll write one.  (All serious development
offers from commercial publishers will be seriously considered.)

===== Pagoda Core Foundation (cf) library =====

Highlighted features include:

- Functional streams and stream processors (extended).
- Functional bootstrapped skew-binomial heap.
- Functional red-black binary tree (associative array).
- Functional sets and maps based on red-black binary tree.
- Functional real-time catenable deque.
- Functional LL(x) parsing using state-exception monad.
- Functional lazy deterministic finite automaton (DFA).
- Functional lexical analyzer (using lazy DFA and monadic parser).
- Functional substring list manipulation (message buffer chains).
- Gregorian calendar date manipulation.
- Standard time manipulation.
- System time in Temps Atomique Internationale (TAI).
- Unicode transcoding.
- Extended socket interface (supports IPv6 and UDP w/multicast).
- Universal resource identifier (URI) manipulation.
- I/O event multiplexing (with Unix.select).

Note: see the ISSUES file for a list of open problems in this release.

===== Required Components =====

This library requires the following external components:

- Objective Caml (v3.07+2 or newer)
- Findlib (tested with v0.8.1 and v1.0.4)

Principle development was on Mac OS X 10.3.  The final version of this
library also compiled successfully and passed all self-tests without
warnings
on Suse Linux 9.0 for x86-32.  Other platforms with POSIX-like
environments
should require only a minimal porting effort.

One major open issue: the extended socket interface is broken under
WIN32.
(The author invites help porting the library to other environments.)

===== Version 0.3 =====

Highlights of the changes:

+ Rewrite the scheduler in [Cf_gadget] so that it sucks less wind.  The
kernel
  is now built entirely out of mutable structures, and we got rid of
the 'pin'
  type because we don't represent wires internally as integer keys in a
map.
+ Added [Cf_journal], a foundation for extensible diagnostic event
journaling
  inspired by Log4j from the Apache Foundation.  (Look for a full suite
of
  extensions to be sold separately.)
+ Removed the [?xf] optional exception function from the
[Cf_lexer.create]
  function.  Use a derived cursor class with an [error] method that can
be
  overridden for this purpose.
+ Added [Cf_scan_parser], which scans an input sequence using the
[Scanf] module
  in the standard library.
+ Minor convenience functions added to [Cf_parser].
+ Other bug fixes.  (See CHANGES file.)
    

Update: OCaml-MinGW-maxi 0.2-alpha

Christoph Bauer announced:
Ocaml-MinGW-Maxi is binary distribution for OCaml on Windows based on the
MinGW toolchain. It contains the OCaml compiler and some precompiled add-on
libraries.

The 0.2-alpha release is the first one compiled from the offical
ocaml-3.08.0 sources.

http://lasagne.unix-ag.uni-kl.de/omm/

Changes since 0.1:

   Updated OCaml (3.08.0)
   Updated Lablgtk (2.4.0)
     ** bytecode compilation is broken (link errors). **
     ** some missing gtk files are included now **
   Some new modules are added: calendar, HereDoc, regexp-pp-ocaml, extlib
    

ExtLib 1.2 Release

Nicolas Cannasse announced:
The ExtLib Release 1.2 is now available.
ExtLib is a project aiming at providing a complete - yet small - standard
library for the OCaml programming language. The purpose of this library is
to add new functions to OCaml Standard Library modules, to modify some
functions in order to get better performances or more safety (tail-rec) but
also to provide new modules which should be useful for the average OCaml
programmer

Changes are :
- compatibility for OCaml 3.08 (and backward compatible with 3.07)
- simplified IO module + support for binary files
- added the Unzip module : pure OCaml implementation of ZLib inflate
algorithm
- some fixes and improvements

The documentation has also been updated.
Everything and more at http://ocaml-lib.sf.net
    

graphics on Mac OS X

Michael Benfield asked:
I have compiled OCaml 3.08 on Mac OS X. I have X11 installed, including
the SDK with the header files and whatnot. When I configured the OCaml
compilation, it did find my X installation and said it would be using
it and installing the graphics module.

But:

$ ocamlmktop -o mytop graphics.cma
$ ./mytop
        Objective Caml version 3.08.0

# Graphics.open_graph "";;
Exception: Graphics.Graphic_failure "Cannot open display ".

I get the same exception when I try to put it in a file and compile and
run it, whether compiled with the bytecode compiler or the native code
compiler. So I know this isn't much to go on but I really am not sure
what to do from here to get the Graphics to work so if anyone could
point me in the right direction I would appreciate it.
    
Richard Jones and Daniel Bünzli suggested, and Michael Benfield answered:
> Maybe you didn't open X11.app (i.e. launch the X server). Also if you
> try to do that from Terminal.app you may need to set the environment
> variable $DISPLAY to ":0.0".

This solved it, thanks. $DISPLAY wasn't set on my machine.
    

Micmatch 0.666 (first release)

Martin Jambon announced:
Dear Caml riders,
      
I would like to announce the first release of Micmatch.
Micmatch is an extension of the pattern matching of OCaml for matching
strings against regular expressions, following the style of ocamllex
regexps.

Here is an example of an interactive session:

# RE digit = ['0'-'9'] ;;
# RE letter = ['a'-'z' 'A'-'Z'] ;;
# RE word = letter (letter | '_' | digit)* ;;
# RE space = [' ' '\t' '\n' '\r'] ;;
# let say_hello l text =
    match l, text with
        (_, RE _* "name" space* "=" space* (word as name) space* ";")
      | (name :: _, _) ->
          print_endline ("Hello " ^ name)
      | _ ->
          invalid_arg "say_hello"
;;
val say_hello : string list -> string -> unit = <fun>
# say_hello ["Joe"; "Jack"] "id=123; name=Martin; end";;
Hello Martin
- : unit = ()
# say_hello ["Joe"; "Jack"] "id=123; name= ; end";;
Hello Joe
- : unit = ()


Documentation can be found here:
  http://martin.jambon.free.fr/micmatch.html

The package can be downloaded directly from here:
  http://martin.jambon.free.fr/micmatch.tar.gz
    

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