Live data from Hacker News

`curl wttr.in`: Weather in your terminal

github.com

111–120 of 147 posts

Re: `curl wttr.in`: Weather in your terminal

#112

Earlier quoted context omitted.

but imagine if you're in a bunker hacking on your fav project, no artificial light and you wonder.. shall i go to the surface? you curl this website and, if tolerable weather conditions, you plan your ascent.

Than you need a webcam out there, with a thermometer in the field of view. I live in a big city, it could be raining frogs in one part and a happy sunny day in the other and the best thing any weather report could say to me is 'expect rain'. And if I need to go it doesn't even matter what the report says or if I have/have not an umbrella with me. Honestly for the last decade even if I look at the weather report I loo…

> I live in a big city, it could be raining frogs in one part and a happy sunny day in the other and the best thing any weather report could say to me is 'expect rain'.

Just in case you haven't seen it: some services provide conditions and forecasts for particular locations with better resolution than ‘the city’, and can show the projected movement of rainclouds.

(You'll have to research the services for your country yourself, as I doubt it that my local one is useful for outsiders. But I'd guess that these days many big web services have these features.)

Re: `curl wttr.in`: Weather in your terminal

#113

Earlier quoted context omitted.

This is true of anything that ever renders to your terminal. I'm not sure this class of issue is worth worrying about, generally. Sure, these are neat and scary examples. Have you seen some of the recent GPU driver ACEs? Better not render any graphics! A generalization of this is "receiving information from third parties can lead to security issues" which is of course true. Untrusted inputs are always untrusted. Pipi…

> Better not render any graphics! Unironically a good idea. Graphics have always been a mistake - most engineers would agree that if we stuck with very basic output, our software would be in a much better place than today (and more usable, too!)

i both agree and disagree with this. on one hand, it’s true that having everything run in CLI mode would probably make programs truly cross platform. for example, recently I had to use namebenchmark to find the best DNS for my needs. on the M1 mac, the program cannot be run since it’s 32 bit. but i managed to simply run it in a terminal instead by calling its python script (used version 2.7). now i get to run this app on any platform since python is also cross platform. but the GUI version would not be easily ported to linux, windows, etc.

on the other hand, most users are not like me. they want something they can interact with using a mouse, and they often use keyboard only to enter words, not commands or shortcuts. so GUI has definitely a place in today’s world.

Re: `curl wttr.in`: Weather in your terminal

#114
post #72

Earlier quoted context omitted.

Is curl unsafe? This is a pretty basic invocation of curl, no fancy flags needed.

Curl isn't the problem they're describing. The remote can assume you're running it in a terminal (especially since the user agent string indicates you're using curl) and can send malicious escape sequences in the body, which will be interpreted by your terminal emulator in most cases. This is true of any program that prints output directly from a remote host / untrusted source. In the event your terminal emulator has…

is there way to “sanitize” the curl output such that escaping is disabled?

another commenter mentioned the threats of graphics, but this seems more concerning, esp. in an elevated shell. maybe pipe curl to a text file and inspect before running?

Re: `curl wttr.in`: Weather in your terminal

#115

Earlier quoted context omitted.

I'm well aware. In this case, I tend to strongly prefer the prescriptivist view to the prescriptivist, and misuse generates confusion rather than clarity. Words ... should mean things. Particularly when they're specifically referring to illegitimate reasoning in the first place. "Enormity", "disinterested", and "very unique" are others on my list.

Good luck with your quest

It's my windmill, and I can tilt if I want to.

Re: `curl wttr.in`: Weather in your terminal

#116
post #104

Earlier quoted context omitted.

Hard disagree, it has a lot of value and there's a reason it still exists and lots of tooling is still developed for running in terminals and shells, sometimes as exclusive target. Problems with untrusted, unknown input from any source affects *all* software that process it, internet browsers, document editors, archive extractors, even just opening a file can do lots of funky stuff depending on the file system.

Yes, and I use terminal emulators too, but I look at it the same way I look at browsers. Sure, there is a lot of useful stuff being made with heavy Javascript dependencies, weird Web frameworks, etc., but this doesn't mean that the technology is good in itself.

a terminal is the bare minimum you get when installing an OS (think Arch). is what gives you the power and speed to shape your workflow exactly the way you want it. running shell inside Emacs is not a bad idea, but you don’t get emacs when you install a new OS. you get a terminal that then lets you install emacs. at that point, you might as will just use the terminal.

Re: `curl wttr.in`: Weather in your terminal

#117
So I do a basic `curl wttr.in` and I get back a line "Weather report: not found" followed however, by what appears to be a full weather report. Two things:

1. Either give me an error and exit, or warn me about something meaningful 2. Show me the location of the weather report, as it stands I'm left guessing

Otherwise, it's nice to see people making simple text interfaces for important data like this.

Re: `curl wttr.in`: Weather in your terminal

#118
Igor created several great cli projects like cheat.sh[1], late.nz[2], QRenco.de[3],rate.sx[4]

Also, he maintains the awesome-console-services[5] list

[1] https://github.com/chubin/cheat.sh

[2] https://github.com/chubin/late.nz

[3] https://github.com/chubin/qrenco.de

[4] https://github.com/chubin/rate.sx

[5] https://github.com/chubin/awesome-console-services

Re: `curl wttr.in`: Weather in your terminal

#120
post #87

Earlier quoted context omitted.

> Better not render any graphics! Unironically a good idea. Graphics have always been a mistake - most engineers would agree that if we stuck with very basic output, our software would be in a much better place than today (and more usable, too!)

Engineers are not UX designers, so their opinion on UX has little value imo.

Engineers can't be users?
Post reply on HN