From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,NO_DNS_FOR_FROM, SPF_SOFTFAIL,UNPARSEABLE_RELAY autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 9C289BC69 for ; Wed, 26 Sep 2007 05:09:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKJq+UbAXQImk2dsb2JhbACOLAEBAQEHBAYHIGk X-IronPort-AV: E=Sophos;i="4.20,298,1186351200"; d="scan'208";a="16787783" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 26 Sep 2007 05:09:09 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8Q38rtK007804 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 26 Sep 2007 05:09:09 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABJq+UaTIFAHh2dsb2JhbACOLAEBAQgKJ2k X-IronPort-AV: E=Sophos;i="4.20,298,1186351200"; d="scan'208";a="1788419" Received: from relay.felk.cvut.cz ([147.32.80.7]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Sep 2007 05:08:52 +0200 Received: from k333.felk.cvut.cz (k333.felk.cvut.cz [147.32.87.5]) by relay.felk.cvut.cz (8.14.1/8.14.1) with ESMTP id l8Q38Kjc058671; Wed, 26 Sep 2007 05:08:20 +0200 (CEST) (envelope-from kybic@fel.cvut.cz) Received: from K333/SpoolDir by k333.felk.cvut.cz (Mercury 1.48); 26 Sep 07 05:08:20 +0100 Received: from SpoolDir by K333 (Mercury 1.48); 26 Sep 07 05:08:07 +0100 Received: from d620-jk (147.32.84.19) by k333.felk.cvut.cz (Mercury 1.48) with ESMTP; 26 Sep 07 05:08:06 +0100 To: Alex Mikhalev Cc: caml-list Subject: Re: Ocaml for Scientific computing Reply-To: Jan Kybic From: Jan Kybic In-Reply-To: <1190718078.5901.18.camel@mikhaa> (Alex Mikhalev's message of "Tue, 25 Sep 2007 12:01:18 +0100") References: <1190718078.5901.18.camel@mikhaa> Date: Wed, 26 Sep 2007 05:06:59 +0200 Message-ID: <87y7euunu4.fsf@fel.cvut.cz> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-FELK-MailScanner-Information: X-FELK-MailScanner: Found to be clean X-FELK-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.599, required 5, autolearn=not spam, BAYES_00 -2.60) X-FELK-MailScanner-From: kybic@fel.cvut.cz X-Miltered: at discorde with ID 46F9CD45.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 lacaml:01 gsl:01 vectors:01 matrices:01 arrays:01 arrays:01 lacaml:01 gsl:01 vectors:01 matrices:01 toplevel:01 gdb:01 byte:01 > 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 tel. +420 2 2435 5721 http://cmp.felk.cvut.cz/~kybic ICQ 200569450