Hi there! I just talked with a Jetbrains rep and t...
# arrow
a
Hi there! I just talked with a Jetbrains rep and they said that KEEP-87 will be implemented using multiple receivers. @raulraja do you think this will work with Arrow? Is there any collaboration on this?
r
Yes, we commented the use cases multiple times with people from the compiler frontend. Multiple receivers is better for Kotlin than the original implicit based injection on keep87 and better for the proof system that meta proposes. There is prototypes also for multiple receivers. @`with` as recently proposed by Roman based on annotation like for injection and inline decorators is also an option for type classes in which multiple receivers may turn into. We adapted the Given feature to reflect these better and Imran and Dani are working on these feature and reencoding Arrow to make it multiplatform now that we have arrow-continuations and most of the meta features we need to get rid of kapt etc.
๐Ÿ˜ 2
We have as of a couple of weeks ago all the features we need to make Arrow MPP and move Arrow to 1.0
๐Ÿ˜ 4
a
Do you need help?
I have some free time now that I want to dedicate to this
r
Yes!
We need help creating all the new binding blocks based on arrow continuations to replace the current binds which ties us to reflection and the JVM
either, list, ...
a
can you point me in the right direction?
i just need an overall understanding of the concept and a good example then i'm off implementing it
@raulraja how would that use case work with multiple receivers when I want to augment an existing type (like
Number
) with a new interface? My understanding was that KEEP-87 is about extension interfaces.
do you have a small code example for this?
r
@addamsson here is an ongoing effort by Kioba to do the same over nullable types using reset / shift https://github.com/arrow-kt/arrow-core/pull/251/files
Regarding your question about the receiver and with, something like
@with<NumberExt>
brings into scope extension functions from NumberExt that target Number. For a more global approach across the board without receivers meta will offer @Coercion and @Extension
There is some examples of cohercion there which project all syntax of a type over another. This is more general than type classes and serve the same purpose, also not restrained to interfaces or generic types
a
wow this sounds great
i'm gonna take a look
@kioba
k
Yes, as I can understand you are looking for implementing continuations ๐Ÿ‘ Either would be a really great introduction and based on the
nullable
example it is easy to port to DelimitedScope. I would suggest to look at the
nullable.kt
inplementation in this PR
<https://github.com/arrow-kt/arrow-core/pull/251>
And read Jannis explanation about how reset/shift works here: https://github.com/arrow-kt/arrow-core/pull/251#discussion_r508632028
a
can you point me to some resource about continuations just to familiarize myself with the concept?
last time I used them by hand was ~10 years ago when i was writing lisp ๐Ÿ˜„
i'll also take a look at
nullable.kt
Seems to work!
@raulraja I checked the
CONTRIBUTING
file, but I can't see what branching strategy are you using. Is it ok if I create a branch with a sensible name and when i'm finished i open a PR from mybranch -> master?
k
The only source I have seen was this tweet from Jorge Castillo but haven't read the chapter yet. https://twitter.com/JorgeCastilloPr/status/1316993992572153856?s=19 Jannis exploration is top notch in the PR that describes the Delimited Scope well but there are examples how to use it in the tests as well
a
thanks
which book is this again? Scala for the impatient?
k
Yes, Scala for the impatient. 22 is the last chapter in the book here: https://horstmann.com/scala/
r
The other bindings have been addressed already for the last part by @danieeh you may wanna check with him for the remaining work https://github.com/arrow-kt/arrow-core/pull/252
๐ŸŽŠ 1
@addamsson regarding branching what you mentioned works
d
yeah, ping me anytime ๐Ÿ™‚
a
should I stop pinging you, Raul?
I managed to build the project, looking at how continuations work now
I think I have to start using Arrow before I try to contribute as I fell into a rabbit hole now with all these concepts I don't really understand ๐Ÿ˜„
I've started using Arrow now on one of my projects and I'll be back once I feel familiar with the lib. If I bump into something in the Arrow documentation that can be improved should I open PRs with them?
r
@addamsson yes please and coordinate with @tomasruizlopez who is currently working on docs and arrow 1.0 thanks!
a
thanks, I'm gonna DM him