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

Concurrency model: Erlang vs Clojure

We are going to write a concurrent program using Clojure, which is going to extract keywords from a huge amount of incoming mail which will be cross-checked with a database. One of my teammates has suggested to use Erlang to write this program. Here…
Quazi Farhan
  • 1,425
  • 7
  • 18
  • 29
57
votes
5 answers

In Erlang, when do I use ; or , or .?

I have been trying to learn Erlang and have been running into some problems with ending lines in functions and case statements. When do I use a semicolon (;), comma (,), or period inside my functions or case statements?
samoz
  • 56,849
  • 55
  • 141
  • 195
55
votes
5 answers

How do I concatenate two binaries in Erlang?

How do I concatenate two binaries in Erlang? For example, let's say I have: B1 = <<1,2>>. B2 = <<3,4>>. How do I concatenate B1 and B2 to create a binary B3 which is <<1,2,3,4>>? The reason I am asking this is because I am writing code to encode a…
Bruno Rijsman
  • 3,715
  • 4
  • 31
  • 61
55
votes
6 answers

Mixing Erlang and Haskell

If you've bought into the functional programming paradigm, the chances are that you like both Erlang and Haskell. Both have purely functional cores and other goodness such as lightweight threads that make them a good fit for a multicore world. But…
53
votes
10 answers

Functional Programming: what is an "improper list"?

Could somebody explain what an "improper list" is?
jldupont
  • 93,734
  • 56
  • 203
  • 318
50
votes
8 answers

How do you do modulo or remainder in Erlang?

I'm brand new to Erlang. How do you do modulo (get the remainder of a division)? It's % in most C-like languages, but that designates a comment in Erlang. Several people answered with rem, which in most cases is fine. But I'm revisiting this because…
Matt
  • 84,419
  • 25
  • 57
  • 67
50
votes
15 answers

Setting up an Erlang development environment

I'm interested in looking at Erlang and want to follow the path of least resistance in getting up and running. At present, I'm planning on installing Erlang R12B-3 and Erlide (Eclipse plugin). This is largely a Google-result-based decision.…
McDowell
  • 107,573
  • 31
  • 204
  • 267
48
votes
4 answers

How, if at all, do Erlang Processes map to Kernel Threads?

Erlang is known for being able to support MANY lightweight processes; it can do this because these are not processes in the traditional sense, or even threads like in P-threads, but threads entirely in user space. This is well and good (fantastic…
48
votes
3 answers

Are Erlang/OTP messages reliable? Can messages be duplicated?

Long version: I'm new to erlang, and considering using it for a scalable architecture. I've found many proponents of the platform touting its reliability and fault tolerance. However, I'm struggling to understand exactly how fault-tolerance is…
joshng
  • 1,530
  • 1
  • 14
  • 16
47
votes
5 answers

What is the "pin" operator for, and are Elixir variables mutable?

Currently trying to understand the "^" operator in Elixir. From the website: The pin operator ^ can be used when there is no interest in rebinding a variable but rather in matching against its value prior to the match: Source -…
47
votes
1 answer

How to call a method dynamically in Elixir, by specifying both module and method name?

I'd like to know what exactly a method name is in elixir: array = [1,2,3] module_name = :lists method_name = :nth # this not working module_name.method_name(1, array) # error, undef function lists.method_name/2 module_name.nth(1,…
halfelf
  • 9,737
  • 13
  • 54
  • 63
46
votes
8 answers

What libraries can I use to build a GUI with Erlang?

What libraries can I use to build a GUI for an Erlang application? Please one option per answer.
givanse
  • 14,503
  • 8
  • 51
  • 75
46
votes
6 answers

Which Actor model library/framework for python and Erlang-like?

I am looking for an easy-to-learn Actor library or framework for Python 2.x. I have tried Candygram and Twisted but I did not like them. I'd like something that will be easy to extend to suppero Greenlet (= stackless python). Candygram is too…
daitangio
  • 583
  • 1
  • 6
  • 18
44
votes
9 answers

Good resources on using functional programming in game development?

I'm quite new to that functional programming paradigm, but so far I like it. Since I'm into game development, I want to try it out in writing some games in purely functional programming style. I don't mind the language - be it Erlang, Haskell, Lisp,…
Mikka
  • 2,113
  • 2
  • 16
  • 12
43
votes
1 answer

How do you design the architecture of an Erlang/OTP-based distributed fault-tolerant multicore system?

I would like to build an Erlang/OTP-based system which solves an 'embarassingly parrallel' problem. I have already read/skimmed through: Learn You Some Erlang; Programming Erlang (Armstrong); Erlang Programming (Cesarini); Erlang/OTP in Action. I…
skanatek
  • 5,133
  • 3
  • 47
  • 75