News for hackers. Stuff that matters.
Re:Becoming Productive in Haskell by QuantumRoar on Friday April 24, 2015 @11:42AM (#9434080)
If you have an array that fills a significant fraction of your memory (say, tens of Gigabytes), you don't have another choice but to use mutation (Haskell doesn't support that).

While quite fast, it is not in the league of low level programming languages. If you need ridiculous speeds, you don't have another choice but to use C, C++ or Fortran.

Python has a lot of very useful modules. If I can solve my problem with basically a few import statements and don't care about performance or anything, I find Python to be better suited.

Erlang's light-weight threads are a boon. Having a webserver written in Erlang and using Erlang as a server-side language, you can support a lot of sessions at once.

Re:Becoming Productive in Haskell by carterschonwald on Friday April 24, 2015 @01:58PM (#9434959)
i write incredibly mutation heavy code in haskell on a nearly daily basis. I've even added compiler support for doing hardware prefetch to the most recent version of ghc https://downloads.haskell.org/~ghc/7.10.1/docs/html/librarie...

there are many lovely mutable data structuers in haskell http://hackage.haskell.org/package/vector-0.5/docs/Data-Vect... is one for unboxed C-struct style arrays,

http://hackage.haskell.org/package/hashtables is a super mature stable mutable hashtable library, that is used, among other places, in agda!

..... please fact check your feelings in the future :)

Re:Becoming Productive in Haskell by QuantumRoar on Friday April 24, 2015 @04:08PM (#9435738)
Sorry. I seriously didn't know. I only ever used the immutable parts of Haskell. Thanks for the correction.
Re:Becoming Productive in Haskell by dllthomas on Friday April 24, 2015 @12:13PM (#9434271)
Haskell does support mutable arrays. Your code that does the mutating will have to live in IO (or perhaps ST), but the downsides of that are exaggerated.
Re:Becoming Productive in Haskell by QuantumRoar on Friday April 24, 2015 @01:11PM (#9434640)
Oh. I didn't know that. Thanks for pointing that out.
Re:Becoming Productive in Haskell by dllthomas on Sunday April 26, 2015 @02:10PM (#9442669)
Haskell strikes many as "bad for mutation" because introductory tutorials don't really cover it. This is because 1) mutation is not terribly idiomatic, 2) relying on mutation often (not always) a bad design decision, 3) Haskell handles the immutable case really well, and 4) mutation involves some more complexity than is involved in other languages. All of these are good reasons to avoid talking about mutation in a beginner Haskell tutorial, but when you need to address a problem where mutation is the best fit you'll find that it actually works pretty well. Haskell doesn't make mutation difficult, it makes it explicit, which has upsides and downsides.
Re:Becoming Productive in Haskell by wz1000 on Friday April 24, 2015 @01:24PM (#9434725)
> If you have an array that fills a significant fraction of your memory (say, tens of Gigabytes), you don't have another choice but to use mutation (Haskell doesn't support that).

Haskell does support mutation, it just requires it to be controlled. Take a look at Data.Array.ST and Data.Array.IO

> Erlang's light-weight threads are a boon. Having a webserver written in Erlang and using Erlang as a server-side language, you can support a lot of sessions at once.

GHC provides a very similar thing in the form of "green threads".

Re:Becoming Productive in Haskell by dragonwriter on Friday April 24, 2015 @01:54PM (#9434931)
> If you have an array that fills a significant fraction of your memory (say, tens of Gigabytes), you don't have another choice but to use mutation (Haskell doesn't support that).

Haskell supports mutation, although many short tutorials don't address it and even many longer tutorials don't do much with it.

Re:Becoming Productive in Haskell by Tyr42 on Friday April 24, 2015 @12:23PM (#9434331)
I mean, there are Data.Vector.Mutable, though I haven't needed to use them yet.