While writing the graphml printer for ocamlgraph (that btw has just been committed in the ocamlgraph svn and it going to be part of the next release of ocamlgraph...), I stumbled in the following pitfall (this is really ocaml for dummies :D). Imagine you want to associate a unique id to each data type. But you also want that equal values have equal ids. The first (wrong !) idea that might come to mind is to use the Hashtbl.hash function compute this integer uid.
The signature is minimal. Since in GraphMl all attributes are typed, we only need two functions to describe the name, type a default value for the attributes of each vertex and edge, and two functions to map the value of each vertex and edge to a key / value list.
Recently we did a bit of clean up of our git repositories and now thanks to roberto's efforts we have a new shiny git repository on the inria forge and two mailing lists to discuss development and user questions.
If you are a user, or interested in dose development, please sign up to these mailing lists:
if you already have a copy
The dose3 code base is getting larger and larger and waiting 40 secs each time I want to recompile the library is not acceptable anymore. Recently I tried to understand why the ocaml compiler was so slow .
To compile dose, I use a combination of ocamlbuild, ocamlfind, camlp4 and Makefile to drive everything.
The first important problem was related to my naive use of camlp4. I extensively use the Camlp4MacroParser module for the conditional compilation of certain features and actually I use camlp4 to process all my source code.
Below you can find an implementation in ocaml of the algorithm described in this paper by D. B. Johnson
Finding all the elementary circuits of a directed graph. D. B. Johnson, SIAM Journal on Computing 4, no. 1, 77-84, 1975. http://dx.doi.org/10.1137/0204007the idea of this algorithm is to enumerate all cycles in a strongly connected component.
The other day I wrote about my experience to set up the build system for a simple library. However, since parmap includes only two simple stubs to syscall I didn't have the chance to talk how to convince ocamlbuild to build stubs that depend on an external dynamic library.
I'm sure, facing this problem you had a look at this example : http://brion.inria.fr/gallium/index.php/Ocamlbuild_example_with_C_stubs
Despite providing all elements, the page is a bit scars of details and explanations (at least for me...).
Today I struggled once again to build a simple library with ocamlbuild, so once for all I decided to write something about it. I'm sure next time, googling for an answer I'll find this post and shake my head in despair :)
The library in question is parmap written by Roberto Di Cosmo to speed up computations on modern multi processors computers. We want to build everything: cma, cmxa and cmxs. Moreover, we want to build a shared library that contains stubs for a couple of bindings to C functions.
I've just released the new version of ocaml-buddy, my ocaml bindings to the buddy BDD c library. Thanks to a fruitful interaction with Jimmy Thomson, I've fixed a couple of memory leaks and cleaned up the code a bit.
grab it when is still hot : https://github.com/abate/ocaml-buddy/tree/0.5
comments a testers are welcome. A debian package is on the way
Thanks to Ralf's work, dose3 has been just accepted in debian experimental !!!
A simple module to parse a uri (well, a small subset of the RFC 3986). The Ocamlnet library contains a better implementation, but it also comes with a lot of dependencies...
Grab it, use it, change it, give it away but remember me :) ...