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

What console output commands are available in Erlang?

What console output commands are available in Erlang? I know about io:format but was wondering what other output libraries exist.
yazz.com
  • 57,320
  • 66
  • 234
  • 385
17
votes
5 answers

Riak on Windows

I want to play with Riak http://riak.basho.com/ or a least get it running on a Windows system. I have downloaded the source code and compiled it but that's where I get stuck, how do I start it?
Michael Edwards
  • 6,308
  • 6
  • 44
  • 75
17
votes
4 answers

How to run erlang (rebar build) application

I am new to Erlang world and currently can't figure out how to start my dummy erlang application. Probably, I am just missing something... So, I created an application with rebar (rebar create-app appid=dummys). Currently I…
kikulikov
  • 2,512
  • 4
  • 29
  • 45
17
votes
12 answers

Sieve of Eratosthenes in Erlang

I'm in the process of learning Erlang. As an exercise I picked up the Sieve of Eratosthenes algorithm of generating prime numbers. Here is my code: -module(seed2). -export([get/1]). get(N) -> WorkList = lists:duplicate(N, empty), get(2,…
Roskoto
  • 1,722
  • 1
  • 16
  • 27
17
votes
5 answers

Erlang clusters

I'm trying to implement a cluster using Erlang as the glue that holds it all together. I like the idea that it creates a fully connected graph of nodes, but upon reading different articles online, it seems as though this doesn't scale well (having a…
SolomonS
  • 227
  • 3
  • 9
17
votes
6 answers

How to generate a random alphanumeric string with Erlang?

I'm trying to generate an random alphanumeric ID with Erlang. I naively tried crypto:strong_rand_bytes(Bytes) to generate a random binary and then used that binary like it was created with <<"my_unique_random_id">> - which didn't work because random…
Max Merz
  • 273
  • 1
  • 2
  • 7
17
votes
1 answer

How do you compile an Erlang program into a standalone windows executable?

Richard of Last.fm over at metabrew has ported his apps to Erlang. It was also done by riak, couchdb and others. He mentions extracting the needed parts, or including the whole VM into the distribution. Main trait here is: the program does not…
Alex V.
  • 333
  • 2
  • 13
17
votes
2 answers

CouchDB: map-reduce in Erlang

How can I write map-reduce functions in Erlang for CouchDB? I am sure Erlang is faster than JavaScript.
edbond
  • 3,921
  • 19
  • 26
17
votes
17 answers

Hidden Features of Erlang

In the spirit of: Hidden Features of C# Hidden Features of Java Hidden Features of ASP.NET Hidden Features of Python Hidden Features of HTML and other Hidden Features questions What are the hidden features of Erlang that every Erlang developer…
pageman
  • 2,864
  • 1
  • 29
  • 38
16
votes
5 answers

Is Erlang "single assignment" different from Haskell "immutable values"?

In the "Programming Erlang" book it's said that the language uses "single assignment" variables. In other articles about functional programming languages I always read of "immutable values" instead. Does the wording "single assignment" mean…
acorello
  • 4,473
  • 4
  • 31
  • 46
16
votes
3 answers

What is the use of non short-circuiting boolean operators in Erlang?

I am learning Erlang from the LearnYouSomeErlang web-book. One thing that struck me while learning was the non short-circuiting boolean conjunction and disjunction operators viz; and and or. What are the use cases for these operators? Why would you…
16
votes
5 answers

Actor-based distributed concurrency libraries for Ocaml and other languages

Question Can anyone recommend a library for Ocaml that offers an actor-based concurrency model for distributed computing? Note here the "actor-based" and "distributed" - I'd like the actor-based model, but also I want seamless handling of…
MGwynne
  • 3,512
  • 1
  • 23
  • 35
16
votes
5 answers

Why doesn't Haskell have symbols (a la ruby) / atoms (a la erlang)?

The two languages where I have used symbols are Ruby and Erlang and I've always found them to be extremely useful. Haskell does have algebraic datatypes, but I still think symbols would be mighty convenient. An immediate use that springs to mind is…
Anupam Jain
  • 7,851
  • 2
  • 39
  • 74
16
votes
5 answers

What weaknesses can be found in using Erlang?

I am considering Erlang as a potential for my upcoming project. I need a "Highly scalable, highly reliable" (duh, what project doesn't?) web server to accept HTTP requests, but not really serve up HTML. We have thousands of distributed clients…
Aaron Rustad
  • 2,016
  • 17
  • 25
16
votes
3 answers

Is there an equivalent to __MODULE__ for named functions in Elixir/ Erlang?

Is there an equivalent for retrieving the name of a function just like like __MODULE__ retrieves the name of a Module in Elixir/Erlang? Example: defmodule Demo do def home_menu do module_name = __MODULE__ func_name = :home_menu # is…
Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157