https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
arrow
  • k

    kitttn

    01/07/2019, 3:23 PM
    nope, with arrow library included
    p
    • 2
    • 2
  • r

    raulraja

    01/07/2019, 5:52 PM
    @kitttn https://try.arrow-kt.io:80
    k
    • 2
    • 1
  • s

    simon.vergauwen

    01/07/2019, 9:31 PM
    Also you could remove the
    IO.run
    if you use
    IO.raiseError
    instead. You’re already import binding for io directly with
    import arrow.effects.extensions.io.monad.binding
    🙂
    b
    • 2
    • 4
  • p

    pakoito

    01/13/2019, 12:16 PM
    meanwhile you’d need to use something like
    EitherT<ForIO, MyError, A>
    which is slower and boilerplaty
    i
    s
    • 3
    • 7
  • s

    snackycracky

    01/22/2019, 8:59 AM
    oh my, why is the documentation with the example: Arm a Nuke launcher Aim toward a Target Launch a Nuke and impact the Target Why not puppies and kittens playing together?
    m
    r
    • 3
    • 2
  • h

    herlevsen

    01/22/2019, 11:29 PM
    Hi. Can anyone explain to how this function gives me the ability to call a bind() function on an expression that returns an either, passed inside a lambda e.g. binding { val number = Either.right(2).bind() } When bind is not part of Eithers interface, and i can not call it when the expression is outside binding. Would also appreciate a link to Kotlin documentation that explains this Thanks 🙂
    -.kt
    s
    s
    r
    • 4
    • 24
  • r

    raulraja

    01/28/2019, 12:22 AM
    -.kt
    b
    s
    • 3
    • 6
  • b

    bjonnh

    01/28/2019, 12:29 AM
    But I'm still really confused about what I should do when executeQuery throw an exception
    r
    • 2
    • 13
  • r

    raulraja

    01/28/2019, 12:30 AM
    Also a new binding still is supported. Where before you did always:
    val a = ioValue.bind()
    You can now do
    val (a) = ioValue
    s
    • 2
    • 3
  • b

    bjonnh

    01/28/2019, 1:23 AM
    in the example above, if the example in the middle throws an error, it just doesn't run the next effects
    r
    • 2
    • 14
  • i

    Imran/Malic

    01/30/2019, 10:08 AM
    I have problems to compile and write own Semigroup Instances also the @instance annotation does not compile

    https://www.youtube.com/watch?v=3y9KI7XWXSY▾

    r
    • 2
    • 7
  • i

    Imran/Malic

    01/30/2019, 10:08 AM
    Does anyone know what I am doing wrong..?
    r
    • 2
    • 1
  • b

    bjonnh

    01/31/2019, 10:02 PM
    IO<Unit> ?
    r
    • 2
    • 3
  • b

    bjonnh

    02/03/2019, 11:41 PM
    so I can write
    when (call.response.status.value) {
                        200 -> effect { call.response.readText() }
                        404 -> IO.raiseError<String>(NonExistentReference).bind()
                        else -> IO.raiseError<String>(UnManagedReturnCode(call.response.status.value)).bind()
                    }
    r
    • 2
    • 7
  • b

    bjonnh

    02/04/2019, 12:05 AM
    Have you ever wrote JUNIT tests for Arrow code?
    r
    • 2
    • 6
  • k

    kartoffelsup

    02/08/2019, 1:03 PM
    Will there be a vod of his talk?
    ➕ 2
    m
    p
    • 3
    • 3
  • s

    streetsofboston

    02/08/2019, 1:53 PM
    Hello, I have a question about make
    suspend
    functions ‘functional’, possibly using Arrow-Fx. I threaded my question “How can I use
    suspend
    functions in a functional way” right here:
    p
    • 2
    • 19
  • p

    pakoito

    02/10/2019, 12:49 PM
    use
    fx
    k
    • 2
    • 2
  • s

    streetsofboston

    02/11/2019, 7:34 PM
    Quick question: Is there a rough estimate on which this bug could be fixed? https://github.com/arrow-kt/arrow/issues/1295
    r
    • 2
    • 3
  • s

    streetsofboston

    02/11/2019, 9:09 PM
    If I have a
    Kind<F, A>
    (and its
    Monad<F>
    as well), how do I pry out the value of type
    A
    ? In other word, how would I implement this extension function?
    fun <F,A> Kind<F,A>.evaluateKind(monad: Monad<F>): A {
        // TODO Get and return the 'A' typed value from 'this' Kind<F,A>
    }
    b
    r
    • 3
    • 27
  • s

    streetsofboston

    02/12/2019, 4:03 PM
    @raulraja or @pakoito After this bug ( https://github.com/arrow-kt/arrow/issues/1295 ) is fixed, will the
    fx { ... }
    calls themselves be blocking or suspending? Looking at the Arrow code, the
    fx { ... }
    calls return a
    returnedMonad
    immediately (which could cause that #1295 bug). If this is fixed and its suspending lambda does not continue immediately, will the
    fx
    call be blocking or suspending to get the correct monad to be returned by it? I’m asking this especially for the
    fx
    calls returning
    Either
    ,
    Try
    , etc values.
    r
    • 2
    • 19
  • s

    streetsofboston

    02/12/2019, 8:24 PM
    Wouldn’t it be easiest to just do
    setOnClickListener { myCallback() }
    . Least amount of typing, i think… 🙂
    l
    • 2
    • 3
  • s

    simon.vergauwen

    02/14/2019, 12:40 PM
    There should be a function available called
    handleErrorWith
    which exists for this exact situation.
    :arrow: 2
    n
    • 2
    • 1
  • k

    kartoffelsup

    02/14/2019, 5:29 PM
    Hi, my apologies for the cross post (already posted on gitter), just want to make sure this is seen, in case it is a bug in Fx. running this: https://gist.github.com/kartoffelsup/f749e2b1d0078a252204cfee82397463 I'm getting:
    Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class arrow.core.Either$Left
    	at arrow.core.Either$Companion.left(Either.kt:173)
     	at arrow.core.EitherKt.Left(Either.kt:196)
     	at arrow.effects.IORunLoop.loop(IORunLoop.kt:182)
     	at arrow.effects.IORunLoop.startCancelable(IORunLoop.kt:27)
     	at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:58)
     	at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:26)
     	at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:145)
     	at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:17)
     	at arrow.effects.IORunLoop.loop(IORunLoop.kt:211)
     	at arrow.effects.IORunLoop.start(IORunLoop.kt:20)
     	at arrow.effects.IO.unsafeRunAsync(IO.kt:112)
     	at arrow.effects.internal.Platform.unsafeResync(Utils.kt:62)
     	at <http://arrow.effects.IO|arrow.effects.IO>$Async.unsafeRunTimedTotal$arrow_effects_data(IO.kt:183)
     	at arrow.effects.IO.unsafeRunTimed(IO.kt:135)
     	at arrow.effects.IO.unsafeRunSync(IO.kt:132)
     	at NoClassDefReproKt.main(NoClassDefRepro.kt:55)
    Is this a bug or am I doing it wrong?
    p
    • 2
    • 6
  • p

    pakoito

    02/14/2019, 6:01 PM
    this has happened before
    k
    • 2
    • 1
  • p

    pakoito

    02/14/2019, 6:22 PM
    @Paolo Gavočanov Natural transformations are defined as FunctionK in Arrow
    p
    r
    • 3
    • 19
  • k

    kartoffelsup

    02/16/2019, 12:11 PM
    Isn't it a bit too dangerous to catch a Throwable in Try {}? I think this is why I had several NoClassDefFound Errors in my sample above (https://kotlinlang.slack.com/archives/C5UPMM0A0/p1550165387048700), because a StackOverFlowError was being caught. https://github.com/arrow-kt/arrow/blob/e82fcf69a35688584e3fb4e8e4ff44a44675c551/modules/core/arrow-core-data/src/main/kotlin/arrow/core/Try.kt#L39
    r
    d
    • 3
    • 29
  • i

    Icaro Temponi

    02/19/2019, 1:45 PM
    Hello everyone, just a quick question, what's the proper way of immediately leaving a Option.monad().binding block or any other type? Is there a better way than just None.bind() (using Option, for example) ?
    s
    r
    • 3
    • 5
  • s

    starke

    02/19/2019, 8:54 PM
    and a second semi-related question:
    get(): A' is deprecated. This function is unsafe and will be removed in future versions of Arrow. Replace or import `arrow.syntax.unsafe.*` if you wish to continue using it in this way
    how does one import
    arrow.syntax.unsafe.*
    ? I can’t find that anywhere
    k
    • 2
    • 11
  • t

    Tim Fennis

    02/22/2019, 1:46 PM
    Oh an Hi to @jacob your talk on arrow is what really got me into functional programming! Thanks ❤️
    :arrow: 4
    j
    • 2
    • 1
Powered by Linen
Title
t

Tim Fennis

02/22/2019, 1:46 PM
Oh an Hi to @jacob your talk on arrow is what really got me into functional programming! Thanks ❤️
:arrow: 4
j

jacob

02/22/2019, 10:09 PM
That's so awesome to hear 😁 I'm glad you liked it, and welcome!
View count: 7