Perhaps this could be a good start for another coding contest: The most inefficient webpage.
The object: take a copy of the Google search page and represent it in the most inefficient, bloated way possible. There would be two divisions: time-bloat and space-bloat.
Rules: Every piece of code must be involved in displaying something visibly on the page. Every statement in the Javascript must be making forward progress toward displaying the page.
The functionality of the page must be exactly the same as the original.
Any other rules?
(There wouldn't be any loading and waiting on external resources, of course.)
Well, sure. But if you add another check for likelihood that `page` is fairly-correct html in utf8, there should be around one correct result really :) If you get 2, the other one is probably a <form> you can use to sell your soul to satan - do not hit submit if you get it.
The problem with this, is that the random bytes in one iteration of the loop might be closer to the page than the next iteration, so there would be reverse progress in that instance. This entry would be disqualified.
This is cool, but when I first clicked it I thought it was transforming my current webpage into HTML/bitmap somehow. I was amazed. Then I realized it's a statically generated page. If you could make this into a bookmarklet that transformed the current page, then I'd be REALLY impressed. :)
Then turn it back into HTML with an experiment of mine: https://github.com/andershaig/img-con - It takes an image, writes a span with a background-color for each pixel. Turns a 100x100 image into a 7 MB HTML file.
You're right and I should have paid more attention. I had thought you were generating just the image from a web page. Having actually worked on something similar, I can say I'm very very impressed with the load time.
But, there's another way - use a damn scripted gif or png</obvious>
...or for monochrome pages, is an xbm smaller?
update:
oh yeah, i forgot, xbm files are C, though I suppose you could meta script them with more C.
people who really dont want their text stolen are going to see the massive bandwidth we have now and start just using images. protects it from anything but ocr.
I would assume he takes a screenshot of the page (xbrow.se is one utility for it) and then picks the colour from each point and displays it... quite simple to do, why is probably a better question :p
The object: take a copy of the Google search page and represent it in the most inefficient, bloated way possible. There would be two divisions: time-bloat and space-bloat.
Rules: Every piece of code must be involved in displaying something visibly on the page. Every statement in the Javascript must be making forward progress toward displaying the page.
The functionality of the page must be exactly the same as the original.
Any other rules?
(There wouldn't be any loading and waiting on external resources, of course.)