[Haskell-cafe] Comment on "The Historical Futurism of Haskell" by Andrew Boardman

Dominic Steinitz dominic at steinitz.org
Mon Sep 13 12:23:58 UTC 2021

> On 12 Sep 2021, at 13:00, haskell-cafe-request at haskell.org wrote:
> In particular, I am a mathematician/statistician working in evolutionary
> biology. I work with multivariate distributions (hardly any of those are readily
> available on Hackage), I work with a lot of random numbers (the support for
> random sampling is mediocre, at best; 'splitmix' is standard by now but not
> supported by the most important statistics library of Haskell), I work with
> numerical optimization (I envy Pythonians for their libraries, although I still
> prefer Haskell because what I achieve, at least I get right), I work with Markov
> chains (yes, I had to write my own MCMC library in order to run proper Markov
> chains), I need to plot my data (there is no superb standard plotting library
> available in Haskell). By now, I do maintain library packages providing answers
> to some of these problems, but it was (and is) a lot of work.

I have to take issue with your statement about random sampling. I think we have a really good story with random numbers now. They are of high quality and fast. R and possibly Python and Julia by comparison still use Mersenne Twister, of lower quality, slower and without a good story for generating independent sequences for parallel computations. I maintain random-fu (sampling from distributions) and using the new random number generator it is now several times (x4?) faster than it was. Conceivably it could be made even faster.

Please give details on where you think we can improve and better still contribute your own improvements :-)

In terms of MCMC, I think Jared Tobin wrote some libraries but I don’t think they are maintained. I maintain an SMC library but I don’t know how much use it gets. Tom Nielsen, Henrik Nilsson and I wrote Haskell “bindings” for Stan: https://nottingham-repository.worktribe.com/output/1151875/getting-more-out-of-stan-some-ideas-from-the-haskell-bindings. It would be a lot of work to e.g. re-create Stan in Haskell natively.

I agree about plotting but inline-r makes it possible to use ggplot in R via Haskell which makes things like drawing maps with reasonable projections relatively straightforward. 

More generally, I think we have a good set of bindings for the ODE solver library SUNDIALS and also for other numeric libraries (e.g. LAPACK and BLAS). The problem we have is not enough hands working on such things.

I now sadly return to programming in Julia.

PS - there is probably more I could say on numerical stuff in Haskell but the above already looks like “stream of consciousness”.

Dominic Steinitz
dominic at steinitz.org
Twitter: @idontgetoutmuch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210913/42158360/attachment.html>

More information about the Haskell-Cafe mailing list