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

RE: Running a unix command in an erlang program
  (Thu Sep 02, 2010 2:25 pm)
RE: Running a unix command in an erlang program
  (Wed Sep 01, 2010 4:11 pm)

Open Telecom Platform (OTP)

RE: Documenting message flows in gen_server
  (Wed Aug 25, 2010 1:14 am)
RE: SSL example
  (Tue Aug 24, 2010 11:41 am)

Advanced Erlang/OTP

RE: RichText and Multiline wxTextCtrl
  (Mon Aug 02, 2010 7:35 am)
RichText and Multiline wxTextCtrl
  (Sat Jul 31, 2010 1:48 pm)

Open Source Projects

RE: Neaterl - A pretty, alternative syntax for Erlang
  (Thu Jul 22, 2010 2:01 pm)

User Contributions

RE: tinch++: Interfacing Erlang from C++
  (Sun Aug 29, 2010 6:17 pm)

Trapexit Forums

Creating a mirror for a cluster of nodes
  (Tue Jul 27, 2010 3:45 pm)

Latest Planet Entries

Erlang Solutions
- Jobs: Subcontractors, Stockholm Sweden

  (Thu Sep 02, 2010 11:30 am)
Process-one Blogs: TextOne for iPhone, with photo sharing!
  (Thu Sep 02, 2010 8:43 am)
Damien Katz: What's New in CouchDB 1.0 Security 'n Stuff
  (Wed Sep 01, 2010 12:36 am)
Programming in the 21st Century: Common Sense, Part 1
  (Tue Aug 31, 2010 6:00 am)
Erlang Inside: Russia?s numerous contributions to the Erlang community ? Dmitrii Dimandt, creator of erlanger.ru
  (Mon Aug 30, 2010 4:58 pm)

Latest Wiki Changes

Mailing Lists Posts

Erlang questions mailing list

RE: diflucan dose r
i
  (Thu Sep 02, 2010 7:03 pm)

Yaws mailing list

RE: Yaws WebSockets and Safari (5.0.1)
  (Wed Aug 04, 2010 7:25 pm)

Erlang Web mailing list

[Erlangweb-users] Erlang Web 1.4.1 has been released
  (Thu Jul 01, 2010 1:57 pm)

Ejabberd mailing list

News for trapexit.ejabberd: Top brands 70% cheaper. or trave
  (Fri Aug 06, 2010 7:01 am)

RabbitMQ mailing list

Building relationships with educational institutions
  (Tue Feb 09, 2010 1:08 pm)


Erlang/OTP Projects
Personal tools