caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe TROESTLER <Christophe.Troestler+ocaml@umh.ac.be>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Interactive technical computing
Date: Thu, 08 Mar 2007 15:24:39 +0100 (CET)	[thread overview]
Message-ID: <20070308.152439.98695201.Christophe.Troestler+ocaml@umh.ac.be> (raw)
In-Reply-To: <200703080113.22721.jon@ffconsultancy.com> <1173356534.8655.6.camel@localhost.localdomain>

Hi,

I certainly am interested in such a project (even to contribute though
my time is limited).

> On Thu, 8 Mar 2007, Jon Harrop <jon@ffconsultancy.com> 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 <info@gerd-stolpmann.de> 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


  reply	other threads:[~2007-03-08 14:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08  1:13 Jon Harrop
2007-03-08  1:49 ` [Caml-list] " Jim Miller
2007-03-08  2:52   ` skaller
2007-03-08  3:00     ` Jim Miller
2007-03-08  3:10       ` skaller
     [not found]         ` <beed19130703071919g1f537f59o93ce06871fba8f3a@mail.gmail.com>
2007-03-08  3:27           ` skaller
2007-03-08  3:36             ` Jim Miller
2007-03-08 21:16               ` Richard Jones
     [not found]                 ` <45F10E90.5000707@laposte.net>
2007-03-09  7:43                   ` Matthieu Dubuget
2007-03-10 14:58                     ` Richard Jones
2007-03-08 12:22             ` Gerd Stolpmann
2007-03-08 14:24               ` Christophe TROESTLER [this message]
2007-03-08 19:34                 ` Jon Harrop
2007-03-08 20:34                   ` Christophe TROESTLER
2007-03-09 10:22                     ` Jon Harrop
2007-03-09 10:45                       ` Christophe TROESTLER
2007-03-08  2:12 ` Erik de Castro Lopo
2007-03-08 12:41   ` [Caml-list] F# Jon Harrop
2007-03-08 11:12 ` [Caml-list] Interactive technical computing Andrej Bauer
2007-03-08 11:59 ` Vu Ngoc San
2007-03-08 12:43   ` Jon Harrop
2007-03-08 21:28     ` Vu Ngoc San
2007-03-09  0:14       ` skaller
2007-03-08 21:26 Robert Fischer
2007-03-09  0:04 ` skaller
2007-03-09 10:06   ` Jon Harrop
2007-03-09 10:25 ` Jon Harrop
2007-03-10 14:55 ` Richard Jones
2007-03-10 22:07   ` Michael Vanier
2007-03-29  0:33     ` Jon Harrop
2007-03-29  8:41       ` Joel Reymont
2007-03-30 11:31         ` Jon Harrop
2007-03-09 13:33 Robert Fischer
2007-03-09 13:49 ` Jon Harrop
2007-03-09 13:54 ` skaller
2007-03-09 14:13 Robert Fischer
2007-03-09 15:21 ` skaller
2007-03-09 17:26 ` Jon Harrop
2007-03-09 18:50 ` Jon Harrop
2007-03-09 14:21 Robert Fischer
2007-03-09 15:35 Robert Fischer
2007-03-09 17:41 Robert Fischer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070308.152439.98695201.Christophe.Troestler+ocaml@umh.ac.be \
    --to=christophe.troestler+ocaml@umh.ac.be \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).