Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ocaml for Scientific computing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jan Kybic <kybic@f...>
Subject: Re: Ocaml for Scientific computing
> I am wondering is anyone using Ocaml for scientific computing? I didn't
> mean parsing, but for number crunching applications, like signal/image
> analysis. Is it suitable for this kind of tasks in general? I would like
> to hear from someone practically using it, not just theoretical
> possibility.

I have used Ocaml for several projects involving numerical
calculations, including image processing, boundary element methods and
optimization. I use Lacaml, fftw, MPI and Gsl libraries, the
installation was not difficult.  Ocaml has performed very well for me 
so far, it is faster than Python or Matlab and more "friendly" than
C/C++. Some minor issues:

- There is too many different representations of vectors and matrices:
  float arrays, plain big arrays, Lacaml Fortran style big arrays,
  several kinds of Gsl vectors with yet separate styles. I found I
  often had to convert vectors or matrices from one format to another
  because the function I wanted to use was available for a different
  interface. 

- Limited interactivity - it would help if you could call native compiled
  modules from the toplevel.

- Limited debugging - it is not possible to debug compiled modules.
  I would like to see an interface to gdb (I work on Linux), or a
  possibility for the byte compiled code being debugged to call
  natively compiled modules.

- I still find Ocaml object system less natural for me and more
  limiting than for example Python's. Also, often you can do the same
  thing with the objects as with the module system, so the choice of the
  best design pattern is sometimes not obvious at the first sight and
  requires a lot of foresight. But I assume this is just a matter of
  practice.

Good luck,

Jan

-- 
-------------------------------------------------------------------------
Jan Kybic <kybic@fel.cvut.cz>                       tel. +420 2 2435 5721
http://cmp.felk.cvut.cz/~kybic                      ICQ 200569450