Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of 24 February to 02 March, 2004.

  1. ECaml 0.3 : a simple object system
  2. Caml jobs announcement
  3. GODI news
  4. ocamlgraph
  5. New location for Extended thread synchronisations
  6. Academic position

ECaml 0.3 : a simple object system

Issac Trotts announced:
ECaml is a simple object system for OCaml, based on polymorphic variants
and a Camlp4 syntax extension.

ECaml can
  o create objects (entities) of anonymous class
  o create new classes within functions or other classes.
  o very easily define methods having polymorphic arguments

NEWS:
  o Removed a bug resulting from the use of colon (:) as the method
    invocation operator.  Of course this was conflicting with the type
    casting syntax, so now I am using the operator '#'.  Users can still
    access methods on standard OCaml objects using the word "invoke" in
    place of '#'.
  o Added a way to concisely describe entity types, for module signatures.
    
Jacques Garrigue said and Issac Trotts answered:
> Interesting.
> I shall have a look at your encoding.

It would be good to get your feedback on it.

> You may also be interested by having a look at the current CVS version
> of objective caml, because it actually has all the features you
> describe. (This doesn't reduce your merit.)
> Just a one line example:
>         Objective Caml version 3.07+13 (2004-01-04)
>
> # let o = object method id x = x end;;
> val o : < id : 'a -> 'a > = <obj>

This is very good to see.  As far as I can tell, the OCaml object system
can now do everything that ECaml can do.  The only reason to use ECaml
now would be if you are using an older version of OCaml (pre 3.07+13),
or just to see an example of something fun to do with polymorphic
variants and Camlp4.

> And if you like experiments, you may even try the objvariants branch.
> Just get the CVS version, and then do:
>   cvs update -r objvariants typing
> It allows you to use unions of object types.
> This is a quick hack (2 hours coding), and there may be bugs, but it
> can be funny. Here is an example session.
>
> # let f (x : [> ]) = x#m 3;;
> val f : [>  as < m : int -> 'a; .. > ] -> 'a = <fun>
> # let o = object method m x = x+2 end;;
> val o : < m : int -> int > = <obj>
> # f (`A o);;
> - : int = 5
> # let l = [`A o; `B(object method m x = x -2 method y = 3 end)];;
> val l :
>   [> `A of < m : int -> int > | `B of < m : int -> int; y : int > ] list =
>   [`A <obj>; `B <obj>]
> # List.map f l;;
> - : int list = [5; 1]
> # let g = function `A x -> x#m 3 | `B x -> x#y;;
> val g : [< `A of < m : int -> 'a; .. > | `B of < y : 'a; .. > ] -> 'a = <fun>
> # List.map g l;;
> - : int list = [5; 3]
>
> The type annotation (x : [> ]) is necessary: # is actually overloaded
> on objects (the default) and variants of objects. You can view the
> variant tag here a bit like a runtime type: you can pattern-match on
> it when needed, but you can also call a method common to all cases
> without looking at the tag.
>
> I got the idea in a paper (in Japanese) by Hideshi Nagira and Atsushi
> Igarashi, but actually this trick was first suggested to me by Koji
> Kagawa about 5 years ago.
>
> (Disclaimer: this kind of experiment is for fun, don't expect it in
> the main branch anytime soon or ever.)

I like it.  Thanks for your message.
    

Caml jobs announcement

Alex Baretta announced:
My company is looking for Caml riders and Caml breeders for internships
and full time jobs in Milano, Italy.

Anyone who is interested can send his or her CV to

giorgia.spinola[   AT    ]baretta[    dot    ]com

Thank you very much.
    

GODI news

Gerd Stolpmann said:
GODI, the O'Caml source distribution, has been updated with
the following packages:

- New versions of godi-tools (i.e. godi_console) and godi-core-mk.
  godi_console now includes a parser for makefiles that speeds up
  the process of scanning source packages. Furthermore, there
  are numerous bug fixes.
- godi-ulex version 0.4
- conf-unixodbc and godi-ocamlodbc-unixodbc version 2.6
- godi-equeue version 2.0.1
- godi-findlib version 1.0.3
- conf-sdl and godi-ocamlsdl version 0.6.3
- godi-lablgl version 1.0

To install these packages, just go into the godi_console, get the new
list of available packages, and select the mentioned packages for
build. Note that you should exit godi_console and call it again to
get the new version.

Gerd

GODI homepage: http://ocaml-programming.de/godi/
    

ocamlgraph

Jean-Christophe Filliatre announced:
It  is our pleasure  to announce  the first  release of  ocamlgraph, a
graph library for ocaml. ocamlgraph intends to provide

 - several graph data strucures (persistent or imperative, labelled or
   not, directed or not, etc.)

 - several graph  algorithms (shortest  path, maximal flow,  SCC, DFS,
   BFS,  topological  order, etc.)  and  graph operations  (transitive
   closure,  mirror, complement,  union,  intersection, random  graph,
   random planar  graph, etc.)  Algorithms and operations  are written
   independently of  the graph data structrure (as  functors) and thus
   can be easily reused in other contexts.

Distribution and full API at http://www.lri.fr/~filliatr/ocamlgraph/

Comments and contributions are welcome.
    

New location for Extended thread synchronisations

David Mentré announced:
I've put my small Extended thread synchronisations package in a new
location as the old one was no longer available :

 http://www.linux-france.org/~dmentre/code/


This code provides barriers and read/write locks (with both reader and
writer preference). The programing interface is a straightforward
translation of the standard OCaml Thread and Mutex modules.

License: GNU LGPL (same as OCaml standard library).


The code is probably not much that complicated but still annoying to
implement.

Let me know if you find it usefull.
    

Academic position

Christophe Troestler announced:
The following full-time tenure track position may interest some people
on this list looking for a position in academia.  I apologize for this
not to be directly related to Ocaml but since a research theme is
"Algorithms and Programming", language theorists are definitely
welcome.  The announce is in french because you need to be fluent
enough in this language to apply.  Please spread this announce around
you.

Thanks,
ChriS

----------------------------------------------------------------------

L'Institut d'Informatique de l'Université de Mons-Hainaut souhaite vous
informer de l'ouverture future d'une charge de cours à temps plein à
partir du 1er octobre 2004.

Les activités de recherche et d'enseignement se situeront en
informatique, avec une préférence pour les domaines de l'"Algorithmique
et Programmation" ou des "Réseaux et Télécommunications".  Le candidat
doit faire état d'une activité de recherche de haut niveau scientifique.

Si vous souhaitez être informé au moment où cette vacance sera
officialisée au moniteur, merci de manifester votre intérêt auprès du
Prof. J. Wijsen (wijsen@umh.ac.be).

----------------------------------------------------------------------

Mons is located on the highway Bruxelles-Paris near the French border.
There is a direct train connection: Paris-Mons using Thalys (1h20, once
a day).  There are Faculties of Medicine, of Sciences, of Economics and
Management, of Educational Sciences, an International School for
foreign languages and a Polytechnic Faculty for engineering.
    

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