Primeval C: two very early compilers
cm.bell-labs.com
cm.bell-labs.com
Compiler optimization be a harsh mistress.
The larger question of whether optimizations are hardware-dependent is interesting. In some sense, sure. But there are a lot of optimizations in modern compilers that apply equally well to the PDP-11 and to the AMD64; they're just not that different.
My homework assignment for you: write a C function of three or four lines which loops over an array of structs and does some computation for each one, including some conditional and a call to a one-line static function; compile it with -c -O0 -Wa,-adhlns=unoptimized.lst and with -c -O5 -fomit-frame-pointer -Wa,-adhlns=optimized.lst; list the optimizations you notice in the difference between unoptimized.lst, and hazard a guess at which of them are applicable on a PDP-11.
On top of that it contains mostly information rather than mark-up and eye candy.
It can get exhausting keeping up with all of the silly CSS/JS web trends, I realize, but there is a good reason for a lot of it.
resource:///defaults/profile/chrome/userContent-example.css
the file goes in <profile directory>/chrome/userContent.css. On a conventionally installed Firefox on OS X, the profile directory is: ~/Library/Application Support/Firefox/Profiles/<random characters>.default/
You may have to create your own "chrome" subfolder in there. (I did.) Some poking around reveals that the essays on Paul Graham's website achieve their indentation by sticking all the text in a <td width=455>. 455 pixels, then. So I tried this CSS file, having spent all of three or so minutes looking at a CSS reference: ~ $ cat heh.css
p {max-width:455px}
And installed that as <profile-dir>/chrome/userContent.css. ... This seems to have far-reaching implications. It does make all the paragraphs on this website, except for the first one, fit in what is presumably a 455px box. This also goes for Hacker News comments, and it also constricts the paragraphs on a website that pretty certainly has its own CSS. I suspect the only thing that would override this is a CSS that specifically changed the max-width property of <p> objects. (I expect a CSS expert would have been able to predict all of the above, except possibly the fact that it seems common for the first paragraph to not be in a <p> tag.) Oh, and I had to restart Firefox for the effects to be visible; and, editing that CSS file, it seems I'll have to restart Firefox again to see changes.For those who don't want to go to the above effort to see the results: http://imgur.com/F1MHng3 http://imgur.com/jYly4fX
People who use CSS resets would be fine; people who use things like normalize.css might have to go get a new version; but the rest of the internet (which is implicitly relying on things like the line-height of <p>s and the padding of <body>) might just spontaneously combust.
Then again, it might be fine to apply an alternate "default theme" if and only if there are literally no non-user-agent CSS styles defined on the page (either by stylesheets or DOM-manipulating Javascript).
That might be the way to go.
This is DMR's website. Good job criticizing a dead man on not "keeping up" or writing CSS so that you don't have to customize your default styles.
javascript:var style=document.getElementsByTagName('body')[0].style;style.marginLeft=style.marginRight='1in';style.maxWidth='7in';void(0)
Ninja update: oops, reply fail :-(Not that they aren' confused between pointers and arrays now.
What is/was the purpose of the ospace() and waste() functions?
http://www.reddit.com/r/programming/comments/19gnki/legacycc...
I am not seeking any sort of recognition for the post whatsoever.
The "post" part is about who posted it to HN, not about who wrote the article.