
Intro to Haskell for Erlangers - waffle_ss
http://bob.ippoli.to/haskell-for-erlangers-2014/
======
jerf
This is how I came to Haskell. If you're a polyglot sort and you eventually
want to get to Haskell, but Erlang also looks interesting, it's not a bad
path. Erlang can get you over the basics of working with immutable data
structures (in particular it can get you past "But how can I write a program
without mutable values?!?"), has enough interesting stuff to learn on its own
about reliable programming to justify learning it on its own merits, and then
when you go to Haskell, you won't be trying to swallow quite as much in one
go. You can focus on what Haskell actually has to say, instead of being stuck
on the basics. The downside is after that, Erlang's deficiencies as a
functional language will be pretty obvious and quite frustrating. (I'm not
kidding that it's worth learning, probably much moreso than the next
C(#/++/)-etc variant, but there's a certain klunkiness to Erlang that gets old
after a while.)

~~~
mercurial
On the other hand, I find myself unable to plateau in Haskell, it seems that
there is always new abstractions behind the corner. Want to thread exceptions
through your monad transformers? Learn MonadState. Want accessors which do not
suck? Learn Lens. And then you have free monads, comonads, Operational,
Kleisli arrows, Pipes/Conduits/IO Streams/Iteratees...

It may be an issue with the language: make a powerful language, and many
things which ought to be part of the core system are going to be in a library.
And as Haskell's syntax unfortunately allows library designers to go wild with
ASCII symbols, you can easily end up with really hard-to-grok code (especially
with the right amount of point-free style). Bonus if you use one-character
variables. Unfortunately, in the real world code is read more than it is
written, and the prevalent cleverness doesn't really help with that.

~~~
lostcolony
I'm working to learn Haskell, and that's actually part of the appeal.

I don't expect to ever write Haskell in production. Oh, sure, some places do,
but they're very, very few; I suspect it's pretty much impossible in any area
where you expect to grow, simply because finding people who know it already is
nearly impossible, and learning it is difficult, especially as your
established crew learns new and more powerful abstractions; the amount of
learning required to get someone up to speed gets higher and higher, which is
not what you want as you expand.

But that said, as a developer even in more approachable languages, learning
that cleverness has its benefits. It provides new insights into ways problems
can be expressed. Most developers agree on the benefits of learning a new
language; you learn a few good ideas, a few paradigms and approaches, that can
carry over and affect the way you code in your day to day. Haskell, with its
depth, is better still; you have a seemingly neverending set of ideas to learn
and draw from. Many, yes, are too clever to see a full implementation
elsewhere in production code that has many maintainers. But borrowing even
part of an idea expressed in Haskell may lead to a simple, reusable, and
concise solution to a problem that otherwise would be an ugly bug riddled one
off solution.

~~~
copergi
Your assumptions are not very accurate at all. The job I just left we had
moved to haskell precisely for growth. We had no problems hiring haskellers,
or having our existing PHP devs learn haskell. The new job I took is getting
tons of applications from experienced haskellers. There's tons of people who
know haskell and don't get to use it at work. They are generally quite eager
to fix that problem.

~~~
MetaCosm
_cough_ _bullshit_ _cough_

I meant it in good humor, but over the last 15 years, I have had the joy (and
pain) of getting to ship production systems in a lot of less popular stacks
including: Erlang (multiple), Eiffel, Haskell, and OCaml.

Hiring and training for these less popular stacks has been a goddamn nightmare
in "win" conditions. You have the benefit of the better signal to noise ratio
in resumes, absolutely. But, you pay for that in rarity, salary and job
demands, which is fine as long as you go in eyes wide open and plan to have a
small team (under 10).

Rapid team growth (from money injection, or simply success and need) is
really, really hard when you don't have a large pool of qualified candidates
to pull from... and training, I honestly can't fathom trying to train PHP
developers in Haskell. If you company has done this successfully, please setup
a newsletter, I would subscribe.

~~~
copergi
>But, you pay for that in rarity, salary and job demands

Quite the opposite. As I said, there are a lot of people who know haskell but
don't get to use it in their job. There's tons of people applying for haskell
jobs at $50-60k/year. Being able to use haskell is a big enough draw in and of
itself.

>If you company has done this successfully, please setup a newsletter, I would
subscribe.

There would be nothing to go in it. Haskell is not particularly difficult to
learn. People can get up and running doing web development very quickly,
without any significant changes to how they normally do things since you don't
do much destructive updating in most web apps anyways.

------
mulligan
I attended this talk and it was very well done. Most intro to $LANGUAGE talks
try to share a few very simple examples of the language. Something most people
could read about and absorb on their own in 10-15 minutes. Bob's slides and
presentation went for breadth, acknowledging that this was not a tutorial but
a way to present listeners with a great sense of what the language does, how
it contrasts with Erlang, and [what I found the most useful] a good
explanation of how to approach some of the more difficult to explain concepts.
Now when I sit down to actually learn Haskell, I have a useful mental model on
a bunch of the not so obvious concepts.

I think video of the talk that goes with these slides will eventually be
uploaded at:
[http://www.youtube.com/user/ErlangSolutions](http://www.youtube.com/user/ErlangSolutions)

Some of the presentations from just a couple days ago are already up, so I
hope to see the rest soon.

~~~
pohl
I love how dense but clear slide 125 is. I look forward to the upload.

~~~
jaytaylor
Getting to slide 125 can be a challenge (no TOC, each next slide takes a
history slot in Chrome).

[http://bob.ippoli.to/haskell-for-
erlangers-2014/#/abstractio...](http://bob.ippoli.to/haskell-for-
erlangers-2014/#/abstractions)

------
louthy
> Cabal; easily fetch more packages from Hackage

Having spent the past two days trying to recover from Cabal Install's
dependency hell (still ongoing), I must disagree on this. OSX seems to be
particularly shonky (on mavericks), Windows has been relatively plain sailing.

[http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-
after-...](http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-me-
cabal-is-not-a-package-manager/)

Don't let that put you off though, Haskell really is a beautiful language, I
quite often find myself just sitting back and looking at the code thinking
"Damn that looks good".

~~~
louthy
Heh, 1 min after posting this I fixed my dependency hell! Finally. Clearly I
just needed a bit of HN distraction :)

~~~
lelf
You should sort out how to use cabal sandboxing

[http://www.haskell.org/cabal/users-guide/installing-
packages...](http://www.haskell.org/cabal/users-guide/installing-
packages.html#developing-with-sandboxes)

------
DiabloD3
As someone that knows Erlang but doesn't Haskell and wants to learn, this
might come in handy.

------
rdtsc
To piggy back on this topic -- this is happening at Erlang Factory (Erlang's
main "conference").

Here is a list of uploaded videos from it. There are some very exciting talks,
including a talk from Whatsapp about their architecture.

[https://www.youtube.com/user/ErlangSolutions/videos?view=0&s...](https://www.youtube.com/user/ErlangSolutions/videos?view=0&shelf_id=1&sort=dd)

------
glesica
Having seen this talk, I highly recommend it, even if you don't know Erlang
(just skip the Erlang slides). It's a great overview of Haskell for anyone
looking to quickly become productive(-ish) with the language!

------
spullara
This seems like a vanishingly small set of people. You're introducing the
49th[1] most popular language to people that program in a 50+ language. If you
are trying to get more converts to Haskell, I would go after a larger set of
programmers. If it is just for fun, cool.

[1]
[http://www.tiobe.com/index.php/content/paperinfo/tpci/index....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html)

~~~
chongli
Functional language cannibalism at its finest!

Seriously, it seems like the more people agree on something the more they
bikeshed over it.

~~~
chc
Haskell and Erlang are different enough in large and significant ways that I
don't feel like they really qualify for the "color of the bikeshed"
comparison. They both fit into the "functional languages" paradigm, but then,
Objective-C and Fortran both fit into the "imperative languages" paradigm.

~~~
troutwine
Being very proficient in Erlang and able to bumble about pretty effectively in
Haskell, I can confidently say that while the two languages require
complementary skills they target two different problem domains: Erlang's a
heavy-lift rocket, Haskell's a sub-orbital rocket-plane.

Well worth being at least familiar with both.

------
lostcolony
Can't wait for the talk to be made available. I missed out on Erlang Factory
this year, but this is one talk I am definitely looking forward to seeing
uploaded.

------
lclarkmichalek
Anyone know of anything similar going the other way around?

------
subleq
In what way is Haskell's pattern matching not as clever as Erlang's?

~~~
lostcolony
It shows later in the slideshow, no? Slides 40-41.

~~~
subleq
I see, it's just the non-linear patterns? Looks like they were considered for
Haskell and there are some good arguments against them: [http://www.mail-
archive.com/haskell@haskell.org/msg03721.htm...](http://www.mail-
archive.com/haskell@haskell.org/msg03721.html).

~~~
lostcolony
I don't know if it's only; didn't see the talk. I can see why to exclude it,
but Erlang has everything in place to make its inclusion a very obvious ones.
All data types are comparable, for ill or for good (I've been both helped and
hurt by it), and allowing non-linear patterns makes for some very clean
pattern matching code for many recursive functions.

------
judk
Nice, a slide show using a bleeding edge layout/display framework that doesn't
work on mobile. Way to spread your ideas.

~~~
thu
It seems those are slides for a live presentation, so I guess you might also
complain about the lack of sound or about how pointless it is to post slides
on the internet. Or you might make a constructive comment. Or no comment at
all.

Still I was curious to find out what "doen't work" means in the context of
your comment. I tried on my Nexus 4 and everything was nice. So maybe you
should complain about how a slack the original author is to not try his
intended-for-a-live-presentation slides on all possible devices a careful
reader like you could see them.

------
jokoon
what about C++ers ? :(

~~~
wging
A little googling has dug this up:
[http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Pr...](http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Programmers)

I'm sure that you also know C, since you know C++. Let me know how it goes.

