Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 01 2021 10:11
    @SystemFw banned @Hudsone_gitlab
  • 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
Peter Aaser
@PeterAaser
Yeah, we should see if he comes back
he must be initiated! He must write his first pipe and be accepted by the tribe as an adult
Gavin Bisesi
@Daenyth
I'm here
sorry
had a $work conversation
Justin Heyes-Jones
@justinhj
@PeterAaser yes that got it! thanks
Fabio Labella
@SystemFw
Right, so, I think a nice way to thinking of effects is as languages
Peter Aaser
@PeterAaser
Glad to hear it, with @SystemFw s blessing the fs2 tribe will now consider you an adult @justinhj
Fabio Labella
@SystemFw
by effects here I mean F[_], like Stream, Pull, IO, but also Option, List or what have you
Gavin Bisesi
@Daenyth
:+1:
Justin Heyes-Jones
@justinhj
@SystemFw yeah the list accumulation was an experiment. I didn't really want to do it that way because it felt wrong
Forgot to delete it from the gist
Fabio Labella
@SystemFw
these languages have some words that are unique to them (e.g. only Stream has uncons), and some that are abstracted in algebras (e.g.flatMap, since they are all monads)
so, what's a Pull
the first thing is that fs2 is a pull based streaming library
Justin Heyes-Jones
@justinhj
If you do want to go into detail on Pull I am all ears
Fabio Labella
@SystemFw
yep, will do, it's not that hard, no worries :)
Gavin Bisesi
@Daenyth
I've encountered the pull-ness :)
Peter Aaser
@PeterAaser
ps F[_] looks like a coffee cup with a weird handle
Gavin Bisesi
@Daenyth
a bit of a mind bend at first but I also am used to python's lazy iterables a fair bit so it's not so alien
Fabio Labella
@SystemFw
and every pull based streaming library, even those with complex implementations like fs2, can roughly be understood like advanced iterators
Peter Aaser
@PeterAaser
totally gonna use that for my next analogy-fest
Fabio Labella
@SystemFw
where you basically need to tell it "give me the next one" to make things happen
Daenyth @Daenyth nods
Fabio Labella
@SystemFw
so let's look at what Pull can do
Pull[F[_], O, R] has 3 params
F[_] effect
O values emitted
R value returned
Gavin Bisesi
@Daenyth
O is related to the stream contents type param?
R is different though - stream doesn't have that
Fabio Labella
@SystemFw
so Pull is a computation that describes emitting 0...n values, while evaluating effects in F, and complete with a value of type R
@Daenyth yes, I'll get to why those are different (and why fs2 splits Stream and Pull, one of its best decisions)
Gavin Bisesi
@Daenyth
Would a Stream be like a pull of R=()?
Fabio Labella
@SystemFw
exactly!
Gavin Bisesi
@Daenyth
:bulb:
Fabio Labella
@SystemFw
so, forgetting about Stream for a second
most people understand F and O in Pull very easily
but R is more confusing
what is that for?
Gavin Bisesi
@Daenyth
I'm also wondering about how it relates to transforming the Stream of IO for example into an IO of the final result
and where R fits into that if pull generalizes stream
Fabio Labella
@SystemFw
no, that's a different concept (although I see why they might look related)
Gavin Bisesi
@Daenyth
:+1:
go on
Peter Aaser
@PeterAaser
btw, from the codebase:
* `Pull` forms a monad in `R` with `pure` and `flatMap`:
Fabio Labella
@SystemFw
so, a Pull can emit some elements and then terminate with a result
Gavin Bisesi
@Daenyth
ok
Fabio Labella
@SystemFw
that result can be used to mean "the rest"