I did try to do something with the same effect in C, but it turned out far more cryptic. And this `define_method` thingie is pretty standard stuff. 

Thanks I'll keep thar in mind and give it another go, maybe it will turn out better this time.