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
Fabio Labella
@SystemFw
but "call something every n minutes and return a Signal whose get returns always the latest values" is async.hold
Fabian Meyer
@fabianmeyer
@SystemFw : thank you! that's exactly what I was looking for
Fabio Labella
@SystemFw
:+1:
Refresh Token or something?
Fabian Meyer
@fabianmeyer
yep
Fabio Labella
@SystemFw

@joesinghaus I get the feeling that the complex bits of utf8Decode (continuationBytes, processSingleChunk, lastIncompleteBytes) are there to deal with the complexities of utf8.

I don't have a specific encoding in mind, I want this to be generic, so writing my own isn't really an option if I have to do something similar for every possible encoding?

The generic part doPull doesn't seem too complex, have you thought how to be generic over possible format? that will require different logic since encodings are different

Fabian Meyer
@fabianmeyer
@SystemFw : works like a charm!
Fabio Labella
@SystemFw
nice :)
the only gotcha
assuming your Stream is Stream.fixedDelay(5.minutes) zip Stream.repeatEval(apiCall)
make sure you handle the error at the apiCall level by returning an empty Stream (and potentially logging ofc)
unless you want one api call failure to end the whole thing
Jakob Oesinghaus
@joesinghaus
@SystemFw Seems right, the main difficulty here seems to be handling of multibyte characters. I think if I can assume for simplicity that I only need to handle UTF8 or single-byte encodings, I should be good.
Martijn Hoekstra
@martijnhoekstra
given an s: Segment[O, Unit], what is the difference between Pull.segment(s) and Pull.output(s)?
Fabio Labella
@SystemFw
first: Segment is gone
anyway, the types are different
ah, sorry
your Segment is of Unit
then they are effectively the same
Martijn Hoekstra
@martijnhoekstra
https://functional-streams-for-scala.github.io/fs2/guide.html uses Segment -- what should be used instead?
Fabio Labella
@SystemFw
The guide is for 0.10 since 1.0 is still in M3
we are using Chunk only now
but you can't really do that unless you upgrade to 1.0-M3
because Chunk in 0.10 is purposefully underpowered
Michael Pilquist
@mpilquist
@SystemFw Are we going to pass Timer[F] and ContextShift[F] explicitly now?
Fabio Labella
@SystemFw
heh, that's good question
my inclination is no for Timer
as for ContextShift, I need to have a closer look at the PR
Michael Pilquist
@mpilquist
right ok, i'm working on the fs2 upgrade now
Fabio Labella
@SystemFw
wrt to how you select which ec you want to run your stuff into
right
I think the argument Daniel made about Ec being ok implicitly because there's the CPU one as a good default still applies here
my mental model for Timer is still "there's a Time[F] typeclass, the runtime gives you an implementation", e.g. IOApp
but I'm open to chaining my mind and more importantly I'm exhausted by having to think about it :joy: :joy:
Michael Pilquist
@mpilquist
:)
oh ContextShift is okay to pass implicitly
trait ContextShift[F[_]] {
  def shift: F[Unit]
  def evalOn[A](ec: ExecutionContext)(fa: F[A]): F[A]
}
Fabio Labella
@SystemFw
ah, cool
it's defo a typeclass then in my mind
Christopher Davenport
@ChristopherDavenport
So happy to get ContextShift
Fabio Labella
@SystemFw
oh yeah, it's awesome
Thanks Pavel ;)
Calvin Lee Fernandes
@calvinlfer
hey guys, I have a question about the Pull datatype, what exactly does the R type represent? Can you think of it as some kind of Resource that you can use to produce Os?
Fabio Labella
@SystemFw
no
it's the return type
you can imagine it as a computation the emits some values and emits returns a new thing
it's actually similar to pagination ;)
which is indeed pull-based
Calvin Lee Fernandes
@calvinlfer
so there's two output types? O and R?
Fabio Labella
@SystemFw
R is not an output type, it's a return type