Live data from Hacker News

A file that's both an acceptable HTML page and a JPEG (view source on it)

lcamtuf.coredump.cx

81–90 of 133 posts

Re: A file that's both an acceptable HTML page and a JPEG (view source on it)

#83

If you think that's cool, look at Daeken's Magister: http://demoseen.com/windowpane/magister.png.html A PNG that's interpreted as HTML and loads itself as compressed JavaScript!

WATCH IT. This file hard-froze my machine (osx/chrome) and I now have to rebuild my dev environment.

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 (view source on it)

#84
post #18

Earlier quoted context omitted.

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.

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.

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 (view source on it)

#85
This is just more evidence that we should strive to do everything in a browser. Or an app that functions like one. It is more secure. Details should not be exposed to the user.

Remember there is no file system. In fact, there are no files.

We hid them so they do not exist. Out of sight, out of mind.

There's no such thing as binary. That only existed when you were younger. Now it no longer exists. The numbers are gone. They do not exist.

What's really important is how good fonts look. The javascript, the CSS, the browser!

No user cares about content like text, audio and video, they care about window dressing: html and browsers. They care about what you can do with javascript. What can you do? Show me some tricks.

Content alone is not enough. Who wants to read a story or download a video clip? You have to present it; you must entertain and you must persuade, by trickery if necessary. It's not the content, silly. It's the webpage. No javascript, no dice. Don't just deliver the content, entertain me for a few minutes first. Tell me about something else.

No one cares about TV programming. They care about the TV's setup screens and onscreen channel guide. They want these menus to come to life. They want their TV's to become "intelligent".

A webpage without javascript is like a lifeless onscreen TV channel guide that does not track what you watch and report it to marketers, or make automatic suggestions on what you should watch, or display animations while you sit and wait for seconds while the TV's software is "Loading..." in response to your last button push. Boring.

Users want books, newspapers, radios and TV's that have "artificial intelligence". They want others to know what they are reading and watching and they want advertisers to address them by name. Let's get with it. Bring us the future.

Re: A file that's both an acceptable HTML page and a JPEG (view source on it)

#87
Hello everyone, i appreciate the great solution that this is but i have a similar problem that could be solved by this solution but has not been solved.

My problem is that i want to publish a series of JPEG images as a Kindle book, but i can't, since the reader slices some of my images and puts padding around them. I would prefer that the images render like the cover page, in full screen, but this is impossible to achieve despite saving the images in 600 * 800 like the cover page.

How can i use this great wisdom to create an .epub file that then becomes a Kindle book.

PS; The scans are a business book that is made up entirely of mindmaps, which are like spatial roadmaps on paper. The book has been written to teach newbies in business the most important things and all the trade-offs involved in this important things.

I think that that sort of thing would do very well on the Kindle platform but i am unable to do it.

Re: A file that's both an acceptable HTML page and a JPEG (view source on it)

#88

If you think that's cool, look at Daeken's Magister: http://demoseen.com/windowpane/magister.png.html A PNG that's interpreted as HTML and loads itself as compressed JavaScript!

froze browser for a minute, alerted of unresponsive script and printed some binary

Re: A file that's both an acceptable HTML page and a JPEG (view source on it)

#89

Earlier quoted context omitted.

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. :/

Really? I see no slowdown whatsoever. What are you running?

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 (view source on it)

#90
post #84

Earlier quoted context omitted.

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.

I wrote up a little explanation of how it works here https://gist.github.com/3039247

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.

Post reply on HN