From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Cc: Basile.Starynkevitch@cea.fr
Subject: Re: Q: Caml for number crunching and/or scripting?
Date: Sat, 13 Sep 1997 18:30:10 +0100 [thread overview]
Message-ID: <6033.199709131730@venus> (raw)
Basile Starynkevitch writes:
> Hello All,
>
> Are there anyone using CAML or Ocaml
>
> for numerical/physical/scientific applications (maybe number crunching)
>
> as an embeddable scripting langage
>
> (both are possible: using CAML as a scripting langage driving low
> level -eg Fortran- numerical routines)
Yes, I use it for both actually.
I've used camlp4 (much recommended btw) to extend the syntax of ocaml
so that I can write matrix/tensor calculations using the summation
convention:
tens v[I J] += w[I K J L] b[K L] + k a[I J]
and have a very efficient loop to do the work inserted automatically,
in C or in ML.
I keep the matrices in Fortran layout so that I can use Lapack
routines on them. Using ocamlopt's -output-obj option you can even
squeeze in a call initialise the f2c libraries at startup time.
I've also taken to using ocaml for scripting jobs that are more
complicated than Perl can comfortably handle. It's interesting that
ML's background as a very abstract language gives it some of the
conciseness and convenience of Perl, but without the flakiness.
On the other hand I'd rather have Perl's than emacs's regexps ...
next reply other threads:[~1997-09-15 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-13 17:30 William Chesters [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-09-11 10:58 Basile STARYNKEVITCH
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=6033.199709131730@venus \
--to=williamc@dai.ed.ac.uk \
--cc=Basile.Starynkevitch@cea.fr \
--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