Generating Objective-C Code With a Ruby DSL
vMAT uses a ruby DSL to do code generation for certain repetitive code patterns. For example, the way coercions between matrices of different types is handled (dynamically, at runtime1) currently requires implementing an Objective-C++ dispatch method to copy to every numeric type from every numeric type. With 10 distinct numeric types that is 100 Objective-C++ methods that are slight variations of the same method template.
This is the problem that vMATCodeMonkey was designed to solve. Read on →