Hacker News new | past | comments | ask | show | jobs | submit login

That depends on the kind of scientific computing you want to do.

Haskell has the repa library [1] which is very nice for working with (multi-dimensional) arrays at a high level. Performance is decent (I don't know if they have a BLAS/LAPACK binding). Overall, the main advantage of Haskell is its runtime system and its great support for concurrency. The downside is, it does not have OpenMP and the MPI bindings don't look very nice to use (I don't know how OCaml or SML fare in this area). There are OpenCL bindings, but I've never used them. Data parallel Haskell is still under heavy development, so that's probably going to take a few years to become production-ready.

OCaml's advantage is that C-like algorithms are easier to transcribe and use (no monads). OCaml's main disadvantage is that its runtime doesn't support multicore well (or even at all?). If you want that you can use F#, though.

I don't know anything about the current state of SML implementations.

[1]: http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Repa_T...




Answering a sub question of yours: Indeed the only way to use more than one core in OCaML is to use multiprocessing. If there is a lot of data that needs to be exchanged, it may not be very fast.

That said there is this patched up version (funded by a one off summer of code by Jane street, I think)

http://www.algo-prog.info/ocmc/

that gives an API for using threads. I am fairly new to OCaML so will not be able to provide details. Another language that I am looking at is Felix

http://felix-lang.org:8080/ (Note the port, its not the one that the search engines will give you).

I am ok with OCaML not giving its users a threading API but a runtime that executes many of its higher-order functions in parallel would be really nice. Well, higher-order functions and the other parallelism exposed by the functional semantics, with some helpful directives from the user of course.


There's been a lot of projects, of which the ocamlnet/netmulticore and Jane St async's are (I think, but not very confidently) the only current. Others are:

poly/ML, ocamlP3, OC4MC, functory, JoCaml

coThreads, LWT

http://www.reddit.com/r/programming/comments/q9cro/real_worl...

http://stackoverflow.com/questions/6588500/what-is-the-state...


There's also hmatrix for a pretty nice Haskell API over blas. The one current caveat is that because certain vector code currently uses GSL under the covers, the core hmatrix lib has to be GPL in turn (as GSL is GPL). That said, there's some work underway (by me and some others) to replace the offending pieces of code with some under bsd or other permissive license so that core hmatrix can be rereleased as a bsd licensed lib and thus see broader use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: