Erlang's Creator Speaks About Its History and Prospects 48
Seal writes "Erlang, originally created at Ericsson in 1986, is a functional programming language which was released as open source around 10 years ago and flourished ever since. In this Q&A, Erlang creator Joe Armstrong talks about its beginnings as a control program for a telephone exchange, its flexibility and its modern day usage in open source programs. 'In the Erlang world we have over twenty years of experience with designing and implementing parallel algorithms. What we lose in sequential processing speed we win back in parallel performance and fault-tolerance,' Armstrong said. He also mentions how multi-core processors pushed the development of Erlang and the advantages of hot swapping."
Facebook's Use of Erlang (Score:5, Informative)
Ooh so now it's a Pop language (Score:1, Offtopic)
Top of the pop chart on face book...
here's the contest: I did the first phrase, you fill in another one and leave the next to someone else:
SHANG A DO (loop) LANG
(Jagger/Richards)
Shang a doo lang, shang a lang erlang
Shang a doo lang, shang a lang erlang
Shang a doo lang, shang shang a erlang
Shang a doo lang, shang a lang erlang
Well you tell me, it's a lambda statement
But I don't know what that meant
that one plus one can't simply be two?
He said he'd seen me, goin' out with Charlie
I only did it, to make him re
The power behind CouchDB (Score:5, Interesting)
I notice that CouchDB [apache.org] makes a big deal of its Erlang based core -- essentially "this part is trustworthy and parallelises well because it's in Erlang".
I also notice Joe Armstrong (or more likely a transcriber) is as bad at spelling "lose" as the rest of the internet...
CSP makes parallel programming easy (Score:5, Interesting)
Describing Erlang as a functional language is true, but misleading. It's not a pure functional language, because there is a (mutable) process dictionary. When you call something a functional language, it implies a language modelled on Lambda Calculus. The fact that functional languages do not allow side effects (Erlang does via the process dictionary) means that they are relatively easy to parallelise implicitly. Erlang adds support for the Communicating Sequential Processes (CSP) formalism on top of a mostly-functional core language.
CSP is a very clean and simple model for describing parallel algorithms. The language enforces the restriction that no data may be both shared and mutable. The only mutable object in Erlang is the processes (which has a dictionary and some execution state). Everything else is immutable. This makes it trivially easy to write code that uses a few tens of thousands of Erlang processes (or more). These are implemented as (very) light-weight threads on top of OS threads and can easily scale up to a large number of processors, or even cluster nodes. The asynchronous aspect of the message passing means that it is not very difficult to write code that scales well across a cluster; bandwidth can be an issue, but latency generally isn't in asynchronous code.
Re:CSP makes parallel programming easy (Score:4, Informative)
Re: (Score:3, Interesting)
the pure functional language Haskell
<nitpick>
Calling Haskell a "pure functional language" is a bit like calling C++ a "pure object-oriented language." There are parts of the Haskell language that allow you to do pure functional programming. But there are parts of the language that allow you to do things like I/O, too.
</nitpick>
Re:CSP makes parallel programming easy (Score:4, Interesting)
The analogy would be to call C a "low level language" even though C++ exists with high level extensions like the template system.
What makes Haskell pure is that stateful code like I/O is handled through a monad so that it doesn't leak out into the rest of the code. The purpose of a computer program is to create a side effect. So every language needs to include some capacity to induce them. What separates pure from impure is whether side effects are scattered throughout the code or isolated.
Re: (Score:3, Interesting)
The purpose of a computer program is to create a side effect.
Back in the good old days, Haskell programs had type String -> String ;-)
Re: (Score:2)
Yep a far worse work around IMHO since it made things like working with a file a problem.
Re: (Score:2)
CSP = synchronous.
Erlang works well, but it does not allow as easy automated model/deadlock/etc checking as CSP based languages.
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
Yes, but sending Mnesia messages (inserting or updating rows) causes its response to functions (select statements) with identical parameters to have different return values, hence, Mnesia isn't pure functional and calls from one part of the system can cause calls in another part of the system to have different return values. Thus people say it isn't pure functional and has side-effects.
That said, I don't have the slightest idea how you would write a database that is pure-functional, since the whole idea of
Re: (Score:1)
I don't have the slightest idea how you would write a database that is pure-functional
IANACS, but I think some version control systems could be pure functional databases. If the revision were a parameter to all calls, and checkins branch, then the result from the same operation (even if it were repeated) could be made to return exactly the same result (although trickier with writes).
isolation levels [slashdot.org] are also relevant? Conventional databases that store all history also relevant?
I agree it would be nice to see a CS type give a correct answer...
On that note.. (Score:1, Offtopic)
I'm actively involved in a startup that is developing a large project in Erlang, looking for some additional folks to add to our team.
It's problematic trying to find people with the right skillset, since it isn't just "Erlang" we're looking for - its the general high-volume, high-availability skillset and a deep interest in learning Erlang. I didn't even know much a
Re: (Score:1)
Re: (Score:2)
If you want to know more... (Score:4, Informative)
Re: (Score:2)
Around 4:35 I think.. Imagine this:
hello?
hello?
whatt-tttttttsu-uuuuuuu-uuuup
whaaaaaaa-aaaaa-aaaaaatuuuuuu uuu-uuuu-uuuuu-up
WHUZZZZZZAA-AAAAAAA-AAAA-A ... watchin' the game, drinkin a bud
Re: (Score:2)
I don't know if it's the color balance, or the seeming age of the film, but I keep expecting to hear the Monty Python theme song.
(Disclaimer: I am really enjoying the Programming Erlang book, and actually do want to use it. :))
Re: (Score:1, Informative)
This has been my absolute favorite in IT videos since I first saw it a year ago. It has that unashamed old-time dorkiness that I'm so nostalgic for. Get it in better-than-youtube quality at archive.org [archive.org].
Re: (Score:2)
Erlang use on FSM Virtual Radio Kernel (Score:1)
Interesting links (Score:1)
See also an interesting paper on the history of Erlang [chalmers.se], by Armstrong, and Erlang, The Movie [google.com].
Wings 3D (Score:1)
Why can't more people think like this... (Score:5, Insightful)
I wish that this could become a universal precept of software design, shaping everything from OS's to desktop apps -- Joe Armstrong: "Stopping a system to upgrade the code is an admission of failure."
Re: (Score:2)
I wish that this could become a universal precept of software design, shaping everything from OS's to desktop apps -- Joe Armstrong: "Stopping a system to upgrade the code is an admission of failure."
Trouble is, that's incredibly hard (expensive, limiting) to get right. So it only makes sense where you can't even schedule maintenance downtime or instruct the load balancer to send all requests to the other machine. So it's useful for the thing that your (and everyone else in town) single, non-redundant phone line plugs in to... and not terribly much else. Certainly not for a desktop where you're not even using it at night.
Re: (Score:1)
Re: (Score:2)
Well, a lot of people do think like this, except making it work in practice is very difficult, and implementing a system that allows code hot code upgrades usually requires so much indirection that efficiency suffers. Also, in practice, stoppiong a system to upgrade the code is a practical proposition, particularly for a home computer. Not everyone is running an ISP in their den.
Even Erlang doesn't enforce hot code swapping, you the developer still have to write the code a particular way, so that, your fu
Erlangs (Score:2)
"Erlang" is a measure of communications channel occupancy - names after the Danish mathematician and telephony researcher - but it also relates to how old telephones use to sound - when they had actual mechanical bells that would ring when a call was coming in - "erlang-a-lang-a-lang".
flourished? (Score:3, Insightful)
define flourished.
Re: (Score:1)
not end of lifed yet.
but it's close to EoL judging by the small number of comments on this thread.
Re: (Score:1, Funny)
Re: (Score:2)
Facebook chat, the rewrite of Delicious (formerly deli.cio.us), CouchDB, ejabberd, RabbitMQ, etc., etc., etc.
Re: (Score:2)
Only a million more projects to go....before it catches up to something like fortran.
Re: (Score:2)
Within the domain on which it is focussed (roughly, systems providing highly parallel communications infrastructure), Erlang is flourishing. Sure, that's not an area where there are as many individual projects as, say, scientific number crunching. And, sure, it hasn't been as long (or as early in the history of programming when there were so few competing options) as Fortran, either. So what?
Re: (Score:2)
So depending on how you define flourishing it still has some distance to go...
Re: (Score:2)
I would suggest that requiring that a language be used in as many projects as Fortran ever has been is a ludicrous standard for "flourishing".
Re: (Score:2)
python, perl, ruby, c, c++, java, php, bash, basic, c#, lua, pascal, cobol, lisp, brainfuck?
I don't care what we pick, just that in comparison to other languages it doesn't appear to an outsider that it's flourishing. I'm just trying to understand the magnitude of it's flourishment.
Programming Erlang (Score:4, Interesting)
I've been (slowly) working my way through Programming Erlang [slashdot.org].
I spend most of my day doing procedural and OOP. Odds are good that I'll never write a single Erlang program after I finish the book. But I guarantee that I'll be using the concepts that I'm learning for the rest of my life.
For the same reason you had to take liberal arts classes in university, everybody should learn a functional language or two.
Re: (Score:1)
Re: (Score:2)
The example that searching an MPEG looking for header frames was pretty cool. It gave me bad flashbacks to when I had to search an unmountable filesystem and extract all the JPEGs[*]. The C code I wrote was horrible...
*: I somehow managed to corrupt a VFAT partition enough that it wouldn't mount in Windows or Linux. Right after my wife unloaded the digital camera, but before she remembered to tell me to back up the photos. So I had to fix it. I scanned the entire drive, looking for the JPEG magic, and