erlang

初めて触ってみたんだけど動かない。コンパイルオプションとかいるのかな。

~/src/otp_src_R12B-0/bin nozaki$ ./erl
Erlang (BEAM) emulator version 5.6 [source] [smp:2] [async-threads:0] [kernel-poll:false]

Eshell V5.6  (abort with ^G)
1> http:request("http://www.google.com/").
** exception exit: {noproc,
                    {gen_server,call,
                     [httpc_manager,
                      {request,
                       {request,undefined,<0.31.0>,0,http,
                        {"www.google.com",80},
                        "/",[],get,
                        {http_request_h,undefined,"keep-alive",undefined,
                         undefined,undefined,undefined,undefined,undefined,
                         undefined,...},
                        {[],[]},
                        {http_options,infinity,true,[],undefined,false},
                        "http://www.google.com/",[],none,[]}},
                      infinity]}}
     in function  gen_server:call/3
     in call from http:handle_request/6

追記:portで入れるときは+smpをいれないと意味ないです。

> sudo port install erlang +smp
smpはデフォルトでオンなのでオフで試したいときは
> erl -smp disable