
Joe Armstrong and Simon Peyton Jones discuss Erlang and Haskell - davidw
http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell
======
roder
I love watching Joe Armstrong speak, he's so dynamic, fun, and energetic. This
was my first opportunity to see Jones. Listening to the two of them together
was great fun to hear their discussion.

The InfoQ interviewer was terrible though :P. He puts the breaks on a good
discussions multiple times. The interviewer doesn't ask very many good
questions from the context of Erlang or Haskell.

~~~
sadache
I am the interviewer, and I find it is kind of sad to have this aggresively
negative reactions after all the work done for having this result that seem to
be interesting for a lot of people. Maybe some questions do not interest you,
but I have a wide variety of audience that I need to satisfy. Can you please
precise what questions you felt irrelevant?

sadache@twitter

~~~
jollojou
I appreciate the interview you did. I found it enlightening, and watching and
listening the whole clip increased my knowledge and understanding on
programming in general, as well as on functional languages and the background
of Erlang and Haskell.

The second question ( _"Haskell and Erlang have 2 distinct models of
concurrency, right? Haskell is going to side-effect free, Erlang is about
messaging. Can you talk a bit about this in contrast to both models of
concurrency?"_ ) was especially interesting to me. I'm not experienced with
functional programming, and I'm interested in the unique characteristics of
Haskell and Erlang. This question directed Armstrong's and Jones' discussion
towards the differences in the languages, even though they did not clearly
answer to the question.

For the sake of feedback, the question starting with _"Yes. This is in sync
with how things happen, but sometimes it gets out of sync. It's the same thing
with when you are dealing with processors"_ (...) was a bit hard to grasp. The
mental models related each programming languages are interesting, but your
question directed the discussion away from the issue of mental models. Perhaps
asking "what do you see as the mental models of Haskell and Erlang" would have
done the job?

Anyway, thanks for the interview, it was beneficial to me, and I'm surely not
the only one.

~~~
sadache
@jollojou I agree my question was confusing, maybe due to the fact that we had
an offline discussion before about that so that I didn't communicate all the
information. Thank you for your feedback, and I am glad you appreciate the
interview.

------
semmons
Here's a link to a google doc I have created with the transcript.

[http://docs.google.com/Doc?docid=0ATkBKEXbo6n8ZGdrNzhoM2dfMz...](http://docs.google.com/Doc?docid=0ATkBKEXbo6n8ZGdrNzhoM2dfMzZobnRmZnZoaA&hl=en)

~~~
plinkplonk
"Here's a link to a google doc I have created"

Thank You! Anything that enables me to avoid InfoQ's design disaster of a web
site is greatly appreciated.

------
davidw
Great interview with two of the smartest guys in the business. If you're
interested in the history of these two languages, and what they're good at,
this is a fascinating read. I'd like to watch the video of it, but I don't
have time (to make it clear: I read it - click on 'expand all').

~~~
Periodic
I thought about just reading it, but after having it play for about 5 minutes
I realized I really wanted to watch them say it. They're both very dynamic and
you get a lot more of the nuance from their body language and inflection.

Also, the transcript has a few errors. They are generally fairly benign, but
it was a bit confusing to read "pool" for "pull" and a few of the quotes and
apostrophes weren't in the right places.

------
garethfleming
It's great to hear these two talk informally about their respective projects.
As well as hearing about the similarities and differences between Erlang and
Haskell, it's nice to get a little insight into how their creators think and
approach the same problems.

------
cousin_it
The site is so awful that I clicked "show all" and copy-pasted the entire
thing into a text file. It must've taken them special effort to make
transcript reading suck so badly.

~~~
alexpopescu
I'd love to make the transcripts more useable so please do let me know how
would you imagine a better solution. Initially we've thought that
synchronizing the transcript with the interview and allowing to jump to
specific questions is quite innovative, but I'd definitely love to hear more
ideas. And just to avoid 'spamming' HN, you can always drop me an email: alex
at infoq.

~~~
cousin_it
Hi Alex, great to see that you guys read HN. You're doing a good job with the
content. That said, here's some suggestions in an irreverent tone:

1) The transcript shouldn't be a scrollable window. Scrollable windows within
scrollable windows suck, especially when people use the mousewheel.

2) The transcript should take up a lot more than freaking 13% of the screen.
(Just measured that in Photoshop, browser maximized, 1280x1024) It's the main
content that most people come to see.

3) The "expand" buttons should not exist. Everything should be expanded,
always. Ever try to read a blog post by clicking to expand each paragraph?

Those are the big issues. Try to emulate the Google Docs reading experience
(see semmons's link higher up the thread). If you want little buttons next to
each paragraph that skip to that place in the video, fine. I don't object to
those.

------
gruseom
I agree that this is an interesting talk, with more common ground than I
expected. Here's a bit that struck me as a Lisp guy (this is Armstrong
talking):

 _In a module you can say there's a parse transform, and the parse transform
is given the parse tree of the program and it can turn it into another parse
tree before it's given to the compiler._

Sounds like a Lisp macro, doesn't it? Except he then has to go into detail
about how the parse trees are represented.

~~~
mononcqc
The end result is relatively similar. Erlang has an underlying representation
that uses something akin to prefix notation, albeit more verbose and a lot
uglier than what you'd get from lisp. Here's a blog post with an Erlang
Abstract Syntax Tree described in it:
[http://seancribbs.com/tech/2009/06/20/building-a-parser-
gene...](http://seancribbs.com/tech/2009/06/20/building-a-parser-generator-in-
erlang-part-4/)

In essence, this can get close to lisp macros; with parse-transforms, some
people have developed modules as objects, qlc (querying an mnesia database as
a list comprehension), cancelling out single assignment, etc.

The ways to do this are rather obscure and not too documented. I think that
it's a bit fortunate (arguably) because it makes it harder for people to build
illegible macro systems.

~~~
gruseom
I've written before that if you represented an AST as a data structure, wrote
a function to transform one instance of that structure into another, and ran
it at compile time, you'd have something close to Lisp macros. What's
interesting about this Erlang example is that people are actually doing it. My
suspicion is that it's more trouble than it's worth. The simplicity of the
sexp representation and the fact that it's the same representation as the
original language (no special notation for ASTs) are what make macros so
natural in Lisp. Take away those properties and things will get messy quickly.
But it might still be worth it for writing certain kinds of tools.

~~~
mononcqc
If you want to write lisp macros in Erlang, Robert Virding's Lisp Flavored
Erlang might be what you look for: it's a lisp syntax on top of the Erlang VM
(so it should be compatible with everything else) and it's supposed to support
more powerful macros (<http://github.com/rvirding/lfe>).

Edit: here's the macro test file
[http://github.com/rvirding/lfe/blob/master/test/test_macro.l...](http://github.com/rvirding/lfe/blob/master/test/test_macro.lfe)

