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

HTTP/1.1 client

After recent experiences and discussions with the Erlang community, ETC have decided to develop and release an HTTP/1.1 client. You can find more information under the open source section of our website and on bitbucket. You can also view this and other user contributions in the User Contribution Section.

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: length of utf-8 string
  (Mon Jun 29, 2009 4:37 pm)
RE: length of utf-8 string
  (Thu Jun 25, 2009 11:49 pm)

Open Telecom Platform (OTP)

Problem with long names and nodes()
  (Mon Jun 29, 2009 5:12 pm)
RE: Can jinterface talk from Erlang to Java?
  (Mon Jun 29, 2009 5:08 pm)

Advanced Erlang/OTP

RE: How to get to know that supervisor restarted a process?
  (Thu Jul 02, 2009 10:13 am)
How to get to know that supervisor restarted a process?
  (Wed Jul 01, 2009 1:22 pm)

User Contributions

RE: neotoma, a PEG/packrat toolkit
  (Mon Jun 29, 2009 1:18 pm)

Trapexit Forums

RE: Can't post to the forum
  (Thu Jan 22, 2009 3:31 am)

Latest Planet Entries

Caoyuan's Blog: Scala Plugin Version 1 for NetBeans 6.7 Released
  (Thu Jul 02, 2009 12:15 am)
Caoyuan's Blog: Rats! Plugin for NetBeans#1: Syntax Highlighting
  (Wed Jul 01, 2009 9:42 pm)
Joe's Blog: Introducing haproxy_join, and how to use it with Chef.
  (Wed Jul 01, 2009 9:24 pm)
Simon Willison's Weblog: PubSub-over-Webhooks with RabbitHub
  (Wed Jul 01, 2009 8:22 pm)
Dukes of Erl: osmos
  (Wed Jul 01, 2009 3:45 pm)

Latest Wiki Changes

Erlang Syntax Highlight for Web pages
  (Tue Jun 30, 2009 1:49 pm)
User:Jldupont
  (Tue Jun 30, 2009 1:44 pm)
Mnesia Table Fragmentation
  (Sat Jun 06, 2009 12:23 pm)

Mailing Lists Posts

Erlang questions mailing list

RE: erlang,mnesia and Windows
  (Thu May 28, 2009 4:27 pm)

Yaws mailing list

RE: badmatch in reformat_request
  (Sun Feb 22, 2009 9:49 pm)

Erlyweb mailing list

2-to-many relationship in ErlyWeb
  (Wed May 13, 2009 6:46 am)

RabbitMQ mailing list

RE: RabbitMQ perfomance testing & troubles
  (Fri Apr 25, 2008 6:15 am)


Erlang/OTP Projects
Personal tools