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

    diesieben07

    05/25/2017, 1:26 PM
    because there is no
    Person
    as
    this
    in scope
    a
    u
    • 3
    • 14
  • t

    thymecypher

    05/25/2017, 1:30 PM
    Correct - and I’m fine with StatusViewProcessor<SmartDevice> since StatusViewProcessor HAS to be T:SmartDevice anyway, but then it says this class isn’t compatible: class BatteryStatusViewProcessor : StatusViewProcessor<Battery>
    d
    • 2
    • 7
  • t

    tagantroy

    05/25/2017, 2:36 PM
    https://kotlinlang.slack.com/archives/C0922A726/p1495722837261926 probably you never tried scala :troll:
    v
    • 2
    • 1
  • r

    rmarinsky

    05/25/2017, 3:03 PM
    Why
    enum class
    in kotlin have no hidden
    override fun toString()
    , as in a data class?
    i
    k
    m
    • 4
    • 3
  • d

    deinspanjer

    05/25/2017, 4:07 PM
    Here is an example of what I’m trying to do: https://gist.github.com/deinspanjer/8a677933f5b85135b05a597c7fbc298c
    d
    • 2
    • 3
  • d

    danko9

    05/25/2017, 8:16 PM
    how do i make the primary constructor of a public class private?
    :stackoverflow: 7
    r
    • 2
    • 1
  • j

    jealousmango

    05/25/2017, 8:53 PM
    anyone have any Udemy recommendations for learning Kotlin?
    m
    • 2
    • 2
  • m

    musachy

    05/25/2017, 11:16 PM
    is this the right channel for questions about Kotlin native?
    d
    • 2
    • 2
  • r

    richardagreen

    05/26/2017, 9:06 AM
    Hi there - we are teaching devs how to use our platform and the ability for us to train them using something like the try.kotlinlang.org site would be incredibly helpful. Is the service behind that in any way available for use ? This is for the corda platform btw.
    g
    u
    • 3
    • 3
  • a

    anthony

    05/26/2017, 3:12 PM
    Other than android apps can I build Desktop applications with kotlin
    i
    p
    • 3
    • 2
  • c

    cy

    05/26/2017, 3:13 PM
    data class Color(val r: Int, val g: Int, val b: Int) {
        init {
            require(r in 0..255) { "invalid red $r" }
            require(g in 0..255) { "invalid red $g" }
            require(b in 0..255) { "invalid red $b" }
        }
    
        constructor(r: String, g: String, b: String) : this(r.toColorComponent("red"), 
                                                            g.toColorComponent("green"), 
                                                            b.toColorComponent("blue"))
    }
    
    private fun String.toColorComponent(name: String) = toIntOrNull() ?: throw IllegalArgumentException("Color component $name string is not a number: $this")
    p
    k
    • 3
    • 36
  • d

    deinspanjer

    05/26/2017, 8:48 PM
    Nope, Mac.
    u
    • 2
    • 4
  • d

    deinspanjer

    05/27/2017, 12:46 AM
    I thought I could just use obj?.let { MyObj(obj) }, but I think this is giving me a function like a Supplier rather than the actual object.
    f
    g
    • 3
    • 41
  • d

    deinspanjer

    05/27/2017, 1:30 AM
    My Maven pom file has the kotlin-maven-plugin version set at 1.1.2-3 which is the latest released version, but this gives me a warning in IntelliJ IDEA because the version bundled into the IDE plugin is 1.1.2-2. Is that safe to just ignore?
    c
    • 2
    • 1
  • c

    cedric

    05/27/2017, 5:21 AM
    Looks like
    vararg
    requires you to explicitly name the following parameters. Sounds like a compiler weakness since inference is unambiguous here
    ➕ 1
    i
    • 2
    • 1
  • m

    mg6maciej

    05/27/2017, 8:35 AM
    It's ok, but soon you'll learn you don't need to. There are things like android extensions for views and
    lazy { }
    that can be used for other things to have `val`s instead of `var`s.
    w
    a
    a
    • 4
    • 6
  • s

    snrostov

    05/27/2017, 4:42 PM
    Why reified type is forbidden for catch parameter?
    inline fun <reified T> testException() {
            try {
    
            } catch (e: T) { // ERROR: reified type is forbidden for catch parameter
    
            }
        }
    • 1
    • 1
  • h

    hansbaum557

    05/28/2017, 12:24 AM
    I have this line of code in a fragment and using the kotlin android extensions: mAnimationDrawable = swipe_refresh_layout!!.background as AnimationDrawable but the swipe_refresh_layout!! throws a RuntimeException. Do someone know hot to solve this problem?
    a
    • 2
    • 1
  • i

    ilya.gorbunov

    05/28/2017, 3:37 PM
    @kevinmost With generics involved it's no longer a matter of one extra character.
    o
    s
    • 3
    • 7
  • r

    ryotamurohoshi

    05/28/2017, 4:35 PM
    I agree the words
    Kotlin has features for null safety
    or
    Kotlin is langage that has null safety characteristic.
    But I have question with words of
    Kotlin is null safety language
    or
    Kotlin has null safety.
    i
    b
    • 3
    • 6
  • d

    deinspanjer

    05/28/2017, 6:28 PM
    Hi folks, I have a simple Java example and what I think is the corresponding Kotlin code, and the Kotlin one doesn’t work. Could someone help me figur this out?
    • 1
    • 1
  • t

    thymecypher

    05/29/2017, 4:04 AM
    So with delegation - how would I be able to set it up so that the same delegate can be used for multiple types?
    d
    • 2
    • 1
  • k

    kirillrakhman

    05/29/2017, 9:06 AM
    @dathoang.se that warning exists
    s
    • 2
    • 2
  • s

    spand

    05/29/2017, 12:24 PM
    Is there some standard functional way of grouping consecutive elements that are similar somehow
    listOf("str", "str", 2, "str")
    into sublists based on ie.
    .class
    so the example would become
    listOf(listOf("str", "str"), listOf(2), listOf("str"))
    d
    k
    • 3
    • 7
  • t

    trevjones

    05/29/2017, 7:57 PM
    thought the edu plugin was deprecated. edit. it isn’t I just wasn’t looking in the right place
    m
    o
    • 3
    • 6
  • r

    rrader

    05/30/2017, 2:40 PM
    Is it possible to mock extension function using Mockito?
    :stackoverflow: 3
    d
    • 2
    • 2
  • h

    hhariri

    05/31/2017, 7:03 PM
    <!here|@here> We’ve published a Code of Conduct and Basic Guidelines for Slack, which is now required to accept before joining. For those that joined beforehand, please take a few moments of your time to read it. https://github.com/JetBrains/kotlin-web-site/blob/master/pages/community/slackccugl.md Thank you.
    👌 69
    😮ctocat: 1
    👍 39
    :kotlin: 22
    f
    l
    d
    • 4
    • 5
  • k

    kirillrakhman

    05/31/2017, 7:07 PM
    where should discussions about the code of conduct go?
    h
    • 2
    • 1
  • a

    andrewreitz

    05/31/2017, 7:18 PM
    Not sure if this is the correct room, but is the master branch failing? I'm unable to build it and Team City is showing in the readme that it's failing. I'm a little confused by this because it looks like the last release that was cut, also shows that it was failing, build-1.1.4-dev-539
    k
    • 2
    • 2
  • u

    user

    05/31/2017, 7:26 PM
    message has been deleted
    👏 5
    m
    • 1
    • 1
Powered by Linen
Title
u

user

05/31/2017, 7:26 PM
message has been deleted
👏 5
m

mg6maciej

05/31/2017, 8:08 PM
5 seconds to execute Hello World app. Not impressed.
🙄 1
View count: 3