Erlang is a general-purpose, concurrent, declarative, functional programming language and runtime environment developed by Ericsson, a Swedish multinational provider of communications technology and services. Erlang is dynamically typed and has a pattern matching syntax. The language solves difficult problems inherent in parallel, concurrent environments. It uses sets of parallel supervised processes, not a single sequential process as found in most programming languages.
Erlang was created in 1986 at the Ellemtel Telecommunication Systems Laboratories for telecommunication systems. The objective was to build a simple and efficient programming language resilient large-scale concurrent industrial applications.
Besides telecommunication systems and applications and other large industrial real-time systems, Erlang is particularly suitable for servers for internet applications, e-commerce, and networked database applications. The versatility of the language is, in part, due to its extensive collection of libraries.
The language is released under an open source license, initially the Erlang Public License, now supplanted by the Apache License 2.0.
1. Erlang Handbook by Bjarne Däcker, Robert Virding
The Erlang Handbook is a concise summary of the language features and the runtime system. Readers don’t need to wade through a large body of text; the book is only 46 pages. A good introduction to the world of Erlang.
It’s aimed at people with some programming experience, serving as a quick introduction to the Erlang domain.
The book was originally written by Bjarne Däcker and subsequently revised by Robert Virding.
The book focuses on the following areas:
- Structure of an Erlang program – offers a brief introduction to module syntax, module attributes, comments, character set, and reserved words.
- Data types – unary data types, compound data types, escape sequences, and type conversions.
- Pattern matching – variables and pattern matching.
- Functions – function definition, function calls, expressions including Boolean expressions, compound expressions, guard sequences, tail recursion, funs, and built-in functions.
- Processes – examines process creation, registered processes, process communication, process termination, monitors, process priorities, and process dictionary.
- Error handling – deals with error handling within a process. Such errors are known as exceptions.
- Distributed Erlang – looks at nodes, node connections, hidden nodes, cookies, distribution built-in functions, distribution command line flags, and distribution modules.
- Ports and Port Drivers.
- Code loading.
This text is made available under a Creative Commons Attribution-ShareAlike 3.0 License. The handbook is typeset using LaTeX.
2. Études for Erlang by J. David Eisenberg
Études for Erlang provides descriptions of programs that you can write in Erlang.
The programs are typically short, and each one is designed as practice material for a particular Erlang programming concept.
These programs have not been designed to be of considerable difficulty, though they may ask the reader to stretch a bit beyond the immediate material and examples that are found in the book Introducing Erlang.
Example programs cover:
- Functions and Modules.
- Atoms, Tuples and Pattern Matching.
- Logic and Recursion.
- Higher Order Functions and List Comprehensions.
- Handling Errors.
- Storing Structured Data.
- Getting Started with OTP.
This book is released under an open source license.
3. Stuff Goes Bad: Erlang in Anger
This book intends to be a little guide about how to be the Erlang medic in a time of war.
It is first and foremost a collection of tips and tricks to help understand where failures come from, and a dictionary of different code snippets and practices that helped developers debug production systems that were built in Erlang.
The first three chapters explore writing applications:
- How to Dive into a Code Base.
- Building Open Source Erlang Software.
- Planning for Overload.
The next three chapters focus on diagnosing applications:
- Connecting to Remote Nodes.
- Runtime Metrics.
- Reading Crash Dumps.
- Memory Leaks.
- CPU and Scheduler Hogs.
The book is published under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
All books in this series:
|Free Programming Books|
|Ada||ALGOL-like programming language, extended from Pascal and other languages|
|Agda||Dependently typed functional language based on intuitionistic Type Theory|
|Arduino||Inexpensive, flexible, open source microcontroller platform|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Awk||Versatile language designed for pattern scanning and processing language|
|Bash||Shell and command language; popular both as a shell and a scripting language|
|BASIC||Beginner’s All-purpose Symbolic Instruction Code|
|C||General-purpose, procedural, portable, high-level language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|Clojure||Dialect of the Lisp programming language|
|COBOL||Common Business-Oriented Language|
|Coq||Dependently typed language similar to Agda, Idris, F* and others|
|Crystal||General-purpose, concurrent, multi-paradigm, object-oriented language|
|CSS||CSS (Cascading Style Sheets) specifies a web page’s appearance|
|D||General-purpose systems programming language with a C-like syntax|
|Dart||Client-optimized language for fast apps on multiple platforms|
|Dylan||Multi-paradigm language supporting functional and object-oriented coding|
|ECMAScript||Best known as the language embedded in web browsers|
|Eiffel||Object-oriented language designed by Bertrand Meyer|
|Elixir||Relatively new functional language running on the Erlang virtual machine|
|Erlang||General-purpose, concurrent, declarative, functional language|
|F#||Uses functional, imperative, and object-oriented programming methods|
|Factor||Dynamic stack-based programming language|
|Forth||Imperative stack-based programming language|
|Fortran||The first high-level language, using the first compiler|
|Go||Compiled, statically typed programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|HTML||HyperText Markup Language|
|Icon||Wide variety of features for processing and presenting symbolic data|
|J||Array programming language based primarily on APL|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|Julia||High-level, high-performance language for technical computing|
|Kotlin||More modern version of Java|
|LabVIEW||Designed to enable domain experts to build power systems quickly|
|LaTeX||Professional document preparation system and document markup language|
|Lisp||Unique features - excellent to study programming constructs|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Lua||Designed as an embeddable scripting language|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Objective-C||Object-oriented language that adds Smalltalk-style messaging to C|
|OCaml||The main implementation of the Caml language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|PHP||PHP has been at the helm of the web for many years|
|PostScript||Interpreted, stack-based and Turing complete language|
|Prolog||A general purpose, declarative, logic programming language|
|Python||General-purpose, structured, powerful language|
|QML||Hierarchical declarative language for user interface layout - JSON-like syntax|
|R||De facto standard among statisticians and data analysts|
|Racket||General-purpose, object-oriented, multi-paradigm, functional language|
|Raku||Member of the Perl family of programming languages|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Scheme||A general-purpose, functional language descended from Lisp and Algol|
|Scratch||Visual programming language designed for 8-16 year-old children|
|SQL||Access and manipulate data held in a relational database management system|
|Standard ML||General-purpose functional language characterized as "Lisp with types"|
|Swift||Powerful and intuitive general-purpose programming language|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|
|TeX||Markup and programming language - create professional quality typeset text|
|Vala||Object-oriented language, syntactically similar to C#|
|VHDL||Hardware description language used in electronic design automation|
|VimL||Powerful scripting language of the Vim editor|
|XML||Rules for defining semantic tags describing structure ad meaning|