News for hackers. Stuff that matters.
Re:Curl Wttr.in by jtokoph on Friday June 26, 2020 @02:26AM (#23649275)
This scared me the first time I tried it because the output was perfectly sized to my terminal. I couldn't fathom how it was possible for the server to know my terminal width.

It turns out my terminal was set at 125 characters wide and wttr.in outputs a 125 character width display.

Re:Curl Wttr.in by Drdrdrq on Friday June 26, 2020 @03:06AM (#23649494)
Curious - wouldn't it be possible to output terminal escape characters to perform some "magic" like moving at the end of the line? Or does curl protect users by not outputting them? (I think not, because fetching a binary file by mistake sometimes garbles the output)
Re:Curl Wttr.in by igor_chubin on Friday June 26, 2020 @03:48AM (#23649706)
It is possible, but it brings nothing, because you don't only need to move to the end of the line but print something in between, and for that the server mush know the width of your terminal