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
1 answer

How to parse config file with erlang?

i am developing one program with erlang, which need to read config file when starting, then load the config data to database. originally, using Ruby or C i can load YAML file or conf file. I want to know, in erlang's world, is there any good way to…
why
  • 23,923
  • 29
  • 97
  • 142
18
votes
4 answers

How to show all processes in Erlang?

I need get all registered process. I input register(). a mnesia_event,kernel_safe_sup,mnesia_monitor,mnesia_snmp_sup, mnesia_recover,mnesia_late_loader,mnesia_kernel_sup,inet_db, rex,kernel_sup,global_name_server,mnesia_checkpoint_sup, …
0xAX
  • 20,957
  • 26
  • 117
  • 206
18
votes
3 answers

Erlang: How to write my outputs in a text file?

I need to write my outputs from shell into a text file to keeping some required records. Can anyone please tell me how can I do this? Thanks
user648747
  • 181
  • 1
  • 1
  • 3
18
votes
5 answers

Erlang source code guide

I am interested in delving into Erlang's C source code and try to understand what is going on under the hood. Where can I find info on the design and structure of the code?
GabiMe
  • 18,105
  • 28
  • 76
  • 113
18
votes
3 answers

mix deps.get failed (seems missing ssl?)

I'm sorry but I'm new to Elixir. while building phoenix application, mix deps.get failed with an error. % mix deps.get Could not find Hex, which is needed to build dependency :phoenix Shall I install Hex? [Yn] y ** (MatchError) no match of right…
otiai10
  • 4,289
  • 5
  • 38
  • 50
18
votes
1 answer

Best way to split several heads from a list with Erlang?

So, Erlang is a real joy to work with, but there's one problem I run into occasionally, that I'm wondering if there is a nicer way to solve. Often, I find myself needing to split several items from a list. The syntax for splitting a list into a Head…
18
votes
1 answer

Is Elixir's module an atom?

I'm trying to get to know what modules are in Elixir. Because in Erlang they're just atoms, but in Elixir atoms start with : character. So I've checked these expressions in iex: iex(16)> is_atom(List) true iex(17)> is_atom(:List) true iex(18)> List…
Krzysztof Wende
  • 3,208
  • 25
  • 38
18
votes
3 answers

Erlang (or elixir) performance (requests per second) is slow vs jruby?

Being a rubyist, I decided to take on erlang for high performance, reliable backend. The setup is quite simple: get a post request, write stuff to redis, return statistics. All json. this is also why I care so much about requests per second. Tools…
orotemo
  • 263
  • 1
  • 3
  • 8
18
votes
6 answers

What is the most mature JSON library for Erlang?

I wanted to use YAML but there is not a single mature YAML library for Erlang. I know there are a few JSON libraries, but was wondering which is the most mature?
yazz.com
  • 57,320
  • 66
  • 234
  • 385
18
votes
7 answers

Can I disable printing lists of small integers as strings in Erlang shell?

The Erlang shell "guesses" whether a given list is a printable string and prints it that way for convenience. Can this "convenience" be disabled?
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
18
votes
2 answers

What does the "head mismatch" compiler error mean?

I tries to write code to print Z character. zzzzzzz z z z z z zzzzzzz But when I compile this code, it throws D:\erlang\graphics>erlc zeez2.erl d:/erlang/graphics/zeez2.erl:19: head mismatch d:/erlang/graphics/zeez2.erl:6: function…
wearetherock
  • 3,721
  • 8
  • 36
  • 47
18
votes
6 answers

Erlang lists:index_of/2 function?

I'm looking for an Erlang library function that will return the index of a particular element in a list. So, if X = [10,30,50,70] lists:index_of(30, X) would return 1, etc., just like java.util.List's indexOf() method. Does such a method exist in…
Justin
  • 4,649
  • 6
  • 33
  • 71
18
votes
6 answers

Remove duplicate elements from a list in Erlang

How can I remove the duplicate from a list in Erlang? Suppose I have a list like: [1,1,2,3,4,5,5,6] How can I get: [1,2,3,4,5,6]
Sina
  • 1,632
  • 3
  • 15
  • 21
18
votes
3 answers

How can I write an exception stack trace in erlang after catching it?

Suppose I have something like this : try code_that_fails() catch _:_ -> ..... How do I print the stacktrace in the catch block? That block catches all exceptions, but I don't know how to print the stack... Can you help me?
Francesco
  • 299
  • 3
  • 6
  • 14
18
votes
2 answers

Introduction to Erlang/OTP production applications deployment

I would like to develop and deploy an Erlang/OTP application into production on a VPS. I am pretty familiar with developing Erlang code on a local machine and my question is about deployment. Basically, I would like to know what steps I should take…
skanatek
  • 5,133
  • 3
  • 47
  • 75