Category Archives: neep-neep

naming is hard

I often have trouble giving meaningful concise names to variables in the programs I write, perhaps because, until I reach for the keyboard, my thinking is largely nonverbal. I suspect that it would be less of a problem for someone … Continue reading

Posted in curve-fitting, neep-neep | 4 Comments

FCC cube generator

I could have used this a week ago. def fccstack(): newlimit = 0 while True: oldlimit = newlimit newlimit += 1 # extend z for x in xrange(oldlimit): for y in xrange((x+oldlimit)&1, oldlimit, 2): yield (x,y,oldlimit) # extend y for … Continue reading

Posted in mathematics, neep-neep | Leave a comment

in which I curse my lack of omniscience

I want to push several hundred greyscale images through a threshold filter, so that an output pixel is black or white according to whether the corresponding input pixel is less or more than 1/2 bright. (My goal is a ‘woodcut’ … Continue reading

Posted in neep-neep | 2 Comments

do you speak my calendar?

In MacBSD, the command cal 9 1752 shows the shortening of that month in the British Empire. If I reinstall MacOS and choose Italian as its default language, will the shift show up instead in October 1582?

Posted in calendars, history, neep-neep | Leave a comment

off by one

A look at 404s in my HTTP log revealed a bug in my math pix page, which in two places chooses randomly from families of images. I didn’t know that the PHP function rand(nmin,nmax) is inclusive at both ends.

Posted in me!me!me!, neep-neep | Leave a comment

pass the time by tracing rays

I had assumed that Pixar did not use ray-tracing because it could not provide certain desired lighting effects. Now Dad tells me that Monsters University is Pixar’s first ray-traced feature, which implies that the speed wasn’t available until now.

Posted in cinema, neep-neep | 1 Comment

u-shape-it

Hm, Shapeways has an API. If I were a skilled Web programmer I’d make a page where you can choose the size and frequencies of a Klein bagel model …

Posted in neep-neep | Leave a comment