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
Michael Pilquist
@mpilquist
i think it stays but done in IO instead
Brian P. Holt
@bpholt
that’s the next 3 lines, right?
Michael Pilquist
@mpilquist
ha yes
the covary[IO] goes away in favor of passing IO explicitly as type param to raiseError
Brian P. Holt
@bpholt
yep
Brian P. Holt
@bpholt
alright, tests pass! I’ll give this another once-over and then submit the PR
Michael Pilquist
@mpilquist
nice!!
Brian P. Holt
@bpholt
except… lol, I haven’t added fromEither yet
I might submit just this for now though
Michael Pilquist
@mpilquist
haha
Brian P. Holt
@bpholt
Ok, I submitted functional-streams-for-scala/fs2#1220. I think there might be a build failure on 2.11, so I’ll look at that tomorrow (along with implementing fromEither). Thanks for everyone’s help today!
Jakob Oesinghaus
@joesinghaus
Just wanted to check quickly: is it correct that fs2 does not have built-in support for decoding input files in an arbitrary encoding? I have seen text.utf8Decode, but an analogue for other encodings does not seem to exist.
Gabriel Volpe
@gvolpe
It is just convenient to have utf8 support but it's fairly straightforward to define your own @joesinghaus , it is just a Pipe[F, I, O] (alias for Stream[F, I] => Stream[F, O])
Jakob Oesinghaus
@joesinghaus
Hmm, utf8Decode seems to be doing some rather involved things to produce this Pipe[F, Byte, String]. 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?
Fabian Meyer
@fabianmeyer
Hi, I have a scheduled stream that emits new elements every n minutes. How can I map that stream to a discrete signal that always returns the latest value when back pressured?
like a behavior in FRP
Fabio Labella
@SystemFw
@fabianmeyer check out async.hold

when back pressured?

Although this terminology doesn't really apply to fs2 so I'm not sure exactly what you mean there

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