News for hackers. Stuff that matters.
Re:Erlang.org's new website look by nivertech on Saturday March 26, 2011 @05:20PM (#2373235)

    -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]).
Re:Erlang.org's new website look by metabrew on Saturday March 26, 2011 @06:53PM (#2373459)

    -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".
Re:Erlang.org's new website look by nivertech on Saturday March 26, 2011 @07:42PM (#2373558)

    -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.
Re:Erlang.org's new website look by metabrew on Sunday March 27, 2011 @06:24AM (#2374667)
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
Re:Erlang.org's new website look by nivertech on Sunday March 27, 2011 @09:40AM (#2374949)
Are you sure?

  [~]$ erl
  Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

  Eshell V5.8.3  (abort with ^G)
  1> io:format("~s ~s!~n",[hello, world]).
  hello world!
  ok
  2>
Re:Erlang.org's new website look by metabrew on Sunday March 27, 2011 @06:04PM (#2376209)
I stand corrected!
Re:Erlang.org's new website look by beej71 on Saturday March 26, 2011 @10:51PM (#2373995)
These are awesome. I'm such a Erlang novice.