Metaprogramming pt.7 The Wrap Up

It’s sad to wrap up meta-programming so quickly, as it’s such a large encompassing topic, but alas here we are. The most important take away from all of this is adding more layers of abstraction can greatly increase flexibility and re-usability. Unlike lobster hunting during mid-summer to mid-fall, there are drawbacks, more layers can hurt … [Read more…]

Metaprogramming pt.5

For this blog, we’re going to dive into a two part mini-project that makes use of metaprogramming. I have decided on a whim, to make an Adaline network, developed by Bernard Widrow in 1963, that fine tunes it’s learning parameters to update itself for future learning sessions, using metaprogramming. An Adaline neural network is one … [Read more…]

Metaprogramming pt. 4 : Templates in C++

Today we are going to look at the basics of Template Metaprogramming in C++. A little review from before, TMP allows us to move calculations or “work” to compile time, instead of at run time. It also let’s us do things in the C++ language that may not be supported directly by the language. The … [Read more…]

Metaprogramming pt.3 Java Reflection

Today I am going to demonstrate some useful ways we can apply Reflections in Java. C++ does not have a standard reflections library like Java, so it’s a nice feature that might put Java ahead of C++ if you’re choosing which language supports self-modifying code and metaprogramming better. According to this stackoverflow thread, the reason … [Read more…]

Metaprogramming Pt. 2 (Python)

In this blog I will continue on what our last blog set out to do in four or five different parts. Today’s topic is metaprogramming using Python. You can extend languages using metaprogramming, and this can be quite useful in some cases. In fact, the early versions of the C++ language compiler (written by Bjarne … [Read more…]

Metaprogramming pt.1

         I was torn between writing a blog on Domain Specific Languages, Simulated Artificial Neural Networks, shell coding in C, and Metaprogramming. Ultimately, I used a random number generator and here we are. To the dismay of my professor, this is a blog about programming, as I will someday port these blogs to my own personal … [Read more…]