bjorng
Erlang Core Team
This topic is about Day 5 of the Advent of Code 2021.
We have a private leaderboard (shared with users of Erlang Forums ):
https://adventofcode.com/2021/leaderboard/private/view/370884
The entry code is:
370884-a6a71927
Trending in Challenges
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
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
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
bjorng
Here is my solution:
https://github.com/bjorng/advent-of-code-2021/blob/6ca39045ed4cef5c81d45a76f1590d0098e6b5c4/day05/lib/day05.ex
princemaple
https://github.com/princemaple/aoc/blob/main/2021/day5.exs
stevensonmt
This one was nicer to me. I like my approach for handling the lines, but I don’t like my approach to parsing the input. There has to be a pattern matching on binaries but it’s beyond me.
https://github.com/stevensonmt/advent_of_code/blob/ace53043d4d95ffdb60f0d47c396f87a6f5562a2/2021/day5/lib/day5.ex
APB9785
Part 2 simply removes the
Enum.filterFull solution here
epilgrim
My solution
Today was significatively simpler than yesterday, but I had to remember my vector algebra
To calculate the intermediate points, I used:
epilgrim
maybe you will like my way of parsing the input?
We can split the file in all the special content we have, and then just take numbers 4 at a time. No need to nest anything
code-shoily
This one was fun. Beautiful use of pipe and pattern:
weego
Feels regex is justified here, maybe?
Malian
Here is my solution for part 1. For part two, removing the filter does the job.
I also draw the board in order to debug, but I am not able to properly draw it neither in console neither in Live Book due to
\nthat are not “expended”.Someone knows how I can show it like this?
ruslandoga
IO.putswould work, I think: