Friday, November 14, 2008

From the Depths of My Mind

A sampling of the things I'm thinking about at cruising altitude:
  • Do they make any good windshield wipers that don't squeak? The wipers on our VW Beetle make the most horrendous scraping sound when the windshield is not "wet enough" for them. It's really loud and annoying. And it startles me while I'm driving.
  • How do I properly use a pointer-to-function that's actually a singleton templated class method in C++? E.g.,
template <typename T> class Singleton {
Instance() {
static T& instance;
return instance;
Singleton(Singleton const&);
Singleton& operator=(Singleton const&);
// then, I have another templated class
class MyCostFn {
template <typename T> Cost cost_fun(T arg1) {
// return some Cost (Cost is typedef'd unsigned long)
// some other irrelevant stuff
// Then, I have a function like this:
void blah(Cost c);
// and I want only a single instance of MyCostFn,
// which I want to use inside the function blah(...),
// so I try
blah(Singleton <MyCostFn>::Instance().cost_fun<double>);
// and the compiler can't figure out what type
// the stuff between parentheses is.
  • Where is my iPod? Oh there it is.
  • Why do colleagues A and B not get along? I get along fine with both of them, but put them in the same room and there's friction. Obviously the transitive property does not apply to friendship.
  • Don't lose your sunglasses for the third time this year. Put them in the carry-on, instead of on top of it.
  • Why would a later version of autoreconf fail to reconfigure the same package that a slightly earlier version reconfigured just fine on another (but very similar) machine? Did I incorrectly install g4/autoconf/automake on the first machine? It passed all its internal tests!
  • There was something I was going to think deeply about while on the plane. Now what was it? I knew I'd have plenty of time to think about it but I can't remember for the life of me what it was.

No comments: