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

    karelpeeters

    09/01/2017, 11:44 AM
    And then you just pass the constructor.
    c
    • 2
    • 7
  • a

    antonkeks

    09/01/2017, 11:52 AM
    Can anybody comment on this? Two example projects with 500 classes: git clone https://github.com/asolntsev/big-app.java git clone https://github.com/asolntsev/big-app.kotlin big-app.java> time gradle classes 0m23.593s big-app.kotlin> time gradle classes 9m34.467s
    d
    c
    d
    • 4
    • 10
  • n

    natpryce

    09/01/2017, 5:20 PM
    I'll push the code up to GitHub and raise a YouTrack issue
    • 1
    • 1
  • a

    adams2

    09/01/2017, 5:32 PM
    curly with a ::? hmmmmm
    k
    • 2
    • 4
  • a

    adams2

    09/01/2017, 5:40 PM
    not sure how to make the :: work
    k
    • 2
    • 3
  • a

    adams2

    09/01/2017, 6:45 PM
    what's the best approach for using Mockito? just slap 'open' on everything?
    a
    t
    • 3
    • 6
  • k

    karelpeeters

    09/02/2017, 8:07 AM
    @dragas Well this just works:
    val myInt: Int = Integer.valueOf(200)
    .
    d
    d
    • 3
    • 12
  • j

    jasoet

    09/02/2017, 1:46 PM
    Hey all, is there a plan to translate Kotlin Docs to other languages?
    :thumbsup_all: 1
    ☝️ 1
    o
    y
    • 3
    • 2
  • j

    jasoet

    09/02/2017, 1:48 PM
    Now Kotlin Indonesia has Most Members on Facebook Group (1.4k members) and Telegram Group Chat (1.3k members)
    o
    b
    • 3
    • 3
  • k

    karelpeeters

    09/02/2017, 8:59 PM
    I remember there being something like
    log
    for sequences to debug them, for example you'd use then like this:
    myList.asSequence().log().map { it + it }.log().toList()
    and it would print out all of the values. Does someone know where I can find it?
    i
    • 2
    • 5
  • j

    jecarr33

    09/03/2017, 6:03 AM
    care to share any thoughts on your projects:?
    k
    e
    • 3
    • 2
  • d

    Dalinar

    09/03/2017, 6:45 AM
    is there a way to implement in a Kotlin class (that uses a java interface), the java interface getter (e.g.
    boolean isRunning();
    ) as a
    val
    property?
    k
    • 2
    • 1
  • f

    feroz_baig

    09/03/2017, 6:59 AM
    What will be returned if i just declare a `var`in interface? Initialisation is not done yet. I read lateinit var is not permitted in interface.
    d
    • 2
    • 1
  • j

    jecarr33

    09/03/2017, 7:04 AM
    for example if you just type
    println
    and select the appropriate suggestion for a strin, does it autocomplete
    println
    and place the caret outside of the
    ( )
    , therefore making hit the back arrow to enter the function?
    p
    • 2
    • 3
  • d

    dave08

    09/03/2017, 9:14 AM
    I'm currently using vertx and kotlin, did you make a library out of this? I'd be interested... also why does vertx need it? I thought its polyglot, and that using the Kotlin version is protected from npes..?
    o
    • 2
    • 1
  • d

    diesieben07

    09/03/2017, 12:14 PM
    Yeah, I know those already. But neither
    requireXXX
    (for "check incoming arguments") nor
    checkXXX
    (for "check if this method may be called right now") are appropriate for an "this internal state must be like this or I made a programmer error".
    a
    • 2
    • 2
  • d

    diesieben07

    09/03/2017, 12:15 PM
    Yes, it's about which exception it throws.
    require
    throws
    IllegalArgumentException
    , which makes no sense here, the arguments passed in to my methods were perfectly fine.
    i
    d
    • 3
    • 6
  • n

    nyxcode

    09/03/2017, 1:41 PM
    Hey, I could really use some help! After adding an other module to my project, its compilation fails because the compiler does not find an extension function in an other module - really, really strange - only the extension functions are not found. I'd appreciate if someone with 1 or 2 minutes spare time could look at it ( : GitHub: https://github.com/knyxcs/knyxcs CI: https://travis-ci.org/knyxcs/knyxcs
    h
    • 2
    • 7
  • r

    raulraja

    09/03/2017, 10:44 PM
    @pablisco if you want to perform effects up until a given condition you can try
    takeWhile
    which stops when the predicate is no longer valid, then with the resulting list you can call
    forEach
    p
    • 2
    • 2
  • j

    jecarr33

    09/03/2017, 10:56 PM
    or use it?
    k
    i
    • 3
    • 8
  • p

    pablisco

    09/03/2017, 11:54 PM
    A question about Reflexion in Kotlin. Are all classes in Kotlin static? For some reason I found myself the other day porting the TypeToken of Gson into Kotlin. (I think I almost got it) But when I went to run the test: https://github.com/google/gson/blob/master/gson/src/test/java/com/google/gson/internal/GsonTypesTest.java#L40 If fails to throw an exception because for some reason D::class.java is always static. Are all the types in Kotlin compiled down to static classes? It’s a bit strange, I was expecting to be failing somewhere else. Here is what I’ve done so far, in case someone has better eyes than me 🙂 https://gist.github.com/pablisco/b21070d6df6622f529e639dbabdb2af1
    g
    • 2
    • 3
  • q

    qwert_ukg

    09/04/2017, 3:28 AM
    i know what it is not a language problem, but i hope to hear any advise about it
    k
    v
    • 3
    • 2
  • c

    Czar

    09/04/2017, 7:54 AM
    Something like
    when (testString) {
        myRegex -> //do something
        //...
    }
    k
    • 2
    • 2
  • a

    antonkeks

    09/04/2017, 8:47 AM
    Anyone has an idea how to enable allopen plugin on the command-line/IDEA settings? I tried adding
    -P plugin:org.jetbrains.kotlin.allopen:annotation=javax.inject.Singleton
    with no effect
    k
    • 2
    • 1
  • j

    jdorleans

    09/04/2017, 10:13 PM
    Little help here? Thx all! https://discuss.kotlinlang.org/t/why-open-property-is-initialized-in-superclass-even-when-it-is-overrided-by-a-subclass/4461
    k
    p
    • 3
    • 4
  • d

    Dalinar

    09/05/2017, 9:49 AM
    is there a way to override a java property with a kotlin property declaration? or must the separate getter and setters always be overriden separately?
    d
    k
    • 3
    • 6
  • n

    natpryce

    09/05/2017, 12:55 PM
    and uses a bitset internally to save space
    e
    d
    k
    • 4
    • 47
  • d

    dharrigan

    09/05/2017, 1:26 PM
    has got our company to sanction the official use of kotlin as a development language
    :kotlin: 12
    👍 5
    c
    • 2
    • 2
  • a

    aballano

    09/05/2017, 2:45 PM
    is there a lint/inspection check that i'm missing so IntelliJ/Android studio warns me about a lambda that can be converted to a reference? I used to find it very useful when working with Java
    k
    • 2
    • 3
  • r

    raulraja

    09/05/2017, 8:51 PM
    What is a good channel to discuss compiler plugins?
    o
    • 2
    • 2
Powered by Linen
Title
r

raulraja

09/05/2017, 8:51 PM
What is a good channel to discuss compiler plugins?
o

orangy

09/05/2017, 9:39 PM
Try #kontributors but note that compiler plugins is not a supported feature, there is no supported public API, etc, etc.
r

raulraja

09/05/2017, 10:14 PM
thanks!
View count: 4