The Mystique of Erlang “Do you hear that, Mr. Anderson? That is the sound of inevitability.” - Agent Smith
Hello World v1.0 “Hello World”. or -module(hello). -export([start/0]). start() -> io:format(“Hello World~n”).
Erlang Introduction Makes hard things easy But also makes easy things hard Virtual machine called BEAM Brutally efficient, and brutally ugly Based on Prolog
Current Uses Cloud-based databases CouchDB SimpleDB Facebook Chat GitHub egitd Yaws Wings 3D
Erlang Advantages Functional programming language Dynamic typing Built for concurrency Extremely reliable No threading Lightweight processes “Let it crash” mantra Hot-swappable code
Entirely (non-pure) Functional Programs built entirely out of functions No objects anywhere Functions are first-class citizens Functions usually return the same values, given the same inputs Functions usually do not have side effects They usually not modify program state Variables can only be assigned to once
Erlang Wrap-up Makes hard things easy and easy things hard Prolog-style syntax alien to most Functional programming paradigm Extremely efficient Extremely reliable “Let it crash” philosophy simplifies code Dynamic typing results in better productivity Simple concurrency Hot swapping code
Resources Erlang Programming http://www.erlang.org/ Erlang (programming language) http://en.wikipedia.org/wiki/Erlang_(programming_language) The *Real* Erlang "Hello, World!“ http://egarson.blogspot.com/2008/03/real-erlang-hello-world.html Erlang for C, C++ and Java Programmers http://tamale.net/erlang/tutorial.shtml