Ryan Schmidt at work pointed this out to me. It’s really very cool.
Ryan Schmidt at work pointed this out to me. It’s really very cool.
Seems the Tories have yet again proposed their horrible, horrible copyright legislation. What’s being proposed is very similar to the disastrous DMCA in the US, but goes even farther. Good for Hollywood, good for the RIAA, bad for people. Very bad.
Boing Boing today has a post which links to this excellent site which is set up to make it easy to voice your opinion to your MP. Takes about 20 seconds, and could make a big difference. So please go send the letter.
So last night I’m all
GslMatrix D;
GslMatrix B;
C.symmetricEigs(B, D.diag() );
But the compiler is all
error: no matching function for call to 'GslMatrix::symmetricEigs(GslMatrix&, GslVector)
See the problem? D.diag() is passed in as a temporary, and the symmetricEigs has it passed in as a reference. Rather than behave rationally, the compiler refuses to consider the possibility that I meant it to pass the temporary by reference, and tells me that it can’t find a proto for what I want to do.
Now I ask you: is this good behaviour on the compiler’s part? Is this what I wanted to do? A nice error telling me that I’m trying to pass a temporary by reference would have been a little better. But is it really an error? What about side effects? I was certainly counting on those in this case, but it refused to play ball.
Anyway, I’m leaning towards my not understanding the situation. Maybe there’s really a technical or spec reason why this error is necessary. For the life of me, I can’t think of one though. So until one of you points out the essential thing that I”m missing, I’m going with this should be a warning at best, but should certainly be allowed.
Oh, and btw, the solution was to create
GslVector d;
one line above and pass that in instead. On the stack like the temporary, but somehow able to give compiler that nice cozy feeling it needed.
Jacob started taking piano lessons last fall, and it quickly became a real focus and, dare I say, passion for him. He is a passionate young man, after all. His teacher has been the marvelous Julia Butenko, and I can’t recommend her more. Unfortunately, Julia has to move to Windsor soon. Jacob is taking it well, I think, but it’s not easy nonetheless.
To cap off their time together, Julia arranged to make a recording of his piano playing as a special present for Elena. We got it a day or two ago, and I’m blown away. So without further ado: Jacob Daum’s pianistical stylings!!!!