Live data from Hacker News

A command-line weather app built using Elixir

github.com

21–30 of 67 posts

Re: A command-line weather app built using Elixir

#21
post #20

Temperature accurate to three decimals? That's kinda silly. It would be more useful to display the "felt temperature".

As well as, you know, the weather? Like temperature is an important part of weather, but it's often not even the most important one.

Re: A command-line weather app built using Elixir

#22
post #19

curl ' http://api.openweathermap.org/data/2.5/weather?q=london&mode... &>/dev/null | jgrep -s main.temp | figlet Put this in a function. Done. Gist here since copying and pasting above didn't work. https://gist.github.com/zaargy/384889cb44960e8559d5

My first thought was "pipe into figlet, done."

Re: A command-line weather app built using Elixir

#23
post #17
post #16

Earlier quoted context omitted.

Indeed, but that's a separate point. The question was why Go was listed as a dependency and my answer was because it's a source code repository. Also, you left off GOROOT from your Go environment :)

> The question was why Go was listed as a dependency You may have read it that way but the question was explicitly referring to "working Go environment"

Only because that was the terminology used on the Github readme. He was quoting it verbatim rather than asking what environmental variables needed setting. The reason I think this is because he also went on to say "I thought one of golang's selling points was the fact that it created a simple binary." which relates directly to discussions people make about JIT compiled (eg Python, Javascript, etc) vs AOT compiled (eg C++ and Go).

It's also worth noting that you're only specifically discussing environmental variables, where as a development environment is more than just that. Aside having your build tools in PATH (and lets not forget that gcc and make need this just as much as go does), you need supporting shells for the ./config(ure) scripts, any source libraries for C++ includes, and so forth. So you could equally use the same "working [language] environment" terminology to describe C++ - or in fact any other programming language too.

Which is why I think he was asking why he needed Go installed to begin with.

Re: A command-line weather app built using Elixir

#24
post #8
post #5

Interesting describing ASCII art as 'beautiful'. You can tell this isn't Designer News :P

I son't know but I love ncurses software and find the actual UI "beautiful since it gets me the information quickly and quickly lets me get things done. I find my wee-chat with 256 color urxvt with Source Code Pro font in Light Solarized to be the best looking IRC client ever :)

this isn't even ncurses, it's just stdout

Re: A command-line weather app built using Elixir

#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
                            __  _  _     ___   _____
                           /_ || || |   |__ \ | ____|
                            | || || |_     ) || |__
                            | ||__   _|   / / |___ \
                            | |   | | _  / /_  ___) |
                            |_|   |_|(_)|____||____/

Re: A command-line weather app built using Elixir

#28

I'm excited about this not because I want to use it, but because it is a great example of an Elixir app. I'm in the process of learning Elixir, and it was cool to see someone else's code and be able to make sense of most of it. Thanks for posting this!

I don't know Elixir, but it does some questionable things. For instance, it appears to read and process the entire ascii_chars.txt file for each character in the output. It's not a big file, but it wouldn't be difficult to read it once.

Re: A command-line weather app built using Elixir

#30
post #23
post #17

Earlier quoted context omitted.

> The question was why Go was listed as a dependency You may have read it that way but the question was explicitly referring to "working Go environment"

Only because that was the terminology used on the Github readme. He was quoting it verbatim rather than asking what environmental variables needed setting. The reason I think this is because he also went on to say " I thought one of golang's selling points was the fact that it created a simple binary. " which relates directly to discussions people make about JIT compiled (eg Python, Javascript, etc) vs AOT compiled (…

Alright, well hopefully somebody gleans something from our little thread either way.
Post reply on HN