Hexa
11/17/2019, 10:20 AMpakoito
11/17/2019, 11:33 PMPagoda 5b
11/18/2019, 9:43 AMBruno
11/18/2019, 2:13 PMFrancesco megna
11/18/2019, 9:41 PMGreg Hibberd
11/18/2019, 11:09 PMraulraja
11/19/2019, 10:46 AMthanerian
11/19/2019, 12:22 PMBruno
11/19/2019, 12:35 PMChris Kruczynski
11/19/2019, 7:41 PMIO
to MonoK
nicely, could anybody help?raulraja
11/20/2019, 5:23 PMpakoito
11/21/2019, 6:05 PMhandleErrorWith { e -> f(e).flatMap { raiseError(e) } }
Dennis Tel
11/22/2019, 8:00 AMBoolean expression AND Boolean expression AND Boolean expression
😅
Do I implement it on boolean expression or is it a different type/class all together?jimn
11/22/2019, 8:31 AMHullaballoonatic
11/23/2019, 3:42 AMval distance = 512.m
val time = 70.s
val speed = distance / time
The compiler only recognizes speed
to be of type Quantity<*>
instead of Quantity<Velocity>
, even though in the code this operation is specifically instantiating a quantity of velocity. Is there some kind of magic in Arrow that could ensure this without me having to hard code every compound quantity conversion?
I'm almost certain at this point that this is impossible to do.Ryan Benasutti
11/23/2019, 7:50 PM@Serializable
? Adding support for it from outside arrow is a massive pain because I have to go through this process: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/custom_serializers.md#about-generic-serializers. (it's actually much easier to copy-paste the arrow classes I want to serialize and annotate them myself, but that's not exactly maintainable)pg
11/25/2019, 10:39 AMMark Fisher
11/25/2019, 12:18 PMval o = Option.functor().multiplyBy2(Option(1))
assertThat(o.fix()).isEqualTo(Option(2))
But I've just come across this in the dependency injection notes
fun <F> Show<Kind<F, Int>>.printAllValues(fa: List<Kind<F, Int>>): Unit {
fa.forEach { println(fa.show()) }
}
I'm trying to write some code to use this, but I'm having trouble finding the right form to invoke it.
How would I call it with (say) a list of Option<Int> values?
Thanks!Yeray Cabello
11/26/2019, 9:19 AMMark Fisher
11/26/2019, 11:46 AMunsafeRunAsync
. I have a test with 3 IO objects I've created and done an attempt()
on, then I want them to run concurrently. I've tried using unsafeRunAsync expecting them to run ... asynchronously, but they run sequentially. How do I make the async IOs run concurrently?
@Test
fun `io module test`() {
val ioModule = Module(IO.async())
ioModule.run {
val ioS1 = repository.byId(u1).fix().attempt()
val ioS2 = repository.byId(u2).fix().attempt()
val ioS3 = repository.byId(u3).fix().attempt()
<http://logger.info|logger.info> { "ioS1..." }
ioS1.unsafeRunAsync { it.fold(ioError, ioInfo) }
<http://logger.info|logger.info> { "ioS2..." }
ioS2.unsafeRunAsync { it.fold(ioError, ioInfo) }
<http://logger.info|logger.info> { "ioS3..." }
ioS3.unsafeRunAsync { it.fold(ioError, ioInfo) }
}
}
My equivalent for using Observable was to use subscribeOn(...)
as follows:
repository.byId(u1).fix().observable.subscribeOn(<http://Schedulers.io|Schedulers.io>()).subscribe(idLogger, errorLogger)
repository.byId(u2).fix().observable.subscribeOn(Schedulers.computation()).subscribe(idLogger, errorLogger)
repository.byId(u3).fix().observable.subscribeOn(Schedulers.newThread()).subscribe(idLogger, errorLogger)
How can I fix the io module test
to run the 3 IO jobs at the same time?
Thanks!pakoito
11/26/2019, 11:53 AMIO.parMapN(<http://Dispatchers.IO|Dispatchers.IO>, ioS1, ioS2, ioS3) { a, b, c ->
Either.map(a,b,c) { aa, bb, cc -> ... }
}
pakoito
11/26/2019, 11:56 AM<http://Dispatchers.IO|Dispatchers.IO>
here is where the ios are started, and each can run on its own schedulerAttila Domokos
11/26/2019, 5:30 PMLens
code generation in my little learning project. The docs seem to be outdated. This is the commit that attempts it: https://github.com/adomokos/kotlin-sandbox/commit/0ac6eca63e7fffc83db113fd87ba3972807a22a2
What am I missing?Jose Antonio Jimenez
11/27/2019, 10:15 AMkioba
11/27/2019, 11:30 AMError<E> | Loading | Success<T>
. I tried to implement applicative
for the type. What I would like to achieve is the that the error
would have a higher precedence than Loading
, but the ap()
implementation with
flatmap{ .map{ ff() } }
I can not obtain the state of the second state unless the first is success.
an example that I would like to achive:
Result.applicative().tupled(Loading, Error)
// current result: Loading
Instead of the loading I am looking for the Error
to be returned. is there a good way to execute it? 🤔 is that a good idea t all? 😄raulraja
11/27/2019, 4:56 PMraulraja
11/27/2019, 5:00 PMhttps://www.youtube.com/watch?v=DaognWtZCbs▾
Imran/Malic
11/29/2019, 11:06 AMRory Armstrong
11/29/2019, 2:32 PMScott Christopher
12/03/2019, 9:56 AMScott Christopher
12/03/2019, 9:56 AMaballano
12/03/2019, 7:55 PMScott Christopher
12/03/2019, 10:01 PMsimon.vergauwen
12/04/2019, 1:51 PMQueue
impl such as sliding
, unbounded
, etc.Scott Christopher
12/05/2019, 9:59 AMQueue
strategies: https://github.com/arrow-kt/arrow/pull/1832simon.vergauwen
12/08/2019, 10:47 AM