×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Erlang's Creator Speaks About Its History and Prospects

timothy posted more than 4 years ago | from the still-coy-on-the-meaning dept.

Programming 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."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

48 comments

Facebook's Use of Erlang (5, Informative)

miller60 (554835) | more than 4 years ago | (#28346829)

Erlang is used in Facebook Chat, which just hit 1 billion messages [datacenterknowledge.com] a day. Eugene Letuchy discussed Facebook's use of Erlang at the Erlang Factory [erlang-factory.com] event.

Re:Facebook's Use of Erlang (-1, Troll)

Anonymous Coward | more than 4 years ago | (#28346927)

Linux just isn't ready for the social networking site yet. It may be ready for the web servers that you nerds use to distribute your TRON fanzines and personal Dungeons and Dragons web-sights across the world wide web, but the average computer user isn't going to spend months learning how to use a CLI and then hours compiling packages so that they can get a workable graphic interface to check the latest info on their friends with, especially not when they already have a Windows machine that does its job perfectly well and is backed by a major corporation, as opposed to Linux which is only supported by a few unemployed nerds living in their mother's basement somewhere. The last thing I want is a level 5 dwarf (haha) providing me my OS.

Re:Facebook's Use of Erlang (0)

Anonymous Coward | more than 4 years ago | (#28357309)

wow

Ooh so now it's a Pop language (0, Offtopic)

goombah99 (560566) | more than 4 years ago | (#28347329)

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 really want me
You say you'll get me, but I'll get him too

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

But now I think the time is right
So let him take me out tonight

I really love him, yes I really love him
I really want him, yes I really want him
Yes I love him, tell him I love him too
Yes I do, yes I do, yes I do, yes I do

Re:Facebook's Use of Erlang (0)

Anonymous Coward | more than 4 years ago | (#28363991)

It's even used at NOKIA in their own MapReduce implementation. See disco project: http://discoproject.org/

The power behind CouchDB (4, Interesting)

slim (1652) | more than 4 years ago | (#28346941)

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 (5, Interesting)

TheRaven64 (641858) | more than 4 years ago | (#28347183)

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 (-1, Troll)

Anonymous Coward | more than 4 years ago | (#28347333)

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.

However, we all know that Lambda-Lambda-Lambda Calculus [wikipedia.org] is superior to plain Lambda Calculus [wikipedia.org] , although both can be self-referential at times.

Re:CSP makes parallel programming easy (3, Informative)

TwistedSquare (650445) | more than 4 years ago | (#28347449)

Erlang is based on the ACTOR model, not CSP. The main practical differences between Erlang and CSP is that Erlang uses asynchronous dynamically-typed messages sent to a particular address (process id), whereas CSP systems usually deal with synchronous messages sent down a particular, typed channel. But they are both message-passing systems with the idea of removing shared mutable data, as you say. For an implementation of CSP in the pure functional language Haskell, see my library CHP (http://www.cs.kent.ac.uk/projects/ofa/chp/).

Re:CSP makes parallel programming easy (2, Interesting)

radtea (464814) | more than 4 years ago | (#28350065)

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 (3, Interesting)

jbolden (176878) | more than 4 years ago | (#28351261)

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:CSP makes parallel programming easy (2, Interesting)

jonaskoelker (922170) | more than 4 years ago | (#28355241)

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:CSP makes parallel programming easy (1)

jbolden (176878) | more than 4 years ago | (#28356981)

Yep a far worse work around IMHO since it made things like working with a file a problem.

Re:CSP makes parallel programming easy (1)

Pinky's Brain (1158667) | more than 4 years ago | (#28347537)

CSP = synchronous.

Erlang works well, but it does not allow as easy automated model/deadlock/etc checking as CSP based languages.

Re:CSP makes parallel programming easy (1)

dumael (1172411) | more than 4 years ago | (#28347855)

There's also the (D)ETS, (disk) erlang term storage, which gives a simple key/value store. It can be shared and mutable, depending on creation parameters. Afaik it's mostly used for the implementation Mnesia, a native term database for erlang.

Re:CSP makes parallel programming easy (1)

TheRaven64 (641858) | more than 4 years ago | (#28348003)

As I understand it, [D]ETS works by spawning a process for handling the storage. When you interact with a [D]ETS store, you do so via a function wrapper around this process; the data store is not aliased, only the process handle is.

Re:CSP makes parallel programming easy (1)

iluvcapra (782887) | more than 4 years ago | (#28350051)

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 a database is to share state, so I don't think the Mnesia people have anything to feel guilty about. Any CS types out there know what a database in a pure functional language looks like?

Re:CSP makes parallel programming easy (1)

QuestionsNotAnswers (723120) | more than 4 years ago | (#28357061)

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...

Re:CSP makes parallel programming easy (0)

Anonymous Coward | more than 4 years ago | (#28357725)

Well, the simpler answer is that a functional database system would pass and return entire databases as function parameters and results. The entire point of a "purely functional" system is that the expression of a function invocation denotes the value obtained from evaluating the function, and the same expression always denotes the same value.

The concept of a transactional database is syntactically non-functional, in that it is modeled on query expressions and results, and the queries affect an implicit, stateful database store. But you could refactor that as functional expressions including query terms and the database value before the query, which results in the database value after the query and the query result.

Somewhere between this functional abstraction and the real world, you have the messy problem of deciding how to share the database between different real-world isochronous processes which introduce query terms and consume query results, and that part is not purely functional. Somewhere deep in the transaction manager layer, the decision is made as to which database values are passed into which query evaluations, by stringing together a sequence of completing transactions. The rest is basically partial-evaluation and common-subexpression optimizations in a concurrent evaluator framework.

On that note.. (1, Offtopic)

bigattichouse (527527) | more than 4 years ago | (#28347439)

Anyone have an Erlang background, or some low level C or similar experience and live in the Chicago area (we're just south of the Loop)

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 about it before the project. So, fire away on the resumes:

bigattichouse@gmail.com

If you want to know more... (3, Informative)

jandrese (485) | more than 4 years ago | (#28347463)

There is even a movie [youtube.com] about Erlang that should give you a good idea of what its strengths are.

Re:If you want to know more... (1)

synthesizerpatel (1210598) | more than 4 years ago | (#28349593)

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:If you want to know more... (1)

gknoy (899301) | more than 4 years ago | (#28350651)

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:If you want to know more... (1, Informative)

Anonymous Coward | more than 4 years ago | (#28355903)

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] .

Erlang use on FSM Virtual Radio Kernel (1)

R80_JR (1094843) | more than 4 years ago | (#28347527)

Erlang is also being used for the virtual radio kernel, which is used for software defined radios. Good article on the subject linked off the www.flex-radio.com FAQ's on PowerSDR V2.

The real history of Erlang (-1, Offtopic)

Anonymous Coward | more than 4 years ago | (#28348587)

Ugh, every time this comes up...

The real history of Erlang [wikipedia.org] .

Created by Tony Casey in October 1993. Denied until his official debut in 1995. Source [wikipedia.org]

Hope that settles it.

Why can't more people think like this... (4, Insightful)

DragonWriter (970822) | more than 4 years ago | (#28348735)

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:Why can't more people think like this... (1)

Timothy Brownawell (627747) | more than 4 years ago | (#28349781)

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:Why can't more people think like this... (1)

dublindan (1558489) | more than 4 years ago | (#28358977)

Maybe you don't use your desktop at night, but I imagine a lot of people here do... for whichever purposes... ;-)

Re:Why can't more people think like this... (1)

iluvcapra (782887) | more than 4 years ago | (#28349811)

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 function names bind to the currently running module, and not just the module they're defined in, so that your receive block is able to dispatch a new message to the new version of the module at the right moment. Deciding where in your process's flow to do this isn't trivial or abstracted away. It's not necessarily hard, either, but it requires cognizance.

Erlangs (1)

Maclir (33773) | more than 4 years ago | (#28348859)

"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? (2, Insightful)

blueskies (525815) | more than 4 years ago | (#28349129)

flourished ever since

define flourished.

Re:flourished? (1)

conspirator57 (1123519) | more than 4 years ago | (#28350617)

not end of lifed yet.

but it's close to EoL judging by the small number of comments on this thread.

Re:flourished? (1, Funny)

Anonymous Coward | more than 4 years ago | (#28352055)

People who use erlang know why they're using it and don't need to spam slashdot seeking validation (Python much?)

Re:flourished? (1)

DragonWriter (970822) | more than 4 years ago | (#28353747)

define flourished.

Facebook chat, the rewrite of Delicious (formerly deli.cio.us), CouchDB, ejabberd, RabbitMQ, etc., etc., etc.

Re:flourished? (1)

blueskies (525815) | more than 4 years ago | (#28356681)

Only a million more projects to go....before it catches up to something like fortran.

Re:flourished? (1)

DragonWriter (970822) | more than 4 years ago | (#28362163)

Only a million more projects to go....before it catches up to something like fortran.

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:flourished? (1)

blueskies (525815) | more than 4 years ago | (#28367913)

So depending on how you define flourishing it still has some distance to go...

Re:flourished? (1)

DragonWriter (970822) | more than 4 years ago | (#28367991)

So depending on how you define flourishing it still has some distance to go...

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:flourished? (1)

blueskies (525815) | more than 4 years ago | (#28368705)

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 (3, Interesting)

lewiscr (3314) | more than 4 years ago | (#28353817)

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:Programming Erlang (1)

larry bagina (561269) | more than 4 years ago | (#28354231)

I've used erlang to write a few utilities. Pattern matching makes it easier to prototype something, particularly binary pattern matching when dealing with network or file structures.

Re:Programming Erlang (1)

lewiscr (3314) | more than 4 years ago | (#28355379)

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 hoped the files were relatively unfragmented. It worked pretty well.

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...