June 2009 Archives

New member of the family!

| 5 Comments

Elissa and I are proud to announce that we have a new member of our little family. We picked up a 6 month-old black lab (mix) from the Tri-county humane society in St Cloud. The shelter had him named "Cash", but that's a pretty lame name if you ask me. So we named him -- while phonetically the same, it's significantly better: Cache. :-)

I don't have pictures of him on the computer yet, but I'm sure you'll be seeing plenty of him in the future. He's really playful, but at six months he's trainable. In fact, he came to us pretty well-trained already! He knows how to sit and stay, and he's great off the leash (never really strays far away and comes back to you when you call him). He pulls a bit on the leash, so we're working on that. He also doesn't dig the kennel, but he'll get over that with some work.

Both of us are super excited to have a dog, and he's been a blast to have around so far (though we've only had him since about 5pm today!). w00t!

Templates and local variables

| 2 Comments

Can anyone spot what's wrong with this code?


void foo( void )
{
  struct Test {
    int a;
  };

std::vector< Test * > tests;
tests.push_back( new Test );
}

Here's a hint: it compiles fine in Visual Studio, but not in XCode. The real answer lies in section 14.3.1.2 of the C++ language specification. Namely,

A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall not be used as a template-argument for a template type-parameter.

I was entirely unaware of this little factoid until I recently committed some code at work which bounced back to me as being unable to compile on the Mac. After reading this section though, I see now that gcc is conforming to the standards more strictly by default than Visual Studio is (though both IDEs have options for strict/relaxed conformance).

My question is: why? It strikes me as being rather odd that templates behave this way, since (AFAIK) there is no other language construct in C++ which disallows locals in this manner. Any ideas as to the reasoning behind this?

Moved and stuff!

| 4 Comments

Sorry for the long absence, but we moved!

After Elissa graduated and walked, we moved back to our house in Minnesota. So for the past few weeks, I've been without internet connectivity. It's been a blessing and a curse. It's nice to get away from the computers for a while, but it still sucks when you have to stand out in your front yard to check your email off a stranger's wireless connection. ;-)

The move has gone mostly well. We took off from Riverside on a Monday morning, and made it to the house by Wed evening. We'd went about 700 miles a day (ten hours of driving), and did 2044 miles in three days, with both of the cats in the car with us. Needless to say, I don't want to sit in a car for a while. ;-) But the trip was uneventful with no major disasters. It was great to see a lot of the country during the move.

But no move is complete without some horror story -- this move's horror story has been dealing with the moving company (Mega Van Lines). Our stuff still hasn't left CA, even though we were told over the phone it would be delivered on the 22nd (this past Monday). Rawr!

Since most of our stuff is still in transit, we're not truly able to "live" in the house right now, which sucks. But it's not stopped us from getting started on the joys of home ownership. We've been doing a lot of gardening, and shopping for things like furniture. Our bedroom set arrived yesterday, the mattress next week, but it will be 6-8 week before our couch arrives. So while we wait to be able to do stuff inside the house, we've been focusing on the outside by doing a ton of weeding, planting and planning for gardens.

All in all, it's great to be back! We've even been treated to a few thunderstorms since arriving, which have been awesome!

August 2009

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31