by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 04:19
    404- forked
    404-/fs2
  • Jan 31 2019 03:01
    SethTisue commented #1232
  • Jan 30 2019 17:22
  • Jan 30 2019 13:45
  • Jan 30 2019 10:48
    pchlupacek commented #1406
  • Jan 30 2019 10:47
    pchlupacek commented #1406
  • Jan 30 2019 10:39
    pchlupacek commented #1407
  • Jan 30 2019 09:58
    lJoublanc commented #870
  • Jan 30 2019 09:42
    vladimir-popov commented #1407
  • Jan 30 2019 08:10
    vladimir-popov closed #1407
  • Jan 30 2019 08:10
    vladimir-popov commented #1407
  • Jan 29 2019 19:20
    SystemFw commented #1407
  • Jan 29 2019 19:20
    SystemFw commented #1407
  • Jan 29 2019 18:57
    SystemFw commented #1406
  • Jan 29 2019 17:47
    pchlupacek commented #1406
  • Jan 29 2019 17:42
    pchlupacek commented #1406
  • Jan 29 2019 17:39
    pchlupacek commented #1407
  • Jan 29 2019 17:39
    vladimir-popov edited #1407
  • Jan 29 2019 17:38
    vladimir-popov commented #1406
  • Jan 29 2019 17:37
    pchlupacek commented #1406
Michael Pilquist
@mpilquist
We need compile to work with SyncIO
So that might be good reason for MonadCancel?
Daniel Spiewak
@djspiewak
oh
hmm
so SyncIO doesn't have cancelation actually
it could; self-cancelation isn't that crazy
if you need compile to work with SyncIO, then yeah, MonadCancel is the only option
Michael Pilquist
@mpilquist
Either that or we have come internal adhoc thing that does attempt.flatmap on SyncIO
Daniel Spiewak
@djspiewak
…which is what @SystemFw did for Resource
so that's technically not outside the realm of sanity
I'm pretty tempted to do MonadCancel tbh
when one person builds an internal ad hoc thing, you ignore it
when two people build the same internal ad hoc thing, you consider the possibility that you're missing something
(ignoring for the moment the fact that Resource and Stream are isomorphic up to this particular need)
Michael Pilquist
@mpilquist
yep
Daniel Spiewak
@djspiewak
k, I'm going to risk the wrath of Fabio and give this a shot
Fabio Labella
@SystemFw
:P

if you need compile to work with SyncIO, then yeah, MonadCancel is the only option

can it not take Resource.Bracket (the internal thing, fyi)

and note that it's not reuse for the sake of it because fs2-next uses compile.resource as the main loop anyway
the reason I prefer that over MonadCancel is that the actual use case is this: "if we allow cancelation, we need a Concurrent to express safety. If we don't, we need a MonadError for attempt.flatMap"
Fabio Labella
@SystemFw
and Resource.Bracket is just a lame OrElse to describe the above
MonadCancel says instead "because we need to support resourceful sync types, we shove (emphasis mine :P) (self-)cancelation into them, so we can talk about this uniformly"
Michael Pilquist
@mpilquist
Oh it may be able to
I guess that’s another reason to wait for Resource to land before getting going
Daniel Spiewak
@djspiewak

MonadCancel says instead "because we need to support resourceful sync types, we shove (emphasis mine :P) (self-)cancelation into them, so we can talk about this uniformly"

I mean, isn't that better than perpetuating an ad hoc typeclass that's just characterizing two broadly-unrelated things? :-)

Sam Desborough
@desbo
Hi all. Are there any examples of fs2 being used for streaming analytics / event aggregation? e.g. processing pageview events to build average number of views over a rolling window, etc. Or is this kind of thing outside of scope?
Adam Rosien
@arosien
@desbo it's a very common use case, for sure. there are a number of built-in methods that do that with one or two functions
Sam Desborough
@desbo
@arosien thanks, which ones are those? I'm currently finding myself using scan with a Map, to allow grouping by a particular ID, but would be interested to know about different approaches
Adam Rosien
@arosien
mapAccumulate is very common
(i'm just a beginner, but have seen many questions like this in this gitter channel)
Paul Snively
@paul-snively
@desbo: fs2 and Algebird are two great tastes that taste great together.
Calvin Lee Fernandes
@calvinlfer
Hey all, is it possible to interface with an Akka Persistence Query from FS2, I’m guessing I would have to use streamz to do this?
Paul Snively
@paul-snively
@calvinlfer: Akka Persistence Query is based on Akka Streams, so please see the fs2 Reactive Streams module: https://fs2.io/guide.html#reactive-streams
Calvin Lee Fernandes
@calvinlfer
Thanks @paul-snively i will take a look, I know Martin and @Daenyth have worked on a higher level api. Essentially, I need to interop with an Akka Streams Source
which i guess is a reactive streams Publisher
Yep seems to be Akka Streams Source = Publisher and Sink = Subscriber in the usual case. Cool, i should be able to use the reactive streams module directlyQ
thanks!
Paul Snively
@paul-snively
You bet!
Jens Grassel
@jan0sch
Hi, is there a recommend way from Stream[F, F[A]] to Stream[F, A]?
Erlend Hamnaberg
@hamnis
evalMap
Jens Grassel
@jan0sch
Thank you.
Gavin Bisesi
@Daenyth
@calvinlfer Look at streamz-converter, it offers akka-streams<->fs2 bindings
Christopher Davenport
@ChristopherDavenport
Is there any queue which allows you to offer batches that will be dequeued together? Or do I need to make the queue of Chunks in order to have that behavor?
Michael Pilquist
@mpilquist
Latter
Christopher Davenport
@ChristopherDavenport
Most efficient Chunk[Chunk[A]] => Chunk[A]?
I'm hoping .flatten
Adam Rosien
@arosien
"chunk-chunk-a-chunk"
Christopher Davenport
@ChristopherDavenport
Well I need to make sure some elements are actually sent as a unit.
But I still want to be able to enqueue multiple.
Michael Pilquist
@mpilquist
Chunk.concat