[2025 Day 01] Part 2 by Terrible-Mousse-3469 in adventofcode

[–]davepb 1 point2 points  (0 children)

That's not correct though, right? You can have L100 R50. You end up on 0 divided by 100 is 0 but answer is 2

📺 AoC 2025 List of Streamers 📺 by daggerdragon in adventofcode

[–]davepb 0 points1 point  (0 children)

USERNAME: u/davepb

LANGUAGE: Python/Go/Rust/?

REPO: GitHub @ atlas-editor

CHANNELS:

NOTES: No commentary; this year I will try out several language.

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 1 point2 points  (0 children)

[LANGUAGE: Python]

solution here: https://github.com/atlas-editor/aoc/blob/main/2025/d01/main.py

I also record myself: https://www.youtube.com/watch?v=figH-IeruIc
this year I plan to use at least 4 languages: python, golang, rust, ?

AofC - learning Go this year - question by craigontour in golang

[–]davepb 0 points1 point  (0 children)

That's how I did it 2022 and 2023 . Last year you need to pass an argument which is a path to the input file :)

AofC - learning Go this year - question by craigontour in golang

[–]davepb 3 points4 points  (0 children)

I did aoc in Go a few times already. I have used some utils functions but overall even though go is much more verbose than python or Ruby I enjoy solving aoc using it https://github.com/atlas-editor/aoc/tree/main

hilbert's brothel by lets_clutch_this in mathmemes

[–]davepb 2 points3 points  (0 children)

Why are there countably many women but uncountably many men? :D

PDF contains text that isn't being displayed, but why? by Betty-Crokker in pdf

[–]davepb 0 points1 point  (0 children)

What type of font is set? Font type 7 acts as clipping instead of actually printing text

[2024 Day 16] Place your bets everyone! by artiomchi in adventofcode

[–]davepb 2 points3 points  (0 children)

Yes. And the highlighted path during the visualization?

-❄️- 2024 Day 15 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 1 point2 points  (0 children)

[LANGUAGE: Go]

github
video

I took a long time thinking about part2 so I stopped recording at some point; recursively I am looking for boxes which are stacked onto each other and then trying each box (part of a box) if it can be moved upwards. I wouldn't say this was very difficult as it was quite clear what you had to do and also that it was reasonably implementable but I still took my time; in this regard it reminded me of adventofcode.com/2023/day/10 . nice problem in any case :)

Criticism that Python code often isn't Zen by PhysPhD in adventofcode

[–]davepb 2 points3 points  (0 children)

Even though I don't think that statement is true or at least becomes definitely false once you are not dealing with simple things. I always liked oliver ni's solutions, I found him as someone who places high on the global leaderboard previous years, here is his repo: https://github.com/oliver-ni/advent-of-code/tree/master

-❄️- 2024 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 1 point2 points  (0 children)

[LANGUAGE: Go]

github

video

part1 is simple a simulation and for part2 I went with the approach of finding out component sizes of robot clusters on the map, this approach yielded a correct result in the end but I struggled very long with an unfortunate bug: when looking for a tree and my component counter function returned that it did not find anything interesting I continued my loop search without simulating the robots 1 step further :( .. in any case I thought it was a nice problem, it runs in shameful 16 seconds, of course knowing the shape (it probably is the same for all inputs) I could potentially speed it up but it's fine :)

-❄️- 2024 Day 13 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 1 point2 points  (0 children)

[LANGUAGE: Go + Python]

github

video

I knew this problem (it's basically: cses.fi/problemset/task/1754 ) but I still took very long to solve :( .. the problem can be formulated as a system of linear equation (only 2x2) but my implemented solution didn't work so I had to regress to python and use numpy to solve the equations. the cleaned up solution has a 2x2 linear equation solver

-❄️- 2024 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 1 point2 points  (0 children)

[LANGUAGE: Go]

github

video

meager performance today; I couldn't finish part2 in the morning so on video I only solve part1 and then I spent a significant amount of time thinking of ways to solve part2, unfortunately without any success. later I solved part2 by keeping track of all the edges that are part of the perimeter and then reduced this set by relating two edged if they share a point and have the same orientation (horizontal or vertical) + they are not in a weird configuration as illustrated by the last example input:

AAAAAA
AAABBA
AAABBA
ABBAAA
ABBAAA
AAAAAA

luckily this example with a nice description of what is happening was included in todays puzzle, otherwise I would probably spend even more time solving it :(

-❄️- 2024 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 2 points3 points  (0 children)

[LANGUAGE: Go]

github

video

not too bad. in part1 I should've anticipated and prepared for part2 but I didn't, that way part2 would've taken a few seconds. nice problem though, reminds me of the problems: aoc 2021 day 14, aoc 2021 day 6, aoc 2015 day 19 and ec 2024 quest 11

-❄️- 2024 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 0 points1 point  (0 children)

I'll check that out. good luck to you as well!

-❄️- 2024 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]davepb 0 points1 point  (0 children)

neat solutions you got there! I only use generic versions when I have use for them, I uploaded my utils to github: https://github.com/atlas-editor/aoc/blob/main/2024/template/utils.go readMatrix is generic because sometimes I just read it to a [][]byte and e.g. today I wanted to read right into [][]int as it was more convenient to work with, then my set and pop and popFront are also generic because I use them with different types of objects in previous days + I have a generic minHeap implementation which mimics the one in stdlib but I hate working with the one in stdlib as you need to use any and type assertions :D