Angly at C++Now recap

As always, C++Now / BoostCon back in May was a blast and I learned a lot.  About a dozen people came to my talk; what was really incredible is that I think everyone knew exactly what I was talking about.

Now, I didn’t manage to give the weirdest talk at C++Now this year – that honor goes to Ábel Sinkovics and Zoltan Porkolab’s Metaparse (video). They demonstrated a parser and interpreter of a subset of Haskell that runs inside the C++ compiler. Yow! As a lot of people have pointed out, the pure functional Haskell programming language could provide a nicer way to do metaprogramming in C++, but this is the closest I know of anyone actually implementing it.

In my Angly talk, I ended up presenting almost the entire library – it’s just a few hundred lines – and along the way compared my approach for “reparsing” angle bracket expressions with the methods used in Metaparse for compile-time strings, and Eric Niebler’s Proto for reparsing expressions.

Here is the video.  And here are the slides.

I will have to try harder to produce the weirdest talk next year. (Will it be Metagraph itself?) But this was a real breakthrough for the depth of conversation in the room on that day, and the thoughts that followed.

The most important thing I learned is that the method I used (a deterministic pushdown automaton) is much more complicated and not as powerful as the non-deterministic recursive descent parsers used by Proto and Metaparse… so I might move in that direction. I’m not sure if that’s as important as actually moving ahead with the Metagraph.  Stay tuned!

Leave a Comment