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
advent-of-code
  • k

    Kroppeb

    11/28/2019, 5:47 PM
    Is there a private leaderboard?
    ➕ 1
    u
    b
    • 3
    • 8
  • k

    Kroppeb

    11/29/2019, 3:08 PM
    Less than 2^11 minutes
    b
    • 2
    • 1
  • k

    karelpeeters

    11/30/2019, 7:38 PM
    I demand powers of two!
    m
    k
    • 3
    • 3
  • k

    Kroppeb

    12/01/2019, 5:25 AM
    My phone somehow rang my alarm an hour late
    b
    • 2
    • 1
  • j

    Joris PZ

    12/01/2019, 10:04 AM
    Like last year, I will try to solve the puzzles using only Kotlin common code, and do some naive performance measurements of the solutions on the JVM, in Node and native on windows. Results are logged at https://github.com/jorispz/aoc-2019. Today I was pretty surprised that the native code took longer to run on each iteration (I run every solution 25 times in an internal loop). First iteration takes about 3ms, then it quickly increased to around 30ms. I have no clue what happens there. Averages for today: JVM 3.07ms, Node 31.39ms, Native 23.88ms
    🏁 1
    👍 2
    k
    t
    • 3
    • 25
  • t

    todd.ginsberg

    12/01/2019, 3:04 PM
    Day 1 is done!
    s
    k
    +2
    • 5
    • 18
  • s

    Steve

    12/02/2019, 12:40 AM
    I'm starting with this template I was suggested: https://github.com/stkent/AdventOfCode2019Template. But, how do I actually use it? How do I set it up so that the file is read in?
    s
    t
    • 3
    • 21
  • k

    karelpeeters

    12/02/2019, 9:06 AM
    Untitled
    👍🏻 4
    j
    • 2
    • 1
  • j

    Joris PZ

    12/02/2019, 1:47 PM
    Yeah, I couldn't resist prematurely optimizing (hopefully...) for later this month, and have started the skeleton for a guidance computer emulator. Performance was terrible on JS and native, with a warm JVM finishing in about 150ms, while JS and native took 5-10s each run
    • 1
    • 1
  • k

    Kroppeb

    12/02/2019, 4:33 PM
    I converted my python code to Kotlin using the ne worksheets and I think It'd be fine to switch. I think I can reach similar coding speeds.
    Untitled
    k
    • 2
    • 1
  • s

    stkent

    12/02/2019, 4:59 PM
    This day1->day2 jump seems a little bigger than in previous years to me. Problems do tend to get harder throughout the 25 days, though not monotonically.
    j
    • 2
    • 1
  • t

    todd.ginsberg

    12/02/2019, 5:18 PM
    I'm guessing 19690720 is a constant across all inputs? Meaning: it's not like our input set which is one of a few and (probably) changes between people. True?
    s
    j
    j
    • 4
    • 8
  • e

    Edgars

    12/02/2019, 5:37 PM
    Used recursion second day in a row. Can we keep it up? (should we?) https://github.com/edgars-supe/advent-of-code/blob/master/src/main/kotlin/lv/esupe/aoc/year2019/Day2.kt
    k
    • 2
    • 1
  • t

    todd.ginsberg

    12/02/2019, 11:15 PM
    Today's post
    k
    • 2
    • 4
  • k

    Kroppeb

    12/03/2019, 5:28 AM
    for part 2 my code works for each example but not my data
    p
    • 2
    • 3
  • k

    Kroppeb

    12/03/2019, 9:42 AM
    Under what license should I release my source code?
    r
    • 2
    • 1
  • a

    asad.awadia

    12/03/2019, 1:21 PM
    For today’s post - in the puzzle input how do I Determine where to start from? I.e where is my central port (o) ?
    e
    • 2
    • 3
  • t

    todd.ginsberg

    12/03/2019, 2:00 PM
    Here's mine for today. I'll write my blog post on it later: https://github.com/tginsberg/advent-2019-kotlin/blob/master/src/main/kotlin/com/ginsberg/advent2019/Day03.kt
    j
    e
    • 3
    • 4
  • l

    Leon Linhart

    12/03/2019, 2:16 PM
    Today's puzzle made me come up with a monster:
    intersectAllBy
    https://github.com/TheMrMilchmann/AdventOfCode2019/blob/f42664c0330b1ba9010c6aac498d79d4fb094489/src/main/kotlin/day03/part2/main.kt#L67
    k
    • 2
    • 2
  • j

    Joris PZ

    12/03/2019, 4:07 PM
    Yeah, I managed to reuse my
    Position
    and
    Heading
    classes from last year after some dusting off. My solution: https://github.com/jorispz/aoc-2019/blob/master/src/commonMain/kotlin/day3/p03.kt I started using a fancy Sequence-based solution until I realized that I needed the whole history of visited points anyway, so dropped that and just went for creating a ListPosition per wire and find the crossing points as above.
    k
    k
    s
    • 4
    • 3
  • d

    David Whittaker

    12/03/2019, 6:50 PM
    This raises an interesting question: should we create a solution that solves our input or a solution that solves any input?
    k
    t
    s
    • 4
    • 5
  • t

    todd.ginsberg

    12/03/2019, 10:37 PM
    Got my blog post done: https://todd.ginsberg.com/post/advent-of-code/2019/day3/
    ➕ 1
    k
    l
    m
    • 4
    • 6
  • k

    Kroppeb

    12/04/2019, 5:12 AM
    Mistakes I made: (In thread cause don't want spoilers in mainchat)
    • 1
    • 1
  • k

    Kroppeb

    12/04/2019, 11:21 AM
    I made a few points functions: https://github.com/Kroppeb/AdventOfCodeSolutions/blob/master/src/helpers/Point.kt
    👍🏻 1
    😲 2
    p
    • 2
    • 1
  • t

    todd.ginsberg

    12/04/2019, 2:37 PM
    Day 4: https://github.com/tginsberg/advent-2019-kotlin/blob/master/src/main/kotlin/com/ginsberg/advent2019/Day04.kt
    k
    b
    +3
    • 6
    • 15
  • k

    karelpeeters

    12/04/2019, 5:37 PM
    I wrote a regex for the first part and then I wasted about an hour trying to write a regex for the second one as well 😕.
    t
    • 2
    • 3
  • m

    mickeelm

    12/04/2019, 5:56 PM
    @todd.ginsberg just read one of your blog posts, amazing effort and very fun to read! 👏
    👍 3
    t
    • 2
    • 1
  • c

    Christoph Baudson

    12/04/2019, 7:08 PM
    Thanks @todd.ginsberg for directing me here from Twitter 🙂 Hope to get involved in some discussions over the next days. So far, here are my solutions https://github.com/sustainablepace/Advent-of-Code-2019/tree/master/src/main/kotlin/advent_of_code Glad to be here!
    k
    j
    • 3
    • 4
  • t

    todd.ginsberg

    12/04/2019, 11:12 PM
    Wrote up today: https://todd.ginsberg.com/post/advent-of-code/2019/day4/
    k
    • 2
    • 2
  • k

    Kroppeb

    12/05/2019, 6:06 AM
    Today in our moment of selfreflection
    b
    • 2
    • 1
Powered by Linen
Title
k

Kroppeb

12/05/2019, 6:06 AM
Today in our moment of selfreflection
b

Burkhard

12/05/2019, 6:59 AM
It took me so long to get the modes to work 🤦 For some reason I got stuck on reversing the digits so they are in the right order.
View count: 2