These are chat archives for non/algebra

4th
Dec 2015
Rüdiger Klaehn
@rklaehn
Dec 04 2015 11:39
@johnynek I have fixed up an old branch of @non that removes spire typeclasses and uses algebra typeclasses instead. https://github.com/rklaehn/spire/tree/topic/algebra-integration . Feedback welcome.
Any idea if this sort of aliasing has a performance impact?
Rüdiger Klaehn
@rklaehn
Dec 04 2015 14:21
By the way: is there a reason there is no companion object for some typeclasses, e.g. IsIntegral and MinMaxLattice? I noticed this when aliasing typeclasses from spire.
Tom Switzer
@tixxit
Dec 04 2015 14:58
An odd question, but how much does everyone like IsReal / IsRational / IsAlgebraic / IsIntegral living in algebra?
There are some things in IsReal that could perhaps be factored out a bit
but many of these type classes I thought of as being a way to extract exact versions of possibly inexact types (eg each class can has a method to cast the underlying type to exact versions: BigInt, Rational, Algebraic and Real)
obviously we lose those methods in algebra, since those types don't exist
but I think that we also lose a lot of utility at the same time, other than the ceil/floor/etc methods on IsReal
(of course IsAlgebraic / IsRational don't exist in algebra, but it's sort of meant to be a hierarchy)
Miles Sabin
@milessabin
Dec 04 2015 15:03
I think it depends on whether you think of Algebra as the intersection of Spire and Algebird (in which case they make sense) or as a foundation for Cats (in which case they don't).
Tom Switzer
@tixxit
Dec 04 2015 15:04
I don't think Algebird has anything similar, so I don't think Algebird would be hurting without them
(this also makes me feel better about removing them)
Rüdiger Klaehn
@rklaehn
Dec 04 2015 15:18
Wouldn't having e.g. IsRational in algebra require having Rational in algebra? Same for IsAlgebraic/Algebraic?
I definitely think that spire is the right place for things like Rational and Algebraic.
Tom Switzer
@tixxit
Dec 04 2015 15:39
@rklaehn Oh yeah, definitely not arguing that. I'm arguing that we should remove IsIntegral and IsReal from algebra
since I don't think algebird uses them and they have been expanded in Spire to be more useful, but rely on Spire number types
Rüdiger Klaehn
@rklaehn
Dec 04 2015 16:28
Ok. Then I agree.
P. Oscar Boykin
@johnynek
Dec 04 2015 18:16
@tixxit I don't see a big win for IsReal in algebra, but I don't object.
Also, I don't see algebra as the intersection of spire and algebird. For instance, there were many objects we didn't bother to add, some we wished we had, but didn't get around to (Commutative*), so I see it as a nice shared foundation.
Also, basically, algebird is used in a monorepo with tons of dependencies, so we are pretty concerned with binary compatibility especially on core things.
Miles Sabin
@milessabin
Dec 04 2015 18:35
Shared foundation for Spire and Algebird?
P. Oscar Boykin
@johnynek
Dec 04 2015 19:36
@milessabin well, that was the original discussion. Since then cats came on the scene, but my intent is to use algebra in algebird, but the binary compatibility requirements are pretty high for something that low it the stack at Twitter.