[Haskell-cafe] Haskell for Physicists

edgar at ymonad.com edgar at ymonad.com
Wed Sep 30 16:53:02 EDT 2009

On Wed, 30/Sep/2009 at 22:27 +0200, Max Rabkin wrote:
> I am *not* a physicist, but I imagine many physicists know at least
> something of functional analysis, algebra, Lie algebras, etc.
> However, when physicists write programs (this is my inference from the
> widespread use of Fortran and the computational assignments given to
> undergraduate students) they are almost exclusively numerical: very
> often evaluating some integrals or integrating a system of
> differential equations. Although Haskell can do these things, it's not
> a place where Haskell really shines (compared to symbolic
> computation).

Well, if you want to write all the code in Haskell, maybe this is true
(some parts an imperative code still is the most efficient, but nothing
that you can't do in C and use in Haskell via FFI). But in my case, Haskell 
really shined using as an interface to GSL/Lapack via the wonderful 
hmatrix lib.
> Since I'm not a physicist, I can't give a good example, but think more
> of the things Mathematica is good for, rather than Fortran or Matlab.
> My impression is that Haskell's advantage over Mathematica is in its
> generality: Mathematica is great if it has a builtin function to do
> what you want, but it's not a very pleasant programming language.

And speed is other advantage! The code that I wrote to solve a problem in 
bose condensation is dozen times fastest that the Mathematica equivalent, 
and much more clean and simple to expand or modify. 


> HTH,
> Max
> On Wed, Sep 30, 2009 at 9:39 PM, Khudyakov Alexey
> <alexey.skladnoy at gmail.com> wrote:
> > В сообщении от Среда 30 сентября 2009 23:29:32 Max Rabkin написал:
> >> On Wed, Sep 30, 2009 at 9:24 PM, Alberto G. Corona <agocorona at gmail.com>
> > wrote:
> >> > Haskell: mathematics beyond numerical calculus
> >>
> >> I'd imagine most physicists know a fair bit of mathematics beyond
> >> numerical calculus; what they might not know much about is
> >> *computation* beyond numerical calculus.
> >>
> > Could you elaborate this. As physicist I don't quite get it.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list