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

    elect

    02/15/2019, 6:37 PM
    but this is what I get https://imgur.com/X4HqGsr
    d
    • 2
    • 5
  • p

    Paul Woitaschek

    02/17/2019, 10:00 AM
    https://github.com/google/ExoPlayer/issues/new Is this 500'ing for you too?
    d
    • 2
    • 2
  • n

    Nikky

    02/18/2019, 7:08 AM
    does anyone know if there is a simpler version to do grouping ? like a single selector returning a pair ?
    val map: Map<String, List<String>> = (0 until versions.length).map { i ->
            val versionNode = versions.item(i)
            val version = versionNode.textContent
            val mcVersion = version.substringBefore('-')
            val forgeVersion = version.substringAfter('-')
            mcVersion to forgeVersion
    }.groupBy(
            keySelector = {it.first},
            valueTransform = {it.second}
    )
    t
    s
    • 3
    • 4
  • o

    omuomugin

    02/19/2019, 9:04 AM
    Hey guys, I have a really random question about operator for collections in Kotlin. Is there something like
    if not empty let
    ? I’m always doing like below and I really wish to drop this local variable if possible.
    val items = getItems()
    if(items.isNotEmpty()) {
      doSomethingWith(items) // e.g map items etc..
    }
    k
    s
    r
    • 4
    • 12
  • h

    hudsonb

    02/19/2019, 2:20 PM
    Any recommendations for a new dev laptop? Smashed the screen on my dev machine, Mid-2014 Mac Book pro and need to replace it. Can't wait 5-6 months for 2019 MBP to come out.
    h
    d
    +8
    • 11
    • 90
  • t

    thiagoretondar

    02/20/2019, 10:30 PM
    Has someone used elasticsearch for BigData and BI?
    h
    • 2
    • 1
  • e

    elect

    02/21/2019, 8:36 PM
    am I the only one having Idea stucking on code highlighting from time to time?
    :yes: 1
    🇳🇴 2
    o
    a
    • 3
    • 14
  • t

    thomasnield

    02/22/2019, 3:36 PM
    Has anybody had problems using Oracle JDK 8 with Intellij IDEA recently? I experienced some bizarre issues starting this month, like Java types not being found. I tried re-installing the JDK and Intellij IDEA (as well as upgraded Gradle) but the issue persisted. When I switched over to Amazon Corretto 8 everything worked perfectly.
    e
    g
    • 3
    • 10
  • k

    kartikpatodi

    02/23/2019, 4:21 PM
    Hey everyone just wanted to know is there way other than reflection through which I can get Java and Kotlin class metadata. We mostly have a mix of java and kotlin files in our projects. I need to get the metadata to generate source code. We are not allowed to use annotations for some reason. Any library or java feature for efficiently doing so? Am I overlooking something or reflection is the only hope?
    j
    n
    • 3
    • 6
  • o

    orangy

    02/23/2019, 5:11 PM
    You can use reflection in the generator, and then not use it in production runtime
    k
    • 2
    • 2
  • k

    kenkyee

    02/24/2019, 7:27 PM
    They're adding coroutines to C++ 😮 https://www.phoronix.com/scan.php?page=news_item&amp;px=Coroutines-Modules-CPP20
    👍 1
    g
    g
    • 3
    • 4
  • n

    Nikky

    02/24/2019, 11:30 PM
    So i am looking for a logging library, or code snippet that can automatically add linenumbers to logmessages, using reflection or so is fine too does anyone know how one can manage something like that with kotlin-logging or any other logging framework ?
    a
    s
    • 3
    • 2
  • b

    benleggiero

    02/26/2019, 2:21 AM
    Any Linux nerds know what this means? Might it have something to do with why my tty2 is weirdly hard to access?
    :stackoverflow: 1
    t
    m
    • 3
    • 3
  • h

    hallvard

    02/27/2019, 4:57 AM
    I recently discovered also Idea's possibility to commit only one change out of many in a file. Simply brilliant!
    o
    e
    k
    • 4
    • 6
  • k

    karelpeeters

    02/28/2019, 5:50 PM
    I sometimes do that if I want to emphasize the common branch.
    h
    • 2
    • 1
  • r

    russhwolf

    02/28/2019, 5:54 PM
    Or, just in case...
    try {
        if (something != null) {
            doX()
        } else if (something == null) {
            doX()
        } else {
            doX()
        } 
    } catch (e: NullpointerException) {
        doX()
    }
    ✔️ 2
    😆 3
    r
    k
    e
    • 4
    • 4
  • o

    oday

    03/02/2019, 10:10 AM
    https://flutter.dev/docs/development/ui/interactive#step-2-subclass-statefulwidget
    👍 1
    k
    g
    • 3
    • 5
  • h

    Hullaballoonatic

    03/04/2019, 9:24 PM
    it is so dumb to me that javascript nor typescript have the ability create class constructors that automatically assign the values of identically defined properties. (aka kotlin's delegation). the lack thereof is perhaps the most unnecessarily verbose aspect of js/ts. e.g.
    interface Baz {
        foo
        bar
    }
    
    class Bar implements Baz {
        foo
        bar
    
        constructor(baz: Baz) {
            this.foo = baz.foo
            this.bar = baz.bar
        }
    }
    that shit becomes so long and verbose in some models
    h
    l
    • 3
    • 6
  • c

    cedric

    03/04/2019, 9:47 PM
    I remember when I was still in college, I asked my C teacher how come I have to write
    a.b
    or
    a -> b
    depending on whether
    a
    is a pointer: the compiler already knows, why put the burden on the developer? He looked at me blankly. Never received a good answer.
    r
    • 2
    • 1
  • r

    robstoll

    03/05/2019, 8:44 PM
    WTF since when does the following result in an ambiguity?
    class A<T>{}
    fun <E> A<E>.foo(a: E){}
    fun <E> A<E>.foo(b: Int){}
    fun test(){
        A<Int?>().foo(null)
    }
    n
    d
    • 3
    • 24
  • p

    Paul Woitaschek

    03/07/2019, 4:29 PM
    So im hiring an Android developer for my company. What do you do with candidates that don't have any kind of public contributions? Like in not even a single issue created somewhere. Do you generally dismiss them? For me being part of the Android developer community is a large part of my work Identity.
    t
    f
    +3
    • 6
    • 16
  • i

    itnoles

    03/08/2019, 3:14 AM
    Still No Android Q SDK 😐
    g
    • 2
    • 18
  • d

    dewildte

    03/11/2019, 5:14 PM
    Is there an elegant way to get Gson an Kotlin’s default values to play nicely?
    g
    • 2
    • 3
  • n

    napperley

    03/11/2019, 9:43 PM
    Is it possible to have Swagger generate only REST API documentation? If so what would Swagger require in order to generate the documentation?
    d
    t
    • 3
    • 7
  • t

    thomasnield

    03/12/2019, 8:54 PM
    @hhariri can you all hand out Kotlin capes at KotlinConf this year? @todd.ginsberg would like one.
    :yes: 9
    🎉 2
    s
    v
    • 3
    • 2
  • n

    napperley

    03/16/2019, 12:18 AM
    Have read that the main performance bottleneck for software compilation is the CPU, is that still the case? What is the main compilation bottleneck when compiling a Kotlin program/library? Is the compilation bottleneck the same across all Kotlin platforms (Kotlin JVM/Android/JS/Native etc)?
    g
    • 2
    • 2
  • o

    orangy

    03/19/2019, 10:20 PM
    😆 https://twitter.com/wmacgyver/status/1108128210942873602
    :kotlin: 6
    r
    • 2
    • 1
  • j

    juliocbcotta

    03/20/2019, 5:44 AM
    Why AS would not allow me to create a module with "-" in the name? Like "models-common" does not seem to be a valid name. Is it a bug or is it by design? Intellij Idea CE 2018.3 does not seem to have the same validation...
    g
    • 2
    • 14
  • u

    ursus

    03/21/2019, 2:39 AM
    Its almost too easy, where could it all go wrong? Should I rather use some actual ws client library?
    g
    l
    • 3
    • 11
  • b

    bjonnh

    03/22/2019, 4:49 PM
    is sun.misc.Unsafe still needed?
    g
    • 2
    • 3
Powered by Linen
Title
b

bjonnh

03/22/2019, 4:49 PM
is sun.misc.Unsafe still needed?
g

gildor

03/22/2019, 5:01 PM
Depends for what, some APIs has public replacement in never veraions of Java, some don't
b

bjonnh

03/22/2019, 8:31 PM
what about kotlin, does it uses it?
g

gildor

03/23/2019, 1:20 AM
Nothing in stdlib, not sure about compiler itself, but probably not
👍 1
View count: 1