
Scout Monitoring
Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

AdventOfCode
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA

InfluxDB
Power RealTime Data Analytics at Scale. Get realtime insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in realtime with unbounded cardinality.

adventofcode2021
Discontinued Code I used for solving https://adventofcode.com/2021 (by pavel1269)

adventofcodego
All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022


SaaSHub
SaaSHub  Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
wow , just finished mine, not feeling so well about it, it tripled in size not being able to do comprehension in rust and having to explicitly specify every data tpye :/ https://github.com/Fadi88/AoC/blob/master/2021/day19/main.rs this gets around 1.4 second in release mode on the same machine
Clojure (500ms for both parts combined)
Python, 6/3. Part 1, Part 2. The main "tricks" I used were:
85/71. Python. Video of me solving. Takes 10s to do both parts in pypy3.
JS 332/273
Python 427/397
(physicist here) see lines 512 of my solution, where I use some numpy and nested forloops to generate all 3x3 permutation matrices with signs flipped and determinant +1. There turns out to be exactly 24 of these, and they are the right ones.
Phew, almost 2 hours of intense coding. This was an incredibly difficult day. Got flashbacks to day 20 of last year.
Perl (709/665)
I've made efficient bruteforce solution with a lot of numpy magic. It solves both parts of today task in 3s on my i5 laptop. And it has 56 lines of code :)
C++ 981/926
Ada 1676/1570.
Original solution
C#: GitHub Commit
Uses some collection helper functions and a tiny matrix math library.
C++ Solution
Part 1: https://github.com/tjol/adventofcode2021/blob/main/19/src/puzzle1.rs
The end.
For a while I didnt think I was going to make it :) But here I am :) github.
Java
Haskell runs in 2 seconds
Brute force in SML (github). Also tried to visualize it with Paraview  no easter eggs there :(
Python with numpy and scipy for linear algebra
C#
I got there, but math! It took a few hours, more along the lines of a weekend project than a quick puzzle! The hardest part is working with the 24 orientations I think. I needed to dust off a little bit of linear algebra and used matrices. There are 6 permutations of the 3 coordinates, and 8 flips (+ on each axis). Composing those gives 48 transformations but half of them are the wrong chirality (mirror image) so we want only the half with determinant equal one. After that it's just a bunch of picky loops and debugging. https://github.com/WilliamLP/AdventOfCode/blob/master/2021/day19.py
Scanner Class
Kotlin
Rust GitHub. Kinda ugly brute force solution which runs in ~10 sec.
Rust
Rust
Kotlin
Clojure (GitHub). Takes 5 minutes... laughably slow. Not sure how else to speed up the overlapfinding part, since the coordinates in any two lists do not necessarily refer to the same beacons.
Elixir (github). About 4s on my laptop.
I too use my own hash function,because the builtin hasher is too slow: https://github.com/SvetlinZarev/adventofcode/blob/main/2021/aocshared/src/hashing.rs
Part1 and part2 in Javascript. Beware, code is ugly, didnt have time to clean it up and it also runs in like 3 minutes... :(
GitHub Repo
Python
Elixir [Main Library]
Rust !!!! Execution time 4 ms !!!!
github
my solution in Rust
Rust (~1.2ms execution time) https://github.com/Mesoptier/adventofcode2021/blob/master/src/days/day19.rs
TypeScript, Tough day, but at the end got a solution which is running under 350 ms combined (both parts and inputs).
Code: https://github.com/Eckankar/AdventOfCode/tree/master/2021/19
Rotations lookup table
Python 3
Python in ~50 lines. Neither particularly elegant nor superefficient, but completes in a few secs and only required limited interactions with the hell of linear algebraic rotation matricesâ€¦
To find the match, I created a Jupyter Notebook to visualize the points with the simple example. After staring 30 minutes into 3d charts, I finally figured out that whenever I find a rotation that matches, then there must be a vector v, which occures a lot of times when comparing each p1 from scanner 1 with each point p2 from scanner 2, because we only have to shift it by this vector to align with the scanner 0 (see jupyter notebook first plot).
Solution on GitHub.
I worked on this for 4.5 hours last night and finally went to bed way too late without finishing. Knew exactly what I needed to do right after I got in bed. After other family stuff and doing a solo cross country flight all afternoon I finally got back around to finishing it. It took another 30 minutes, so 5 hours total. I'm seeing a lot of relatively slow times, but mine finishes in 120ms in release mode and 1.9s in debug mode. [rust code](https://github.com/tylerhawkes/adventofcode2021/blob/main/src/day19.rs)
Haskell 258/240
Python. Brute force with a tiny bit of pruning, takes about 3 minutes. I've been thinking of switching from CL for days and having the chance to use matrix multiplications finally gave me a great reason to :)
u/soaring_turtle Look at the top of my refactored solution, I did the approach I described there. (The cross product is implicitly done in Mat3D in my new lib.graphics library.)
By all means! I think I just have a lot of extra data allocation that isn't quite as necessary in python because of going between different data types. https://github.com/GlenboLake/aoc2021/blob/master/src/day19.rs
Please check out my simple solution in Ruby ;) https://github.com/0x8b/advent.of.code.each/blob/main/src/2021/19.rb
GitHub [Solution w/ comments] Runtime for both parts: 240ms
This solution solves the puzzle and is being well structured and readable. However, I gave up on my goal to make it fast  I had spend enough time on this that I just wanted to spend time on different things than code (heresy  I know). My only solution slower than a second this year so far (it's uh 35 sec on my MB pro)!
Better late than never! This was a beast, runs in under a second without any imports (other than os) â€“ was able to complete with a lot of help trolling this thread, put a highly annotated version on GitHub if it would be useful to anyone.
Code
I coded it in rust, with the very good lib nalgebra for the vector, point, matrix and SVD computation and petgraph for the graph, and I'm very happy with my math heavy, computer vision and no brute force solution.
Rust, 150ms