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

How to join list of bitstrings?

Having a list of bitstrings, need to join into a single bitstring: join(Bs) -> F = fun(B, Bt) -> <> end, lists:foldr(F, <<>>, Bs). Could you please advise faster way to do this?
taro
  • 5,772
  • 2
  • 30
  • 34
5
votes
1 answer

How to split a string into a list with multiple values, using Erlang?

When I read specific lines from a .txt file, I get a string like this one: "Test,Test2,Test3,Test4,Test5,Test6" I want to convert this string so it can fill a list, which looks like this: List = [A, B, C, D, E, F] Inserting values in such list can…
BorisMeister
  • 87
  • 1
  • 9
5
votes
3 answers

Erlang mysql example

Just wondering if anyone could give a working example of using the erlang-mysql module (http://code.google.com/p/erlang-mysql-driver/). I am new to erlang and I am trying to replace some old scripts with a few erlang batch processes. I am able to…
Matt
  • 450
  • 1
  • 4
  • 11
5
votes
1 answer

How to read character-wise on the standard input in Erlang

I'm trying to code a basic video-game and would like the input to be entered from the keyboard. Therefore, I need to read the characters on the standard input as they are produced. Because of the buffering, io:get_chars, io:fread will return only…
Daiwen
  • 727
  • 1
  • 4
  • 15
5
votes
3 answers

How to determining why an Erlang application is not starting?

I'm trying to start an Erlang app that is failing. All I see in the shell is: =INFO REPORT==== 7-Jan-2010::17:37:42 === application: ui exited: {shutdown,{ui_app,start,[normal,[]]}} type: temporary How can I get Erlang to give me more…
Jeremy Raymond
  • 5,817
  • 3
  • 31
  • 33
5
votes
3 answers

Erlang will be "particularly bad at things like signal processing"

From the book "Learn you some Erlang for Great Good:" Erlang is no silver bullet and will be particularly bad at things like image and signal processing, operating system device drivers, and other functions. Now, operating system device…
Cygil
  • 391
  • 1
  • 4
5
votes
3 answers

Restarting an Erlang node after a segmentation fault

I'm currently running an Erlang application that is running C code through Nifs. However, if a segmentation fault occurs within the C code, the entire node goes down, as well as the Erlang virtual machine that the Erlang application was running…
Lee Torres
  • 561
  • 1
  • 5
  • 19
5
votes
3 answers

Why or when should I use messages queues such as RabbitMQ, ZeroMQ in Erlang?

Hello awesome Erlang community! I'm making a little project that contains a Client and a Backend. (Complicated.. right?) :) I'm making it in erlang. The client and backend will be two separate processes and I'm wondering if I would need to (or…
Robbie
  • 620
  • 1
  • 5
  • 17
5
votes
1 answer

Should I be pattern matching every return value?

When I'm programming in Erlang should I be validating all return values from function calls for success via pattern matching even if i don't intend to use the return value? Most Erlang APIs I've seen so far don't throw exceptions on error (but…
Jeremy Raymond
  • 5,817
  • 3
  • 31
  • 33
5
votes
3 answers

Erlang C node related question

In the tutorial provided at: http://www.erlang.org/doc/tutorial/cnode.html There is the following example: /* cnode_s.c */ #include #include #include #include #include "erl_interface.h" #include "ei.h" #define BUFSIZE 1000 int main(int argc,…
user237855
  • 51
  • 3
5
votes
3 answers

Erlang and Antlr

Is it possible to write an Antlr code generation target for Erlang?
Tat-Yuen Hui
  • 141
  • 1
  • 6
5
votes
4 answers

What other systems beside Erlang are based on "Green Processes"?

I was reading this informative page on Green Thread (Wikipedia) and I wonder: what other programming systems rely on "green processes" beside Erlang? Edit: " Green Thread != Green Process " Green Process based Erlang Inferno Green Thread…
jldupont
  • 93,734
  • 56
  • 203
  • 318
5
votes
4 answers

Why is Erlang crashing on large sequences?

I have just started learning Erlang and am trying out some Project Euler problems to get started. However, I seem to be able to do any operations on large sequences without crashing the erlang shell. Ie.,even this: list:seq(1,64000000). crashes…
Dana
  • 32,083
  • 17
  • 62
  • 73
5
votes
3 answers

How to run n2o on 80 port?

I've tried changing port both in wf_core.erl and sys.config, but now it can't even initialize webserver. Checked if something is using 80 port - it is free.
akalenuk
  • 3,815
  • 4
  • 34
  • 56
5
votes
2 answers

Erlang list comprehension with two lists in sequence?

Is it possible to use list comprehension on two lists, item by item, in sequence? Given A = [1,2,3], B = [4,5,6], get some C = [f(1, 4), f(2, 5), f(3, 6)]. In other words, a more direct/efficient way to do [f(U, V) || {U, V} = lists:zip(A,…
me2
  • 3,069
  • 2
  • 26
  • 33