News for hackers. Stuff that matters.
Re:Meta-meta-programming: Generating C++ templates with Rack... by elfprince13 on Sunday January 31, 2016 @04:03PM (#11008054)
I've been working on a similar project for a while ( https://github.com/elfprince13/RacketMacros4Cxx ), and I should also point out that while templates are Turing complete, that only means you can express arbitrary computations. It doesn't mean you can express arbitrary (hygienic) manipulations of syntax trees, which is more typically what you want to accomplish with metaprogramming

Also, once you have Racket macros, you quickly discover you don't really need templates any more either.

See section 4 of https://drive.google.com/open?id=0Byxgs15FUp2QRHJRVFVBLTZZc1... for some good examples rewriting code that Nvidia shows off as good examples of "how to optimize CUDA" to something that doesn't look like someone had an accident with copy/paste.

There are no comments on this comment yet.