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

    Paul Woitaschek

    01/07/2022, 12:17 PM
    As there is no more general channel: https://github.com/ktorio/ktor/blob/main/ktor-http/api/ktor-http.api How do such api files get generated?
    s
    r
    +2
    • 5
    • 6
  • a

    andylamax

    01/08/2022, 8:22 AM
    Hey there, Can github runners build libraries targeting these targets??
    iosSimulatorArm64
    watchosSimulatorArm64
    tvosSimulatorArm64
    macosArm64
    Has anyone given it a try??
    l
    • 2
    • 2
  • e

    Ethan Hsu

    01/10/2022, 2:43 AM
    Always wondered: how feasible would it be to have something similar to play.kotlinlang.org that supported basic Kotlin dependencies (basically an online version of Kotlin scratches that includes dependencies)? Would it require too much computing power? Would it boil down to basically being a Gradle VM?
    h
    • 2
    • 2
  • m

    mcpiroman

    01/11/2022, 10:43 AM
    Has anyone tried or has insight into writing extension for VS Code in Kotlin (using JS backend)?
    n
    • 2
    • 3
  • j

    Jason5lee

    01/12/2022, 1:45 PM
    A programmer ran
    cargo build
    .
    cargo
    said, ‘It takes ten years to build your Rust project.’ And programmer asked, ‘Morning or afternoon?’ .
    cargo
    said, ‘Ten years from now, what difference does it make?’ and he said, ‘Well, Android Studio finishing importing my Gradle project in the morning.’”
    c
    • 2
    • 1
  • c

    Colton Idle

    01/12/2022, 6:02 PM
    Trying to run an app that isn't mine. I get this error. Is this just due to the fact that bintray was shutdown, or is this actually an intermittent issue that should resolve itself at somepoint soon? Could not HEAD 'https://jcenter.bintray.com/org/jetbrains/dokka/org.jetbrains.dokka.gradle.plugin/1.4.32/org.jetbrains.dokka.gradle.plugin-1.4.32.jar'. Received status code 502 from server: Bad Gateway
    :plus1: 2
    n
    p
    +7
    • 10
    • 29
  • p

    Piotr Krzemiński

    01/14/2022, 1:13 PM
    anyone else would like to be able to describe GitHub Actions workflows with a Kotlin DSL? type-safety, being able to extract common stuff to functions, and more - seems attractive to me, especially if the logic becomes complicated. I did some initial work here: https://github.com/krzema12/github-actions-kotlin-dsl, if you're interested, feel free to watch the effort and maybe contribute 🙂
    🙌 3
    🙌🏼 1
    l
    a
    • 3
    • 21
  • j

    Jason5lee

    01/16/2022, 3:40 PM
    e: java.lang.IllegalStateException: Unsupported Xcode version 12.4, minimal supported version is 12.5.
    error on GitHub action when testing macOS and iOS Kotlin Native.
    • 1
    • 1
  • z

    Zun

    01/17/2022, 6:16 PM
    I noticed my .apk increased by roughly 3mb despite not updating any libraries. I tried comparing the apk file vs an older one but I don't see what changed. Can someone help. See thread
    g
    • 2
    • 5
  • j

    Jason5lee

    01/18/2022, 8:19 AM
    Everytime when a new C# is released.
    😂 1
    🤔 1
    r
    • 2
    • 1
  • c

    christophsturm

    01/21/2022, 3:51 PM
    is there a library that shows the differences of 2 data class instances in a nice way?
    u
    l
    • 3
    • 11
  • u

    ursus

    01/24/2022, 12:22 AM
    Anybody aware of a git ui client thats m1 native?
    l
    v
    +2
    • 5
    • 7
  • l

    LeoColman

    01/24/2022, 7:38 PM
    Hey guys! IntelliJ is giving me an error in my Kotlin project "Highlighning is temporarily suspended for file ...kt due to internal error"
    r
    n
    +2
    • 5
    • 8
  • j

    Jason5lee

    01/26/2022, 1:12 PM
    I hope Kotlin Multiplatform is not like this.
    🙅 1
    👎 1
    😄 8
    d
    c
    e
    • 4
    • 4
  • c

    Colton Idle

    01/27/2022, 12:38 AM
    you'd still use the native tools of the platform to build out the UI
    t
    • 2
    • 1
  • c

    Can Korkmaz

    01/27/2022, 7:27 PM
    Hey folks, I'd like to hear your opinion on my current bad internship experience. I joined a small start-up which focuses on 3d modelling for e-commerce (integration with web and mobile) this Monday and found out that the company doesn't have any full-time paid developers, senior or junior, doesn't have a product either. I get no guidance, mentorship whatsoever. The part that frustrates me the most is that I'm asked to do web development because I'm sure the person asking me isn't aware that I wouldn't be capable of doing web with react without any prior knowledge or experience. What would you do in my situation, quit and focus on advancing android development skills and focusing on projects and leetcode, or just accept the condition since I haven't done any internship previously.
    l
    a
    +2
    • 5
    • 9
  • u

    ursus

    01/28/2022, 4:41 PM
    macOS noob here, how can I open git gui from spotlight?
    z
    • 2
    • 3
  • c

    Colton Idle

    01/29/2022, 6:15 AM
    I'm learning the "new" java 8 date and time apis. "Local"Date and "Local"Time doesn't really make sense to me. They seem to be dates and times without any time zone data attributed to them, but if something was a Local date or time, wouldn't you WANT the locale/timezone in the date/time? I guess what I'm saying is that I don't understand the "local" name in LocalDate and LocalTime. Appreciate any pointers. time is hard.
    j
    k
    +3
    • 6
    • 12
  • n

    napperley

    02/03/2022, 10:36 PM
    There is an article called Multilingual blink for Raspberry Pi Pico ( https://www.raspberrypi.com/news/multilingual-blink-for-raspberry-pi-pico/ ). Note that the Rust version is the most verbose by far 😱. In case anyone is wondering Kotlin isn't available for uC's (Microcontrollers), therefore the Kotlin version is absent (missing in action). All questions about that, and other stuff relating to Embedded development with Kotlin should be directed to the Kotlin team the next time they have a Kotlin AMA (Ask Me Anything) session on Reddit. Who knows, there might be a Kotlin team member busy working on a side project to port Kotlin to a uC 🙃 . JavaScript already works on the Raspberry Pi Pico, no pressure 😅.
    💯 1
    g
    m
    • 3
    • 3
  • a

    andylamax

    02/04/2022, 12:01 AM
    It is so frustating when I face an issue I can't report because I can't reproduce it 😞
    😞 1
    l
    • 2
    • 5
  • t

    therealbluepandabear

    02/04/2022, 4:26 AM
    Hey, Does anyone know a faster and more efficient way (might be a library that's out there) to draw a grid in a custom view than using
    drawLine()
    ? I have a pixel art editor (made with
    Bitmap
    and written 100% in Kotlin) and I want to give the user the option to enable grid lines, but using
    drawLine()
    is not performant at all, and I've been trying to find a better alternative for some time now. Not to mention it's also verbose and for larger canvases it is not performant. I've spoken to a couple of people who have created a pixel art editor for Windows and they say that most platforms have a custom grid-drawing implementation for
    Bitmap
    which is lightweight and easy to use, but I so far haven't found one in Android. I also haven't found any library on GitHub which assists in this. I understand this is a niche question - since most people haven't created a pixel art editor/have experience in this space - but if anyone has any info/leads please let me know; it's mostly an app for a school project (and will be on the Play Store in the future), and I want it to function perfectly 😄 Cheers 🙏🏻, thebluepandabear
    d
    • 2
    • 9
  • g

    Gavin Ray

    02/07/2022, 1:29 AM
    Just discovered that Kotlin
    1.7-dev
    has Context Receivers/Multiple Receivers Check this out 😍 😍
    😍 4
    :nice: 5
    m
    t
    +3
    • 6
    • 10
  • e

    ephemient

    02/07/2022, 11:43 PM
    did anybody watch the Kotlin track at FOSDEM this past weekend? https://fosdem.org/2022/schedule/track/kotlin/ I didn't catch it live and the FOSDEM site only has recordings for one talk and slides for one other talk; I hope we can get some more shared here.
    e
    • 2
    • 2
  • g

    Gabi

    02/08/2022, 1:43 PM
    hi can i by any form suppress all warnings in a file?
    p
    • 2
    • 2
  • l

    LeoColman

    02/08/2022, 3:42 PM
    Hey guys! Is there somewhere that contains short descriptions of Kotlin concepts? I want to explain
    !!
    to a Java developer that will start working with Kotlin. I wanted to do it in a succinct way that I can send as a slack message without being too boring. A longer cheatsheet or glossary is probably what I'm looking for, but I couldn't find it yet.
    m
    m
    • 3
    • 4
  • r

    rook

    02/08/2022, 4:26 PM
    I came across this unusual behavior. The output of line 23 is
    Foo's ext
    , whereas the output of line 24 is
    Bar's ext
    . I was under the impression that
    foo as? Bar ?: foo
    was effectively the same type inference logic as
    if (foo is Bar) foo else foo
    . Can someone shed some light on the differences here?
    snip_kt.cpp
    t
    • 2
    • 1
  • p

    pablisco

    02/09/2022, 9:31 AM
    Remote culture is hard, right? I was wondering, what policy do you and your company have regarding cameras on meetings? 🙂
    d
    r
    • 3
    • 8
  • g

    Gavin Ray

    02/11/2022, 7:36 PM
    Quick question: I notice that changing
    jvmTarget
    from
    1.8
    to
    17
    , and setting the below compiler arguments seems to make a near-zero impact on performance. Does anyone have experience or suggestions on changes that DO make improvements?
    freeCompilerArgs = freeCompilerArgs + listOf(
        "-Xlambdas=indy",
        "-Xsam-conversions=indy",
        "-Xstring-concat=indy-with-constants",
        "-Xtype-enhancement-improvements-strict-mode",
        "-Xinline-classes",
        "-Xnew-inference",
        "-Xunrestricted-builder-inference",
        "-Xuse-fir",
        "-Xuse-fir-extended-checkers"
    )
    e
    f
    • 3
    • 4
  • g

    Gavin Ray

    02/13/2022, 6:55 PM
    So I have prototyped the same application in both Kotlin and Java (https://github.com/GavinRay97/GraphQLCalcite) For some reason, the Kotlin version is significantly slower than the Java implementation It's a latency sensitive application, in Kotlin the query execution pipeline takes about ~24ms for a depth-2, basic query In Java, it's closer to 13ms. Are there any big no-no's to keep in mind? I've tried to even stay to using
    for (x in y)
    loops etc and mutable collections and whatnot.
    r
    • 2
    • 5
  • l

    Lin Zhang

    02/17/2022, 11:32 AM
    I see a “magic” code in JetBrains/skiko …😂
    😄 1
    🤣 2
    :magic_wand: 3
    p
    k
    +3
    • 6
    • 6
Powered by Linen
Title
l

Lin Zhang

02/17/2022, 11:32 AM
I see a “magic” code in JetBrains/skiko …😂
😄 1
🤣 2
:magic_wand: 3
p

Paul Woitaschek

02/17/2022, 12:26 PM

https://c.tenor.com/HylPDAulWTEAAAAM/star-wars.gif▾

There is no
when
in kotlin
k

Klitos Kyriacou

02/17/2022, 3:01 PM
Aside from the artistic looks, why would anyone do
if ("literal" == variable)
in Kotlin when you can do
if (variable == "literal")
even when the variable might be null? (By the way, the expressions 0, 1, etc, look more like Fortran label numbers to me rather than resulting values.)
s

Svyatoslav Kuzmich [JB]

02/17/2022, 7:55 PM
It is probably a defensive habit from languages where assignment is an expression and types can be coerced to boolean implicitly.
if ("literal" = variable)
would be a compile error while
if (variable = "literal")
would be a runtime bug.
k

Klitos Kyriacou

02/18/2022, 9:39 AM
Thanks. Even when I was a C and C++ developer, I still didn't use Yoda conditions because both the IDE and the compiler gave clear warnings when using
=
instead of
==
.
y

Youssef Shoaib [MOD]

02/18/2022, 10:13 AM
I heard this once from an older developer, but I haven't heard it anywhere else, but "apparently" some early compilers optimized checking against a literal better if the literal was the first argument? It sounds more absurd now that I say it out loud, so idk if there's any truth to it
g

Gavin Ray

02/18/2022, 11:00 PM
"Yoda conditions", huh TIL
View count: 2