https://kotlinlang.org logo
Docs
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
  • s

    sreich

    04/08/2017, 3:11 PM
    java logging confuses the crap out of me. so many libs and apis it's a bit of a mess
    👍 3
    e
    b
    c
    • 4
    • 29
  • d

    Dalinar

    04/09/2017, 3:56 AM
    q1. how can I get code coverage colours to show in the file in the editor? I can see the covered lines if I export the HTML (in the HTML) - but in the editor, the coloured bars I see only seem to relate to changes since last commit q2. what does partial line coverage mean on a line like
    if (x != null) {
    (yellow) (and then the following lines are fully covered (green) inside the
    if
    block) - does that mean that
    x
    was never
    null
    ?
    m
    • 2
    • 1
  • f

    fellshard

    04/10/2017, 12:42 AM
    Jigsaw is lining up to be a mess, as previously suspected.
    n
    s
    • 3
    • 10
  • o

    orangy

    04/10/2017, 2:37 PM
    http://www.baeldung.com/java-in-2017 Given that Maven is still strong (and getting stronger) anyone to make Maven Polyglot support for Kotlin?
    e
    • 2
    • 1
  • p

    pavlospt

    04/10/2017, 3:01 PM
    Someone from JetBrains that can help with some docs I am looking for Intellij Plugin Development?
    h
    • 2
    • 5
  • m

    mg6maciej

    04/10/2017, 6:10 PM

    https://i.redd.it/yh8nv9m7l6qy.jpg▾

    👍 1
    💯 3
    😜 4
    s
    m
    • 3
    • 2
  • s

    sksk

    04/12/2017, 1:21 PM
    i fixed it by not mentioning birth date at all it was not required
    s
    o
    • 3
    • 2
  • s

    sksk

    04/12/2017, 3:21 PM
    wow ovh ask me for identity paper... anyone can recomand me a cheap vps provider for a server with at last 2gb of ram ?
    s
    • 2
    • 4
  • g

    groostav

    04/13/2017, 3:52 AM
    on an unrelated note: My cucumber stub
    @Given("^We want to execute a constraint graph 10000 times$")
        fun `We want to execute a constraint graph 10000 times`(){
            TODO()
        }
    the desire to write my own test driver is real. Wouldnt it be nice if I could just tag the method with
    @Given
    and simply embed regex in the method name
    m
    • 2
    • 2
  • s

    sksk

    04/13/2017, 3:18 PM
    Unity change versioning, this is reminds me jetbrains one 😛 https://unity3d.com/unity/beta/unity2017.1.0b1
    o
    m
    r
    • 4
    • 7
  • d

    d.medina

    04/14/2017, 2:26 PM
    The other part was a bit of a brain fart i should have said I make them nullable. Like if a Java class is passing me something it maybe null so Its best to let kotlin know that it maybe null
    m
    • 2
    • 2
  • d

    deviant

    04/15/2017, 2:12 PM
    see xiaomi devices. pretty good price/quality ratio
    m
    k
    • 3
    • 8
  • o

    orangy

    04/16/2017, 2:29 PM
    https://twitter.com/TimvdLippe/status/853608013441183744
    e
    • 2
    • 1
  • o

    orangy

    04/16/2017, 4:02 PM
    DSL markers do not change how a call is resolved, it issues an error when such a call violate dsl rules
    v
    • 2
    • 8
  • s

    sreich

    04/16/2017, 9:44 PM
    I.. Can't believe visual studio doesn't auto do that
    m
    • 2
    • 7
  • d

    deviant

    04/18/2017, 7:32 PM
    guys, does anybody know what service has been used to generate this image?

    https://habrastorage.org/files/7d4/244/a01/7d4244a0150d41d1adb706a13a3f8083.jpg▾

    it would be nice to monitor this statistics in real time 🙂
    r
    • 2
    • 1
  • m

    mg6maciej

    04/18/2017, 7:35 PM
    Lines of code don't matter. If all these projects were written in Java, it would say something between 100 and 1000 MLOC. 😉
    😆 5
    r
    d
    • 3
    • 2
  • s

    sreich

    04/18/2017, 8:06 PM
    Eg did everybody just watch a video talk or..
    b
    • 2
    • 1
  • m

    mg6maciej

    04/19/2017, 8:11 PM
    Smart casts are fun!
    val x: Any = Unit
    if (x is Int && x is String) {
      x.length + x
    }
    😂 2
    t
    • 2
    • 4
  • c

    cedric

    04/20/2017, 12:53 AM
    @mg6maciej Surprisingly, the compiler is not flagging this as “will always be `false`”
    m
    b
    m
    • 4
    • 8
  • m

    mg6maciej

    04/20/2017, 10:10 AM
    For me that partially means how many milliseconds it takes your brain to figure out there is negation there.
    if (not isEmpty())
    if (!isEmpty())
    if (isNotEmpty())
    if (isEmpty().not())
    n
    s
    • 3
    • 5
  • m

    mwerschy

    04/20/2017, 2:08 PM
    @dg3feiko why would you need that? Something like this works fine
    sealed class Expression
    data class Const(val value: Int) : Expression()
    data class Add(val left: Expression, val right: Expression) : Expression()
    data class Neg(val expr: Expression) : Expression()
    
    fun eval(expr: Expression): Int = when (expr) {
        is Const -> expr.value
        is Add -> eval(expr.left) + eval(expr.right)
        is Neg -> -eval(expr.expr)
    }
    
    fun main(args: Array<String>) {
        println(eval(Add(Const(1), Neg(Const(2)))))
    }
    :kotlin: 3
    d
    • 2
    • 1
  • m

    mwerschy

    04/20/2017, 2:10 PM
    Won't let me tailrec optimize it though 😞
    e
    • 2
    • 3
  • m

    mg6maciej

    04/20/2017, 2:12 PM
    How would you go with matching
    Add(left, Const(0))
    to simplify it to
    left
    ?
    e
    • 2
    • 7
  • m

    mwerschy

    04/20/2017, 2:23 PM
    @dg3feiko match on x.op?
    d
    • 2
    • 2
  • o

    orangy

    04/20/2017, 10:24 PM
    only 4 members to join for a nice number in #general
    😈 3
    c
    • 2
    • 1
  • t

    trevjones

    04/21/2017, 5:43 PM
    seems an awful lot like protocol buffers
    👍 2
    r
    • 2
    • 1
  • e

    evanchooly

    04/24/2017, 2:37 PM
    couple that with language injection and 💥
  • s

    snrostov

    04/24/2017, 9:47 PM
    Just curious: what is "multiplatform"? 'header' and 'impl' modifier? It is something unannounced yet? https://youtrack.jetbrains.com/issue/KT-17024
    s
    • 2
    • 1
  • g

    groostav

    04/25/2017, 6:31 PM
    hey gents, I'm seeing different behaviour pertaining to a
    process.start()
    call from when I run the target under intelliJ, and under an IntelliJ ant target than when I run it from install4j. This is on windows 7. Interestingly the behavior difference disappears on our (newer) windows 10 machines. Anybody here got some thoughts about what the difference might be?
    d
    • 2
    • 6
Powered by Linen
Title
g

groostav

04/25/2017, 6:31 PM
hey gents, I'm seeing different behaviour pertaining to a
process.start()
call from when I run the target under intelliJ, and under an IntelliJ ant target than when I run it from install4j. This is on windows 7. Interestingly the behavior difference disappears on our (newer) windows 10 machines. Anybody here got some thoughts about what the difference might be?
Oook, so the problem was
javaw
vs
java
. Windows apparently has some concept of a console window, where processes can either have a console window or they can not have a console window (even if they spawn several later in their life cycles). Abaqus, being an ancient piece of software, was not willing to tolerate being `Process.start()`'d by a young-upstart-non-console'd process, which is what our software is. There must be come old API on the windows process object. Infuriating.
Also the exact behaviour of this flag/property appears to have changed from Windows 7 to Windows 10
d

dalexander

04/26/2017, 6:32 PM
Ouch. Did they actually document the change anywhere?
g

groostav

04/26/2017, 6:46 PM
probably? but I'm not even an MDSN subscriber, so there was no way I was in a channel to get news of that change. It could also be the software doing an
if(WIN_7) doA() else if (WIN_10) doB()
, I'll never know
but yeah it was probably 30-40 man hours to solve this stupid flag.
d

dalexander

04/26/2017, 6:51 PM
This did seem like hard won knowledge.
View count: 3