News for hackers. Stuff that matters.
Re:MSR funding a 2-year project to mature Parallel Haskell f... by runT1ME on Thursday April 29, 2010 @02:02PM (#1305368)
I wasn't aware Haskell had good multi-threaded support.

How is Haskell better at auto-parallelizing an algorithm compared to say, java's fork/join or .NET's equivalent?

Re:MSR funding a 2-year project to mature Parallel Haskell f... by lincolnq on Thursday April 29, 2010 @02:10PM (#1305397)
Haskell's tools mostly have the same sort of power as forkjoin (scheduling work to be done on separate threads; creating the right number of threads based on the hardware; providing an easy-to-use set of functions that call for work to be done in parallel).

The major difference is that the tools compose with the language better. Instead of having to keep "I'm working in a multicore environment" in your head all the time when you're writing your client code (as you would in Java, worrying about concurrent mutation and so on), Haskell enforces immutability throughout the language. Often you get the extremely convenient situation where you observe that something could be parallelized, change map to pmap and you're now using all your cores.

Re:MSR funding a 2-year project to mature Parallel Haskell f... by eru on Thursday April 29, 2010 @07:36PM (#1306529)
Yes. But immutability is not the whole job. You have to make sure to use the right data structures. Linear data structures like lists don't parallelize well. You need to use something that breaks into more equal parts instead of car and cdr.

Compare Guy Steele's talk "Get rid of Cons" at the International Conference on Functional Programming 2009. For the slides go to http://news.ycombinator.com/item?id=814632, the video should also be available online somewhere.

Re:MSR funding a 2-year project to mature Parallel Haskell f... by chc on Thursday April 29, 2010 @02:49PM (#1305534)
A large part of Haskell's strength in this regard comes because it is a pure functional language, so neither the programmer nor the parallelism library has to worry much about side effects. This both makes it easier to parallelize more code and it can make the parallelism more efficient in some cases (since Haskell isn't operating in an environment designed for mutability).
Re:MSR funding a 2-year project to mature Parallel Haskell f... by Psyonic on Thursday April 29, 2010 @02:45PM (#1305519)
Its mainly the language that makes the difference. By having such a strict type system, the language can know for sure that something is safe to parallelize.
Re:MSR funding a 2-year project to mature Parallel Haskell f... by eru on Thursday April 29, 2010 @07:40PM (#1306543)
You can get by with a much weaker (and/or dynamic) type system, and still get a language that's easier to parallelize. As long as you keep all mutation explicit.

Haskell does keep track of mutations in your program, because you have to wrap those in a monad. Since monads are part of the type system, you are right--but I felt that needed more explanation.