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

    mp

    08/01/2018, 7:34 PM
    I don`t like post randoms usually but it must be here! 😃
    😞 3
    💯 2
    😄 1
    😂 9
    😡 4
    :rage2: 1
    a
    • 2
    • 2
  • j

    jdiaz

    08/04/2018, 7:38 PM
    Plot twist, almost all the ideas are stolen
    🤔 1
    s
    • 2
    • 1
  • j

    juliocbcotta

    08/08/2018, 4:21 AM
    Where would be the best slack to ask/talk about android (non kotlin related) stuff ?
    ➕ 3
    r
    • 2
    • 1
  • e

    edwardwongtl

    08/08/2018, 5:01 AM
    I know a slack called Android United
    ☝️ 1
    j
    g
    • 3
    • 2
  • e

    elect

    08/10/2018, 10:27 AM
    @elizarov I was looking at your gist, https://gist.github.com/elizarov/03425be1c4209d59ad813ddccab29313 very interesting. Have you (or somebody else) use it in real scenarios? How did it play? Could you share it?
    g
    • 2
    • 5
  • v

    vpriscan

    08/17/2018, 8:40 AM
    why does't supressing SpellCheckingInspection work for kotlin classes?
    l
    • 2
    • 1
  • t

    twisterrob

    08/18/2018, 10:43 AM
    Looking for someone with a non-Windows machine with Android Studio 3.1 or 3.2 at hand. I would like to do an experiment with Gradle and console output inside IDEA.
    l
    • 2
    • 2
  • j

    juliocbcotta

    08/21/2018, 8:19 PM
    Hi, where would be the best place to talk about or just show a kotlin that we made available on github?
    l
    • 2
    • 2
  • r

    Ruckus

    08/24/2018, 9:17 PM
    Late doesn't matter now that we have full history 🙂
    :trollface: 3
    👍 5
    m
    • 2
    • 1
  • o

    orangy

    08/28/2018, 1:45 PM
    Do anyone remember the website, where lots of programming languages syntax and basic concepts are described in tl;dr way? My google-fu is failing on me…
    t
    t
    j
    • 4
    • 5
  • s

    Shawn

    08/29/2018, 2:41 AM
    if you’re encountering this question for the first time and you wanna learn more about it (after voting), google
    👍 1
    • 1
    • 1
  • v

    voddan

    08/30/2018, 9:31 AM
    @thomasnield Wouldn't it be cool to run some sort of trivial probabilistic experiment on a computer, find the 3-doors paradox, pretend not to believe in it, then calculate probabilities with a math library, see the numbers, and only then explain how it works?
    t
    • 2
    • 3
  • a

    Aregev2

    08/30/2018, 6:18 PM
    I want to make a library that will contain useful extensions for the stdlib, anyone has idea / suggestions for it?
    o
    • 2
    • 4
  • a

    Albert

    09/03/2018, 11:54 AM
    Any recommendations for lightweight DI? So far I found Dagger and PicoContainer
    d
    • 2
    • 1
  • m

    Mohamed Ebrahim

    09/06/2018, 2:33 AM
    @orangy is Jetbrains Russian company?
    g
    g
    +3
    • 6
    • 5
  • k

    karelpeeters

    09/06/2018, 11:19 AM
    They should instantly ban people who comment "+1 Yes please" on YouTrack issues. I want to follow the actual discussion, not the votes!
    d
    t
    j
    • 4
    • 3
  • o

    oshai

    09/06/2018, 8:35 PM
    Add yours: https://github.com/ygaller/kotlin-companies/wiki
    v
    y
    • 3
    • 3
  • e

    elect

    09/09/2018, 5:31 AM
    found out intellij is working on a gui solution for pulling github push requests.. cool! https://youtrack.jetbrains.com/issue/IDEA-85079
    n
    • 2
    • 3
  • e

    elect

    09/09/2018, 8:40 AM
    related, https://youtrack.jetbrains.com/issue/IDEA-122424
    k
    p
    • 3
    • 6
  • a

    Albert

    09/12/2018, 8:12 AM
    I am trying to define some methods which resolves overloading like so:
    inline fun <reified T> apply(apply: T) {
        on(apply)
    }
    
    fun on(apply: Any?) {
        throw Exception()
    }
    
    fun on(apply: String) {
        println("String: $apply")
    }
    
    fun on(apply: Int) {
        println("Int: $apply")
    }
    When
    apply("test")
    it will always endup in
    on(apply: Any?)
    . I thought that
    inline
    with
    reified
    was basically a "copy/paste" behavior of that method. So when performing
    apply("test")
    I would expect that after compiling it would look like something like so
    on("test")
    . Clearly I am making a wrong assumption here. Is it possible to do something like this? Or should I always use a reflection to resolve this at runtime?
    g
    • 2
    • 1
  • p

    pga4711

    09/12/2018, 9:06 AM
    Hello, can i ask about random stuff here? Actually i wonder why i can't do "ping rpi3dev1" from a windows PC on the same network. Even if my hostname on the raspberry pi device is right:
    pi@rpi3dev1:~ $ cat /proc/sys/kernel/hostname
    rpi3dev1
    pi@rpi3dev1:~ $ ifconfig
    ...
    inet 192.168.35.6 ...
    But i can ping that IP-adress from the windows PC.
    h
    n
    +2
    • 5
    • 22
  • g

    gabrielfv

    09/12/2018, 9:09 PM
    object MyObj {
        const val MESSAGE = "msg"
    }
    Getting the bytecode and decompiling, it translates into
    // Simplified
    public final class MyObj {
       @NotNull
       public static final String MESSAGE = "msg";
       public static final MyObj INSTANCE;
    
       static {
          INSTANCE = new MyObj();
       }
    }
    g
    • 2
    • 2
  • g

    gabrielfv

    09/12/2018, 9:12 PM
    I might be wrong, but wouldn't that
    private <init>()V
    be the private constructor? Why doesn't it show up on the java decompiled version?
    g
    • 2
    • 2
  • e

    elect

    09/15/2018, 6:18 AM
    I was looking into Github Pages in order to check if it's possible to have a website accepting forms from users, but apparently since they are static this doesn't look feasible.. is it right?
    l
    t
    i
    • 4
    • 12
  • p

    Paul Woitaschek

    09/16/2018, 1:20 PM
    A bit random, but has anyone ever thought about making a reflection based dagger 2 that you can use while developing and using an annotation based one when releasing?
    g
    • 2
    • 5
  • a

    agrosner

    09/16/2018, 10:53 PM
    I don't think that is a good idea because it'll catch dependency cycles, missing injections, and other things at compile time that you would uncover at runtime
    g
    p
    • 3
    • 12
  • a

    Albert

    09/17/2018, 9:37 AM
    So according to https://blog.jetbrains.com/kotlin/2018/09/kotlin-1-2-70-is-out/ "_Using sequences helps avoid unnecessary temporary allocations overhead_" Why is the non-sequence making temporary allocations? Is this somehow a limitation of
    Iterator
    ?
    n
    l
    • 3
    • 5
  • t

    thomasnield

    09/17/2018, 6:02 PM
    https://www.cnbc.com/2018/09/17/linux-creator-linus-torvalds-takes-time-off-apologizes-for-behavior.html
    a
    • 2
    • 1
  • j

    janvladimirmostert

    09/18/2018, 8:40 AM
    I see this article being referenced on a June Redit thread: https://www.infoworld.com/article/3284164/java/oracle-now-requires-a-subscription-to-use-java-se.html Does this mean if you're using Oracle JDK, you now have to pay for it? We're using OpenJDK at the moment and will probably continue to do so
    a
    p
    • 3
    • 4
  • u

    ursus

    09/19/2018, 6:27 AM
    hey, when using selfsigned ssl cert and hardcoding it in the apk, so its the only one in the trust manager does it make sense to implement public key pinning via okhttp certificate pinner? isnt it the same thing?
    m
    • 2
    • 2
Powered by Linen
Title
u

ursus

09/19/2018, 6:27 AM
hey, when using selfsigned ssl cert and hardcoding it in the apk, so its the only one in the trust manager does it make sense to implement public key pinning via okhttp certificate pinner? isnt it the same thing?
m

maxmello

09/19/2018, 7:45 AM
Afaik they are not the same, they are listed as different security methods here: https://developer.android.com/training/articles/security-ssl Here is a very exhaustive article about pinning: https://medium.com/@appmattus/android-security-ssl-pinning-1db8acb6621e
u

ursus

09/19/2018, 2:40 PM
right, but arent ultimately pins calculated from certificates? so if i trust only 1 cert, isnt that effectively the same?
View count: 3