A shibboleth is language that sends cultural signals beyond its plain meaning. The word comes from a fairly amazing Bible story.
Now I want a word for language invented to annoy, like “Democrat Party”.
Aristotle believed slavery to be “expedient and right”. All the best arguments by learned apologists for slavery in the U.S. South were from his writings, particularly in the Politics.
Incidentally, Aristotle thought democracy was a crummy form of government. And, in his ideal society, homeschooling would be banned.
There are expressions of the Golden Rule in the scriptures of many religions.
I don't understand what this means, exactly, but the x86 instruction set contains an
FNOPinstruction. The manual describes it as a floating-point no-operation instruction. How this might be different from a regular
NOPI don't know.
So there's a widely known interview question: write a function to count the number of bits of a 32-bit int that are set to 1. This function is called the population count—that link describes a surprising use for it.
The last time I tested this, summing 4 queries into a 256-value lookup table is fastest for 32-bit integers, faster than the awesomely clever bit-twiddling solution. I shouldn't have been surprised. The lookup table fits easily into cache. The bit-twiddling solution has a lot of dependencies; the CPU can't find any instruction-level parallelism there.
Anyway, what I learned a week or two ago is that future Intel chips will have an SSE instruction,
POPCNT,that does this, in parallel, for several words at a time. (Someone I mentioned this to commented that he doesn't want to be fired for pronouncing that.)
Often when I write these blog entries, I'm still unsure of the significance of some of the things I've just learned. For example, I learned something about Java monitors (or pthreads condition variables, which are the same thing). When thread 1 notifies, waking thread 2 on a separate CPU, the lock associated with the monitor ensures that CPU 1's writes are flushed to main memory and CPU 2 sees them before thread 2 starts running. There's no need for write-barrier magic in
Apple's Shark profiler has a feature that lets you compare two profiles. But the result is calculated by comparing percentages, not comparing the absolute number of samples. So, for my purposes, useless.
The .mshark files produced by Shark are gzipped binary property lists, but the actual samples are stored in there as raw binary data which I haven't tried to decipher.