HNHacker News
TopNewBestAskShowJobs

HZet0r

3 karma · joined March 19, 2015

submissionscomments
HZet0r··on Boltons: over 100 Python utilities
There is a LRU cache in the standard library starting in 3.2: https://docs.python.org/3/library/functools.html#functools.l...

Doesn't have quite the same options, but arguably nicer to use because it's a decorator.

HZet0r··on The infinite-pixel screen
You're right - good point. For one way, I guess you could let p_i represent the ith prime number (there are infinitely many) and use p_x / p_y instead. Unsure about the other way.
HZet0r··on The infinite-pixel screen
If the pixels are laid out in a grid then each has a coordinate (x, y), where x and y are integers. Then we form a bijection (x, y) <-> x/y and we see that there are as many pixels as rational numbers. We know that the set of rational numbers is countably infinite, so the number of pixels is countably infinite.