adrgrunt · @adrgrunt
27 followers · 28 posts · Server fosstodon.org

I've completed "Proboscidea Volcanium" - Day 16 - Advent of Code 2022 adventofcode.com/2022/day/16

Solution in gist.github.com/zoldar/a2b7c37

Struggled the whole weekend. Resorted to tons of hints. Started with naive ideas thinking there's some "simple trick", given it's supposed to run no longer than 15 seconds on 10yr old hardware. Had a version that worked on example and didn't finish on real data. Turned out I wasn't patient enough.

#adventofcode #adventofnim #nim #nimlang

Last updated 3 years ago

adrgrunt · @adrgrunt
31 followers · 48 posts · Server fosstodon.org

I've completed "Proboscidea Volcanium" - Day 16 - Advent of Code 2022 adventofcode.com/2022/day/16

Solution in gist.github.com/zoldar/a2b7c37

Struggled the whole weekend. Resorted to tons of hints. Started with naive ideas thinking there's some "simple trick", given it's supposed to run no longer than 15 seconds on 10yr old hardware. Had a version that worked on example and didn't finish on real data. Turned out I wasn't patient enough.

#adventofcode #adventofnim #nim #nimlang

Last updated 3 years ago

adrgrunt · @adrgrunt
24 followers · 27 posts · Server fosstodon.org

I've completed "Beacon Exclusion Zone" - Day 15 - Advent of Code 2022 adventofcode.com/2022/day/15

Solution in : gist.github.com/zoldar/2ba99c6

I'm not going to even comment on how much time I've spent figuring out "perimeter checking" after initial failed attempt with set based approach which was _crawling_. It's still brute-force but at least it executes reasonably fast.

#adventofcode #adventofnim #nim #nimlang

Last updated 3 years ago

adrgrunt · @adrgrunt
24 followers · 24 posts · Server fosstodon.org

I just completed "Regolith Reservoir" - Day 14 - Advent of Code 2022 adventofcode.com/2022/day/14

Solution in gist.github.com/zoldar/0c2e02d

Not exactly the most efficient code (changing cave state in place would probably help πŸ˜… - as it is, it takes ~3 seconds to compute for full input), but it works! I got a bit stuck when solving part 2 due to my dumb brain hardly coping with imperative logic. I've sorted it out though.

#adventofcode #adventofnim #nim #nimlang

Last updated 3 years ago

adrgrunt · @adrgrunt
23 followers · 22 posts · Server fosstodon.org

I just completed "Hill Climbing Algorithm" - Day 12 - Advent of Code 2022 adventofcode.com/2022/day/12

Solution in gist.github.com/zoldar/ca0f382

πŸ™ˆ 😢

#adventofcode #adventofnim #nim

Last updated 3 years ago

adrgrunt · @adrgrunt
23 followers · 21 posts · Server fosstodon.org

I just completed "Monkey in the Middle" - Day 11 - Advent of Code 2022 adventofcode.com/2022/day/11

Solution in gist.github.com/zoldar/43f5f2c

I think I'll wrap my AoC with this day, as it's taking too much of my time. For part 2, I've misunderstood the requirements and tried to make the solution work using bigints - the program was grinding CPU to no end. Only after I've glimpsed somebody mentioning figuring out modulo to solve it, I've finally finished it.

#adventofcode #adventofnim #nim #nimlang

Last updated 3 years ago

adrgrunt · @adrgrunt
23 followers · 17 posts · Server fosstodon.org
adrgrunt · @adrgrunt
23 followers · 16 posts · Server fosstodon.org

I just completed "Rope Bridge" - Day 9 - Advent of Code 2022 adventofcode.com/2022/day/9

Solution in gist.github.com/zoldar/596d961

Tripped up on a lot of suff several times over due to my stupidity, but this last sneaky corner case of latter knot following earlier one moving >1 spot on both axes was ... just ... mean. The tail position counts for part 1 and all examples were correct without considering it.

#adventofcode #adventofnim #nimlang #nim

Last updated 3 years ago

adrgrunt · @adrgrunt
23 followers · 16 posts · Server fosstodon.org

I just completed "Treetop Tree House" - Day 8 - Advent of Code 2022 adventofcode.com/2022/day/8

Solution in gist.github.com/zoldar/b10d048

I was _this_ close to throwing in the towel. I have played myself by trying to reuse the algorithm from the first part in the second one and bashing my dumb head against the wall trying to make it work. Finally I gave in and went with the "naive" approach.

#adventofcode #adventofnim #nimlang #nim

Last updated 3 years ago

adrgrunt · @adrgrunt
23 followers · 16 posts · Server fosstodon.org

I just completed "No Space Left On Device" - Day 7 - Advent of Code 2022 adventofcode.com/2022/day/7

In gist.github.com/zoldar/e63096b

I got totally lost when it came to passing by value vs by reference and arriving at this solution took, uh, some time. At this rate, I'm not sure I'll be able to carry on :blobcatnervous:

#adventofcode #adventofnim #nim

Last updated 3 years ago

Pietro Peterlongo · @pietroppeter
60 followers · 65 posts · Server fosstodon.org

I made a visualization for Day 4 Camp Cleanup with πŸŽ„πŸ‘‘πŸŒΈπŸ³ pietroppeter.github.io/advento

#AdventOfCode2022 #nimlang #p5nim #p5js #nimib #adventofnim

Last updated 3 years ago