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
Gavin Bisesi
@Daenyth
import cats.syntax.all._
Steven Fines
@sfines-clgx
ah,
Fabio Labella
@SystemFw
when you move to IO it's the same, but call parSequence instead of sequence (or parTraverse, depends on what you have)
Steven Fines
@sfines-clgx
well, when slick moves to IO or I figure out how to lift Futures to IO then I will be happy
Gavin Bisesi
@Daenyth
Speaking of differences in IO vs Future concurrency: https://github.com/daenyth/intro-cats-effect/
ah slick
Fabio Labella
@SystemFw
Async.fromFuture should do that for you
Steven Fines
@sfines-clgx
that says worlds
Ok, I will see what I can mess up ;)
Gavin Bisesi
@Daenyth
@sfines-clgx Also have a look at the slick-effect library that gives you an IO-native slick interface
Steven Fines
@sfines-clgx
OOOOOO
Gavin Bisesi
@Daenyth
(somewhat, with caveats)
Steven Fines
@sfines-clgx
Lemme google
Gavin Bisesi
@Daenyth

Yes, that one.

As long as you use DBIO and don't rely on the phantom read/write param stuff, it should do you OK. And it doesn't have streaming support built in, but it can be added on top (I've done so)

Steven Fines
@sfines-clgx
not 2.13 compatible tho
Gavin Bisesi
@Daenyth
And the typeclass instances for DBIO still rely on implicit EC; no way around that
eh? are you sure?
:eyes: build.sbt says 2.13 is in there, I think the readme is just outdated
it doesn't support cats-effect 3 yet, but WIP
and CE3 isn't out itself yet, anyway
Steven Fines
@sfines-clgx
I'm not on cats-effect 3 so
ok, will try
Gavin Bisesi
@Daenyth
by the time you'll want to be on it, it'll be out
(and this should support it)
Steven Fines
@sfines-clgx
so I can use that to get an IO which I use in a Fiber
much nicer
Steven Fines
@sfines-clgx
so, slick-effect lacks meaningful examples
Gavin Bisesi
@Daenyth
Truth :)
but it's basically just one method: transact(myDBIO) for DBIO[A] => IO[A]
Steven Fines
@sfines-clgx
it's constructing to that point which is boggling me
Gavin Bisesi
@Daenyth
oh
hang on
:eyes:
It's been a while..
It's just some factory methods on the Transactor object
If you're specializing to IO you don't need to worry about the typeclass bits, so for example fromDatabase wants an IO[...DatabaseDef]
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