[racket] Racket in computational science?

From: Neil Toronto (neil.toronto at gmail.com)
Date: Fri Aug 16 15:14:25 EDT 2013

On 08/16/2013 08:22 AM, Konrad Hinsen wrote:
> Matthias Felleisen writes:
>   > Did you look at the Science collection on Planet? It's used in a
>   > commercial product but the producers decided it was worth opening
>   > the library to the public. -- Matthias
> That one looks quite impressive as well, but it doesn't use
> racket/math.  In fact, it duplicates much of the functionality, so I
> suspect it's an older development from pre-Typed-Racket days.

It has a few things the math library doesn't, particularly ODE solvers. 
I would have cribbed the heck out of it for the math library, but a lot 
of it is based on the Gnu Scientific Library (GSL). The GSL is great, 
but it's distributed under the GPL, which is incompatible with Racket's 
libraries, which are LGPL.

Anyway, the math library came about because I was sitting on a pile of 
code I thought I should share. When I announced it, people asked for 
arrays, so I added them, and Jens Axel volunteered number theory and 
linear algebra functions.

You may not be seeing much code that uses the math library because it's 
still young. Also, using arrays from untyped Racket code is (currently) 
a bad idea if you care about performance. Everything else should be 
fast, typed or otherwise - in particular, the floating-point and big 
integer functions should be As Fast As C. The number theory and matrix 
stuff is very solid, and I've spent a lot of time ensuring the special 
functions and distributions are accurate. In fact, I think our Gamma PDF 
is the most accurate 64-bit implementation out there.

I would love to see more computational science libraries in Racket. Are 
you planning to write one? :)

Neil ⊥

Posted on the users mailing list.