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
Steven Fines
@sfines-clgx
so I will need to grab the slic-effect-transactor lib as well?
Gavin Bisesi
@Daenyth
If you have import slick.someprofile.api._ and use Database, then Database is that
oh yeah - I forgot that. The base library just gives you typeclass instances for DBIO
Gavin Bisesi
@Daenyth
If anyone here is good with scalafix, I could use a pointer: https://gitter.im/scalacenter/scalafix?at=5fad3d088d286f2076a5932f
Gavin Bisesi
@Daenyth

@mpilquist re: non-daemon thread logger.

I'm not sure I've actually ever used raw threads before. Is there anything special I need to do in order to ensure that the daemon thread I create is on the right thread pool, not submitted to one the IOApp is about to close? Is it enough if I add a shutdown hook?

Adam Rosien
@arosien
iirc creating a thread doesn't associate it with anything else if you don't pass a ThreadGroup
Gavin Bisesi
@Daenyth
so just new MyThread().start()?
Adam Rosien
@arosien
if you want to make it a daemon you have to setDaemon(true), oh joy
but yes
Gavin Bisesi
@Daenyth
Yup. Is that safe to do in the static body?
Adam Rosien
@arosien
sorry, which static body do you mean?
Gavin Bisesi
@Daenyth
sec lemme just push
bout to run off to an appointment, will be back in a bit
Rafi Baker
@BakerRafi_twitter
How do we use Async.memoize? If I do something like Async.memoize(fa).flatten, it seems to be executing fa everytime.
Fabio Labella
@SystemFw
yeah
do you know how to use things like http4s clients, which have the shape F[Client[F]]
things of shape F[Thing[F]] in general
are you used to seeing things like that, or not?
Rafi Baker
@BakerRafi_twitter
Yes, I do use F[Ref[F]]. Is this similar to that?
Fabio Labella
@SystemFw
exactly
you need to pass the Ref around, and flatMap to seal the region of sharing
it's similar, you pass the inner F around, in all the places you need memoisation
everything you flatMap the outer one, you create a one region of memoisation
Rafi Baker
@BakerRafi_twitter
Okay, that makes sense. Thank you!
Fabio Labella
@SystemFw
look at it as F[Cache[F]]
Rafi Baker
@BakerRafi_twitter
Right.
Fabio Labella
@SystemFw
in general, there is a reason why a type is F[F[A]], and we didn't just flatten in the implementation
Rafi Baker
@BakerRafi_twitter
Is it because the internal F[A] is stateful?
Gavin Bisesi
@Daenyth
They describe different things
The outer F[F[A]] is "create shared state to store memoization"
The inner F[A] is "read or populate the shared memoization state"
If you flatten it, you get "create shared state for memoization, then immediately populate it, and discard the access to the state"
Rafi Baker
@BakerRafi_twitter
I had to read that a couple of times but I think I get it now. Thanks :)
Steven Fines
@sfines-clgx
I am about to ask a really stupid question.
like, it should be capitalized
Real Stupid Question
I've been coming at cats piecemeal, and the one thing I never really see explained is F[_]
I believe that it is supposed to be some sort of typed function but am not really sure enough to stake my life one it
am I correct, and if not, where can I become less stupid about this in the future?
Fabio Labella
@SystemFw
you are not quite right, but the question is not stupid at all
do you want to know what F[_] means in terms of language feature
or the point of the pattern? (and what the pattern is, how it works)
Steven Fines
@sfines-clgx
well, I get that the _ is a wildcard type
Fabio Labella
@SystemFw
ah, it's not
Steven Fines
@sfines-clgx
ok, then maybe we should start there
Fabio Labella
@SystemFw
scala 2 syntax is confusing in that respect (and it's thankfully changing in scala 3), but it's not a wildcard
Steven Fines
@sfines-clgx
I feel I probably need to know both
Fabio Labella
@SystemFw
right, let's start from there then
have you ever heard the word kind?
in the context of type systems, of course :smile: