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
random
  • c

    Colton Idle

    10/27/2022, 2:00 PM
    What's that thing in intellij where I can write a word (like
    blah
    ) and it'll expand it into a code snippet?
    j
    • 2
    • 1
  • k

    kenkyee

    10/27/2022, 2:01 PM
    live templates?
  • k

    kenkyee

    10/27/2022, 2:02 PM
    actually…simple templates: https://www.jetbrains.com/help/idea/using-live-templates.html#live_templates_types
  • c

    Colton Idle

    10/27/2022, 2:11 PM
    ah yes. i couldn't find the word and the name was escaping me. hopeffully throwing together a live template isn't too hard. wish me luck
  • c

    Colton Idle

    10/27/2022, 2:27 PM
    This helped. Everything works pretty easy except for that for whatever reason it tries to autocomplete every variable name i type with "ViewModel", but not going to worry about that. lol
  • c

    Colton Idle

    10/27/2022, 2:27 PM

    https://www.youtube.com/watch?v=4rI4tTd7-J8▾

  • c

    Colton Idle

    10/27/2022, 2:57 PM
    Is there anyway to leave a "link" to another class in a comment? e.g. I want to have a comment of
    //If you are touching this class, you will also have to update #LINK_TO_OTHER_CLASS
    and hopefully I'd like to make the link "clickable" of course.
    s
    m
    +2
    • 5
    • 11
  • t

    theapache64

    10/29/2022, 6:53 PM
    Kotlin Bulb!
    r
    d
    c
    • 4
    • 14
  • n

    Northrup James

    11/01/2022, 8:12 AM
    I've been using copilot and for kotlin mpp it helps quite a bit to plow through bindings. Where copilot appers to need help is with unit tests- intellij moves the context and prevents copilot from having a view of the intended classes. has anyone given thought to a means of inline unit test generation? something like what Arrow does with """ | fun to(){blah} """.trim ?
  • e

    elect

    11/03/2022, 11:37 PM
    best kotlin friendly lib to deserialize xml to data class? Jackson?
    d
    • 2
    • 2
  • d

    Davide Giuseppe Farella

    11/06/2022, 6:49 AM
    Hello everybody, I have a class like
    sealed interface A {
    
        @JvmInline
        value class B(val value: String) : A
    
        @JvmInline
        value class C(val value: Int) : A
    }
    And I would like to override the
    equals
    , is it even possible?
    r
    e
    • 3
    • 2
  • e

    elect

    11/06/2022, 9:56 PM
    any lib for converting html somehow to kdoc?
  • j

    jmfayard

    11/07/2022, 8:19 PM
    Why my code looks the way it looks!
    e
    • 2
    • 1
  • p

    Pablichjenkov

    11/08/2022, 12:31 PM
    Just happened to see this on Twitter, if anyone wants to make some money. https://hackathon.antmedia.io/
  • u

    ursus

    11/08/2022, 11:10 PM
    Anyone who tried
    Copilot
    yet? Is it possible for it to suggest anything other than “public” code? i.e. could I say something from our actual code base like “Use PaymentHistoryApiClient to fetch latest payment, then query PaymentHistoryDao for latest 20 items, calculate a diff between the two, and if there is something new, show a notification”? Or is it meant just for stuff like “Throwup binary search over this collection”?
    t
    • 2
    • 2
  • s

    Stylianos Gakis

    11/09/2022, 5:27 PM
    I don’t think any channel fits this so asking here. I’m using renovate to check package bumps, and I wanted to ignore any version bumps for Kotlin itself. My reasoning is that I’m using compose and it’s bound to that version so I don’t want to always have to close this PR manually since I never want to merge that alone. I don’t know what I’d have to put inside the
    "ignoreDeps": ["here"]
    in order to tell renovate to ignore all kotlin bumps. Anyone who had to do this before figured it out before?
    l
    c
    • 3
    • 4
  • n

    napperley

    11/11/2022, 1:45 AM
    Is there a version of the KotlinX Metadata Klib library available for Kotlin Native? The following dependency notation has been used in the Gradle build file:
    "org.jetbrains.kotlinx:kotlinx-metadata-klib:0.0.3
    After doing a Gradle refresh no build errors have appeared, however the imports for the library (e.g. kotlinx.metadata.KmClass) aren't available.
    • 1
    • 1
  • s

    scaventz

    11/11/2022, 3:11 AM
    Debugging multiple processes is a pain. As far as I know, I can use the
    JDWP
    options, but it requires figuring out where the process is created, which is a challenge for me in a large codebase that I'm not familiar with. So just curious, is there a better way to do this? (Context: I'm debugging Gradle's test subproject and I just want the program to stop at my breakpoint, no matter which process is running it)
  • c

    Colton Idle

    11/13/2022, 12:57 AM
    Anyone get a streaming service "perk" from their job? If so, is it tied to your work email? I'm at a small company (6 people) and trying to see if we can get a corporate perk like that where we pay on one card vs 6 people having to send in an expense report every month. lol
    d
    e
    • 3
    • 7
  • m

    mbonnin

    11/14/2022, 12:29 PM
    Is there an issue with youtrack.jetbrains.com at the moment? Looks like all the comments have disappeared for me.
    h
    • 2
    • 3
  • r

    rtsketo

    11/15/2022, 7:17 AM
    So, the random question of the day. If you have an inline constructor the class member properties go below it (there's no other option). If you have multiple constructors though, do you declare the variables above the constructors (Java-style) or below? What's the "proper" Kotlin way?
    r
    l
    • 3
    • 2
  • a

    Alexander

    11/17/2022, 3:16 PM
    Hello. I'm Alex, a developer and volunteer from Ukraine. You may be tired of such messages, but I would like to you read this. My military friend is protecting my country, his battalion needs a reconnaissance drone and a thermal imager. I can not buy such expensive equipment, I will be grateful for any help. In return for a donation, I can help you with tips or small solutions, as I have experience with a Compose application with NativeAdView in production. PayPal: akhomencko@gmail.com But my spoken English is not very good😭
    r
    • 2
    • 4
  • d

    Davide Giuseppe Farella

    11/18/2022, 9:10 AM
    Good morning, I recently started practicing on LeetCode using Kotlin, and I experienced something weird. Given the script posted here, there are 4 test cases on LeetCode, all of them passes in a kts file ( scratch file in a project with Kotlin 1.6.21 ) and only for one of them we have an incorrect output on LeetCode only. Do you have any idea about it? Test cases in the thread
    Untitled.kt
    s
    r
    • 3
    • 9
  • m

    mbonnin

    11/18/2022, 4:55 PM
    How do I filter the issues I have starred (⭐) in youtrack.jetbrains.com? I know about the issues I have voted on (👍) but I can't find a filter for stars/watching
    s
    • 2
    • 13
  • a

    andylamax

    11/19/2022, 6:02 PM
    Fellas, how do you cater for external configurations into your apps (server side or desktop)??? I am currently using TOML files, but lack of referencing other config values warrants for extra repetition of the configuration, does anyone have a better option apart from TOML/JSON/XML?? Supposedly one with referential capabilities???
    o
    j
    • 3
    • 3
  • c

    Colton Idle

    11/21/2022, 2:02 PM
    stateIn
    operator is kinda confusing to me. As in. it doesn't make sense why its named stateIn. Anyone have any "aha" moment on why the name fits? or is it just me with this confusion?
    s
    • 2
    • 2
  • c

    Colton Idle

    11/22/2022, 5:07 PM
    Does NumberFormat in java/kotlin have any docs on how it rounds specifically? I noticed it would round 5.869 to $5.87, but trying to find in the docs on what it's doing exactly.
    s
    • 2
    • 4
  • t

    Tgo1014

    11/23/2022, 10:55 AM
    Did anyone had to handle accessibility with pdfs? Apparently talkback can't read it 🤔
    c
    • 2
    • 5
  • p

    Piotr Krzemiński

    11/28/2022, 12:27 PM
    just wondering what a technical release means in the context of https://github.com/JetBrains/kotlin/releases/tag/v1.7.22
    This is a technical release. It doesn’t contain any fixes that aren’t included in Kotlin 1.7.21.
    Version 1.7.22 of the Kotlin plugin will not be available for downloading or installing in any IDEs.
    asking because my Renovate bot did detect this new version and I’ve spent some time on it. Just curious what the technical releases are for (who’s the target audience for them?) and if they are going to happen often
    b
    m
    • 3
    • 3
  • a

    Awodire babajide samuel

    11/29/2022, 6:28 PM
    NetworkStateObserver Version 1.0.1 is now on jitpack. A library that helps you observe the state of your network in real-time, you can update your UI without a need to swipe to refresh when network fails or implement a dialog to try again. ✌️ https://github.com/RhymezxCode/NetworkStateObserver
Powered by Linen
Title
a

Awodire babajide samuel

11/29/2022, 6:28 PM
NetworkStateObserver Version 1.0.1 is now on jitpack. A library that helps you observe the state of your network in real-time, you can update your UI without a need to swipe to refresh when network fails or implement a dialog to try again. ✌️ https://github.com/RhymezxCode/NetworkStateObserver
View count: 5