Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:08
    armanbilge labeled #6806
  • 17:32

    github-actions[bot] on gh-pages

    deploy: 9ffdefabdc2c0721ad6cd1a… (compare)

  • 17:27

    danicheg on series

    (compare)

  • 17:27

    danicheg on 0.23

    Update cats-effect, cats-effect… Merge pull request #6838 from h… (compare)

  • 17:27
    danicheg closed #6838
  • 16:33
    mergify[bot] labeled #6838
  • 16:33
    mergify[bot] labeled #6838
  • 16:33

    http4s-steward[bot] on series

    Update cats-effect, cats-effect… (compare)

  • 16:33
    http4s-steward[bot] opened #6838
  • 15:09
    monzonj commented #6806
  • 15:05

    rossabaker on 0.23

    [chore] updated dependencies Merge pull request #296 from gc… (compare)

  • 15:05
    rossabaker closed #296
  • 11:48
    gcnyin opened #296
  • 08:49
    cesarcolle starred http4s/http4s
  • 08:30

    github-actions[bot] on gh-pages

    deploy: 7dd8cf7fd2e68ca7ddfae09… (compare)

  • 08:26
    themorya starred http4s/http4s
  • 08:25

    armanbilge on flake-lock

    (compare)

  • 08:25
    armanbilge closed #6837
  • 08:25

    armanbilge on 0.23

    flake.lock: Update Flake lock … Merge pull request #6837 from h… (compare)

  • 07:47
    mergify[bot] labeled #6837
Christopher Davenport
@ChristopherDavenport
Woot! Ember to the rescue
Rob Norris
@tpolecat
Do you have a sense for how close it is to being ready for prime time?
Works fine in my dinky experiment.
Christopher Davenport
@ChristopherDavenport
The client is pretty ok, there seems to be some issues with chunked encoding I haven’t pinned down. The server connection reuse is the part I have horribly wrong presently.
For most use cases the client as written is probably good to go.
I put a lot of work into that pool, so it should be mostly useful. :laughing:
Rob Norris
@tpolecat
Neato.
In the meantime blaze and async-http can hang their heads in shame.
We need to rename it CursedMinusTwoConcurrentEffectOfSuffering
Christopher Davenport
@ChristopherDavenport
Catchy name for a client.
Rob Norris
@tpolecat
I should quit while I'm ahead and turn the computer off.
Christopher Davenport
@ChristopherDavenport
That’s the spirit!
I’ll try to cut a release tonight, I want to remove server connection reuse temporarily as I don’t like having broken code in the mainline.
Rob Norris
@tpolecat
I didn't look at the server part. It's possible that can be weakened too.
Christopher Davenport
@ChristopherDavenport
Already took care of it. :smile:
If ember doesn’t suit your needs let me know and I’ll do my best, either here or in ChristopherDavenport/libraries
Rob Norris
@tpolecat
:+1:
Christopher Davenport
@ChristopherDavenport
Bits are migrating now, so you can rely on a real artifact.
Rob Norris
@tpolecat
No worries, it's just a throwaway thing right now.
Just trying to get distributed tracing to actually distribute. It works, so I'm good.
Christopher Davenport
@ChristopherDavenport
I'm excited, it's the only client that doesn't require effect, which means pure throughout.
Rob Norris
@tpolecat
Right. Skunk too, for the same reason.
Carlos Quiroz
@cquiroz
Could you explain that a bit for newbies
Do you mean the Effect type class?
Rob Norris
@tpolecat
yes, the blaze and async-http clients have an Effect constraint
so this means your F[A] can't be Kleisli[G, E, A] because you need an E before you have any hope of getting an A out, so you can't write Kleisli[G, E, A] => A which is basically what Effect is.
So the "reader" effect is incompatible with Effect. You can never have both.
So. Getting rid of an Effect constraint is a big deal.
Ross A. Baker
@rossabaker
I tried, but I can't remember if I tried since cats-effect-1.
I guess ember gets away with it by being one big stream? I think the problem is the request has to be an end of the world in most backends.
Rob Norris
@tpolecat
I guess it comes down to the particulars. fs2 does nio sockets without Effect.
Michael Pilquist
@mpilquist
Oh hey, I spent my Friday evening on this: functional-streams-for-scala/fs2#1497
Which led me to propose typelevel/cats-effect#555
@tpolecat Would especially like your feedback on the fs2.io.tcp changes given your usage in skunk
Rob Norris
@tpolecat
Oh cool. Yeah I’ll check it out. My talk has to take a detour to deal with ACG.
Packing and loafing around atm but I’ll have a look on ze plane.
Toby Thain
@toby5box
I've asked this before I think but… I have a rather deep and complicated bunch of code that produces a ConnectionIO[], and now I need a side-effecty IO value deep inside it… so it would save me a lot of work if I could use ConnectionIO as IO. what's the accepted way to do this again?
(the IO wraps a random UUID)
Fabio Labella
@SystemFw
liftIO
in this case it's fine because even though you cannot rollback the IO inside, it's not a big deal
Toby Thain
@toby5box
thanks! lemme see…
Rob Norris
@tpolecat
IO(...).to[ConnectionIO]
Toby Thain
@toby5box

IO(...).to[ConnectionIO]

thanks, smartypants

Rohde Fischer
@rfftrifork
is there any good ways to mock/stub/whatever for a http4s client in testing? I've always had a bad taste about mocking frameworks,because I end up testing that a specific method is called, rather than the specific result. E.g., if I have a service that use the client I want to know that http://foo is called, I want to simulate the response "bar" and that my service gives "baz". I do not (seen from the test) care if this is done using expect, getAs or some other way
Fabio Labella
@SystemFw
@rfftrifork you can use Client.fromHttpApp, which takes an http4s server definition and gives you a client that calls that server
no actual http is involved so you can actually use it in unit tests
Rohde Fischer
@rfftrifork
@SystemFw oooooohhhhhh sounds exactly like what I want, thanks once again, mate :) You're a great help (y)
Fabio Labella
@SystemFw
:+1:
Rohde Fischer
@rohdef
is it correct that the only reasonable ways to reach the Response object is either via run or the error callbacks?
Rohde Fischer
@rohdef
because that seems slightly weird to me :) especially since I don't want to translate http errors in to exceptions (by default at least), rather I'd like to react selectively on them, e.g. a Not Found might result in a message about creating the resource where a Request Timeout might be cause for using a circuit breaker with exponential timeout and so on, where an exception is something I'd use more for code issues, such as if I try to pass an malformed url to a method