this post was submitted on 14 Dec 2023
22 points (100.0% liked)

Advent Of Code

761 readers
1 users here now

An unofficial home for the advent of code community on programming.dev!

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

AoC 2023

Solution Threads

M T W T F S S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25

Rules/Guidelines

Relevant Communities

Relevant Links

Credits

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

console.log('Hello World')

founded 1 year ago
MODERATORS
 

Thought I'd share mine because most of the visualisations out there show the rocks sliding one cell at a time, all together. That looks nice but for my solution that's not how it works - I walk every row/col with two cursors.

Code here: https://github.com/sjmulder/aoc/blob/master/2023/c/day14.c

The visualisation is emitted right from the solution using a small library which dumps frames to ffmpeg.

top 1 comments
sorted by: hot top controversial new old
[–] hades@lemm.ee 2 points 10 months ago

Very nice! I was wondering what the movements of the blocks looked like.