advent
individual solutions at AoC (by martino-vic)
aoc2021
Advent of Code 2021 - my answers (by ephemient)
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
advent
Posts with mentions or reviews of advent.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-24.
-
-🎄- 2021 Day 25 Solutions -🎄-
Day 25 Solution
-
[2021 Day 20 (Part 1)][Python] Is there a flaw in my logic?
I can't find an answer to what causes my script to give the right answer to the example but not to the real input. The workflow looks like this: 1. the padding-character is "." 2. expand the input-matrix by 1 padding-character in each direction 3. for each pixel of the expanded image query the surrounding 8 pixels. If out of bounds add the pudding character instead. 4. flip the pudding from "." to "#" or from '#' to '.' if necessary. 5. Go back to step 2 and repeat the process with the new image
-
[2021 Day 18 (Part 1)][Python 3] bug in final example
With the help of reddit users and endless patience I got this far: https://github.com/martino-vic/Advent/blob/master/day18/day18_3.ipynb It passes all the tests, *except* for the final example homework assignment, which I have saved in file "i3". I'd actually not only be curious what the bug here might be, but maybe in this case it would be more useful to learn how to debug these kind of cases efficiently. What worked until now was a print() and input() statement in the while loop so I could track step by step what is happening. But with this many additions and reductions it's simply impossible to catch a bug that way. So I'm thinking about what strategies could exist to identify a bug in a scenario like this, especially if all the previous tests (including the "slightly larger example") are passing. Any help - as always - much appreciated!
-
[2021 Day 18 (Part 1)][Python 3] infinite loop at "[[[0,[4,5]],[0,0]],[[[4,5],[2,6]],[9,5]]] [7,[[[3,7],[4,3]] + [[6,3],[8,8]]]]"
I spent the entire day with this but didn't manage to get a silver star: https://github.com/martino-vic/Advent/blob/master/day18/day18_2.ipynb I intensly hope someone can help me out... I cleaned up the code so it's easier to see what's going on. It works well until the " Here's a slightly larger example: "-part. I have the feeling it must be some trivial mistake but I can't figure it out and with my current tiredness level I've lost hope that I will. At one point the code enters an infinite loop and I can't figure out how to snap out of it. I've put an input() statement in one line, so that the while loop doesn't run away and one can track round by round what is happening. Maybe someone had some similar issue as me and can quickly point out the issue? Any hints and any help much appreciated!
-
[2021 Day 15 (Part 1)][Python] correct for easy example wrong for real input
Didn't manage to get a silver star, similar situation as yesterday: I get the correct output for the easier input-example and for the real input the answer is wrong and it's a complete mystery to me why. Tinkered around for 2.5h before I gave up: https://github.com/martino-vic/Advent/tree/master/day15
-
poly 40 iterations
[2021 14 #part2] Python 3: https://github.com/martino-vic/Advent/tree/master/day14
-
-🎄- 2021 Day 10 Solutions -🎄-
Python 3 part1: https://github.com/martino-vic/Advent/tree/master/day14 got a silver star quite quickly by using nltk's ngrams. Part 2 tripped me up, works only for the easy input but for the proper one it gives me the wrong output, no idea why :/
aoc2021
Posts with mentions or reviews of aoc2021.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-02-04.
-
All years, all days, everything in Haskell
I've done every year in Haskell (2015 2016 2017 2018 2019 2020 2021), and so have several other people such as /u/glguy. I don't see if /u/mstksg has anything published for 2015 but they've done 2016 2017 2018 2019 2020 2021 along with some pretty good writeups, I recommend checking those out.
-
Jetbrains looks like it's about to release Compose ui for ios, and web!
I ran my own benchmarks for a whole ton of code at https://github.com/ephemient/aoc2021 on both Linux x64 and macos x64, and ended up disabling Kotlin/Native because it was varying between 10x and 100x slower than Kotlin/JVM, eventually timing out on CI. The generated code may be reasonable thanks to LLVM, but the runtime certainly is not.
-
-🎄- 2021 Day 25 Solutions -🎄-
Took a while for me to get around to completing this in Kotlin, Python, and Rust as well, since I was working on optimizing other solutions, but I finally made it.
-
-🎄- 2021 Day 24 Solutions -🎄-
So I switched tacks and implemented this in Kotlin, where mutation is easier. First version was brute-force with duplicate state avoidance (checked before the state explosion at every input), which worked quickly enough for part 1, but ran into OOMs for part 2. Once I replaced the HashSet with a custom LruSet (and later a simpler CacheSet which simply overwrites on hash collisions) it ran part 2 in a few minutes. I then ported this into Haskell.
-
-🎄- 2021 Day 23 Solutions -🎄-
Haskell 1171/339
-
-🎄- 2021 Day 22 Solutions -🎄-
Kotlin, Python, and Rust solutions are the same solution but much uglier.
-
-🎄- 2021 Day 21 Solutions -🎄-
I'm doing the same cached recursion in Kotlin, Python, and Rust.
-
-🎄- 2021 Day 20 Solutions -🎄-
Haskell 621/603
-
-🎄- 2021 Day 19 Solutions -🎄-
Haskell 258/240
-
-🎄- 2021 Day 18 Solutions -🎄-
Haskell Kotlin 622/1185