C++ Template Metaprogramming

September 10th, 2009

I have not used C++ in many years. It was so long ago that templates, in the way they are used today, were not in C++ yet. I hope I never have to program in C++ again. That said, it’s interesting to know that C++ templates are so powerful that you can write a compile-time Lisp interpreter in them!

The following is from the notes at Amazon about the book “C++ Template Metaprogramming” by David Abrahams and Alexey Gurtovoy:

“In 1998 Dave had the privilege of attending a workshop in Generic Programming at Dagstuhl Castle in Germany. Near the end of the workshop, a very enthusiastic Kristof Czarnecki and Ullrich Eisenecker (of Generative Programming fame) passed out a few pages of C++ source code that they billed as a complete Lisp implementation built out of C++ templates. At the time it appeared to Dave to be nothing more than a curiosity, a charming but impractical hijacking of the template system to prove that you can write programs that execute at compile time. He never suspected that one day he would see a role for metaprogramming in most of his day-to-day programming jobs.”

Thanks for David Mankins for bringing this to my attention!

I recently learned about Python’s powerful metaprogramming techniques, from a talk by Adam Baratz of The Echonest. This was very impressive and I hope to find time to learn more.

Adrian Belew Power Trio, with Julie and Eric Slick

September 6th, 2009

I greatly enjoyed the Adrian Belew Power Trio last night at the Natick Center for the Arts. I mentioned this concert in an earlier blog posting. Adrian Belew is a great electric guitar player and composer. He’s a member of Robert Fripp’s band King Crimson, and has performed with some of my favorite bands and musicians, including Laurie Anderson, Talking Heads, and Mike Oldfield.

The trio includes Julie Slick on bass and Eric Slick on drums. Julie is 23 years old, and her brother is 22. As a 50-year-old, I’m never quite sure whether to characterize people that age as “kids” or not. Friends of mine who I consider to be my age have children in their early 20’s, but these people are adults. I have to learn to change the way I deal with one of the most basic characterizations/classifications in life! Adrian referred to them as his “youthful compadres”. What I can say for sure is that I would have been quite impressed with their musicianship even without seeing them or knowing anything about them, but that they can play that way at such a young age is stunning. What will they be like in ten or twenty years? I definitely want to keep track of them!

Their mother, Robin, sold CD’s and tee shirts. Although I aready have enough tee shirts, as my wife keeps reminding me, I bought theirs, both because I want to support them and because I like the design.

For some reason, the otherwise-nice packaging of the CD of “e” does not include a track list. From what Adrian said at the concert, I expected to find five tracks named “a” through “e”. However, there were 11 tracks. The Gracenote CDDB did not find a track list; that’s also very surprising, as the CDDB has never failed me before, even for some pretty obscure stuff. I tracked down an email address for Robin Slick, who helpfully sent me the track list. It’s “a”, “a2″, “a3″, “b”, “b2″, “b3″, “c”, “d”, “d2″, “e”, and “e2″. I told iTunes to submit this to the CDDB, and I hope it’ll be installed so you won’t have to type these in manually. Thanks, Robin!

Julia and Erik studied at The Paul Green School of Rock in Philadelphia, which was showcased in the excellent documentary film Rock School (not to be confused with the fictional film School of Rock). The Paul Green school seems to be training a whole new generation of progressive rockers. The best-known is C. J. Tywoniak, who was so awesome in the Rock School documentary playing “Inca Roads” by Frank Zappa; he has performed extensively with Jon Anderson of Yes. (Eric Slick has also performed with Jon Anderson.)

The performance featured the songs “a”, “b”, “c”, “d”, and “e” from their new album, “e”. They also performed two King Crimson songs: Neurotica (from Beat) and Three of a Perfect Pair (from Three of a Perfect Pair). Here is a (low-quality) video of them performing Neurotica in Budapest, and you can find more such videos on YouTube. Here is an Animoto MTV-style video of the beginning of Three of a Pefect Pair from Eric Slick’s web site. They also did two of Adrian’s own songs, Big Electric Cat and Lone Rhinoceros, both from Adrian’s first solo album, Lone Rhinoceros, and several other songs.

If they perform in the Boston area again, TourFilter will let me know. TourFilter is a wonderful free service. You tell it what bands you like, and it tells you when and where they’re coming. Thanks to Chris Marstall for creating and operating this gem.

What Programming Language Do People Speak Well Of?

September 4th, 2009

I usually don’t write blog entries that are merely pointers to someone else’s blog entries, but I’m making an exception this time. A blogger named Lukas Biewald, in a blog called/of Dolores Labs, wrote an entry called The Programming Language With The Happiest Users.

He measured Twitter “tweets” that mention certain programming languages, and ascertained which were positive. I’m particularly interested because Lisp came in second place.

Interpreting this as “the programming langauge with the happiest users” depends on several tacit assumptions that seem dubious at best.  We don’t know that the people writing these comments are actually users.  The number of tweets sent about a language is not uncorreleated with the langauge; I bet there are fewer COBOL programmers using Twitter than Perl programmers.  Not everybody tweets about how much they like or dislike their langauge as much as everybody else. He knows this and mentions some of these problems at the end of the post, so I’m not saying this to criticize him.

Yes, the title of the blog post is sort of misleading, but written to get the attention of readers.  I cannot criticize him for that either, since I do the same thing.  Sometimes it backfires; a lot of people seem to have seen my post named “Why Did M.I.T. Switch from Scheme to Python” without getting my points, which were (1) they didn’t make a high-level decision to switch languages, but rather this fell out as an end consequence of decisions that had nothing to do with languages, and (2) this is only for the freshman core courses, not the whole curriculum.

It’s hard to draw any hard and meaningful and useful conclusions from this research, but I still find it interesting and entertaining.

Rejoice, The Funding Returns!

August 8th, 2009

this article in Mass High Tech talks about early stage venture funding in New England. Here are the numbers that the article provided. I did some averages to keep all the figures “per month”.

  • Jul, Aug, Sept 2008: 6 deals, $34M total
  • Jan, Feb, Mar 2009: 3 deals, $17M total
  • Jul 2009: 15 deals, $97M total

James Geschwiler, executive director of Common Angels, is quoted extensively in the article, which ends: “After all, when the economy is down, investors should be taking advantage of the lower costs. [James] said: ‘I didn’t have to go to business school to learn “buy low, sell high.”‘”

Family Trip to the West Coast, Summer 2009

August 2nd, 2009

I rarely post about day-to-day events, but this is an exception.  My family is travelling out west.  My wife Cheryl, and my son Adam (almost 18, going into his senior year of high school), are first going to Seattle so that Adam can attend residential Cybercamp for two weeks.  We had planned to do this at Bentley College, as we did for the last two years, but the parent organization (Giant Campus) has shut down about half of the Cybercamps across the USA this year due to lack of signups.  (Presumably this is due to the recession.)  Adam very much wants to stay on his promotion track (counselor in training, etc) so that he can be a counselor next summer.  Cheryl spent a long time researching alternatives, and this one works the best.

Cheryl and I spent all day yesterday getting her and Adam all set to leave.  At noon, Cheryl said that she wanted a netbook to bring, so I went to Staples, bought one, and spent hours removing bloatware, and putting in a new firewall, anti-virus too, and the apps she needs.  They left this morning at 4:00 AM for their 6:00 AM flight (she scheduled it, so don’t blame me).  Adam is doing two weeks of Cybercamp, and Cheryl is having a good time and picking Adam up for the weekend a week from now (Cybercamp ends Friday afternoon and resumes Sunday).

I’ll be here through Thursday (8/6).  On Friday (8/7) I have a 7:00 AM flight to San Jose.  I’ll be staying at Bill York’s house for a week.  Then Cheryl and Adam will fly down from Seattle on Sat (8/15), and we’ll see friends around S.F., the Bay Area in general, and Santa Cruz.  We’ll all see the Hearst Castle for the first time, and we’ll be staying in San Luis Obispo (at the Madonna Inn, although they didn’t give us one of the best special rooms).  We’re also signed up for the special nighttime tour of Alcatraz (Cheryl and I did the regular tour about 20 years ago).  We have a long list of places to visit, some of which we’ll get to, including the Computer Museum, the Intel Museum, and the Winchester Mystery House (Cheryl and Adam have already been there, but Adam very much wants to go back and show me).

We will be back on the evening of Tuesday 8/25.  Adam’s first day of school is Thursday 8/27.

To my friends in California, I want to see every one of you, but I don’t think I’ll manage to pull that off.  If you would like to get together and have not already communicated with me about it, please send me email so we can try to work out a meeting.  See you soon!

For those of you who got the “Change in status” mail from LinkedIn: no, I have not changed jobs.  When I do an angel investment, I create a new “Current Job” item so that I’ll turn up in LinkedIn queries by company. LinkedIn does not provide a way to control the order in which these items appear; it’s sorted by how recently you added the item.  I could remove and re-add ITA Software, but I’m not entirely sure that there would not be some undesirable effect.  I’ll say more in a subsequent post about how I use LinkedIn.