Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 05 2019 14:43
    @typelevel-bot banned @jdegoes
  • Jan 31 2019 21:17
    codecov-io commented #484
  • Jan 31 2019 21:08
    scala-steward opened #484
  • Jan 31 2019 18:19
    andywhite37 commented #189
  • Jan 31 2019 02:41
    kamilongus starred typelevel/cats-effect
  • Jan 30 2019 00:01
    codecov-io commented #483
  • Jan 29 2019 23:51
    deniszjukow opened #483
  • Jan 29 2019 23:37
  • Jan 29 2019 23:22
  • Jan 29 2019 20:26
    Rui-L starred typelevel/cats-effect
  • Jan 29 2019 18:01
    jdegoes commented #480
  • Jan 29 2019 17:04
    thomaav starred typelevel/cats-effect
  • Jan 28 2019 17:43
    asachdeva starred typelevel/cats-effect
  • Jan 28 2019 07:12
    alexandru commented #480
  • Jan 28 2019 05:45
    codecov-io commented #482
  • Jan 28 2019 05:35
    daron666 opened #482
  • Jan 27 2019 13:56
    codecov-io commented #481
  • Jan 27 2019 13:46
    lrodero opened #481
  • Jan 27 2019 05:47
    codecov-io commented #460
  • Jan 27 2019 05:37
    codecov-io commented #460
Jakub Kozłowski
@kubukoz
oh. There isn't any
Anthony Garo
@agaro1121
I guess because you can’t implement Async
nor suspend and all the good stuff
it wouldn’t make sense
Christopher Davenport
@ChristopherDavenport
If you can write a lawful instance, I'll be impressed.
Gabriel Volpe
@gvolpe
You could write a lawful instance as long as type Id[A] = IO[A] :trollface:
Anthony Garo
@agaro1121
hehehehe
Jakub Kozłowski
@kubukoz
lol
Ross A. Baker
@rossabaker
Id tops out at Monad, and Future tops out at MonadError.
Daniel Spiewak
@djspiewak
@rossabaker btw in case you're interested in such a thing https://github.com/djspiewak/cats-effect-testing
still lacks scalatest support because no one has written it and I'm lazy, but it's pretty trivial
Christopher Davenport
@ChristopherDavenport
@djspiewak Is that ready for use?
Daniel Spiewak
@djspiewak
I haven't personally tried it, but it's like tested and stuff
it's not production code, so… throw it at your unit tests and give it a try!
I'll keep it semver'd
@ChristopherDavenport do you want a properly numbered release?
I can also like, put it on sonatype if you want :-)
Christopher Davenport
@ChristopherDavenport
Yeah, ideally versioned and sonatype. But thats really cool.
Daniel Spiewak
@djspiewak
Alrighty. It'll be up tonight
It's trivial to do I just haven't done it
Daniel Spiewak
@djspiewak
@ChristopherDavenport 0.1.0 is up on sonatype
Ross A. Baker
@rossabaker
There's a cats-effect integration in specs2. I'd need to compare and contrast.
Daniel Spiewak
@djspiewak
Oh I wasn’t aware of that!
Be easier to use something built-in
Ryan Peters
@sloshy
Sanity check - io.map(_ => println("something")) is bad (I think) because granularity is usually preferred, but could this also technically do anything unexpected?
Christopher Davenport
@ChristopherDavenport
Io.flatMap(_ => IO(println(“something”)))
Ryan Peters
@sloshy
I guess what I'm asking is - what should I say when I explain why that^ is the preferred way to do things to a coworker who inevitably writes it with map instead
Christopher Davenport
@ChristopherDavenport
Anything which does a side-effect is not a pure function.
map is a tool for working with pure functions.
Ross A. Baker
@rossabaker
Therefore the interpreter may assume it's a pure function, therefore you may be surprised when or how many times it prints.
Gavin Bisesi
@Daenyth

surprised when or how many times it prints.

@sloshy This is the main thing.

Not only that, but when and how many times it gets printed can change without your calling code changing, because implementations of combinators could change, or someone could refactor code in your project in a way that's type-safe but changes the impure evaluation structure

Ross A. Baker
@rossabaker
"Because it's an effect" is the theory and "because it's going to do weird shit" is the practice, and it's good to share both with your team.
Jacob Barber
@Jacoby6000
Hey guys, we recently introduced timeoutTo in a bunch of places (running on cats.effect.IO and sometimes EitherT of IO). We've noticed a pretty big perf impact from this. With the kind of traffic we get, this results in thousands of sleep operations getting placed on the sleep scheduler. Would you expect that to have a significant performance impact? I was under the impression that java schedulers were pretty good with throughput
Gavin Bisesi
@Daenyth
@Jacoby6000 I would not expect that to be a large impact. What kind of thread pool / ec setup are you using?
Ross A. Baker
@rossabaker
typelevel/cats-effect#568 is relevant to timeouts.
Jacob Barber
@Jacoby6000
@rossabaker oooh yeah that's almost definitely the problem! Has this been backported already? If not I'll go ahead and do it.
Ross A. Baker
@rossabaker
It's only on master, but it's binary compatible, so I see no reason it couldn't be backported.
Jacob Barber
@Jacoby6000
:+1:
Ross A. Baker
@rossabaker
I wonder if there are other backports, while cats-2.0.0 final is stuck in the mud.
Gavin Bisesi
@Daenyth
2.0.0 upgrade also isn't drop-in for users
in my case I have c-e > fs2 > third party fs2 libraries that aren't on fs2 1.1.x yet
so upgrading ce is blocked until those extra libraries are updated
so backports are quite valuable
Daniel Spiewak
@djspiewak
@rossabaker at least one other backport I know of is the fatal errors thing
and to @Daenyth's point, I think ongoing backports even after 2.0 will be valuable
I don't want to just drop the series/1.x branch on the floor
I realize backporting is a bit thankless, but it's important for serious software
speaking of thankless… @Jacoby6000 Thanks for the backport! :-)
Gavin Bisesi
@Daenyth
Is there a way I can do that in my own code with WithContext?
it looks even with WithContext, the IOTimer construction can't be overridden, though I might be misreading