Stupid compiler error messages

Posted by mikedaum on January 27th, 2009

Just got this delightful error message:

gslwrap/HMCMC.cpp:57: error: conversion from ‘boost::cb_details::iterator<boost::circular_buffer<bool, std::allocator<bool> >, boost::cb_details::const_traits<std::allocator<bool> > >’ to non-scalar type ‘boost::cb_details::iterator<boost::circular_buffer<bool, std::allocator<bool> >, boost::cb_details::nonconst_traits<std::allocator<bool> > >’ requested

I get it and its ilk fairly regularly.  Takes me a bit to actually sort it out.  Don’t know why.  What it’s trying to say is that I used a non-const iterator somewhere where it needed to be a const_iterator.

Was that so hard?

Singing with my own sweet self

Posted by mikedaum on November 14th, 2008

Sometimes when I’m walking around I sing to myself.  Maybe I get some strange looks on the street, but in general it works for me.  Usually it’s a Niggun-like repeating pattern, that changes a bit over time.  And it occured to me that I have a computer and stuff  that would let me actually sing with myself if I let it, and the tune’s evolution would turn into harmony, maybe.

Well it took me more time than my Linux-addled pride cares to admit to get stuff set up for that, but I finally did it.  And in honour of it being Erev Shabbos I sang something very close to a pre-Barucha Niggun.  Well, the technique certainly needs refinement (not to mention the singing), but I figured I’d send out the results anyway, because I actually really like them! So without further ado…here’s my First Song with Me.

Shark. Jumped.

Posted by mikedaum on September 28th, 2008

I don’t know why this article is what finally did it for me.  The pathetic political situation in the US has bottomed out.  I’m ashamed, I’m ashamed, I’m ashamed.  It’s like reading the crappy copy from some tenth rate near future sci-fi TV show.  In case you don’t want to read the whole thing…here’s the lede:

In an election campaign notable for its surprises, Sarah Palin, the Republican vice- presidential candidate, may be about to spring a new one — the wedding of her pregnant teenage daughter to her ice-hockey-playing fiancé before the November 4 election.

Enormously cool Grafitti-mation

Posted by mikedaum on June 14th, 2008

Ryan Schmidt at work pointed this out to me. It’s really very cool.

Speak out against the Canadian uber-DMCA

Posted by mikedaum on June 13th, 2008

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.

Fussy C++

Posted by mikedaum on June 11th, 2008

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 plays piano!

Posted by mikedaum on June 5th, 2008

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!!!!

The audacity of heat in the kitchen

Posted by mikedaum on April 22nd, 2008

Not much to post here. But this is too perfect to pass:

Hillary’s dirty tricks

Posted by mikedaum on February 25th, 2008

In a really despicable turn, the Clinton campaign has started distributing pictures of Obama wearing native Kenyan garb. He was in Kenya at the time, and his dad’s from there. I guess it makes him look a bit like a terrorist muslim. For myself, I have no problems with somebody looking like a muslim, or even looking like a windswept has-been for that matter.

New York Sleeps: I do not

Posted by mikedaum on February 17th, 2008

We’re in NYC this weekend for the wedding of Elena’s lovely college friend Amy Mushlin.  So far it’s been a nice affair, and a good chance to catch up with the Branford crowd, many of whom we have not seen in a long, long time.  In addition, it’s the first time we have travelled without the kids, who are happy as clams back in Toronto under the watchful eye of our excellent friend Imelda.

After spending our first night in town at the home of friends Mari and Sean, we checked into the Barclay hotel yesterday, where Amy had booked a block of rooms.  Our first encounter with the hotel was lovely, and we marveled at the way service can be elevated to a high art in this country as the bellhop ran circles around the lobby grabbing our bags, getting WiFi access codes from the business center, etc.  The room looked great and we had plenty of room to unpack.

Then we heard the baby in the next room.  Not a screamer, just a steady nagging cry.  And then the parents comforting him.  The door between the rooms was paper-thin and I swear the sound was as if they were right there in the room with us.  Ah well, when we got to the lobby, reception was mobbed so we asked the concierge what could be done.  He told us that if the problem continued we should go to reception and get the room changed.  We were rushing to the rehearsal dinner, so we decided to stick it out for the night and re-address in the morning.

Worst.  Call.  Ever.

I don’t think I got more than 2 hours of sleep in a row.  At 5:30 when I was awakened for the 300th time I quickly judged that further sleep was improbable.  I put my coat on and went down to the lobby and complained.  Then back to the room.  Put pants on in silence and headed back out.  As I opened the room door there was a knock.  There was a man in the hall in hotel uniform who I shushed down to a whisper immediately.  Noise complaint he said, but he had been standing there and didn’t hear anything.  So much for the service as an art thing.

So I went down to the lobby and the coffee shop was still closed.  But it’s New York.  I’ve been woken up in the city that never sleeps.  Just cross the street to one of the any number of wide open establishments which will offer me hot coffee and plentiful WiFi for the next 3 or 4 hours.  Nope.  Streets are dark and empty.  Stores are closed.  Alright, over to Times Square.  Surely that place is wide open — centre of the known universe, right.  Mixed results.  Many bright signs and Giant TV’s flashing and telling me things, but still very sparse on the humans.  Hundreds of closed Starbucks.  All stores closed, and have no hours posted on the doors, almost like they’re ashamed to admit it.

Back to the hotel.  Waitaminnit, isn’t that the gold Rockefeller Center thingy they skate in front of in the movies?  Go closer…my god, it is!  But the whole thing’s tiny, like they made some Disney replica of the actual article.  Rink’s so small I don’t think you could even work up a sweat.  But I don’t skate anyway.

Back to the hotel.  Business centre.  Internet.  Power.  Coffee soon.  Nap later.