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
announcements
  • s

    strelok

    06/05/2017, 1:20 PM
    @udalov i saw an answer to a question you provided on SO and just wanted to get some more information. It's about retaining parameter names on constructors
    u
    • 2
    • 24
  • k

    krissrex

    06/05/2017, 9:01 PM
    Are there any libraries for integration testing with databases that work well with kotlin? I can't really find anything other than DBunit on google.
    • 1
    • 1
  • s

    scott

    06/05/2017, 9:02 PM
    I can’t tell you you are talking about inline functions or functionality intrinsic to the language @diesieben07
    d
    • 2
    • 3
  • s

    strelok

    06/06/2017, 3:21 AM
    is there a way to see (confirm) the kotlinc command line (or exact options) used by the IntelliJ during a build?
    s
    i
    • 3
    • 10
  • m

    maplonki

    06/06/2017, 4:55 AM
    I’m trying to compare if 2 classes are of the same instance type but i’m getting an error because
    this.contentFragment
    is nullable, but i can just null check it
    var contentFragment: Fragment? = null
    
    fun exec(contentFragment: Fragment) {
      if (contentFragment::class == this.contentFragment?::class) return
    }
    😱 3
    k
    l
    m
    • 4
    • 4
  • s

    Slackbot

    06/06/2017, 8:50 AM
    This message was deleted.
    d
    s
    • 3
    • 3
  • s

    Slackbot

    06/06/2017, 8:53 AM
    This message was deleted.
    d
    s
    • 3
    • 2
  • a

    andyb

    06/06/2017, 2:26 PM
    @onionsoup probably because static methods are a bit of a code smell in an OO language. They are much better represented by top-level functions in FP and the companion object is merely a way of grouping these functions.
    o
    n
    • 3
    • 3
  • t

    tulio

    06/06/2017, 2:31 PM
    @andyb Could you explain how would I include the runtime on this 'fat' jar?
    c
    • 2
    • 2
  • c

    chb0kotlin

    06/06/2017, 6:09 PM
    I am not entirely sure how to use
    File.walk
    someone got a handy example
    d
    r
    • 3
    • 5
  • s

    squinky

    06/07/2017, 3:46 AM
    Hello Kotlin gurus! Just finished reading Kotlin in Action and I’m looking to write a legacy-free backend for a largely single page web app. What’s the best Kotlin framework for that kind of thing? I am going to use Postgres for the database. Thanks!!
    s
    • 2
    • 1
  • r

    rattrayalex

    06/07/2017, 4:47 PM
    I’m curious; how have people liked the
    it
    feature of Kotlin? Does it cause problems/confusions?
    t
    h
    +3
    • 6
    • 12
  • o

    orangy

    06/07/2017, 5:24 PM
    For real fans 😄 https://plugins.jetbrains.com/plugin/9754-tiobe-index-for-kotlin
    🤘 1
    :kotlin: 8
    😄 2
    d
    j
    m
    • 4
    • 9
  • v

    vaskir

    06/07/2017, 6:58 PM
    🙂
    r
    • 2
    • 2
  • m

    molikto

    06/08/2017, 6:12 AM
    Any reason Kotlin doesn't support overriding
    plus
    and
    plusAssign
    the same time? This can be handy for mutable data types, like
    Vector2
    in libGDX
    s
    • 2
    • 1
  • i

    illaz

    06/08/2017, 7:35 AM
    @akbarsha03 According to https://discuss.kotlinlang.org/t/fall-through-in-when/2540 there is no fallthrough construct yet.
    j
    • 2
    • 1
  • i

    illaz

    06/08/2017, 7:37 AM
    @vaskir As far as I know Swift has a “fallthrough” keyword 😉
    a
    • 2
    • 1
  • w

    witoldsz

    06/08/2017, 2:30 PM
    Hello, where can I find how exactly does
    with (x) {a() b() c()}
    work? Do the
    a()
    and
    b()
    execute on the same instance of
    x
    , or do the result of
    a()
    can "update" the
    x
    , so the following methods run on what
    a()
    returned?
    t
    k
    • 3
    • 4
  • f

    forcelain

    06/08/2017, 4:52 PM
    I have an
    Item
    .
    Item
    has a list of another
    Item
    . Is there a way to recursively collect all subitems for a given item into a flat list?
    d
    k
    • 3
    • 4
  • s

    snowe

    06/08/2017, 4:53 PM
    I'm not seeing any methods that would allow me to.
    n
    • 2
    • 1
  • m

    mg6maciej

    06/08/2017, 8:37 PM
    @fmd Interesting. When would you separate test into blocks instead of simply creating two separate tests?
    f
    • 2
    • 2
  • i

    ilya.gorbunov

    06/09/2017, 1:01 AM
    @groostav Take a look at this example: https://try.kotlinlang.org/#/UserProjects/q1qp3un899nd41tcall8qmapg5/9kedig2qt02lre65kj8jt9eqan What is different from your code?
    🤔 1
    g
    • 2
    • 8
  • d

    Dalinar

    06/09/2017, 3:41 AM
    so if a nested class is not
    inner
    then it is static? The docs don't really say anything about that
    o
    • 2
    • 4
  • d

    dominikabee

    06/09/2017, 8:29 AM
    Hi, we’re organizing an event about kotlin in Cracow (Poland) and we’re looking for speakers to share their experience using Kotlin in projects. What differs this event from others is that it will not be a fully open event, we’re going to invite Senior Developers, CTOs etc. who are interested in using Kotlin in their projects, so we estimate that the number of attendees will not exceed 50. Are you interested in a speaker role or maybe you know somebody that you can recommend? Thanks for your help!
    o
    • 2
    • 2
  • m

    mnawrot

    06/09/2017, 11:01 AM
    hey, is it possible to add another condition in the same
    is
    inside
    when()
    statement? something like :
    when(someVariable) {
            is Int or is String {
                \\\something
            } 
        }
    m
    l
    +2
    • 5
    • 6
  • n

    nitrog42

    06/09/2017, 1:22 PM
    hi guys ! interface SAMListener { public void listen(param1: Object, param2: Object) } myclass.setSAMListener { param1, (param2 as Boolean) -> } I’m trying to make param2 autocast to Boolean, but it’s not working... Is there any way to do it in the prototype of the lambda ?
    m
    m
    • 3
    • 8
  • c

    chb0kotlin

    06/09/2017, 6:16 PM
    private fun hash(f: File): String {
            MessageDigest.getInstance(hashAlgo)?.let {
                FileInputStream(f).let { f ->
                    IOUtils.copy(f, DigestOutputStream(NullOutputStream(), it))
                    f.close()
                }
                it.digest().map { String.format("%02x",it) }.reduce{String::plus}
            }
            throw RuntimeException("Something went wrong")
        }
    n
    • 2
    • 1
  • s

    Slackbot

    06/10/2017, 10:07 AM
    This message was deleted.
    v
    t
    • 3
    • 7
  • t

    tvede

    06/10/2017, 10:31 AM
    Hi Guys, So if i have a type parameter, is there no way to say that it can be “Any” except “Exception” ?
    v
    • 2
    • 7
  • e

    Eugenio

    06/10/2017, 12:30 PM
    What is the font in the Kotlin logo? Is it available anywhere?
    ❤️ 2
    v
    r
    • 3
    • 3
Powered by Linen
Title
e

Eugenio

06/10/2017, 12:30 PM
What is the font in the Kotlin logo? Is it available anywhere?
❤️ 2
v

voddan

06/10/2017, 1:02 PM
eugenio: ask @roman.belov
r

roman.belov

06/10/2017, 1:03 PM
Gotham
❤️ 1
e

Eugenio

06/10/2017, 1:03 PM
on, nice, thank you!
View count: 2