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
18
votes
6 answers

Query an Erlang process for its state?

A common pattern in Erlang is the recursive loop that maintains state: loop(State) -> receive Msg -> NewState = whatever(Msg), loop(NewState) end. Is there any way to query the state of a running process with a bif or tracing or…
mwt
  • 697
  • 1
  • 6
  • 14
17
votes
3 answers

How does one use cached data in a functional language such as Erlang?

I've been reading a bit lately about functional languages. Coming from 10+ years of OO development, I'm finding it difficult to get my head around how on earth one can point the pure functional approach (i.e. the same method called with the same…
oxbow_lakes
  • 133,303
  • 56
  • 317
  • 449
17
votes
4 answers

How to encrypt Erlang rpc calls (and Mnesia replication) and other traffic?

I believe that internode communication is taking place in the clear and that the cookie value is strictly used for authentication. (I do not have any proof as yet). How do I encrypt internode communication? How do I encrypt Mnesia replication…
Richard
  • 10,122
  • 10
  • 42
  • 61
17
votes
2 answers

What is the worst case when the epmd port is open?

When using Erlang programs like ejabberd the Erlang port mapper daemon epmd is started and opens port 4369. This port is accessible over the internet (only most recent ejabberd versions allow to configure that epmd should bind to localhost) by…
maxschlepzig
  • 35,645
  • 14
  • 145
  • 182
17
votes
4 answers

Is Erlang a Constraint-Logic programming language?

Since Erlang is based upon Prolog, does this mean that Erlang is a Constraint-Logic Language? Does Erlang have Prolog's building blocks: Facts, Rules and Query
Chiron
  • 20,081
  • 17
  • 81
  • 133
17
votes
2 answers

Erlang -- How to convert a fun() object to a String

Is there a straightforward way to convert an Erlang fun to a string? A call to io_lib:format only prints the function reference, e.g. something like "#Fun". For example, I'd like to be able to do this: 1> Fun = fun() ->…
Travis Webb
  • 14,688
  • 7
  • 55
  • 109
17
votes
3 answers

Mailbox Processor on Distributed Systems

I noticed the following comment in my copy of Expert F# on page 379: Passing and Processing Messages A distinction is often made between shared-memory concurrency and message passing concurrency. The former is often more efficient on local…
Juliet
  • 80,494
  • 45
  • 196
  • 228
17
votes
4 answers

Concurrency: Processes vs Threads

What are the main advantages of using a model for concurrency based on processes over one based on threads and in what contexts is the latter appropriate?
Kummo
  • 3,602
  • 5
  • 24
  • 29
17
votes
6 answers

What's the best way to unit test concurrent Erlang code?

I'm spending a bit of time with Erlang, and I'm wanting to apply TDD to code I'm writing. While EUnit in the standard lib provides a nice traditional unit testing framework for testing regular style code, there doesn't seem to be anything to help…
madlep
  • 47,370
  • 7
  • 42
  • 53
17
votes
1 answer

Elixir call Axis2 Java SOAP Web Service with detergentex and detergent

From Elixir, I am trying to call a SOAP Web Service with detergentex, which is a wrapper around the Erlang library detergent. I can call the SOAP Web Service in the example on the detergent home page with no problems:…
Svein Fidjestøl
  • 3,106
  • 2
  • 24
  • 40
17
votes
1 answer

Converting Erlang-C port example to Erlang-Golang

I'm trying to write a Golang driver for Erlang, accesible via an Erlang port. I've started with the Erlang C port example, which works fine: http://www.erlang.org/doc/tutorial/c_port.html Now I'm trying to port the C code to Golang; just trying to…
Justin
  • 4,649
  • 6
  • 33
  • 71
17
votes
1 answer

Elixir - What does the 'use' keyword do?

I suspect it's an elementary question, but it's been hard to find a succinct, canonical answer online. From what little I understand; It's distinct from both 'require' and 'import' It's used to import the contents of modules. It's a macro Can…
Charlie
  • 4,197
  • 5
  • 42
  • 59
17
votes
1 answer

Executing a basic shell command in Elixir

At a very early stage of learning the language, and working through the ElixirSips series of videos. I keep hitting stuff that's been slightly obseleted by language changes. Trying to wrap my head around this, and Google/Github issue trackers/SO…
DanCouper
  • 850
  • 6
  • 15
17
votes
2 answers

How to Upgrade the Erlang version on Ubuntu (R14B04 to latest stable version)?

How to Upgrade Erlang version on Ubuntu (R14B04 to latest stable version)?
Jamie Tabone
  • 581
  • 1
  • 4
  • 7
17
votes
4 answers

rabbitmqctl Error: unable to connect to node rabbit@myserver nodedown

I am running RabbitMQ v3.3.5 with Erlang OTP 17.1 on Windows 2008 R2. My Dev and QA environments are stand-alone. My staging and production environments are clustered. I am finding this one problem happening often where the RabbitMQ service is…
Alf47
  • 563
  • 1
  • 5
  • 12