Frequently Asked Questions about Erlang


Cover

Table of Contents


1 What is Erlang
1.1 In a nutshell, what is Erlang?
1.2 What is OTP?
1.3 What sort of applications is Erlang particularly suitable for?
1.4 What sort of problems is Erlang not particularly suitable for?
1.5 Who uses Erlang for product development?
1.6 Who uses Erlang for research and teaching?
1.7 Can I get commercial support for Erlang?

2 Questions about this FAQ
2.1 Where can I get the latest version of the FAQ?
2.2 What's new?
2.3 Where do I ask questions which are not answered in this FAQ?
2.4 The answer to question 2.4 is wrong!
2.5 Disclaimer/Distribution

3 Obtaining Erlang/OTP and books/articles about it
3.1 Where can I get Erlang/OTP?
3.2 What's the current version of (Open Source) Erlang?
3.3 Which licence is Open Source Erlang shipped with?
3.4 What documentation is there for Erlang?
3.5 What advanced Erlang documentation is there?
3.6 What documentation is there in related subjects?
3.7 Is there a public CVS server for Erlang?
3.8 How can I contribute to Erlang?
3.9 How can I propose changes to the language itself?
3.10 Where is Erlang discussed?
3.11 Where are the web forums and mailing list archives?
3.12 Are there any websites apart from erlang.org?
3.13 Where can I find Erlang programmers/employers?

4 Getting Started
4.1 How long does it take to learn Erlang?
4.2 How can I learn Erlang?
4.3 What does "hello world" look like?
4.4 How do I quit the Erlang shell?
4.5 Why does Erlang print "ok" after my program's output?

5 How do I...
5.1 ...compare numbers?
5.2 ...represent a text-string?
5.3 ...convert a string to lower case?
5.4 ...convert a text string representation of a term to a term?
5.5 ...use unicode/UTF-8?
5.6 ...destructively update data, like in C
5.7 ...run an Erlang program directly from the unix shell?
5.8 ...communicate with non-Erlang programs?
5.9 ...write a unix pipe program in Erlang?
5.10 ...communicate with a DBMS?
5.11 ...decode binary Erlang terms
5.12 ...decode Erlang crash dumps
5.13 ...estimate performance of an Erlang system?
5.14 ...measure performance of an Erlang system?
5.15 ...measure memory consumption in an Erlang system?
5.16 ...estimate productivity in an Erlang project?
5.17 ...use multiple CPUs (or cores) in one server?
5.18 ...run distributed Erlang through a firewall?
5.19 ...find out which line my Erlang program crashed at?
5.20 ...distribute the Erlang programs I write to my friends/colleagues/users?
5.21 ...write to standard error (stderr) on a unix system?

6 Erlang Libraries
6.1 What's in the OTP libraries?
6.2 Is there a collection of data structures, e.g. balanced trees?
6.3 Is there a serial port driver for Erlang?
6.4 Is there a toolkit for building GUIs?
6.5 I've written a library to handle XYZ. How do I get it into the standard Erlang distribution?

7 Erlang Tools
7.1 Is there a pretty printer for Erlang?
7.2 Where is the source for LEEX (the erlang lexer)?
7.3 Is there a diagram tool for Erlang?
7.4 What code testing tools and suites exist for and in Erlang/OTP?
7.5 Is there a way to benchmark an Erlang implementation?
7.6 Does anyone have a magic file for Erlang?
7.7 Is there an Erlang IDE?
7.8 Are there Erlang Coding Guidelines?
7.9 What refactoring tools are there for Erlang
7.10 What static code analysis tools are there?
7.11 Is there a "reverse compiler" for BEAM files?

8 Implementation and Ports of Erlang
8.1 What Production-quality implementations of Erlang are there?
8.2 What Experimental and Research Implementations are there?
8.3 Which version of Erlang am I running?
8.4 What operating systems does Erlang run on?
8.5 What implementations of the Erlang Virtual Machine are there?
8.6 Is there an unofficial port for...?
8.7 Can Erlang compiled under Microsoft Windows?
8.8 Can Erlang be cross compiled?
8.9 Is Erlang small enough for Pocket PCs?
8.10 Is Erlang small enough for embedded systems?

9 Troubleshooting, Problems and 'Gotchas'
9.1 Why can't I write a = 3 (badmatch)?
9.2 Why can't I change the value of a variable?
9.3 Why do lists of numbers get printed incorrectly?
9.4 Why can't I call arbitrary functions in a guard?
9.5 Why can't I use "or" in a guard?
9.6 Why does 'catch' give me a syntax error?
9.7 What is a sticky directory?
9.8 Why won't my distributed Erlang nodes communicate?
9.9 When distribution won't work
9.10 Known problems
9.11 Why does my application die every second time I load new code into it?
9.12 Why can't I open devices (e.g. a serial port) like normal files?
9.13 Why doesn't the stack backtrace show the right functions for this code:
9.14 What do I do if I get an error when compiling Open Source Erlang?
9.15 Why do errors in the shell kill other processes?

10 Academic and Historical Questions
10.1 Why is Erlang called "Erlang"?
10.2 Who invented Erlang?
10.3 Where does Erlang syntax come from?
10.4 Why is Ericsson giving away Erlang?
10.5 What can I do for Open Source Erlang?
10.6 What does soft realtime mean?
10.7 How did the first Erlang compiler get written?
10.8 Erlang Syntax and Semantics Details
10.9 Is the order of message reception guaranteed?
10.10 If I send a message, is it guaranteed to reach the receiver?
10.11 What limits does Erlang have?
10.12 Do funs behave during a code change?
10.13 Examples of bound funs causing surprises
10.14 Is it just me, or are records ugly?
10.15 Can a process receive messages with varying priorities?
10.16 Flamewars
10.17 Erlang should have a static type checker
10.18 Why do we have to have yet another programming language; C++ (or Java, or Visual Basic) does everything.
10.19 Erlang should use a Just In Time compiler
10.20 Erlang should be object oriented
10.21 How are strings implemented and how can I speed up my string code?
10.22 How does the Garbage Collector work?
10.23 Can I exploit knowledge about my program to make the GC more efficient?
10.24 Could the Java Virtual Machine be used to run Erlang?
10.25 Is it possible to prove the correctness of Erlang programs?
10.26 I've heard it's a bad idea to program defensively in Erlang. Why?

11 Mnesia Database Questions
11.1 What is Mnesia good at?
11.2 What is Mnesia not so good at?
11.3 Is Mnesia good for storing blobs?
11.4 Is there an SQL interface for mnesia?
11.5 How much data can be stored in Mnesia?
11.6 Contributors