Some of the workarounds he mentions at the end of his Trello in 4096 bytes[1] post seem really interesting: - I optimized for compression by doing things the same way everywhere; e.g. I always put the class attribute first in my tags - I wrote a utility that tried rearranging my CSS, in an attempt to find the ordering that was the most compressible [1] http://danlec.com/blog/trello-in-4096-bytes
As much Stack Overflow as possible in 4096 bytes
31–40 of 77 posts
Re: As much Stack Overflow as possible in 4096 bytes
#32Earlier quoted context omitted.
Yes. In some ways I think we're still in a very primative kind of level for web development. Either you do it by hand, tweaking each individual parameter like the old demoscene, and making it fast and amazingly small, or else you write huge chunky slow web apps, or more usually, something in the middle. I feel like the big thing I'm missing is smart compilers that can take web app concepts, and turn them into extreme…
the "sufficiently smart compiler" is kind of like "world peace"; something to work towards, but i doubt we'll have it this lifetime. http://c2.com/cgi/wiki?SufficientlySmartCompiler
Re: As much Stack Overflow as possible in 4096 bytes
#33This probably says something about compression technology vs. the state of the art in machine learning, but I'm not sure what.
Re: As much Stack Overflow as possible in 4096 bytes
#34E.g on a thread click:
St4k:
GET https://api.stackexchange.com/2.2/questions/21840919 [HTTP/1.1 200 OK 212ms] 18:02:16.802
GET https://www.gravatar.com/avatar/dca03295d2e81708823c5bd62e75... [HTTP/1.1 200 OK 146ms] 18:02:16.803
stackoverflow.com (a lot of web requests):
GET http://stackoverflow.com/questions/21841027/override-volume-... [HTTP/1.1 200 OK 120ms] 18:02:54.791
GET http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min... [HTTP/1.1 200 OK 62ms] 18:02:54.792
GET http://cdn.sstatic.net/Js/stub.en.js [HTTP/1.1 200 OK 58ms] 18:02:54.792
GET http://cdn.sstatic.net/stackoverflow/all.css [HTTP/1.1 200 OK 73ms] 18:02:54.792
GET https://www.gravatar.com/avatar/2a4cbc9da2ce334d7a5c8f483c92... [HTTP/1.1 200 OK 90ms] 18:02:55.683
GET http://i.stack.imgur.com/tKsDb.png [HTTP/1.1 200 OK 20ms] 18:02:55.683
GET http://static.adzerk.net/ados.js [HTTP/1.1 200 OK 33ms] 18:02:55.684
GET http://www.google-analytics.com/analytics.js [HTTP/1.1 200 OK 18ms] 18:02:55.684
GET http://edge.quantserve.com/quant.js
....and more....
Re: As much Stack Overflow as possible in 4096 bytes
#35Code is formatted in a serif font, instead of monospace, which seems like a rather important difference. Otherwise, it is quite impressive.
Try popping open the inspector panel, and the fonts will magically correct themselves.
Re: As much Stack Overflow as possible in 4096 bytes
#36Re: As much Stack Overflow as possible in 4096 bytes
#374096 is a good goal, but there is a much more obvious benefit at 1024 since it would fit within the IPv6 1280 MTU (i.e. a single packet). I recall hearing stories that the Google Homepage had to fit within 512 bytes for IPv4's 576 MTU.
One packet is great if you can do it. There's a big penalty after the sender in a new TCP connection reaches the initial transmit window. A lot of sites these days have configured this up from 2x or 3x MSS to 10x MSS (about 5,360 bytes) to increase what can be sent in the first transmission back from the server (HTTP response for example).
Re: As much Stack Overflow as possible in 4096 bytes
#38Very impressive. I wish extreme performance goals and requirements would become a new trend. I think we have come to accept a certain level of sluggishness in web apps. I hate it. I wrote a tire search app a few years back and made it work extremely fast given the task at hand. But I did not go to the level that this guy did. http://tiredb.com
Well, there will always be demoscene (http://www.youtube.com/watch?v=5lbAMLrl3xI ) which I've always found remarkable.
Re: As much Stack Overflow as possible in 4096 bytes
#39And now we're proud to have a simple functional list compiled into the same amount of memory ...
Re: As much Stack Overflow as possible in 4096 bytes
#40And now consider that 4096 bytes (words) was exactly the total memory of a DEC PDP-1, considered to be a mainframe in its time and featuring timesharing and things like Spacewar!. And now we're proud to have a simple functional list compiled into the same amount of memory ...