lud
This topic is about Day 21 of the Advent of Code 2020 .
Thanks to @egze, we have a private leaderboard:
https://adventofcode.com/2020/leaderboard/private/view/39276
The join code is:
39276-eeb74f9a
Trending in Challenges
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
lud
Today was quick and easy, thanks to
MapSetPapey
Yep, mine is a bit verbose maybe but it works so
https://github.com/papey/aoc/commit/a730fc00747f565bb7d622a5c54f1cc11b7a5701
blue_quartz
After the slaughter that is day 20 (which I did solve, but with a sprawling 163 sloc solution
), this was a good detox, and I got to even reuse day 16’s logic a bit too…
I ‘accidentally’ created the relevant map for day 2 while solving for day 1, and the day 16 reuse is for the part where we have a map of values with increasing lengths, so we just need to sort by that and start picking out the correct value for the key.
code-shoily
This would have been easy, got the algorithm right faster than other days. But, I made a small mistake, I used
Map.newon a list of{allergen, items}where I should not have, there were duplicateallergenand theMapconversion kept on showing me a few ingredients less. I did the error in processing the input, not in the actual algorithmscamilleryr
What a difference a day makes - also went with
MapSet- think there are probably ways to optimize parts of this, but after yesterday Im happy to have something that came together nice and quick. Even got the rare feeling of pretty much having solved part 2 because of the way I implemented part 1.I did find it novel to get to use
~wfor parsing the list ingredient list in my parser - don’t think I would ever really use it, but it was kind of funhttps://github.com/camilleryr/advent20/blob/main/lib/day_21.ex
bjorng
Here is my solution.
felix-alonso
Oh, man, that was refreshingly easy. Days 19 and 20 definitely took a toll so this was sanity restoring.
Hallski
Ended up doing this one as well, so much for taking a break
My solution