Rafal Piotrowski
08/28/2019, 9:02 AMpakoito
08/28/2019, 10:30 AMIO.effect
. I don't know if it's too much of a rewrite then 😄
I'll keep on reading.pakoito
08/28/2019, 10:31 AMoverride fun findAll(): IOOf<List<Employee>> = IO {
in there you can make it return IO<List<Employeee>>
and the compiler won't complain!!Rafal Piotrowski
08/28/2019, 10:31 AMraulraja
08/28/2019, 10:31 AMraulraja
08/28/2019, 10:32 AMpakoito
08/28/2019, 10:32 AMraulraja
08/28/2019, 10:32 AMRafal Piotrowski
08/28/2019, 10:32 AMpakoito
08/28/2019, 10:33 AMpakoito
08/28/2019, 10:34 AMpakoito
08/28/2019, 10:35 AMpakoito
08/28/2019, 10:35 AMstreetsofboston
08/28/2019, 10:59 AMrunBlocking { ... }
? I think wrapping it in runBlocking is not necessary. The call to suspendCoroutine { ... }
is enough, I think.Rafal Piotrowski
08/28/2019, 11:01 AMSuspendable
is not in 0.10.0-SNAPSHOT I got wrong impression about it talking with @simon.vergauwen I'll remove info about this class in 0.10.0 release of Arrow from my articlepakoito
08/28/2019, 11:02 AMsuspendCoroutine
. launch
is the equivalent of unsafeRunSync
, except that it swallows all errors and doesn't wire cancellation and you have to fix that.
Getting everything piped together is a bit messy. We've done it tho.pakoito
08/28/2019, 11:03 AMRafal Piotrowski
08/28/2019, 11:12 AMrunBlocking
since suspendCoroutine
is invoked in suspend fun
, good catch @streetsofboston 👍Robert Menke
08/28/2019, 12:19 PMBob Glamm
08/28/2019, 1:12 PMwith (employeeRouting) { ... }
construct; that suggests to me it is possible to aggregate typed routes, similar to the syntax enabled by http4s
Bob Glamm
08/28/2019, 1:12 PMcall
differently, thoughsimon.vergauwen
08/28/2019, 1:14 PMI like theThat’s a technique @raulraja has used to combine dependencies for a receiver. https://gist.github.com/raulraja/62de72039b11b05ed6d472cb8178da0cconstruct; that suggests to me it is possible to aggregate typed routes, similar to the syntax enabled bywith (employeeRouting) { ... }
http4s
simon.vergauwen
08/28/2019, 1:15 PMBob Glamm
08/28/2019, 1:16 PMraulraja
08/28/2019, 1:20 PMDerek Seroky
08/28/2019, 2:01 PMRafal Piotrowski
08/28/2019, 2:27 PMRafal Piotrowski
08/28/2019, 2:29 PMDerek Seroky
08/28/2019, 2:51 PMraulraja
08/28/2019, 2:51 PMraulraja
08/28/2019, 2:52 PMraulraja
08/28/2019, 2:52 PMraulraja
08/28/2019, 2:53 PMraulraja
08/28/2019, 2:54 PMraulraja
08/28/2019, 2:54 PMraulraja
08/28/2019, 2:54 PMDerek Seroky
08/28/2019, 2:55 PMraulraja
08/28/2019, 7:58 PMraulraja
08/28/2019, 7:58 PMBob Glamm
08/28/2019, 8:27 PMktor
to http4s
. I'm not convinced that bridging IO
is sufficient when the method for forming responses in ktor
involves calling mutation methods on the call
object supplied as an argument to the endpoint handler in the routing configuration. That doesn't feel very RT to meBob Glamm
08/28/2019, 9:05 PMhttp4s
suggests to me that response objects are RT, usually created by constructors (e.g. Response(status=200, headers=(/* map literal */), "body")
) or by pure functions that return a new copy of the response object (e.g. Response(...).addCookie(_ => ...)
) Definitely at odds with ktor's mutational methods on call
Derek Seroky
08/29/2019, 12:45 PMIO
api stabilizing in 0.10.0
? I've been avoiding using it since there was some discussion a few months ago about the API being re-worked. We've been basically just marking code with comments that will need to be refactored to use the new IO api once it is completed.simon.vergauwen
08/29/2019, 1:02 PM0.10.0
. Any chances to it’s API will only be additional combinators, beside any normal activity of course.