Archive for September, 2007

C++ Hating

Topic: Hacks, CS| No Comments »

I believed I had this beautiful set of numbers. Then reality struck and they weren't actually there. On one hand, having fake but nice numbers is bad, on the other hand, those numbers were really pretty. And now I sit around reading and thinking about Haskell and hating on C++. Who would have known that j would differ in

 
  std::vector<int> something[numelts];
  something[7].push_back(2);
  int j = something[7][0];
 

and

 
  std::vector<int> something[numelts];
  something[7].push_back(2);
  int j = (something[7])[0];
 

.
The later is correct, the first is wrong, C++ seems to be treating unparenthisized things as normal array lookups, while the parenthisized thing leads to it using operator[] from vector.

panda

Why Some Things Make Sense

Topic: article| 1 Comment »

When I was at EA, me and Eddie once had a debate about why I thought Aston Martin's were cool. Now neither of us could really afford one of those, it was more of an academic debate, with him arguing that mass produced cars were more likely to be safer and have better designed engines. I am not completely sure why it came to be, maybe there was some new stuff about the DBS V12 on Digg, maybe it was a result of one of the people in a neighboring cube acquiring a Porsche and commenting about not liking the stick shift. The problem is this is not a new thing, I seem to like frivolous expensive thing which have no obvious reason for being liked by me, and I will sometimes passionately defend the people who would spend money on this. Of course some of this comes from having a father who read and commented on all manners of well made watches, cars and cameras, and often actually acquired a few :D. Really this is not a critique of him doing so, they are all kinds of cool things which have been at our home because of this.

I have been looking for a good reference to point people I argue with to, mostly because I do this a lot, and do it on both sides of the world (partially retro mostly mechanical things are weird, though friends in India are more likely to agree about really expensive cars). Well I think this pretty accurately reflects my feelings on liking weirdly expensive things.

Now back to work.

panda

Mercurial, filesystems

Topic: systems, CS| No Comments »

This semester as a part of TAing 167/9 we are making use of Mercurial for SCM. Itay liked Hg so much that he actually started using it for nearly everything on his computer and came up with a good reason for doing this. I am not organized enough to put all of my files into source control (though heavens knows I probably should), but I actually like the idea of using mercurial to keep my two copies of research code synchronized.

Read the rest of this entry »