Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 03:07
    SethTisue commented #219
  • Jan 30 21:49
    keithschulze starred typelevel/algebra
  • Jan 30 20:19

    larsrh on gh-pages

    updated site (compare)

  • Jan 30 20:11

    larsrh on gh-pages

    updated site (compare)

  • Jan 30 19:56

    larsrh on revert-216-docs

    (compare)

  • Jan 30 19:56

    larsrh on master

    Revert "fix homepage (#216)" T… Merge pull request #220 from ty… (compare)

  • Jan 30 19:56
    larsrh closed #220
  • Jan 30 19:55
    larsrh commented #219
  • Jan 30 19:55
    larsrh closed #219
  • Jan 30 19:55

    larsrh on v1.0.1

    (compare)

  • Jan 30 19:55

    larsrh on master

    Setting version to 1.0.1 Setting version to 1.0.2-SNAPSH… (compare)

  • Jan 30 18:05

    larsrh on gh-pages

    updated site (compare)

  • Jan 30 17:54

    johnynek on master

    build for 2.13.0-M5 (#223) * b… (compare)

  • Jan 30 17:54
    johnynek closed #223
  • Jan 30 16:41
    sungjk starred typelevel/algebra
  • Jan 30 14:28
    erikerlandson commented #223
  • Jan 30 13:58
    tusharbihani starred typelevel/algebra
  • Jan 30 13:39
    larsrh commented #223
  • Jan 30 13:37
    erikerlandson commented #223
  • Jan 30 13:30
    larsrh commented #223
Luka Jacobowitz
@LukaJCB
I made it so that they all extend from Band so the laws should be tested there
Denis Rosset
@denisrosset
Ha! thanks, will check it out later
Denis Rosset
@denisrosset
I see, we diverge on the use of bases. I made the choice of using only parents in my version of the laws. Would be happy to discuss about it.
In my understanding, the new laws style of cats is extremely straightforward at the price of some boilerplate and repetition. This is why I dumped the bases-type encoding.
For example, in the lattice laws, I duplicated the laws for the meet operation and for the join operation; then a lattice laws is simply the union of all these. It's then very easy to move from the typeclass, to the laws trait, and follow the inheritance chain.
However, by using bases, the relevant laws cannot be found by looking at the law traits; you have to go to the discipline implementation, and understand how things work together, which imho defeats the purpose of the new style. Any thoughts?
NB: would be happy to move this discussion to the GitHub PR. Feel free to cut'n'paste stuff there.
Luka Jacobowitz
@LukaJCB
Interesting, I haven't put as much thought into it TBH
Denis Rosset
@denisrosset
Can you enlighten me on the motivations of moving from the old laws (basically, everything in Discipline rule sets), and the new style?
Because what I wrote is pure speculation after comparing the code before/after
Luka Jacobowitz
@LukaJCB
I'm sure someone from the cats side can give you a better answer
Luka Jacobowitz
@LukaJCB
Tbh mostly it was just so cats kernel had the same law encoding as cats core
Denis Rosset
@denisrosset
Oh I see
Kai(luo) Wang
@kailuowang
I am sure the new style can be improved. I actually don't recall any tests in cats that uses base.
Nick Barnwell
@nickbarnwell
Hi all - all the Algebra docs seem to have disappeared from the Typelevel site. Did the hosting change?
Vladimir Pavkin
@vpavkin

Can someone pls look at an updated PR for cats 1.0.1?
typelevel/algebra#213

As Oscar suggested, I turned off mima for travis build

P. Oscar Boykin
@johnynek
I think we are good now thanks to Colt.
(and others who helped in this process, thanks all!)
Denis Rosset
@denisrosset
Hi all, thanks for polishing my half-baked efforts!
Vladimir Pavkin
@vpavkin
:clap: thanks!
Ryan Stull
@ryanstull

Hello all,

Just curious, is there a reason the Additive and Multiplicative Typeclasses don't extend their general versions from Cats?

Here's the header of AdditiveSemiGroup:

package algebra
package ring

trait AdditiveSemigroup[@sp(Int, Long, Float, Double) A] extends Any with Serializable

So it doesn't actually extend Semigroup from Cats.

I'm running into a situation where I want to have a function defined for a cats.kernel.Semigroup but I can't pass an AdditiveSemigroup to it.

Currently I'm getting around this by using an implicit def to convert from the Additive and Multiplicative versions to the generic one. Is there a reason for this? or potentially a way to resolve it? Thanks

Denis Rosset
@denisrosset
Yep, because some types have both additive and multiplicative semigroups defined, and if both extended cats.kernel.Semigroup that would lead to ambiguous implicits.
If my memory serves correctly, there is already a way to convert an AdditiveSemigroup to Semigroup by calling the method .additive; please check if it exists in algebra.
Ryan Stull
@ryanstull
Ahhh, makes sense! Thanks a bunch!
jeremyrsmith
@jeremyrsmith
inspired by @tpolecat’s diagrams of cats’ typeclass hierarchy (though not nearly as nice)
(it is pretty small on the gist preview, but if you right-click and open image in new tab it looks alright)
it’s an interesting question: what does it mean to be an additive or multiplicative group in the absence of the other (within a ring)
jeremyrsmith
@jeremyrsmith
If a non-armchair mathematician has an answer I’d be fascinated to hear. I’m thinking something about multiplicative groups being combinatorial in nature, but it doesn’t seem like you can know that without “cheating” and looking at the structure of the group. Also I think there’s something there about relating a ring to a monad via multiply (eta) and add (mu). But as an armchair mathematician, I’ll leave it to the experts.
Luka Jacobowitz
@LukaJCB
Awesome stuff @jeremyrsmith
Srepfler Srdan
@schrepfler
what do you mean @jeremyrsmith by "to be an additive or multiplicative group in the absence of the other (within a ring)”?
jeremyrsmith
@jeremyrsmith
just that they’re structurally indistinguishable from one another, unless they’re both part of a ring structure
if you have a ring structure, then you have two group structures and you know which is additive and which is multiplicative by the nature of multiplication distributing over addition (at least)
if all you have is a group structure, there is no structural way to say whether it’s additive or multiplicative, without “peeking"
(as far as I can determine)
Srepfler Srdan
@schrepfler
I think in abstract algebra the terms additiona and multiplication are mostly inherited from historical baggage of dealing with numbers
a Zero and One are both a Neutral element of the group
and Negate and Invert are the Reciprocal of the value relative to the Neutral
the fact that you have two operations which follow these rules
that defines the Ring
No grups, no ring
both addition and multiplications are a function from two operands to one
Srepfler Srdan
@schrepfler
So I imagine what the guys want to say is here's a framework on how to reason if computations which are chained have a result in the end since it will tell you if you have holes in your domain and arrival set
and then the category theory guys kind of expanded that
Denis Rosset
@denisrosset
There are a few things between "commutative ring" and "field", such as "unique factorization domain" and "euclidean ring".
Wikipedia is pretty complete on that
Lars Hupel
@larsrh
Can I get a :+1: on this? #217
I'm trying to aid in moving everyone to M5
Lars Hupel
@larsrh
#223 will update everything necessary for M5
Denis Rosset
@denisrosset
Thanks!