Trending
csh's Avatar

csh

@csh.codes

Server-side Kotlin ๐Ÿง‘โ€๐Ÿ’ป Usual lurker, maybe I'll give this a go for a change

16
Followers
69
Following
10
Posts
15.11.2024
Joined
Posts Following

Latest posts by csh @csh.codes

A bit different to what you are currently reading but I really enjoyed project Hail Mary and the Martian by Andy Weir. Some classics from the 70s like Solaris by Stanislaw Lem, Gateway by Frederik Pohl, The Forever War by Joe Haldeman

19.12.2024 19:56 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Day 07 โœ…

Playing catch up again, at least this wasn't too bad. I'm sure there are ways to cut down the search space but ๐Ÿคท

TIL you can pass a radix into toString which was very handy

github.com/csh97/advent...

#kotlin #AdventOfCode

09.12.2024 12:06 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I've ended up writing something like this in the past to time test time + gradle tasks + intellji shenanigans and then wrote the results to a file. So that I could argue why I needed a new work laptop ๐Ÿ˜… It worked though, I got my new laptop!

I actually got the idea from a talk you did a while ago!

08.12.2024 21:31 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Day 06 โœ…

Tried to keep it all immutable but part 2 took ~8mins ๐Ÿ˜…
Refactored it to be mutable and part 2 runs in ~500ms now

(I think the codes starting to get too big for the images)

github.com/csh97/advent...

#kotlin #AdventOfCode

07.12.2024 19:53 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Day 05 โœ…

Not that happy with part 2 but it will do, at least I am caught up now

github.com/csh97/advent...

#kotlin #AdventOfCode

05.12.2024 22:10 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Day 04 โœ…

Playing catchup today, I've already managed to fall behind ๐Ÿ˜…

Can definitely be improved but I don't have time, using a try catch instead of checking boundaries feels gross but it works ๐Ÿคท

github.com/csh97/advent...

#kotlin #AdventOfCode

05.12.2024 21:24 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I noticed that when I looked at a few solutions after, its a nice shorthand. Lets see if I remember it next year when I touch regex again

05.12.2024 21:21 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Code solution in Kotlin

Code solution in Kotlin

Day 03 โœ…

I knew some regex was coming soon, thankfully not too bad today

github.com/csh97/advent...

#kotlin #AdventOfCode

03.12.2024 09:17 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0
Post image

Day 02 โœ…

Made some silly mistakes in part 2 due to misreading the explanation, but made for some good debugging

I feel like there's a better way than brute forcing but its day 02 ๐Ÿคท

github.com/csh97/advent...

#kotlin #AdventOfCode

02.12.2024 22:26 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
advent-of-code-2024-kotlin/src/day01.kt at main ยท csh97/advent-of-code-2024-kotlin Contribute to csh97/advent-of-code-2024-kotlin development by creating an account on GitHub.

Its that time of year again, Advent of code day 01 โœ…

Nice use case for `zip()` and `unzip()` today!

github.com/csh97/advent...

#kotlin #AdventOfCode

01.12.2024 22:03 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0