Sunday 2011-10-30

In OutOfControl Kevin Kelly tells about asking people "what color is a chameleon in a mirror?":

MATHEMATICIAN JOHN HOLLAND: It goes kaleidoscopic! There's a lag time, so it'll flicker all over the place. The chameleon won't ever be a uniform color.

COMPUTER SCIENTIST MARVIN MINSKY: It might have a number of eigenvalues or colors, so it will zero in on a number of colors. If you put it in when it's green it might stay green, and if it was red it might stay red, but if you put it in when it was brown it might tend to go to green.

NATURALIST PETER WARSHALL: A chameleon changes color out of a fright response so it all depends on its emotional state. It might be frightened by its image at first, but then later "warm up" to it, and so change colors.

-- Chapter 5: Coevolution

As I read that, I thought What Would Feynman Do? and I figured he'd say "I don't know; let's go find one!" and we'd be off on some mad-cap run around campus to disturb some poor herpetologist much like Skinner on Sunday at Harvard when he read about the information content of bees' dances and had to find out *right then* what happens when you hoist a bee vertically, show it a huge amount of nectar, and release it.

Of course, Kelly's not dumb and not exactly humble about it, so he tells that he ran off and found an anole since chameleons are not cheep. "Although Brand's riddle had been around for 20 years, this was the first time, as far as I know, anyone had actually tried it." His anole turned green, which Kelly thinks is its color of fear ( -1 for not testing this; +1 for not rigorously terrorizing some pet lizard ).

Reducing the costs of experimentation seems like an eminently good thing to do. I could be wrong, though.

Like today, I searched for whether processes inherit the priority of the parent when I got confused by the userland representation of process priority vs the kernel representation, which ps outputs via ps -o pri. A cursory search returned nothing useful, so I wrote a test:

#include <sys/time.h>
#include <sys/resource.h>
#define DUMP printf("pid %d running at %d\n", getpid(), getpriority( PRIO_PROCESS, getpid() ))

int main(void)
	setpriority(PRIO_PROCESS, getpid(), 20);
	return 0;

Quick and easy. So, what about Ken Jennings when his kid asks him whether he's more buoyant swimming in salt water or fresh. Do you run off and get two glasses of water? What do you do?