Re:Jaxga: Geometric algebra library for Jax
by chpatrick on Tuesday December 13, 2022 @10:19PM
(#33979618)
Do you think there's a practical benefit, or is it just more elegant conceptually?
From my limited understanding the idea is that instead of having vectors, quaternions, planes and so forth, these are all represented pretty much the same way. But as a working programmer is there a benefit to that? At the type level I'd definitely like those concepts to be separate.
Re:Jaxga: Geometric algebra library for Jax
by pizza on Tuesday December 13, 2022 @10:35PM
(#33979707)
Check out this gallery of examples (from ganja.js), e.g. this one https://enkimute.github.io/ganja.js/examples/coffeeshop.html...
The concepts may or may not be useful for your aims. One pragmatic benefit could be e.g. you can automatically generate optimally-performant code for different algebraic operations, all just from the spec.
This means that "multiplying" apples and oranges is possible by having appapple components, ororange components, and apporange components, and they're just described the same way as you do with distributing multiplication in brackets, so just sum of incomparable objects.
So ultimately, in terms of calculations they fundamentally use the same number of operations. The main advantage is a cohesive framework of Types, rather than arbitrary exceptions defining different product rules. You just have *one* vector product, whose output have all of those as components.