Main Page

From Erlang Community

Your Erlang Community Site

Welcome to trapexit.org, the Erlang community site where you can read news and weblogs related to Erlang/OTP, discuss projects, issues and ideas with other Erlang developers, and read and publish articles and HowTos related to Erlang/OTP.

Trapexit News

tryerlang.org is Live!

tryerlang.org is an interactive hands-on tutorial that allows you to try the power of Erlang directly in the browser. Try the power of the Erlang shell without installing anything to your machine! Visit: http://www.tryerlang.org

What is Erlang and OTP?

Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. Originally developed at Ericsson, it was released as open source in 1998.

OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems. It includes its own distributed database, applications to interface towards other languages, debugging and release handling tools. These tools and applications distributed by Ericsson are complemented by numerous other open source projects.

Here is an example of Erlang code:

-module(beersong).
-author('BillClementson').
-export([sing/0]).
-define(TEMPLATE_0, "~s of beer on the wall, ~s of beer.~n"
                    "Go to the store and buy some more," 
                    "99 bottles of beer on the wall.~n").
-define(TEMPLATE_N, "~s of beer on the wall, ~s of beer.~n"
                    "Take one down and pass it around, ~s"
                    " of beer on the wall.~n~n").

create_verse(0)      -> 
    {0, io_lib:format(?TEMPLATE_0, phrase(0))};
create_verse(Bottle) -> 
    {Bottle, io_lib:format(?TEMPLATE_N, phrase(Bottle))}.

phrase(0)      -> ["No more bottles", "no more bottles"];
phrase(1)      -> ["1 bottle", "1 bottle", "no more bottles"];
phrase(2)      -> ["2 bottles", "2 bottles", "1 bottle"];
phrase(Bottle) -> 
     lists:duplicate(2,integer_to_list(Bottle) ++ " bottles") ++ 
                     [integer_to_list(Bottle-1) ++ " bottles"].
bottles() -> lists:reverse(lists:seq(0,99)).
sing() ->
    lists:foreach(fun spawn_singer/1, bottles()),
    sing_verse(99).
spawn_singer(Bottle) ->
    Pid = self(), 
    spawn(fun() -> Pid ! create_verse(Bottle) end).
sing_verse(Bottle) ->
    receive
	{_, Verse} when Bottle == 0 ->
	    io:format(Verse);
	{N, Verse} when Bottle == N ->
	    io:format(Verse),
	    sing_verse(Bottle-1)
    after 
	3000 ->
	    io:format("Verse not received after 3 seconds"
                      " - re-starting singer~n"),
	    spawn_singer(Bottle),
	    sing_verse(Bottle)
    end.


Starter

Good places to start on trapexit.org

HowTo documents - Tutorials and Guides for Erlang developers
Erlang Cookbook - A collection of Erlang solutions to specific problems
Erlang Concepts - Articles dealing with specific Erlang aspects
Erlang Best Practices - Articles dealing with best practices in Erlang
Erlang Articles - Articles of interest to Erlang developers and testers
ErlangJobs - Erlang and Erlang related Jobs
Links to Erlang related sites outside Trapexit
RSS Feeds related to Erlang, including blogs and software development

Latest Forum Posts

Erlang

north face jackets
  (Wed Feb 22, 2012 7:35 am)
RE: Erlang + ViM
  (Wed Feb 22, 2012 7:35 am)

Open Telecom Platform (OTP)

How to access the internet with Huawei E587?
  (Wed Feb 22, 2012 5:46 am)
Huawei E587 mobile hotspot for Nook Tablet
  (Wed Feb 22, 2012 2:09 am)

Advanced Erlang/OTP

jinterface json riak
  (Fri Feb 17, 2012 3:25 pm)
RE: list_to_atom(String) and D.O.S. attacs
  (Fri Feb 17, 2012 7:02 am)

Open Source Projects

RE: payroll management
  (Mon Feb 13, 2012 7:35 am)

User Contributions

RE: Leex - a lexical analyser generator
  (Wed Feb 22, 2012 6:01 am)

Trapexit Forums

cheap north face jackets
  (Wed Feb 22, 2012 7:36 am)

Latest Planet Entries

REALITY.SYS: Stierkampf mal anders.
  (Thu Jan 01, 1970 12:00 am)
REALITY.SYS: Immer dieses Händewaschen?
  (Thu Jan 01, 1970 12:00 am)
ejabberd@jabber.ru: ejabberd 2.1.8 - Fix PubSub
  (Thu Jan 01, 1970 12:00 am)
Process-one Blogs: ?Google Social?: A paradox of its own
  (Thu Jan 01, 1970 12:00 am)
ejabberd@jabber.ru: ejabberd 2.1.7, 3.0.0-alpha-3 and exmpp 0.9.7 -- security release
  (Thu Jan 01, 1970 12:00 am)

Latest Wiki Changes

Test Configuration
  (Thu Jan 01, 1970 12:00 am)
Hardcoding Expectations
  (Thu Jan 01, 1970 12:00 am)
Erlang Wiki
  (Thu Jan 01, 1970 12:00 am)

Mailing Lists Posts

Erlang questions mailing list

RE: Erlang ports and Perl
  (Tue Feb 21, 2012 3:30 am)

Yaws mailing list

RE: replace apache with yaws
  (Tue Feb 21, 2012 3:33 am)

Erlang Web mailing list

[Erlangweb-users] How to distributing the service?
  (Sat Sep 10, 2011 4:08 pm)

Ejabberd mailing list

RE: business loan express
  (Tue Feb 21, 2012 3:34 am)

RabbitMQ mailing list

RE: Streaming stock prices to long-polling clients
  (Tue Feb 21, 2012 1:19 pm)


Erlang/OTP Projects
Personal tools