simon.vergauwen
04/25/2019, 9:35 AMResource
between data type vs typeclass. https://github.com/arrow-kt/arrow/pull/1376simon.vergauwen
04/25/2019, 12:46 PMsimon.vergauwen
04/25/2019, 3:28 PMLeoColman
04/28/2019, 2:59 AMarrowAnnotations
LeoColman
04/30/2019, 10:21 PMGenOf
at Multiplatform/Common, but I do it in JVMBob Glamm
05/24/2019, 12:28 PMBob Glamm
06/04/2019, 3:06 AMBob Glamm
06/04/2019, 3:09 AMgradlew
. I guess I could have tried downloading gradle-5.0 and running that instead. Gradle 5.2.1 and 5.4.1 definitely fail the same way, thoughpakoito
06/13/2019, 9:49 AMpakoito
06/13/2019, 9:49 AMImran/Malic
06/14/2019, 10:25 AMe: error: Arrow's annotations can only be used on Kotlin classes. Not valid for error.NonExistentClass
In the Debug stacktrace it occurs that the failure happens in arrow-core-extensions
more specifically, the kapt Task kaptKotlin
I have 2 assumptions:
- Either there is a problem with codegen and I need to make this PR bigger than expected. Moving everything out of arrow-extras-data.
- Or I am missing an import in gradlecarbaj0
06/14/2019, 3:07 PMImran/Malic
06/19/2019, 10:10 AMpakoito
07/08/2019, 3:13 PMpakoito
07/10/2019, 11:00 AMpakoito
07/10/2019, 11:00 AMpakoito
07/10/2019, 11:00 AMaddamsson
07/14/2019, 11:07 AMaddamsson
07/14/2019, 4:01 PMFunctor
which are very well documented
but there are things like Profunctor
which have literally no docs. The functions are also a bit problematic because their kdocs are mostly hard to understand or non-existent.
Do you plan on improving this? It would be useful for contributors who didn't come from a Scala background.addamsson
07/14/2019, 4:07 PMSemigroup
and I'm wondering why combine
is not just an alias for operator fun plus
?addamsson
07/14/2019, 4:25 PMPersistentCollection
+ PersistentMap
only with Semigroup
, Monoid
, Foldable
, Functor
and FunctorFilter
.
There is one question though: Implementing removal with FunctorFilter
isn't going to be ineffective? I mean it is O(n)
vs O(log n)
or even O(1)
in some of the cases. Is there a typeclass for explicit removal instead of filtering?addamsson
07/15/2019, 12:13 PMImran/Malic
07/15/2019, 3:08 PMraulraja
07/15/2019, 3:13 PMsimon.vergauwen
07/15/2019, 4:05 PMImran/Malic
07/16/2019, 11:11 PMfun <B> mapFilter(f: (A) -> Option<B>): NonEmptyList<B> =
map(f).foldLeft(NonEmptyList(listOf())) { acc, o -> o.fold({ acc }, { acc + it }) }
Well I suggest to change the returnType to something like Option<NonEmptyList<B>>
, because if there doesn’t exist any value which fulfills the f function and returns an Some<B> the return List is empty thus it’s not an NonEmptyList<B>.
I also consider something like an Either<List<Nothing>, NonEmptyList<B>>
, which is in my opinion more granular.
I am happy for Feedback 🙂pakoito
07/16/2019, 11:42 PMaddamsson
07/17/2019, 8:22 AMJorge Castillo
07/19/2019, 12:33 PMaddamsson
07/21/2019, 5:29 PMaddamsson
07/21/2019, 5:29 PMsimon.vergauwen
07/21/2019, 7:10 PMaddamsson
07/22/2019, 7:25 AMassoc-in
in clojuresimon.vergauwen
07/22/2019, 7:27 AMaddamsson
07/22/2019, 7:57 AMsimon.vergauwen
07/22/2019, 7:58 AMRef
in Arrow Fx 🙂addamsson
07/22/2019, 7:59 AMsimon.vergauwen
07/22/2019, 8:00 AMaddamsson
07/22/2019, 8:19 AMsimon.vergauwen
07/22/2019, 8:20 AMcopy
to update immutable fields and copy
gets generated by the compiler.when
which is equivalent to TABLE_SWITCH
so super fastFold
or Traversal
can be derived from Foldable
and Traverse
so they always should be the highest performing.how about performance?Or did you mean something else?
addamsson
07/22/2019, 9:12 AMsimon.vergauwen
07/22/2019, 9:12 AMAtomicReference
. And for MPP we’ll wrap kotlinx.atomicfu which is also a simply a typealiased AtomicReference
for Java.i’m interested in the performance characteristics of ref vs actor or simple thread confinementOh, that’s more related to architecture than it’s related to individual building blocks of Arrow. In Arrow Fx you’ll typically find all low level building blocks but in the context of
F
. Ref
is AtomicReference
, Promise
has many use-cases but a good example is that you can use it as a latch to do synchronisation and Semaphore
. So it’s all low level building blocks concurrency people are typically familiar with.addamsson
07/22/2019, 11:55 AMactor
but its performance is abysmalsimon.vergauwen
07/22/2019, 11:55 AMactor
implementation on top of IO
and concurrency tools in Arrowaddamsson
07/22/2019, 11:56 AMsimon.vergauwen
07/22/2019, 11:56 AMQueue
, Ref
and Promise
. Where you basically have a Queue
of Promise
and you can take
in the actor to act on a message and you can put
in the Queue
to send a message.addamsson
07/22/2019, 11:57 AMEval
simon.vergauwen
07/22/2019, 11:59 AMaddamsson
07/22/2019, 11:59 AMsimon.vergauwen
07/22/2019, 12:07 PMaddamsson
07/22/2019, 12:08 PM