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
  • p

    prat

    09/02/2017, 7:45 PM
    i'm writing a simple test
    testLaws(SemigroupKLaws.laws(SequenceKW.semigroupK(), applicative, Eq.any()))
    and it failed
    java.lang.AssertionError: Property failed for
    SequenceKW(sequence=kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$1@5d5abcb9)
    SequenceKW(sequence=kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$1@2973d20a)
    SequenceKW(sequence=kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$1@1ec9a588))
    	at io.kotlintest.properties.PropertyTestingKt.forAll(PropertyTesting.kt:43)
    	at kategory.data.SequenceKWTest$$special$$inlined$laws$1.invoke(SemigroupKlaws.kt:17)
    	at kategory.data.SequenceKWTest$$special$$inlined$laws$1.invoke(SemigroupKlaws.kt:6)
    	at io.kotlintest.Spec$runTest$callable$1$1.invoke(Spec.kt:124)
    	at io.kotlintest.Spec$runTest$callable$1$1.invoke(Spec.kt:15)
    	at io.kotlintest.Spec$runTest$initialInterceptor$1$1.invoke(Spec.kt:116)
    	at io.kotlintest.Spec$runTest$initialInterceptor$1$1.invoke(Spec.kt:15)
    	at io.kotlintest.Spec.interceptTestCase(Spec.kt:78)
    	at io.kotlintest.Spec$runTest$initialInterceptor$1.invoke(Spec.kt:116)
    	at io.kotlintest.Spec$runTest$initialInterceptor$1.invoke(Spec.kt:15)
    	at io.kotlintest.Spec$runTest$callable$1.call(Spec.kt:124)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    any thought?
    p
    e
    • 3
    • 9
  • r

    raulraja

    09/05/2017, 4:35 PM
    Now if you have a project that depends on kategory and use any of the functions in that file the produced output links in the bytecode directly to that. And if then you exclude Kategory from the list of transitive dependencies manually the compile code can't resolve user provided artifacts because those files are also excluded so it fails with a NoClassDefFound exception
    e
    • 2
    • 18
  • r

    raulraja

    09/14/2017, 10:30 PM
    there is a
    isSubtype
    for
    TypeMirror
    comparisons and it does not work so I'm recursing all interfaces as I did before and comparing Strings
    e
    • 2
    • 1
  • r

    raulraja

    09/14/2017, 10:31 PM
    metaprogramming in Kotlin is very painful, I'm impressed how far you've got, I'd have given up right away xD
    e
    • 2
    • 1
  • r

    raulraja

    09/17/2017, 8:35 PM
    @Eugenio If an annotation processor performs codegen that should be expanded with other annotation processors, does it need to do anything special beside adding the annotations to codegen?
    e
    • 2
    • 3
  • r

    raulraja

    10/04/2017, 7:55 AM
    @ersin_ertan expanding on what @simon.vergauwen said that is a polymorphic function that can compute over any higher kind for which a
    MonadError<F, NukeException>
    exist. In the case of
    Option
    it can't provide such an instance because there is no way to store the
    NukeException
    , since
    None
    which is the unbiased case can't store that error. Same for
    Try
    since it's
    Failure
    it's fixed to
    Throwable
    and
    NukeException
    is not in the
    Throwable
    hierarchy. The only choice here is
    Either
    which is parametric in it's
    Left
    case.
    attack
    may be invoked in two different ways:https://gist.github.com/raulraja/40ac0d0f03f4a1a85f6d249464f30a95
    e
    s
    • 3
    • 11
  • r

    raulraja

    10/05/2017, 8:53 PM
    @ersin_ertan what does
    .p()
    do?
    e
    • 2
    • 3
  • s

    simon.vergauwen

    10/10/2017, 11:56 AM
    I am not sure if I understand correctly what you mean by syntax for functional types
    e
    r
    j
    • 4
    • 22
  • r

    raulraja

    10/30/2017, 2:27 PM
    object test {
    
        sealed class BizError  {
            object Error1 : BizError()
            object Error2 : BizError()
            object Error3: BizError()
        }
    
        val ops: List<ValidatedNel<BizError, Int>> = listOf(
                1.validNel(),
                1.validNel(),
                1.validNel(),
                BizError.Error1.invalidNel(),
                BizError.Error2.invalidNel(),
                BizError.Error3.invalidNel()
        )
    
        val result: ValidatedNel<BizError, Int> = ops.reduce { a, b ->
            a.combine(b, NonEmptyList.semigroup())
        }
    }
    n
    p
    • 3
    • 5
  • r

    raulraja

    10/31/2017, 12:09 PM
    @simon.vergauwen I'm currently swamped with work, if you wanna do the honors go for it or I'll ask someone else if they can. I think @pablisco fixed it so that it just needs a tag
    p
    • 2
    • 1
  • j

    Jorge Castillo

    11/03/2017, 2:51 PM
    Oh, don’t forget to attend @pakoito’s talk today, he is gonna talk about how kategory works behind the scenes. Both talks complement each other in a really good way
    i
    p
    • 3
    • 2
  • r

    raulraja

    11/05/2017, 9:36 PM
    https://github.com/kategory/kategory/pull/441
    n
    • 2
    • 2
  • s

    snrostov

    11/06/2017, 10:19 AM
    Yet another use case for type classes in the UI:
    // in existed module
    data class User(val name: String)
    
    // in other module
    object UserRenderer: Renderer<User> {
        fun User.render() = Row {
            +Column { +"Name: " }
            +Column { +name }        
        }
    }
    
    fun someOtherComponent(user: User)
      = Row { +user }
    👏 1
    e
    • 2
    • 5
  • r

    raulraja

    11/07/2017, 2:57 PM
    For example look at this way to do DI type checked by the compiler and eliminating the need for DI frameworks:
    interface Context<A> {
      fun A.config(): Config
    }
    package prod
    
    object ProdContext: Context<Service> {
      fun Service.config(): Config = ProdConfig
    }
    package test
    
    object TestContext: Context<Service> {
      fun Service.config(): Config = TestConfig
    }
    package prod
    
    service.config() // ProdConfig
    package test
    
    service.config() // TestConfig
    d
    • 2
    • 20
  • p

    pakoito

    12/02/2017, 11:39 PM
    @wiyarmir can answer that best, I’m a faithful customer of jitpack 😄
    w
    • 2
    • 1
  • r

    raulraja

    12/02/2017, 11:39 PM
    @Czar it may not be needed after some recent changes if you can resolve all modules with jcenter. Meaning that you just found a piece of outdated documentation 🙂
    c
    • 2
    • 2
  • p

    pakoito

    12/20/2017, 7:02 PM
    I personally oversee that it doesn’t happen, so it isn’t expected 😄
    k
    r
    i
    • 4
    • 21
  • k

    kevinherron

    12/20/2017, 10:26 PM
    @pakoito @raulraja re: earlier, removing the
    crossinline
    modifier from the parameters to
    map
    and
    flatMap
    allow me to call suspending functions. if you’d like, I’ll PR those changes as well. I suspect there’s more than just the
    Try
    data structure being affected by this.
    👍 1
    r
    • 2
    • 3
  • d

    dh44t

    12/22/2017, 9:49 AM
    https://www.packtpub.com/application-development/functional-kotlin
    👍 5
    😱 3
    🎉 8
    i
    • 2
    • 2
  • a

    alex.hart

    01/04/2018, 12:20 PM
    Also it’s super cool that Jesse Wilson is a Co-Organizer
    e
    • 2
    • 1
  • p

    pakoito

    01/15/2018, 5:33 PM
    that's just a thin wrapper over PCollections. We'd like our own built up from scratch. @glenkpeterson made Paguro for Java and was taking a look on his spare time 😄
    🔥 2
    g
    • 2
    • 2
  • d

    dh44t

    01/18/2018, 2:59 PM
    I'm writing one section of my book about State, I had a few examples of it. The code examples are Apache licensed, as soon as I have it public I'll post it here
    👍 3
    a
    • 2
    • 1
  • y

    yousuf.haque

    01/18/2018, 3:30 PM
    question, has anyone already written/found a retrofit converter factory for nullables into
    Option
    ?
    j
    r
    +2
    • 5
    • 11
  • r

    raulraja

    01/19/2018, 12:04 AM
    Scala has already changed to a right biased either since 2.11
    ✅ 3
    r
    • 2
    • 2
  • r

    rawtoast

    01/24/2018, 1:48 PM
    @cedric Interesting, from experience with Scala I would advise you don’t do that for Option. In Scala there is a difference between
    Option(null)
    (returns
    None
    ) and
    Some(null)
    (returns an Option holding
    null
    ). It’s understandable but can be confusing and lead to bugs as not everyone knows this edge case. So for safety you end up creating/assigning with
    Option
    and only using
    Some
    for pattern matching/test assertions. Not really tried that in Kotlin, as I tend to use Option.fromNullable which seems to work in a sane manner 🙂
    c
    a
    • 3
    • 4
  • a

    aeruhxi

    01/24/2018, 6:31 PM
    semantically,
    Some(null)
    doesn't make sense at all 🤔
    r
    • 2
    • 1
  • r

    raulraja

    02/04/2018, 1:56 AM
    https://github.com/arrow-kt/arrow/pull/649
    g
    j
    • 3
    • 8
  • r

    raulraja

    02/08/2018, 12:47 PM
    https://twitter.com/arrow_kt/status/961562757152862208
    👏 6
    👍 7
    🎉 11
    j
    s
    • 3
    • 5
  • t

    thanerian

    02/08/2018, 8:31 PM
    https://github.com/arrow-kt/arrow/blob/master/modules/docs/arrow-docs/docs/docs/quickstart/blogs/README.md you only need to modify It and send a PR
    h
    • 2
    • 1
  • s

    simon.vergauwen

    02/12/2018, 10:05 AM
    Isn't it really confusing we are releasing docs on every merge?
    p
    r
    • 3
    • 4
Powered by Linen
Title
s

simon.vergauwen

02/12/2018, 10:05 AM
Isn't it really confusing we are releasing docs on every merge?
p

pguardiola

02/12/2018, 10:35 AM
yeah i was wondering the same 🤔
btw after releasing
0.7.0
should be more stable
r

raulraja

02/12/2018, 10:42 AM
yes that is confusing and a larger issue is that docs need to be versioned and stored. We don't have a strategy yet to do that but generating the site in the current version number and serving all versions may be an option.
User's may want to consult the docs for 0.5.1 and those are no longer available since we are making destructive changes in the doc site.
👍 1
View count: 7