Live data from Hacker News

A command-line weather app built using Elixir

github.com

31–40 of 67 posts

Re: A command-line weather app built using Elixir

#32
post #27

function weather(){curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=metric" | jq .main.temp | figlet -kcf big} $ weather london __ _ _ ___ _____ /_ || || | |__ \ | ____| | || || |_ ) || |__ | ||__ _| / / |___ \ | | | | _ / /_ ___) | |_| |_|(_)|____||____/

But that's not web-scale and written in a functional language!

Re: A command-line weather app built using Elixir

#35
Does not work (osx):

  ~/tmp/elixir-weather $ ./weather  Amsterdam

  =INFO REPORT==== 7-May-2015::16:37:56 ===
      application: elixir
      exited: {bad_return,
                  {{elixir,start,[normal,[]]},
                   {'EXIT',
                       {{badmatch,{error,enotsup}},
                        [{elixir,start,2,[{file,"src/elixir.erl"},{line,34}]},
                         {application_master,start_it_old,4,
                             [{file,"application_master.erl"},{line,272}]}]}}}}
      type: temporary
  Failed to start Elixir.
  error: {error,
             {elixir,
                 {bad_return,
                     {{elixir,start,[normal,[]]},
                      {'EXIT',
                          {{badmatch,{error,enotsup}},
                           [{elixir,start,2,[{file,"src/elixir.erl"},{line,34}]},
                            {application_master,start_it_old,4,
                                [{file,"application_master.erl"},
                                 {line,272}]}]}}}}}}

Re: A command-line weather app built using Elixir

#40
I'm sorry if this comes across as negative, but this is an example of using the wrong tool for the job, IMO.

I love Erlang and Elixir because BEAM gives me easy concurrency, metaprogramming and best of all, fault tolerance via supervisors. For a service that I need to stay alive, this is great. For a simple command line utility, I'd lean more toward a compiled language like Go, Haskell, Common Lisp, etc.

Post reply on HN