3 ms·
All the major arrays are named after mathematical constructs you can find defined elsewhere. There's examples of them in the docs, and the describe function dum
by BorisTheBrave 7y ago
All the major arrays are named after mathematical constructs you can find defined elsewhere. There's examples of them in the docs, and the describe function dumps them out for you.
The hairiest parts of the code and where he deviates from mathematical convention have more in depth comments (e.g. simplify, simplify_bits, inline).
Much of meaning and purpose is explained by that top coment - go read about Clifford algebras elsewhere. That seems an entirely reasonable approach to me. Indeed, I read the wikipedia page briefly, and already the code made a great deal more sense to me. So I think his position is justified.
So I really cannot see how you see this falling short.
Perhaps this is about expectations. You obviously wanted code that teaches, as well as functions. Maybe you were also expecting more object orientation, more spread out code? Well, those were not part of the authors plan, but don't alone make it bad code.
Seeing as this functions as a code generator, frankly, the output is a better teaching tool - one can look at the rust generated for, say complex numbers and dual numbers, and immediately see which parts are in common, and which parts are different. That makes you think about what other things could fit the same template, which is basically what clifford algebra attempts to answer.