Questions tagged [erlang]

Erlang is a general-purpose, garbage-collected programming language and runtime environment, with built-in support for concurrency, distribution and fault tolerance.

Erlang is a general-purpose functional programming language and runtime environment. It has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson. Erlang is open source and available for download on GitHub.

Some Erlang features:

Online Resources:

Erlang Books:

9600 questions
79
votes
6 answers

The actor model: Why is Erlang/OTP special? Could you use another language?

I've been looking into learning Erlang/OTP, and as a result, have been reading (okay, skimming) about the actor model. From what I understand, the actor model is simply a set of functions (run within lightweight threads called "processes" in…
Jonathan Winks
  • 1,091
  • 2
  • 9
  • 12
77
votes
5 answers

Can someone explain the structure of a Pid (Process Identifier) in Erlang?

Can someone explain the structure of a Pid in Erlang? Pids looks like this: , e.g. <0.30.0> , but I would like to know what is the meaning of these three "bits": A, B and C. A seems to be always 0 on a local node, but this value changes when…
jideel
  • 482
  • 2
  • 8
  • 14
74
votes
5 answers

What is the best way to learn Erlang?

Other than specific projects (although those are welcome as well)... What tools, books, articles, and other resources should I have at my desk to help me learn Erlang? Also, are there mobile runtimes for Erlang? Please point me in the right…
Jeff Meatball Yang
  • 37,839
  • 27
  • 91
  • 125
72
votes
15 answers

Why did you decide "against" using Erlang?

Have you actually "tried" (means programmed in, not just read an article on it) Erlang and decided against it for a project? If so, why? Also, if you have opted to go back to your old language, or to use another functional language like F#, Haskell,…
yazz.com
  • 57,320
  • 66
  • 234
  • 385
72
votes
4 answers

How to use trace and dbg in Erlang to debug and trace my program?

I am trying to start using erlang:trace/3 and the dbg module to trace the behaviour of a live production system without taking the server down. The documentation is opaque (to put it mildly) and there don't appear to be any useful tutorials…
Gordon Guthrie
  • 6,252
  • 2
  • 27
  • 52
71
votes
7 answers

Erlang's let-it-crash philosophy - applicable elsewhere?

Erlang's (or Joe Armstrong's?) advice NOT to use defensive programming and to let processes crash (rather than pollute your code with needless guards trying to keep track of the wreckage) makes so much sense to me now that I wonder why I wasted so…
Andrew Matthews
  • 3,006
  • 2
  • 29
  • 42
70
votes
3 answers

Design patterns/best practice for building Actor-based system

I am struggling to find any decent links to design patterns, best practice or good, basic architectural principles that should be used in building Actor-based apps. Those few that I know of are: Blog posts, articles, WIKIs, guides OTP Design…
Vasil Remeniuk
  • 20,519
  • 6
  • 71
  • 81
70
votes
12 answers

RabbitMQ fails on Error: unable to connect to node rabbit@TPAJ05421843: nodedown

On a Windows 7 Enterprise machine, I made a fresh install of Erlang 17.4 and RabbitMQ 3.4.3 x64. The installation was successful and uneventful. I have not yet tried to create my first queue or exchange, but I already see trouble. This problem…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
67
votes
3 answers

Future investment: Erlang vs. Scala

since concurrent programming becomes constantly more important, I was wondering what you think about Erlang vs. Scala in that respect. It seems to me that Scala has a larger user base and potentially a brighter future than Erlang. Furthermore, Scala…
Mark
  • 1,333
  • 1
  • 14
  • 21
67
votes
7 answers

Erlang Processes vs Java Threads

I am reading "Elixir in Action" book by Saša Jurić, and in the first chapter it says: Erlang processes are completely isolated from each other. They share no memory, and a crash of one process doesn’t cause a crash of other processes. Isn't…
Wand Maker
  • 18,476
  • 8
  • 53
  • 87
64
votes
13 answers

Lisp and Erlang Atoms, Ruby and Scheme Symbols. How useful are they?

How useful is the feature of having an atom data type in a programming language? A few programming languages have the concept of atom or symbol to represent a constant of sorts. There are a few differences among the languages I have come across…
Muhammad Alkarouri
  • 23,884
  • 19
  • 66
  • 101
63
votes
2 answers

Is F# really faster than Erlang at spawning and killing processes?

Updated: This question contains an error which makes the benchmark meaningless. I will attempt a better benchmark comparing F# and Erlang's basic concurrency functionality and inquire about the results in another question. I am trying do…
Tristan
  • 6,776
  • 5
  • 40
  • 63
62
votes
5 answers

How to convert an integer to a string in Erlang?

I know strings in Erlang can be costly to use. So how do I convert "5"to 5? Is there anything like io:format("~p",[5]) that would return a formatted string instead of printing to a stream?
collapsinghrung
  • 855
  • 1
  • 6
  • 7
60
votes
5 answers

RabbitMQ (beam.smp) and high CPU/memory load issue

I have a debian box running tasks with celery and rabbitmq for about a year. Recently I noticed tasks were not being processed so I logged into the system and noticed that celery could not connect to rabbitmq. I restarted rabbitmq-server and even…
marcin_koss
  • 5,763
  • 10
  • 46
  • 65
60
votes
10 answers

How does shared memory vs message passing handle large data structures?

In looking at Go and Erlang's approach to concurrency, I noticed that they both rely on message passing. This approach obviously alleviates the need for complex locks because there is no shared state. However, consider the case of many clients…
wsorenson
  • 5,701
  • 6
  • 32
  • 29