Re:A file that's both an acceptable HTML page and a JPEG (vi...
by daeken on Friday July 06, 2012 @03:10PM
(#4209197)
Note: Chrome or Firefox with WebGL required. I also wrote an article on how I got this down to 1kb, http://daeken.com/superpacking-js-demos , and just released a new demo based on the same techniques (747 bytes): http://demoseen.com/windowpane/nufl0wer.png.html
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by jack-r-abbit on Friday July 06, 2012 @03:36PM
(#4209295)
Holy Fuck.... that looked really cool as it brought my whole system to a dead stop. Took forever to recover enough to close the tab. :/
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by redthrowaway on Friday July 06, 2012 @04:39PM
(#4209536)
Really? I see no slowdown whatsoever. What are you running?
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by jack-r-abbit on Friday July 06, 2012 @05:00PM
(#4209628)
It didn't die this last time so I must have just had a perfect storm of activity right at that moment.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by ingenium on Friday July 06, 2012 @06:59PM
(#4210010)
Yeah it locks up Chrome for me, pressing Ctrl+w closed the tab after about 10 seconds. Chrome 20 on Ubuntu 12.04 x86_64. Core 2 Duo with Intel graphics.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by mediocregopher on Friday July 06, 2012 @11:31PM
(#4210632)
It did fine for me on Chrome 20, Arch 64bit. Also a dual core, but nVidia graphics. Maybe the intel graphics drivers are being weird?
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by ophis on Saturday July 07, 2012 @01:01PM
(#4212104)
works fine on Win7 32bit + opera 12
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by 9k9 on Friday July 06, 2012 @07:51PM
(#4210143)
I started zooming out and my graphics driver crashed which is quite a rare a occurrence these days.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by sneak on Friday July 06, 2012 @09:05PM
(#4210343)
Works perfectly here, in both "in browser" as well as "totally blowing my mind" mode. Kudos, sir.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by denysonique on Friday July 06, 2012 @03:10PM
(#4209193)
Another one is Matraka: http://www.p01.org/releases/MATRAKA/matraka.png.html
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by daeken on Friday July 06, 2012 @03:14PM
(#4209211)
Matraka is seriously worth a watch. All 2d canvas, and it actually has music in a 1k. What's funny is that p01 is the reason I got into web demo development, and he's actually using the png technique I came up with. Makes me proud to be a hacker.
Edit: It also won a much-deserved first place in the DemoJS 1k compo.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by StavrosK on Friday July 06, 2012 @03:56PM
(#4209354)
Wait, is it using the image data as code to evaluate? My mind is too blown to appreciate this.
EDIT: Oh, okay. It's not a valid PNG. That would have been all sorts of incredible. Still great, though.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by tlack on Friday July 06, 2012 @06:03PM
(#4209858)
I wrote up a little explanation of how it works here https://gist.github.com/3039247
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by StavrosK on Friday July 06, 2012 @07:16PM
(#4210040)
Very interesting, thanks!
By the way, the for loop seems to be irrelevant to the invocation, (1,eval) just returns eval. (1,console.log)("hi") looks like it should work, except it raises an error. (1,2)+3 returns 5, however, and (1,console.log) returns the log function.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by skrebbel on Saturday July 07, 2012 @11:18AM
(#4211828)
it's a performance thing. i forgot the details, but if you change the `(1,eval)` to `eval`, it's all much slower. something with the scope of the code that's being eval'ed, if i recall correctly.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by tlack on Saturday July 07, 2012 @04:41PM
(#4212654)
(1,eval)('2*2') evaluates in the global context, so it may be slower I would think. Here's a really long and insanely detailed post about this odd feature: http://perfectionkills.com/global-eval-what-are-the-options/
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by dmauro on Friday July 06, 2012 @04:03PM
(#4209372)
Trying to right click and save page as in Chrome crashes OS 10.7.4 for me. Pretty cool stuff.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by shawndrost on Friday July 06, 2012 @05:35PM
(#4209769)
WATCH IT. This file hard-froze my machine (osx/chrome) and I now have to rebuild my dev environment.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by jarek on Friday July 06, 2012 @06:00PM
(#4209843)
How does a hard freeze force you to rebuild your dev env?
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by adgar on Saturday July 07, 2012 @08:13AM
(#4211444)
Someone doesn't use dotfiles, I'm guessing.
Re:A file that's both an acceptable HTML page and a JPEG (vi...
by skrebbel on Saturday July 07, 2012 @06:28AM
(#4211309)
it's god punishing you for F5'ing HN when you should be working.
A PNG that's interpreted as HTML and loads itself as compressed JavaScript!