Archive for August 24, 2010

Tuesday, August 24, 2010 [Tweets] [Favorites]

Why Python’s Integer Division Floors

Guido van Rossum:

I made the same choice because there are some interesting applications of the modulo operation where the sign of a is uninteresting. Consider taking a POSIX timestamp (seconds since the start of 1970) and turning it into the time of day. Since there are 24*3600 = 86400 seconds in a day, this calculation is simply t % 86400. But if we were to express times before 1970 using negative numbers, the "truncate towards zero" rule would give a meaningless result! Using the floor rule it all works out fine.

Keeping Mint’s Unique Referrers List Clean and Useful

Shawn Blanc:

I did a bit of research and compiled a list of 286 unique Google domains, many of which send traffic via search results, Google Reader, and translating. Additionally, it’s not that helpful to see all the unique visits coming from the Tumblr Dashboard, someone’s Facebook wall, or an Instapaper/Read it Later/Pinboard account.

Xbox System-on-a-Chip

Jon Stokes (via John Siracusa):

It would have been easier and more natural to just connect the CPU and GPU with a high-bandwidth, low-latency internal connection, but that would have made the new SoC faster in some respects than the older systems, and that’s not allowed. So they had to introduce this separate module onto the chip that could actually add latency between the CPU and GPU blocks, and generally behave like an off-die FSB.