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

Choose The Right Watch to Reflect Your Personality
  (Sat Jan 14, 2012 6:26 am)
Which Big Brand Do You Prefer?
  (Sat Jan 14, 2012 6:21 am)

Open Telecom Platform (OTP)

RE: Connecting to different hosts
  (Thu Jan 12, 2012 7:10 am)
RE: Behaviour for sensor network
  (Thu Jan 12, 2012 2:47 am)

Advanced Erlang/OTP

file:sendfile for ssl socket (Erlang 15B) ?
  (Thu Jan 26, 2012 11:24 am)
RE: Starting Erlang VM as a separate thread
  (Wed Jan 11, 2012 8:24 am)

Open Source Projects

RE: Next Generation erlguten project
  (Thu Jan 19, 2012 3:34 pm)

User Contributions

RE: efficient json parser
  (Wed Dec 07, 2011 1:31 pm)

Trapexit Forums

RE: Shopping at the Online Computer Store
  (Tue Jan 24, 2012 5:55 pm)

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

Mailing Lists Posts

Erlang questions mailing list

Process backlogged
  (Mon Jan 09, 2012 4:29 am)

Yaws mailing list

RE: YAWS Web Hosting
  (Sat Dec 10, 2011 8:08 am)

Erlang Web mailing list

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

Ejabberd mailing list

tissot archetypal dream
  (Wed Jan 04, 2012 7:47 am)

RabbitMQ mailing list

RE: Streaming stock prices to long-polling clients
  (Tue Jan 17, 2012 10:40 am)


Erlang/OTP Projects
Personal tools