Algebraic operator are every where in python. + = * / Dict are every where in python.
What can we achieve by combining both of them?
Slides are here
Algebra is a wonderful abstraction that make the infamous 2D point example of a class or nameddict useless when you have complex data type (that is HW accelerated on Intel CPU).
Simple: Is something consistent with linear algebra? it requires 17 simple unit tests suffice to say so
So just let makes a test this rules are followed, and then a class that applies these behaviours and we have implemented it.
Well, you have basic data type like { x: 1, y :2, z :3 } that is actually behaving like an euclidean vector.
If an object is a MutableMapping thus we can create a universal operator for saying how much an object «looks like» another one. Practical use :
...
That is the basis of Textual indexation and profiling (it is not only for evil purpose) https://github.com/jul/ADictAddiction/blob/master/example/cosdemo.py
Most of the operation tested here https://github.com/jul/ADictAdd_iction/
Implementation as a trait here https://github.com/jul/archery
Basically it works BUT :
Prepare to throw 2 away
A chain is as strong as its weakest link : if a lib is based on composing the python based operator, the algebra will be as consistent as the CORE behaviour of the operator in the language.
Algebra is a powerful abstraction that is still underused.
Possible development : - Rieman/Hermitian algebra: using the power of the math used in Quantum Mechanics/relativity and python in the same fashion - Using Quaternion to have quirkless rotation in euclidean 3D...
Speakers: Julien Tayon