Aetherus
This topic is about Day 4 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
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
- #ai
- #elixirconf-us
- #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)
Aetherus
A straightforward solution for Part 2:
aaronnamba
I see some pattern matching in there, but you could do a lot more of it. Also,
Integer.parseis your friend on the height field.aaronnamba
Observations:
Excerpt:
Aetherus
Yea, pattern matching provides great help in validation. That’s one of the reasons why FP languages rock.
Damirados
As this is typical day to day work I just imported Ecto in my solution
Aetherus
True. This year’s quizzes are not so interesting.
Damirados
At least properly collecting passports via
Stream.transformwas fun learning experience. I’m using AoC to properly dig into that module.Aetherus
Seems like you are seeking fun in a quite boring quiz. I did so too, in Day 1. See my last post in Day 1’s thread.
adamu
Nothing much to add.
I missed a trick not overloading the validator function for each case, so that you can just validate the map with
Enum.all- that’s pretty nice.I forgot about the
=~operator, and I used to work with Perl!Aetherus
I’m not familiar with Perl, but I coded and am still coding a lot in Ruby. Is the
=~operator an Perl invention?