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=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4141FBC69 for ; Thu, 8 Mar 2007 15:24:46 +0100 (CET) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l28EOjK6032314 for ; Thu, 8 Mar 2007 15:24:46 +0100 Received: from poincare.swapping.umh.ac.be ([10.102.100.10]) by hedwig1.umh.ac.be (8.13.6/8.13.6) with ESMTP id l28ER1JU2580656; Thu, 8 Mar 2007 15:27:05 +0100 Received: from localhost ([127.0.0.1] ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.63) (envelope-from ) id 1HPJXs-00007C-18; Thu, 08 Mar 2007 15:24:40 +0100 Date: Thu, 08 Mar 2007 15:24:39 +0100 (CET) Message-Id: <20070308.152439.98695201.Christophe.Troestler+ocaml@umh.ac.be> To: caml-list@inria.fr Subject: Re: [Caml-list] Interactive technical computing From: Christophe TROESTLER In-Reply-To: <200703080113.22721.jon@ffconsultancy.com> <1173356534.8655.6.camel@localhost.localdomain> References: <200703080113.22721.jon@ffconsultancy.com> <1173356534.8655.6.camel@localhost.localdomain> X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j Organization: University of Mons-Hainaut X-Mailer: Mew version 5.1.52 on Emacs 22.0.95 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at discorde with ID 45F01CAD.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 umh:01 gnuplot:01 umh:01 gnuplot:01 ocaml:01 gerd:01 stolpmann:01 overloading:01 vectors:01 matrices:01 Hi, I certainly am interested in such a project (even to contribute though my time is limited). > On Thu, 8 Mar 2007, Jon Harrop wrote: > > > > I think F# has a great future because of its ability to spawn > > visualizations from a running interactive session. [...] I have written a Gnuplot module that allows that. Here is the compulsory screenshot :) ftp://ftp.umh.ac.be/pub/ftp_san/Ocaml-gnuplot.png Code : # load "gnuplot.cma";; # module G = Gnuplot.Array;; # let g = G.init G.X;; # G.box g;; # G.pen g 1;; # G.fx g sin (-1.) 20.;; It definitely needs some further work but I do not have much time for that now. Also, I need to be able to plot data defined on triangular meshes (and non square domains) and Gnuplot does not allow that so I am looking for a solution viable for a longer term. Maybe a wrapper for VTK (http://www.vtk.org/) could be a good start -- and trivially solves the portability issues. > > Obviously I'm interested in this from a commercial > > perspective. That looks easy for F# but not so easy for OCaml. > > [...] On Thu, 08 Mar 2007, Gerd Stolpmann wrote: > > - Make the product open-source (this is a door-opener!) Unless it is open source, I would not use such a product. Having it open source is the only waranty for long term security. I would not develop codes that cannot run 5 years later because, say, you unfortunately went to bankruptcy... or you became crazy and ask 10 times more money... or... > > Finally, I'd like to note that operator overloading is probably > > the single biggest difference between my F# and OCaml code. The > > ability to apply + and - to many types, particularly vectors and > > matrices, makes this kind of work so much easier. That would not completely remove the problem of adding some operators but I was thinking of a possibly generic solution using Camlp4: writing [X.(a + b)] where [X] is a module would become [X.add a b]. Now for matrices, one still needs + (for matrix addition), * (for matrix multiplication) and, say, .* (for scalar product). So to be generic, one needs to be able to specify a set of operators (with precedences) and a way to transform an AST of that mini language into Caml code (that would possibly allow some optimisations, analysing the expression at compile time to reduce de number of intermediate matrices allocated). A slicing notation also needs to be developed, say [a.{1, 2:3:7}], as well as a good ASCII pretty printer for matrices (they must be bigarrays to be able to use interesting libraries). Cheers, ChriS