Previous week   Up   Next week
Hello,

Here is the latest Caml Weekly News, weeks 25 june to 09 july, 2002. 

(Sorry about last week, I was abroad and did not have an internet
connection)

1) ICFP 2002 programming contest
2) nonblocking I/O - using channels or Unix.file_descr
3) Gdkpixbuf
4) Research Job: Compositional Analysis & Reasoning for Software
5) Where are curses/ncurses bindings for OCaml available
6) Cameleon 0.5pre
7) interfacing C++ with OCaml
8) Patch to ocaml-mysql
9) lablglut 1.0

======================================================================
1) ICFP 2002 programming contest
----------------------------------------------------------------------
Xavier Leroy forwarded the information:

The contest will run from 12:00 Noon Pacific Standard Time on Friday
August 30, 2002, until 12:00 Noon Monday September 2, 2002.

======================================================================
2) nonblocking I/O - using channels or Unix.file_descr
----------------------------------------------------------------------
Basile Starynkevitch asked and Xavier Leroy answered:

> I want to code nonblocking IO on Linux (I am not concerned with
> "portability" problems to non-unix system). Of course I will use
> Unix.select to wait for availability of input and output.  (I do not
> want to use multithreading here  because I might have several dozens of such
> I/O "ports" thru Unix named FIFOs).
> 
> Can I use Pervasives channels and then
> 
> Unix.set_nonblock (Unix.descr_of_in_channel myinchan)
> Unix.set_nonblock (Unix.descr_of_out_channel myoutchan)
> 
> and then read & write bytes with
>   Pervasives.input myinchan buf pos len
>   Pervasives.output myoutchan buf pos len

Yes -- the bytecode thread library does just that.
Be prepared to handle the Sys_blocked_io exception that will be raised
by Pervasives I/O functions when they cannot complete without
blocking.

======================================================================
3) Gdkpixbuf
----------------------------------------------------------------------
Ketanu asked and Jacques Garrigue announced:

> Does anyone know about using gdkpixbuf (from the gdk library) with objective
> caml ? The gdkpixbuf object provides loading/saving images to many common
> file formats, in a way usable altogether with GTK+. 

OK, I've added some kind of support. See the new snapshot 2002-07-01.
To enable GdkPixbuf support, you must configure with USE_GNOME=1.
This is preliminary, but at least you can render any picture supported
by GdkPixbuf.

Another approach is to use the CamlImages library, which also offers
lablgtk compatibility.  I believe it allows more fancy processing.

======================================================================
4) Research Job: Compositional Analysis & Reasoning for Software
----------------------------------------------------------------------
Joe Wells announced:

                             Research Position

    Useful Logics, Types, Rewriting, and their Automation (ULTRA) Group
                        Computer Science Department
                School of Mathematical and Computer Sciences
                           Heriot-Watt University
                          Edinburgh, Scotland, UK

The HTML version of this job posting can be found at:

   http://www.cee.hw.ac.uk/~jbw/position-ad.html

(the long version of this email is archived at
http://caml.inria.fr/archives/200206/msg00304.html )

======================================================================
5) Where are curses/ncurses bindings for OCaml available
----------------------------------------------------------------------
Travis Bemann asked, Jérôme Marant and Basile Starynkevitch answered:

> Supposedly curses/ncurses bindings for OCaml are available, at least 
> according to the "Interfacing C with Objective Caml" section in the
> OCaml Documentation and user's manual.  However, I have not been able
> to find it, as it is not distributed with OCaml 3.04, and is not
> available through The Humps or The Caml Link Database, and also is not
> distributed as part of latest CDK.  So therefore, where could I find
> curses/ncurses bindings for OCaml?

Try http://www.freesoftware.fsf.org/ocaml-tmk/ and
http://savannah.gnu.org/projects/ocaml-tmk/ (it is called the Ocaml
Text Mode Kit).

======================================================================
6) Cameleon 0.5pre
----------------------------------------------------------------------
Maxence Guesdon announced:

Hello everybody,

i'm pleased to announce the release 0.5pre of Cameleon,
my OCaml-oriented development environment.

Changes are (from Cameleon's change log):
  * config directory is now ~/.cameleon instead of ~/.cameleonrc,
  * all menus can be configured,
  * support for plug-ins: put the .cmo plugins files in your ~/.cameleon/plugins
+directory (see plugins/*.ml for examples),
  * commands can be shell commands (beginning with '#') or cameleon internal
+commands,
  * new ocamldoc generators (odoc_command.cmo and odoc_command_latex.cmo) added to
+create plug-ins documentation,
  * manual update.

http://www.maxence-g.net/Tools/cameleon/cameleon.html

======================================================================
7) interfacing C++ with OCaml
----------------------------------------------------------------------
Thierry Salset asked and Xavier Leroy answered:

> I used Camlidl to help me interface C functions and datatypes with OCaml
> under Unix but now I would like to interface some existing (written by
> others) C++ classes and methods with OCaml. I am not a C++ programmer
> and I'm a little bit lost. Can Camlidl be of some help ? Should I write
> a C layer between C++ and OCaml ?

This is a reasonable option.  Once you have a pure C API for the 
C++ code, you can use CamlIDL as usual.

CamlIDL itself doesn't have any kind of direct support for C++.  Well,
it supports COM interfaces, which correspond to a very small subset of
C++ classes, but I doubt this can help you, unless the C++ code of
interest is already structured as COM interfaces.

The other alternative is to hand-write Caml wrappers that call
directly the C++ code, without going through C.  I believe you can
write those wrappers in C++ if you're careful to declare the entry points
(the functions that Caml will call) "extern "C"".

Some of the features of C++ might be used to wrap the Caml runtime API (the
functions and macros provided by <caml/mlvalues.h>, etc) in a more
C++-friendly style, see e.g.
         http://caml.inria.fr/archives/199704/msg00029.html

Bon courage...

======================================================================
8) Patch to ocaml-mysql
----------------------------------------------------------------------
Artem Prisyaznuk remarked and Shawn Wagner announced:

> Hello 
> 
> I found in  Ocaml-MySql binding 0.1.1 some bugs. 

Introducing ocaml-mysql 0.1.2. :)  

http://raevnos.pennmush.org/code/ocaml-mysql-0.1.2.tar.gz

======================================================================
9) lablglut 1.0
----------------------------------------------------------------------
Issac Trotts announced:

Available at www.issactrotts.net :

The lablglut library is a simple GLUT binding for OCaml.  GLUT (OpenGL
Utility Toolkit) is a portable, minimal user interface library for
OpenGL, written by Mark Kilgard.  GLUT tends to be easier to install and
use than most other OpenGL windowing alternatives.  Its portability is
hard to beat.

lablglut includes bindings for a small subset, called ezgl, of OpenGL's
commands, mainly for testing.  For real programs, lablGL's bindings
will probably come in handy.

======================================================================
Old cwn
----------------------------------------------------------------------

If you happen to miss a cwn, you can send me a message
(alan.schmitt@inria.fr) and I'll mail it to you. If you also wish to
receive it every week by mail, just tell me so.

======================================================================

Alan Schmitt