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

    ephemient

    02/03/2023, 1:35 PM
    I just debugged a test failure down to different results on different JVMs:
    import kotlin.math.*
    sin(85.05112877980658 * PI / 180)
    •
    0.9962720762207499
    (
    Double.fromBits(0x3fefe175fa29280f)
    ) with Java 11 and Java 17 on Linux x86-64 as well as Java 11 on Apple Silicon •
    0.99627207622075
    (
    Double.fromBits(0x3fefe175fa292810)
    ) with Java 17 on Apple Silicon
    p
    • 2
    • 4
  • c

    Colton Idle

    02/04/2023, 4:06 AM
    Anyone do android+compose dev and ios swiftUI dev? I'm learning swift UI and a few youtube instructors are using @EnvironmentObject and it's giving me CompositionLocal vibes... which means I feel like i should stay away from it. lol
    s
    • 2
    • 1
  • a

    ayodele

    02/07/2023, 9:12 AM
    Hello is there any documentation on compose. Not compose UI though.
    b
    l
    • 3
    • 6
  • c

    clayblockunova

    02/10/2023, 10:20 AM
    Kotlin community only chat in Slack?
    s
    • 2
    • 1
  • e

    elect

    02/11/2023, 10:07 AM
    is there a way in Kotlin and Idea to programmatically have the execution stops (like a breakpoint) when in debug mode?
    l
    k
    • 3
    • 4
  • e

    Eugen Martynov

    02/11/2023, 7:33 PM
    Does anyone have something to teach Kotlin as first programming language to child?
    o
    a
    y
    • 4
    • 10
  • e

    Eugen Martynov

    02/11/2023, 7:33 PM
    Or maybe there is something like first programming language for other language to check and I can adapt it to kotlin
  • m

    martinsumera

    02/17/2023, 7:35 AM
    Hi, guys, I'm looking for some information about tickets for Kotlinconf. It is already sold out but there is waiting list. Is there somebody who has idea if there is chance that some tickets will be on sale again?
    t
    • 2
    • 2
  • l

    LeoColman

    02/17/2023, 7:08 PM
    Is there any alternative for JMeter that you guys use?
    e
    r
    • 3
    • 4
  • a

    ayodele

    02/18/2023, 7:22 PM
    What automated testing tool is great for mobile app testing? Firebase testlab seems to ignore my compose UI
  • j

    Jason5lee

    02/19/2023, 6:07 AM
    I wrote two blogs about my understanding of Programming, OOP and FP. Spoiler: According to my understanding, Kotlin is considered a great language. My understanding of Programming | Jason5Lee's Personal Blog My understanding of OOP and FP | Jason5Lee's Personal Blog
  • e

    elect

    02/19/2023, 6:33 AM
    https://twitter.com/bazlur_rahman/status/1626868006725857280
  • j

    Jason5lee

    02/19/2023, 7:47 AM
    Kotlin Coroutine is a good obfuscator. No one can understand the decompiled Java code.
    e
    • 2
    • 2
  • e

    ephemient

    02/19/2023, 10:30 AM
    https://github.com/openjdk/jdk-sandbox/tree/classfile-api-branch#readme ooh, built in classfile handling? that'll be nice instead of having to rely on ASM updates for every Java version. hopefully the API is less error-prone, looking forward to being able to use it in N years
  • s

    snowe

    02/21/2023, 12:33 AM
    is hamkrest not api compatible with hamcrest?
  • d

    darkmoon_uk

    02/21/2023, 4:33 AM
    (1)
    fun load() = scope.launch {
        ...
    }.ignore()
    where
    .ignore()
    returns
    Unit
    vs. (2)
    fun load() {
        scope.launch {
            ...
        }
    }
    Vote 1️⃣ or 2️⃣
    e
    m
    +3
    • 6
    • 10
  • r

    rtsketo

    02/22/2023, 8:48 AM
    Completely random, but I thought I'd finally ask (since Google didn't yield any results for me just now). I've been an Android developer for three years and I keep declaring on the functions I create that the Int parameter is in fact a @ColorInt (for example
    fun View.background(@ColorInt color: Int) = ...
    ) expecting that if someone passes a variable that isn't annotated with the same annotation (
    val someColor = Color.parse("#C0FF33"); someView.background(someColor)
    ) an error will be produced. I've never seen so far such an error, not even for Android SDK's functions like `setColorText(..)`that are also annotated like so. Was having an error or a warning a false expectation of mine? If so, what is even the annotation supposed to do?
    t
    e
    k
    • 4
    • 7
  • g

    Gleb Minaev

    02/22/2023, 1:32 PM
    Where do (or would) you put nullability annotations in Java? (1️⃣)
    @Notnull
    public static String foo() { ... }
    (2️⃣)
    public static @Notnull String foo() { ... }
    r
    b
    • 3
    • 5
  • c

    Colton Idle

    02/23/2023, 3:09 PM
    Anyone use google truth assertion library? I can't figure out how to assert that an object is of a specific type. Not possible?
    e
    s
    k
    • 4
    • 9
  • n

    napperley

    02/23/2023, 9:25 PM
    When building the Kotlin code base an error is encountered on a missing tool chain dependency:
    Could not determine the dependencies of task ':kotlin-stdlib:compileMainJdk7Kotlin'.
    > Unable to download toolchain matching the requirements ({languageVersion=7, vendor=any, implementation=vendor-specific}) from '<https://api.foojay.io/disco/v3.0/ids/45dfb704e8dcceab434285501d74cd33/redirect>'.
       > Provisioned toolchain '/home/napperley/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64' could not be probed.
    Is there a way to resolve the issue?
    r
    t
    • 3
    • 3
  • y

    Youssef Shoaib [MOD]

    02/26/2023, 1:57 AM
    When using a tool like jmh or kotlinx-benchmark to benchmark a PR change. Is it sufficient to run the benchmark pre-PR and then post-PR on the same machine? or must the benchmark also be run at the same time (by editing the PR so that it can co-exist with the pre-existing code). I'm testing a significant change (moving from a sealed class hierarchy to value classes) and so it's a bit difficult to have both cases co-exist.
    e
    • 2
    • 2
  • g

    gsala

    03/01/2023, 1:37 PM
    What do you think of this ImmutableList class definition?
    class ImmutableList<T>(list: List<T>) : List<T> by list.toList()
    l
    l
    c
    • 4
    • 6
  • g

    groostav

    03/01/2023, 10:50 PM
    so im making some bad decisions to create a DSL: what I wanted was basically intelliJ to give me a kind of folder-path style autocomplete, where i could write something like
    val domainRelevantKey = Root / HighDomainTerm / MediumDomainTerm / LowDomtainTerm("runtime value!") / OptionallyAFeature
    which would be a kind of key for use in our application. As you can imagine by its pathy-ness this kind've imposes a hierarchy on my app, which is what im looking for. I did get this... with a boatload of pretty strange code: https://gist.github.com/Groostav/68234f5ab6d5582b182990c16b548db8 Some pros: - use of static symbols like this means spelling mistakes become compiler errors (where if I'd used some more dynamic things involving strings, I'd likely see misbehaviors that given my usage would be difficult to find in tests) - its likely going to be pretty readable; anybody reading
    val relevantSection = Root / Model / ...
    is going to understand its usage. - its reasonably extensible in as far as java-with-boilerplate is extensible, in that you can copy-paste-change and have it likely work for your purposes. some cons: - nobody will ever understand my inheritance scheme, I'm pretty sure I wont in 3 months. - each new symbol/domain concept requires more code. A purely dynamic solution wouldn't have this problem --except of course at callsites. - seems pretty overbuilt
    e
    • 2
    • 2
  • g

    Gleb Minaev

    03/02/2023, 7:15 AM
    I am just interested in opinion of the community. Am I only one who wants by analogy with
    ..<
    operator to have
    <..
    and
    <..<
    operators? (Vote with 👍 if you want the operators too and 👎 otherwise.)
    e
    e
    r
    • 4
    • 9
  • j

    João Gabriel Zó

    03/03/2023, 6:14 PM
    Anybody know a SFTP client lib for Kotlin?
  • s

    Sheroziy

    03/06/2023, 9:53 AM
    Hello, Anyone bought a ticket KotlinConf’23 and cant attend, I will be open to buy the ticket from you. Thanks.
  • d

    Davide Giuseppe Farella

    03/07/2023, 10:31 PM
    Hello people. I prototyped something similar to the Store library (I used the same name for now 😅) to be used in my KMP pet project. It’s decently covered with tests, but, as you can imagine, when dealing with multiple flows, many edge cases get uncovered when you execute the code in a real environment. For this reason, I have to choose between two roads: 1) replace it with Store library, now that it is multiplatform 2) create an open-source library for it and get some feedback/contributions to maintain it more easier I’m not confident in replacing it, as I put much effort into it, and it supports pagination better than Store Here’s a brief snippet
    fun getMovie(movieId: MovieId) = Store(
        key = StoreKey<Movie>(movieId),
        refresh = Refresh.WithInterval(3.minutes),
        fetcher = Fetcher.forError { remoteMovieDataSource.getMovieDetails(movieId) },
        reader = Reader.fromSource { localMovieDataSource.findMovieWithDetails(movieId) },
        write = localMovieDataSource::insert
    )
    The full snippet with more info in the thread The source here: https://github.com/4face-studi0/CineScout/tree/main/cinescout/store/src I’d like to receive some feedback
    • 1
    • 1
  • e

    Eugen Martynov

    03/08/2023, 11:34 AM
    Hi people, I have a compose function with many default params. I want to Deprecate it and propose replace it with new one. However, I’m not sure how to write all possible replace with variants when some parameters are default. Example:
    @Deprecated("Use new one", replaceWith("newFun(param1, param2)"))
    fun oldFun(param1: Int, param2: String = "test"){}
    
    fun newFun(param1: Int, param2: String = "test){}
    Will cover the calls where all params are specified and will add extra non existing param when the second param is defaulted.
  • m

    Marcin Wisniowski

    03/08/2023, 9:33 PM
    IllegalStateException: You are currently running with version 2.1.1 of google-api-client. You need at least version 1.31.1 of google-api-client
    Very funny...
  • e

    elect

    03/10/2023, 10:15 AM
    https://twitter.com/kenklippenstein/status/1633261069534724096
    m
    • 2
    • 1
Powered by Linen
Title
e

elect

03/10/2023, 10:15 AM
https://twitter.com/kenklippenstein/status/1633261069534724096
m

Matteo Mirk

03/14/2023, 1:39 PM
to all the cops answering :not-kotlin: : guess what? It's the random channel... 🙄
View count: 4