I've completed "Proboscidea Volcanium" - Day 16 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/16
Solution in #nim #nimlang https://gist.github.com/zoldar/a2b7c3767ffd117548d66565a26b0c9a
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
I've completed "Proboscidea Volcanium" - Day 16 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/16
Solution in #nim #nimlang https://gist.github.com/zoldar/a2b7c3767ffd117548d66565a26b0c9a
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
I've completed "Beacon Exclusion Zone" - Day 15 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/15
Solution in #nim #nimlang: https://gist.github.com/zoldar/2ba99c61f019229809c9516b170873f4
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
I just completed "Regolith Reservoir" - Day 14 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/14
Solution in #nim #nimlang https://gist.github.com/zoldar/0c2e02d82f6dceb26adde1fe62a3c12e
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
I just completed "Hill Climbing Algorithm" - Day 12 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/12
Solution in #nim https://gist.github.com/zoldar/ca0f38274129824d11ea3aaf4377c67b
π πΆ
#adventofcode #adventofnim #nim
I just completed "Monkey in the Middle" - Day 11 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/11
Solution in #nim #nimlang https://gist.github.com/zoldar/43f5f2c6f0fb9c62857cc903f22ea4cf
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
I just completed "Cathode-Ray Tube" - Day 10 - Advent of Code 2022 #AdventOfCode #AdventOfNim #nimlang https://adventofcode.com/2022/day/10
Solution in #nim: https://gist.github.com/zoldar/6e3d94c02fce82decc198027736e382b
#adventofcode #adventofnim #nimlang #nim
I just completed "Rope Bridge" - Day 9 - Advent of Code 2022 #AdventOfCode #AdventOfNim #nimlang https://adventofcode.com/2022/day/9
Solution in #nim https://gist.github.com/zoldar/596d9617817d4c61642a32389f753cdc
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
I just completed "Treetop Tree House" - Day 8 - Advent of Code 2022 #AdventOfCode #AdventOfNim #nimlang https://adventofcode.com/2022/day/8
Solution in #nim https://gist.github.com/zoldar/b10d048d86d19844a6ff38c8de3c799d
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
I just completed "No Space Left On Device" - Day 7 - Advent of Code 2022 #AdventOfCode #AdventOfNim https://adventofcode.com/2022/day/7
In #nim https://gist.github.com/zoldar/e63096b30e761c22a71ca30de24bbaca
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
I made a visualization for #AdventOfCode2022 Day 4 Camp Cleanup with #nimlang #p5nim #p5js #nimib #adventofnim πππΈπ³ https://pietroppeter.github.io/adventofnim/2022/day04.html#viz
#AdventOfCode2022 #nimlang #p5nim #p5js #nimib #adventofnim