Noticed this yesterday when I was going to download R14B02. Took me a minute to make sure I was on the right site...
Now I can't wait for them to update the online man pages. Something like redis.io documentation would be ideal. A console right there, shows the complexity of functions. I'd be so excited...
Congratulation! Better look. Under Links->Erlang applications and projects, please consider to include Erlang apps such as Riak, RabbitMQ, CouchDB, ejabberd, Mochiweb, Webmachine and Zotonic.
-module(opine).
-export([opine/0]).
-import(io).
-import(random).
opine() ->
io:fwrite("I "),
X = random:uniform(),
if
X > 0.2 ->
io:fwrite("love");
true ->
io:fwrite("hate")
end,
io:fwrite(" the new website.\n").
-module(opine).
-export([opine/0]).
opine() ->
S = case random:uniform() > 0.2 of
true -> "love";
false -> "hate"
end,
io:format("I ~s the new website.~n", [S]).
-module(opine).
-export([opine/0]).
opine() -> io:format(gen_opine(random:uniform())).
gen_opine(R) when R > 0.2 -> "I love the new website.~n";
gen_opine(_) -> "I hate the new website.~n".
-module(opine).
-export([opine/0]).
opine() ->
io:format("I ~s the new website.~n",[gen_opine(random:uniform())]).
gen_opine(R) when R > 0.2 -> love;
gen_opine(_) -> hate.
Heh, won't quite work since you used ~s for atoms, and also, mine is better because it's more flexible if you want to change the format of an opinion for a specific score range ;P
17 comments
[ 3.0 ms ] story [ 44.6 ms ] threadNow I can't wait for them to update the online man pages. Something like redis.io documentation would be ideal. A console right there, shows the complexity of functions. I'd be so excited...
Citing a simple mailing list demonstration here: http://www.erlang.org/%3C/div%3E%3Cdiv%3E%3Ch1%20style=%22fo...
http://www.erlang.org/erldoc?q=mensia&x=0&y=0
I still prefer erldocs, as the author I am bias though :)
Wonder what logic they followed to design the new site.