Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 18:28
    pjfanning commented #12327
  • 18:28
    robert-blankenship commented #12327
  • 18:27
    robert-blankenship commented #12327
  • 18:25
    robert-blankenship commented #12327
  • 17:34
    som-snytt commented #11631
  • 15:28

    SethTisue on 2.13.x

    advance http4s to make it green… (compare)

  • 14:11
    SethTisue commented on cf1b35b
  • 14:10

    SethTisue on 2.13.x

    avro4s went green on JDK 17 (compare)

  • 08:29
    scala-jenkins milestoned #9768
  • 08:06
    NthPortal edited #9768
  • 08:04
    NthPortal labeled #9768
  • 08:04
    NthPortal opened #9768
  • 08:04
    NthPortal labeled #9768
  • 07:46
    nwk37011 synchronize #9752
  • 07:12
    xuwei-k commented on cf1b35b
  • 06:17
    som-snytt commented #12464
  • 05:59
    NthPortal commented #9275
  • 05:45
    NthPortal commented #9388
  • 05:44
    NthPortal commented #12464
  • 05:38
    NthPortal synchronize #9388
Jose C
@jmcardon
or even in scala 2.13
Fabio Labella
@SystemFw
so defining fmap _ _ = Nothing breaks the identity law (haven't checked composition, but it doesn't matter, we've already seen it's not a Functor)
Martijn Hoekstra
@martijnhoekstra
the opaque types SIP is still pending. If the last SIP meeting was the December meeting, it hasn't been discussed yet
Jose C
@jmcardon
rip that's probably the SIP that I care the most about right now
trepidacious
@trepidacious
@SystemFw Ah yeah I was thinking that since _ => Nothing is the identity of Nothing it was enough, but I guess that is only enough if the type constructor was to Nothing, rather than to Maybe?
Fabio Labella
@SystemFw
see, Nothing can't be a type constructor
Jose C
@jmcardon
because opaque types being 0-cost with no .asInstanceOf casts would be so good
Fabio Labella
@SystemFw
that's where Scala is a bit weird
because Some and None have their own types
but the Functor is for Option
Martijn Hoekstra
@martijnhoekstra
it was on the agenda for last SIP meeting, but it got postponed @jmcardon - I don't know when the next SIP meeting is scheduled. Ask Jorge if you see him about.
trepidacious
@trepidacious
@SystemFw Yes it's the fact that the type constructor is Maybe that I was missing, I was kind of assuming that everything was Nothing ;)
Fabio Labella
@SystemFw
in Haskell is a bit clearer because Just can not be a type (I'm ignoring DataKinds ofc, but even in that case it's not the same)
Jose C
@jmcardon
:(
ok
thanks @martijnhoekstra
Fabio Labella
@SystemFw
yeah, Just and Nothing aren't types in Haskell at all, just constructors whose result has type Maybe a
Jose C
@jmcardon
Benching stuff, it's pretty nutty that .asInstanceOf casts can be equally expensive or more than creating a new object in the heap, as far as runtime is concerned
trepidacious
@trepidacious
@SystemFw And Nothing isn't a type constructor because it has no type parameter, whereas Const is, even though the type parameter does nothing?
Fabio Labella
@SystemFw
no
that's not the reason
data Maybe a = Just a | Nothing
the stuff to the right of = is data constructors, not types
Jose C
@jmcardon
yeah
you can't have stuff return Just I think
only Maybe
Fabio Labella
@SystemFw
in Scala you have a hierarchy of types/classes
in Haskell you have a type with variants
Just and Nothing are two things
trepidacious
@trepidacious
@SystemFw Ah ok, that makes sense. Even in Scala though None wouldn't be a type constructor because it is just a type?
@SystemFw Whereas Some actually is?
Jose C
@jmcardon
yeah
you can see it in the signature
Fabio Labella
@SystemFw
right, the important distinction here is not between type and type constructor
that doesn't matter
Jose C
@jmcardon
object None extends Option[Nothing]
Fabio Labella
@SystemFw
it's between type constructor and data constructor
the fact that Nothing/None have no arguments is not the point I'm making
let me put it this way
trepidacious
@trepidacious
@SystemFw I get that Nothing is different to a type or type constructor (at least approximately) yup.
Fabio Labella
@SystemFw
same for Just
yeah ok
Jose C
@jmcardon
@trepidacious what do you find weird about grasping re: type constructors?
trepidacious
@trepidacious
@SystemFw Yes. But it's still the case that to have a functor you need a type constructor rather than a type? I get that Just and Nothing fail even BEFORE that by not being a type OR a type constructor :)
Fabio Labella
@SystemFw
(btw, the distinction between type and type constructor is not really useful imho except in conversational talking, they're all types afterall, and we have kinds to talk about them precisely)
a Functor needs to be over a type of kind * -> *
that's what you need
trepidacious
@trepidacious
@SystemFw Is * -> * not the same as a type constructor? I thought they were just different terms for the same thing?
Fabio Labella
@SystemFw
yeah, but type constructor is not as precise
think Either