News for hackers. Stuff that matters.
Re:What I Wish I Knew When Learning Haskell 2.0 by jonnybgood on Wednesday April 23, 2014 @08:38PM (#7637885)
Haskell's a good language, but I would add to this list the use cases as to where Haskell is the right tool for the job. I think this would help a lot beginners get a better grasp of Haskell.

For example, I wouldn't tell someone to write a web server backend in Haskell if it's going to be in production. Sure, you can do it, but there are more adequate tools for the job. On the other hand, if you were looking to create a DSL or write a parser, Haskell would be great. This is how Galois and Facebook are taking advantage of Haskell.

Re:What I Wish I Knew When Learning Haskell 2.0 by gregwebs on Wednesday April 23, 2014 @09:29PM (#7638030)
There is greater leverage with Haskell in tackling hard problems or problems where there are existing quality libraries that can be leveraged (such as parsing). Haskell is probably not a good choice in comparison to C/Go/Java if having the best possible CPU performance is a requirement. I am not sure what you mean by a server backend, but that could potentially describe most Haskell code written in the modern networked world.

I think the idea though that one language is objectively better at a certain task gets strongly warped by subjective factors. Ultimately language decision is more about the team of programmers you have, the available libraries and ecosystems, and the team's understanding of it.

Perhaps not surprisingly, we have found that for programmers already experienced in Haskell, Haskell is a great language for most problems.

Re:What I Wish I Knew When Learning Haskell 2.0 by jonnybgood on Wednesday April 23, 2014 @09:32PM (#7638040)
Yes, I should of been more specific. I meant web server backend. Changed.

I agree. Modern languages are converging on ideas more than ever so it starts to become subjective. However, there exists a subtlety in feature focus. Compare concurrency and distributed programming in Erlang and Haskell, for example. If you're proficient in both and your domain demands high concurrency, why would you choose the lesser of the two which is Haskell?

Re:What I Wish I Knew When Learning Haskell 2.0 by codygman on Wednesday April 23, 2014 @09:48PM (#7638089)
Why wouldn't you write a web server backend in Haskell? What is more adequate than Haskell for web server backends and why?

You give no support to the claim that "There are more adequate tools than Haskell for writing web server backends".

Re:What I Wish I Knew When Learning Haskell 2.0 by freyrs3 on Wednesday April 23, 2014 @09:51PM (#7638096)
I'm surprised by this statement as well, considering the rather remarkable performance that Warp server[1] has been able to achieve. Writing highly concurrent servers is arguably one of Haskell's biggest strength.

1: http://aosabook.org/en/posa/warp.html

Re:What I Wish I Knew When Learning Haskell 2.0 by platz on Thursday April 24, 2014 @12:06AM (#7638456)
Warp seems plenty fast, but still didn't seem to do as well as I'd hoped, in this particular example, I wonder if they're doing it wrong.

http://www.techempower.com/benchmarks/

https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

Re:What I Wish I Knew When Learning Haskell 2.0 by codygman on Thursday April 24, 2014 @02:32AM (#7638787)
Warp didn't do as well I had hoped either. Keep an eye on the next tech empower web benchmark though because ghc 7.8 and mio made a lot of stuff faster.
Re:What I Wish I Knew When Learning Haskell 2.0 by jonnybgood on Wednesday April 23, 2014 @10:08PM (#7638143)
The JVM, for one. The JVM far exceeds Haskell in this regard. Superior libraries and equal if not better performance. I didn't say you couldn't, but for production purposes if I had to choose.
Re:What I Wish I Knew When Learning Haskell 2.0 by codygman on Thursday April 24, 2014 @02:34AM (#7638790)
Define superior. Making such bold claims without any proof/examples is very poor form.
Re:What I Wish I Knew When Learning Haskell 2.0 by danieldk on Thursday April 24, 2014 @03:55AM (#7638944)
Superior is indeed difficult to define. I think most Haskell libraries define far more elegant abstractions than their Java counterparts.

However, as a user of both Haskell and the JVM, there are some things to be said for the Java library ecosystem. For instance, the most widely-used Java libraries are often more mature, maintained better (usually because its authors are paid to do so), and more API-stable (for most of my Haskell code, a dependency version bump usually implies updating my own code). Of course, this is all reasonable, since the Haskell ecosystem exploded far more recently than Java's. The older Haskell pages (bytestring, text, vector) tend to be very stable and predictable.

Another aspect where the JVM is currently ahead is VM monitoring. E.g. if there is a bottleneck, I can easily attach Visual VM or even my IDE to a running Tomcat and peek around. The JVM can do code hotswap (even more effectively with JRebel and LiveRebel).

Note: I posted this to provide some balance to the discussion. I believe Haskell is superior in many other respects, such as the type system, REPL-driven development, web frameworks with type-safe URLSs, etc.

Re:What I Wish I Knew When Learning Haskell 2.0 by rtpg on Thursday April 24, 2014 @03:56AM (#7638948)
JVM might have superior libraries (though I think that is debatable) but Haskell's performance is pretty top notch. If any compiler is approaching the sufficiently smart compiler, it's the GHC
Re:What I Wish I Knew When Learning Haskell 2.0 by coolsunglasses on Wednesday April 23, 2014 @08:44PM (#7637904)
Haskell happens to be excellent for writing programs.
Re:What I Wish I Knew When Learning Haskell 2.0 by jonnybgood on Wednesday April 23, 2014 @08:53PM (#7637929)
So is C++ and every other modern language. Every language has its positives and negatives depending on the implementation. Haskell is no different. This is why having some impartiality to languages is important. You use the right tool for the job.
Re:What I Wish I Knew When Learning Haskell 2.0 by laichzeit0 on Thursday April 24, 2014 @02:57AM (#7638839)
I would like to think so too, yet if you suggest e.g. using Perl or PHP on HN you'll have the typical backlash of "But why not Ruby or Python or etc. it's so much newer and better"

This has been my personal observation since following HN for the past few years.

Re:What I Wish I Knew When Learning Haskell 2.0 by jfischoff on Thursday April 24, 2014 @04:26AM (#7638991)
And what is right job for whitespace?
Re:What I Wish I Knew When Learning Haskell 2.0 by copergi on Thursday April 24, 2014 @02:06PM (#7641835)
>For example, I wouldn't tell someone to write a web server backend in Haskell if it's going to be in production.

You probably shouldn't be giving advice then.

>This is how Galois and Facebook are taking advantage of Haskell

Facebook is using haskell for a high performance, high concurrency server for filtering. You do realize how similar that is to a web server right?