Here is the stuff I wrote in or for OCaml (wrappers for C libraries mainly).
An interface to the GNU libplot library. The project is hosted on Sourceforge : http://ocamlplot.sourceforge.net/
A Texinfo generator for
OCamldoc : odoc_texi.ml. It produces .texi files
that can be converted to Info files using makeinfo. It is now part of OCamldoc,
which is now included in the OCaml distribution.
There is some helper Emacs-lisp code that automatically search the Info files for
a requested identifier :
caml-info-look. It even works with opened modules or
modules aliases !
You can also use caml-help.el from the OCaml distribution.
The OCaml 3.07 documentation in ocamldoc-generated Info files : ocaml-3.07.info.tar
The LablGTK2 documentation in ocamldoc-generated Info files : lablgtk2.info.tar.
I wrote a binding for GSL, the GNU scientific
library.
Get it here and see the documentation.
The latest version is 0.5.1 and requires GSL 1.8. Version 0.4.1 requires GSL 1.6, builds with GSL 1.7 but does not build with GSL 1.8.
Libart is a 2D, vector-based drawing library. It is used by GNOME
in the GNOME Canvas and in Nautilus.
These are bindings that interface Libart with CamlImages, LablGTK
and OCamlSDL.
Here is some reference documentation,
the author's site.
I'm one of the developers of LablGTK,
a GTK+ bindings for OCaml.
Here's the ocamldoc-generated documentation, with links to the GTK+
reference manual.
I contributed bindings for the Cairo vector graphics
library. The code is hosted on freedesktop.org.
There are no tarballs yet but the code is in the CVS. Here is the
OCamldoc-generated documentation.
I am writing bindings for ORBit2, the CORBA ORB of the GNOME project. There is a IDL compiler that maps CORBA types to OCaml types, and a runtime library that does the necessary conversions. It requires a fairly recent version of ORBit2 (>= 2.7.2).
See the README and the
embryonic manual.
First version (not complete, alpha quality, etc.):
A syntax extension for camlp4 that defines a somehow lighter syntax for pattern-matching on records :
Instead of writing :
let t = Unix.localtime (Unix.time ()) in
let { Unix.tm_hour = tm_hour; Unix.tm_min = tm_min } = t in
Printf.printf "%02d:%02d" tm_hour tm_min
one can write :
let t = Unix.localtime (Unix.time ()) in
let Unix.{ tm_hour; tm_min } = t in
Printf.printf "%02d:%02d" tm_hour tm_min
UPDATE: it now works with record expressions too.
Get it here and compile it like this :
ocamlc -pp camlp4o -c -I +camlp4 pa_records.ml
To use it: ocamlc -pp "camlp4o ./pa_records.cmo" -c my_file.ml
A small list comprehension syntax extension with camlp4.
list_compr_expr::=[+expr|list_compr_item{|list_compr_item}]list_compr_item::=patt<-expr_list|letlet-binding|whenexpr
The expr_list is evaluated (it must be of a list type), then for each element that matches the pattern patt, expr is evaluated to build a new list. You can have multiple list_compr_item. It all expands to some combination of List.fold_right.
For instance:
| list comprehension expression ... | ... expands to: |
|---|---|
|
|
|
|
|
|
Get it here and compile it like this :
ocamlc -pp camlp4o -c -I +camlp4 pa_compr.ml
To use it: ocamlc -pp "camlp4o ./pa_compr.cmo" -c my_file.ml
A patch for the Unix
module of the caml distribution providing support for IPv6
networking.
It is only tested on GNU/Linux !
New things:
inet_addr_of_string and
string_of_inet_addr understand IPv6 addresses in colon
notationinet6_addr_any is the IPv6 equivalent of
inet_addr_anyinet_addr_family returns the type of
address:
type inet_addr_family =
| AF_INET
| AF_INET6
val inet_addr_family : inet_addr -> inet_addr_familyPF_INET6gethostbyname2, getaddrinfo and
getnameinfo for nodename and service name
translation:
val gethostbyname2 : string -> inet_addr_family -> host_entry
type addrinfo = {
ai_family : socket_domain ;
ai_socktype : socket_type ;
ai_protocol : int ;
ai_canonname : string ;
ai_addr : sockaddr ;
}
type addrinfo_flags =
AI_PASSIVE
| AI_CANONNAME
| AI_NUMERICHOST
val getaddrinfo : string -> string ->
?family:socket_domain ->
?socktype:socket_type ->
?protocol:int ->
addrinfo_flags list -> addrinfo list
type nameinfo_flags =
NI_NOFQDN
| NI_NUMERICHOST
| NI_NAMEREQD
| NI_NUMERICSERV
| NI_DGRAM
val getnameinfo : sockaddr -> nameinfo_flags list -> string * string
in6_is_addr_* predicates for testing special IPv6 addresses
(loopback, linklocal, v4 mapped, etc.)Thu 05 Oct 2006 02:19:56 PM CEST