News for hackers. Stuff that matters.
Re:GHCJS - Haskell in the Browser by colanderman on Wednesday June 26, 2013 @04:06PM (#5948641)
fork threads, use MVars, perform STM

As someone who is very familiar with purely functional languages and with multiprocessor synchronization, I must ask, why would anyone want to use any of these things in Haskell? Aren't two of the primary benefits of Haskell the ability to auto-parallelize, and not needing to reason about state?

Re:GHCJS - Haskell in the Browser by Peaker on Wednesday June 26, 2013 @07:21PM (#5949765)
"Purely functional" is a misnomer. A better description is "typed effects". Haskell doesn't forego effects, it types them. You still have imperative destructive updates if you need them (e.g: to avoid a logarithmic complexity hit, or a constant performance hit). You still may want to write imperative programs, often-times as the backend of a pure functional interface.

Haskell is actually quite good at it, and jokingly referred to as "the world's finest imperative language".

Re:GHCJS - Haskell in the Browser by chongli on Wednesday June 26, 2013 @05:05PM (#5949050)
Haskell doesn't have auto-parallelism. There are some excellent libraries for parallelism (strategies, DPH, repa) but they take some work. True auto-parallelism (a la Parasail) is far more difficult to get right (often due to granularity of work units).
Re:GHCJS - Haskell in the Browser by colanderman on Wednesday June 26, 2013 @07:27PM (#5949788)
Mercury does a decent job of this (not quite auto-parallelism, you need to hint at parallelization points, but it manages granularity for you).