bjorng
Erlang Core Team
My code for today’s puzzle:
https://github.com/bjorng/advent-of-code-2023/blob/main/day11/lib/day11.ex
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)
rugyoga
Just a simple tweak of the Manhattan distance…
lud
To expand I sort the empty Y coords descending, and for each one I bump each XY in the galaxy list. Same for X.
I have an idea to do it all at once but I’m not chasing milliseconds today
https://github.com/lud/adventofcode/blob/main/lib/solutions/2023/day11.ex
igorb
Solution using dynamic programming (prefix sums): advent-of-code-2023/lib/advent_of_code/day_11.ex at main · ibarakaiev/advent-of-code-2023 · GitHub. There are some possible optimizations like recording coordinates at the same time as the vertical prefix sum, but it would take away from readability
midouest
This one seemed like a great opportunity to learn a bit of Nx. I took the naive approach for part 1 and duplicated all of the rows and columns. Obviously that didn’t work out in part 2
Part 1
Part 2
Aetherus
The scale of today’s puzzle is too small. I don’t even bother to optimize my solution.
https://github.com/Aetherus/advent-of-code/blob/master/2023/day-11.livemd
code-shoily
It was easy this one. I was mostly busy adding tags and difficulty markdown page generator for Advent of Code repository, so was too busy checking it out. But here’s my code (pretty similar to lot of y’all)
https://github.com/code-shoily/advent_of_code/blob/master/lib/2023/day_11.ex
trnasistor
My beginner’s solution, Day 11 part 1. Cosmic Expansion
mkasztelnik
I started with matrix transpose but improved with finding gaps between galaxies:
woojiahao
Added quite a few new helper functions to speed up writing AOC solutions, notably:
load_day_as_gridto automatically parse input as a map of coordinates to pointsdistinct_pairsto generate all distinct pairs of elements within a listlist_set_differenceto calculate the set difference between 2 lists (reducing the need forMapSet.newcalls)https://github.com/woojiahao/aoc/blob/main/lib/aoc/2023/day_11.ex
stevensonmt
Very similar to everyone else’s approach today. No gratuitous use of
:digraphthis time. Agree with @Aetherus that scale of the dataset made it easier than expected. My solution has lots of room for optimization but works fast enough for the given dataset.Like a lot of people for part 1 I just did the naive thing and literally expanded the grid. I knew it was not the ideal approach but did it anyway because I like to see what the point of part 2 is sometimes.