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
35
votes
3 answers

What is the storage capacity of a Mnesia database?

Some places state 2GB period. Some places state it depends up the number of nodes.
user52543
  • 383
  • 1
  • 3
  • 6
35
votes
5 answers

Considering an Erlang web framework to learn and use in production

I’ve started learning Erlang a few days ago and it’s definitely a very interesting language and very suitable for web development (back end at least). I am going to experiment and eventually settle with one Erlang web framework to use for my next…
Jeff
  • 13,079
  • 23
  • 71
  • 102
34
votes
5 answers

Can Elixir or Erlang programs be compiled to a standalone binary?

It says that Elixir has a tool called elixirc and Erlang has a tool called erlc to compile modules for use. It says immediately after this that you can then run code with the elixir command line tool. Is there a way to compile a binary executable…
Mike H-R
  • 7,726
  • 5
  • 43
  • 65
34
votes
7 answers

Why is MPI considered harder than shared memory and Erlang considered easier, when they are both message-passing?

There's a lot of interest these days in Erlang as a language for writing parallel programs on multicore. I've heard people argue that Erlang's message-passing model is easier to program than the dominant shared-memory models such as threads.…
Lorin Hochstein
  • 57,372
  • 31
  • 105
  • 141
34
votes
7 answers

Why is Erlang slower than Java on all these small math benchmarks?

While considering alternatives for Java for a distributed/concurrent/failover/scalable backend environment I discovered Erlang. I've spent some time on books and articles where nearly all of them (even Java addicted guys) says that Erlang is a…
yetanothercoder
  • 1,689
  • 4
  • 21
  • 43
33
votes
3 answers

What's the best way to do something periodically in Erlang?

I have a process that needs to do some work every fifteen seconds. I'm currently doing it like this: -behavior(gen_server). interval_milliseconds ()-> 15000. init()-> {ok, _State = FascinatingStateData, _TimeoutInterval =…
offby1
  • 6,767
  • 30
  • 45
33
votes
4 answers

How to debug Erlang code?

I have some Ruby and Java background and I'm accustomed to having exact numbers of lines in the error logs. So, if there is an error in the compiled code, I will see the number of line which caused the exception in the console output. Like in this…
Kirill
  • 867
  • 2
  • 11
  • 14
33
votes
4 answers

When to prefer `and` over `andalso` in guard tests

I am curious why the comma ‹,› is a shortcut for and and not andalso in guard tests. Since I'd call myself a “C native” I fail to see any shortcomings of short-circuit boolean evaluation. I compiled some test code using the to_core flag to see what…
Kijewski
  • 25,517
  • 12
  • 101
  • 143
33
votes
8 answers

Haskell for a server?

With regards to making a game server, it seems Erlang always comes up as a language that is "built for this kind of thing" with its scalability and concurrency features. I don't have experience in either Haskell nor Erlang, but on the surface they…
ryeguy
  • 65,519
  • 58
  • 198
  • 260
33
votes
7 answers

Is Erlang Object-Oriented?

Message-passing is a fundamental part of Erlang. Alan Kay has argued that message-passing is a concept more important than objects in his view of object-oriented programming (and he "invented" the term!). Can Erlang be considered an object-oriented…
Mr. X
  • 331
  • 1
  • 3
  • 3
32
votes
5 answers

Erlang/OTP behaviors for beginner

As I understood from the "Erlang and OTP in action" book, the word behavior refers to: the behaviour interface, which is a set of functions; the behaviour implementation, which is the application-specific code (a callback module); the behaviour…
Kirill
  • 867
  • 2
  • 11
  • 14
32
votes
7 answers

Failed to Create Cookie file RabbitMQ in Windows

I am trying to run the following command rabbitmq-plugins.bat enable rabbitmq_management and its giving me an error like this: 11:36:55.464 [error] Failed to create cookie file 'h:/.erlang.cookie': enoent I am using windows 7, Erlang Version…
user636525
  • 3,180
  • 9
  • 38
  • 51
32
votes
2 answers

What do the Erlang emulator info statements mean?

When I start up my Erlang emulator, there the first bit has a bunch of informational things. (Slightly reformatted for effect.) manoa:~ stu$ erl Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] [async-threads:0] [hipe]…
Stu Thompson
  • 38,370
  • 19
  • 110
  • 156
31
votes
2 answers

Reduce RabbitMQ memory usage

I'm trying to run RabbitMQ on a small VPS (512mb RAM) along with Nginx and a few other programs. I've been able to tweak the memory usage of everything else without difficulty, but I can't seem to get RabbitMQ to use any less RAM. I think I need to…
Alex Jillard
  • 2,792
  • 2
  • 19
  • 20
31
votes
1 answer

How scalable is distributed Erlang?

Part A: Erlang has a lot of success stories about running concurrent agents e.g. the millions of simultaneous Facebook chats. That's millions of agents, but of course it's not millions of CPUs across a network. I'm having trouble finding metrics on…
G__
  • 7,003
  • 5
  • 36
  • 54