by DavidBuchanan on 6/24/21, 12:45 AM
Author here - this was just a quick PoC, I'm pleasently surprised that it seems to be handling all the HN traffic.
It's served from a python script using aiohttp, behind nginx, on a $16/year VPS.
I might make a github repo with more details, but in the meantime, here's the server script: https://pastebin.com/ykUeppqc (apologies for pastebin, I don't have access to my github account at present)
Just in case the server dies, there's a video of it here: https://twitter.com/David3141593/status/1388602027484356614
by masswerk on 6/23/21, 8:08 PM
Fun fact: similar things, but much more general, were in the HTTP/1.1 standard from 1997. However, HTTP frames relied on HTTP chunks, which were fundamentally broken in the Win-HTTP-stack implementation. (Third party browsers like Netscape Navigator or Opera implemented a HTTP-stack of their own, but IE relied on the built-in implementation.)
(Because of this flaw, keep-alive was broken, as well, and requests stalled until they timed out. Which is, why everyone set the request timeout to just a short period and you couldn't type a HTTP request manually in a terminal anymore.)
by thepete2 on 6/23/21, 5:09 PM
A great example of doing something unintended by exploiting one's knowledge of the system. Awesome!
by tyingq on 6/23/21, 5:23 PM
Pretty neat. That sent me on a brief hunt out to see how it might work. It seems that PNG (including APNG) has a fairly easy to follow pattern of chunks. So this could be a fairly simple cgi-bin type script that just does a "sleep(2)" or similar when it encounters a fcTL (frame control) chunk.
See https://pyokagan.name/blog/2019-10-14-png/ for a good overview of how you might walk over PNG chunks.
by bawolff on 6/23/21, 8:25 PM
by rozab on 6/23/21, 4:46 PM
poor unappreciated APNG :(
by IncRnd on 6/23/21, 6:08 PM
This reminds me of adding an animated gif (that's a video of someone else) as my background in Zoom or other conferencing software. The result is that people won't see "me" but someone else when my camera is turned-off.
by jaffathecake on 6/24/21, 4:55 AM
Shameless self promotion: Did a video recently that explores how various image formats look as they load
https://youtu.be/-7k3H2GxE5E.
Includes adam7 PNG (used here), but covers other browser image formats + JPEG-XL.
by jmkjaer on 6/23/21, 6:12 PM
This is cool! It's interesting to see how programs handle this - the thumbnail in a specific gallery app on my Android phone is the first "frame", while it's the finished image in my file explorer.
by chronotis on 6/23/21, 8:20 PM
I am having flashbacks to the dial-up BBS days of the late 80s, where I made a decent local living designing animated logon screens for various sites in exchange for access to said sites. Had to optimize character animations based on the baud rate of the inbound modem connection, separate versions for 1200 and 2400 baud.
by ganzuul on 6/23/21, 7:43 PM
Long ago I was making node server which served partials of progressive JPEG files, stopping at IIRC the SOS headers. I had an 'enhance' button that worked. :)
It would have worked even better with JPEG 2000, but browsers killed that off for some reason. I miss the old Netscape days.
by yobert on 6/23/21, 5:51 PM
But can I play Doom on it?
by omoikane on 6/23/21, 5:12 PM
by barbazoo on 6/23/21, 4:55 PM
I can roughly imagine how this works but is there a technical explanation anywhere how this is done?
by anfractuosity on 6/23/21, 5:00 PM
Neat :) There's no way to do something similar with jpegs interlacing is there?
by codetrotter on 6/23/21, 4:56 PM
Safari on iPhone X / iOS 14.6
All I see is a slow loading blank page and then the final frame.
by exabrial on 6/24/21, 3:01 AM
Hah! From the right tool for the job dept!
by ellis0n on 6/24/21, 4:19 AM
optimize the png bitfields for gan transcoder and you got low cost twitch stream network
ps: eos
by crestinfosys on 6/24/21, 9:30 AM
Oh, really! Is this true?
by soheil on 6/23/21, 7:36 PM
Can it be used to playback a movie?
by The_rationalist on 6/23/21, 7:54 PM
Apng or animated webp are more suited for this though
by soheil on 6/23/21, 7:30 PM
Amazing hack, this is totally in the spirit of Hackernews, I wish there were more posts like this and less political, news centric stories.
I wonder if it is possible to completely remove opacity of old frames.