Main Page
From Erlang Community
| Revision as of 15:16, 12 September 2007 (edit) Admin (Talk | contribs) ← Previous diff |
Revision as of 15:35, 21 September 2007 (edit) (undo) Karl (Talk | contribs) m (Changed RSS-url:s to point to forum subdomain) Next diff → |
||
| Line 10: | Line 10: | ||
| {| style="margin-left: 0px; margin-top: 15px; background:#fcfcfc; border:1px solid #860404; cell-padding:0 white-space:nowrap; overflow: hidden" | {| style="margin-left: 0px; margin-top: 15px; background:#fcfcfc; border:1px solid #860404; cell-padding:0 white-space:nowrap; overflow: hidden" | ||
| |style="color:#000; font-size:85%; margin-top:20"| | |style="color:#000; font-size:85%; margin-top:20"| | ||
| - | <irss max=1 news=true>http:// | + | <irss max=1 news=true>http://forum.trapexit.org/rss_mod.php?f=19&t=1</irss> |
| |} | |} | ||
| Line 85: | Line 85: | ||
| |style="color:#000; font-size:85%; margin-top:0; "| | |style="color:#000; font-size:85%; margin-top:0; "| | ||
| <h2 class="#bodyContent">Latest Forum Posts</h2> | <h2 class="#bodyContent">Latest Forum Posts</h2> | ||
| - | <irss max=2>http:// | + | <irss max=2>http://forum.trapexit.org/rss_mod.php?f=23&t=1</irss> |
| - | <br/><irss max=2>http:// | + | <br/><irss max=2>http://forum.trapexit.org/rss_mod.php?f=7&t=1</irss> |
| - | <br/><irss max=2>http:// | + | <br/><irss max=2>http://forum.trapexit.org/rss_mod.php?f=14&t=1</irss> |
| - | <br/><irss max=1>http:// | + | <br/><irss max=1>http://forum.trapexit.org/rss_mod.php?f=20&t=1</irss> |
| - | <br/><irss max=1>http:// | + | <br/><irss max=1>http://forum.trapexit.org/rss_mod.php?f=5&t=1</irss> |
| |} | |} | ||
| Line 107: | Line 107: | ||
| |style="color:#000; font-size:85%; margin-top:0; "| | |style="color:#000; font-size:85%; margin-top:0; "| | ||
| <h2 class="#bodyContent">Mailing Lists Posts</h2> | <h2 class="#bodyContent">Mailing Lists Posts</h2> | ||
| - | <irss max=1>http:// | + | <irss max=1>http://forum.trapexit.org/rss_mod.php?f=2&t=1</irss><br/> |
| - | <irss max=1>http:// | + | <irss max=1>http://forum.trapexit.org/rss_mod.php?f=11&t=1</irss><br/> |
| - | <irss max=1>http:// | + | <irss max=1>http://forum.trapexit.org/rss_mod.php?f=24&t=1</irss><br/> |
| - | <irss max=1>http:// | + | <irss max=1>http://forum.trapexit.org/rss_mod.php?f=25&t=1</irss><br/> |
| - | <irss max=1>http:// | + | <irss max=1>http://forum.trapexit.org/rss_mod.php?f=12&t=1</irss> |
| |} | |} | ||
Revision as of 15:35, 21 September 2007
Your Erlang Community SiteWelcome 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 NewsWhat is Erlang and OTP?Erlang is a programming language and a runtime system with strong built-in support for concurrency, distribution and fault tolerance. Originally developed at Ericsson, Erlang was released as open source in 1998. The Open Telecom Platform (OTP) is set of Erlang libraries and design principles providing middle-ware to develop distributed, fault tolerant, massively concurrent soft real-time systems. 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.
StarterGood places to start on trapexit.org HowTo documents - Tutorials and Guides for Erlang developers |
|

Digg It
Del.icio.us
Reddit
Facebook
Stumble Upon
Technorati

