sasajuric

sasajuric

Author of Elixir In Action

Note: This topic is to talk about Day 13 of the Advent of Code.

For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.

Showing Posts 1 to 8

sasajuric

sasajuric OP

Author of Elixir In Action

I found today’s task somewhat tedious. I lost some time because I didn’t cover the case where the cars crash in the middle of the tick, so I got wrong results. Anyway, my solution is here.

simon

simon

I need to do some serious refactoring and tidying up and I’ve only completed part 1 so far but my solution is here.

Part 2 should be pretty simple to solve but my guess about it involving tracking the number of ticks was wrong so I can also tidy my code up because of that a bit too.

My biggest gotcha was in that I copied and pasted my file reading code from a previous day and was trimming it so my grid was all out of alignment. :tired_face:

I’ll add the part two solution tomorrow morning.

JEG2

JEG2

Author of Designing Elixir Systems with OTP

My solution to Day 13:

https://github.com/JEG2/advent_of_code_2018/blob/master/day_13/mine_cart_madness.exs

You can watch me create it in this video (for the next 14 days):

bjorng

bjorng

Erlang Core Team

My solution to Day 13. I struggled with collision detection for a long time. Here is the cleaned up version of my code.

sfusato

sfusato

I struggled with this one. It was also a pain in the ass to debug what was wrong with the state I was building at each tick. I wish they gave more test cases to cover rather than the default one as that one was passing.

My solution is here.

snewcomer

snewcomer

Phoenix Core Team
simon

simon

It wasn’t and I ended up also retro-fitting the part 2 solution to handle part 1 too. However the updated code can all be found here.

— All posts loaded —

Where Next? Top

Trending in Challenges Top

Other Trending Topics Top

GenericJam
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
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews