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
@lorandszakacs you can use scio, which is what we use to replace most of our spark jobs
If anyone is around, I have some questions regarding fibers
Fabio Labella
@SystemFw
go for it
Steven Fines
@sfines-clgx
namely, I have series of database inserts that are independent
which currently live in futures
Fabio Labella
@SystemFw
start
:)
but yeah go on
Steven Fines
@sfines-clgx
yeah yeah, this is more about appropriateness not how
Fabio Labella
@SystemFw
ah yeah
Steven Fines
@sfines-clgx
so I have, in effect a Future.sequence that I would like to replace because I want to collect all the failures and not terminate on the first one
and because all of the inserts are independent, I was thinking that fibers were a better solution
Fabio Labella
@SystemFw
I think the two points are orthogonal
Steven Fines
@sfines-clgx
yes, but I have to live at the intersection
Fabio Labella
@SystemFw
to deal with the failures, you can call .attempt
that works for Future as well
Steven Fines
@sfines-clgx
is Future wrapped somewhere that I am not seeing?
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