https://kotlinlang.org logo
Docs
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
announcements
  • m

    mp

    01/15/2019, 3:28 PM
    hi there can anyone please share blogposts/news/docs about kotlin with java9+? I`m trying to clarify state and understand what can I do now with migration or should all of related questions should be postponed tnx a lot
    x
    a
    • 3
    • 4
  • j

    Jacks0n23

    01/15/2019, 3:37 PM
    WFT? Wrong order, should be private vararg val Bug in IntelliJ?
    -.kt
    :youtrack: 1
    i
    • 2
    • 2
  • x

    xenoterracide

    01/15/2019, 4:51 PM
    what's the difference between
    ::javaClass
    and
    ::class.java
    s
    h
    n
    • 4
    • 5
  • x

    xenoterracide

    01/15/2019, 5:57 PM
    is it possible to write this using similar postfix notation? or am I stuck writing if == null
    break if addByte == null else continue;
    d
    h
    • 3
    • 13
  • t

    Tillmann Berg

    01/15/2019, 9:47 PM
    Just curious: Why are only 80 % of Kotlin written in Kotlin and 19 % in Java?
    i
    p
    y
    • 4
    • 4
  • t

    thana

    01/15/2019, 9:56 PM
    too bad there is no way to react on reactions 😂
    s
    t
    • 3
    • 3
  • n

    Nikky

    01/16/2019, 3:22 AM
    https://github.com/falkreon/Jankson its a mix of hjson and JSON5
    s
    d
    • 3
    • 8
  • g

    gildor

    01/16/2019, 6:56 AM
    This is Idea/AndroidStudio feature (maybe also Android Lint)
    j
    • 2
    • 5
  • p

    PHondogo

    01/16/2019, 7:14 AM
    Hello! Nice to be here! 🙂 Does anybody know if there is documentation for Kotlin compiler plugin?
    g
    • 2
    • 3
  • d

    dG

    01/16/2019, 8:44 AM
    How would I replace
    kotlin-stdlib-jre8
    with the jdk version in libraries I am using with gradle? I tried adding the jdk as a dependency, and then this on top of the build file:
    configurations.all {
        exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jre8"
        exclude group: "org.jetbrains.kotlin", module: 'kotlin-stdlib-jre7'
    }
    but with gradle's
    dependencyInsight
    the jre is still there..
    i
    • 2
    • 1
  • t

    tddmonkey

    01/16/2019, 8:48 AM
    I have this:
    dependencySubstitution {
                substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre7") with module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion")
                substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre8") with module("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
    }
    d
    • 2
    • 7
  • t

    thana

    01/16/2019, 9:53 AM
    what is the status of the multiplatform feature? i know it's called "experimental" but what does it mean? is the code as is stable but the api subject to change? is the transpiler itself alpha? beta? stable (despite it might be changed in future)?
    g
    d
    • 3
    • 8
  • d

    Dalinar

    01/16/2019, 11:54 AM
    [WARNING] Using experimental Kotlin incremental compilation
    is there anything wrong with using this?
    g
    • 2
    • 1
  • d

    Dalinar

    01/16/2019, 12:21 PM
    anyone know how to exclude specific kt files in maven from compilation?
    n
    • 2
    • 1
  • o

    Onur

    01/16/2019, 1:27 PM
    Maybe dumb question, but why is this giving me an error?
    d
    g
    • 3
    • 3
  • n

    natpryce

    01/16/2019, 1:30 PM
    Anyone_know_what_would_cause_the_following_compiler_error_and_how_I_can_work_around_it_.pl
    😮 1
    n
    • 2
    • 10
  • l

    LeoColman

    01/16/2019, 3:52 PM
    Things that happen are for instance
    Thread.sleep(1000000)
    . I wanted to interrupt this Co-routine, but it's impossible
    m
    m
    +2
    • 5
    • 31
  • s

    serebit

    01/16/2019, 9:47 PM
    huh, new slack icon
    s
    • 2
    • 1
  • s

    Slackbot

    01/16/2019, 9:52 PM
    This message was deleted.
    a
    x
    • 3
    • 3
  • d

    DefinitelyAHuman

    01/16/2019, 11:29 PM
    anyone know of any in depth material for kotlin on apache spark? i have stuff for java and scala but i'd like to use it with kotlin instead.
    h
    o
    • 3
    • 2
  • x

    xenoterracide

    01/17/2019, 12:39 AM
    this relates to my earlier question about why java can infer SAM where Kotlin can't... this is my fix, why can't kotlin make this inference?
    .extracting( Extractor {eds: EngDataStructure? -> eds?.rtcTime?.get(Calendar.SECOND) } )
    h
    a
    • 3
    • 4
  • s

    Saša Šijak

    01/17/2019, 7:57 AM
    is there any support for http/3 in java/kotlin world?
    g
    n
    • 3
    • 19
  • c

    coder82

    01/17/2019, 9:03 AM
    I was trying to implement a generic way to create a message in gRPC without creating a Kotlin specific code generator. I wondered if there was a way to just pass SendRequest as a type and infer the SendRequest.Builder, indeed I cannot things like T.Builder
    DSL_creation_for_gRPC.js
    n
    g
    • 3
    • 30
  • p

    pga4711

    01/17/2019, 10:58 AM
    Hello, i am doing a
    ACTION_GET_CONTENT
    intent. I wonder how to add custom storage locations on the "Android SAF Select file"-drawer list. Someone with ideas? I think it might be possible because there are items like Images, Videos, Audio in the list.
    :stackoverflow: 4
    g
    a
    d
    • 4
    • 4
  • a

    arve

    01/17/2019, 2:02 PM
    you can define return type explicitly if you want:
    fun square(x: int): Int = x * x
    a
    • 2
    • 3
  • b

    Bernhard

    01/17/2019, 2:06 PM
    p
    • 2
    • 2
  • t

    Teknight

    01/17/2019, 2:22 PM
    If i do inheritance by delegation, is it possible to interact with the parent, from within the delegated class? Say we have:
    class MyClass: IDelegate by MyDelegatedClass()
    Can i access the MyClass instance from within MyDelegatedClass in any way?
    h
    a
    d
    • 4
    • 16
  • k

    karelpeeters

    01/17/2019, 3:00 PM
    What does that mean? You can't annotate an instance.
    g
    a
    • 3
    • 8
  • t

    Tristan Caron

    01/17/2019, 7:57 PM
    I use Kotlin
    1.3.11
    c
    s
    • 3
    • 34
  • t

    Tsvetozar Bonev

    01/18/2019, 10:15 AM
    I've got three functions that I want to call asynchronously, do I have to make them suspended or can I just run three async blocks?
    d
    • 2
    • 2
Powered by Linen
Title
t

Tsvetozar Bonev

01/18/2019, 10:15 AM
I've got three functions that I want to call asynchronously, do I have to make them suspended or can I just run three async blocks?
d

Dico

01/18/2019, 10:59 AM
suspend functions are not automatically asynchronous. Concurrency is explicit in kotlin. You can use
GlobalScope.launch
, although I would recommend adding your application lifecycle to the coroutine context.
Scrap that, I mean component lifecycle
View count: 1