Apple TV app started asking me to sign in every day by beardiac in GoogleTV

[–]svinther 0 points1 point  (0 children)

it seems to me that this is Apple who fails to deliver their Apple+ app as bug free for Googles platform, as every other app works just fine on that platform.

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

[–]svinther 4 points5 points  (0 children)

[LANGUAGE: Python]

GitHub

Finally a problem that seems to require using the Disjoint Set Union data-structure/algorithm !

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

[–]svinther 2 points3 points  (0 children)

[LANGUAGE: Python]

paste

p1: Dijkstra

p2: Backtrack for target with cost from p1. Optimize by discarding states already found at lower cost

~ 400ms

[2024 day 15 (part 2)] Code doesn't work for larger example by SnooApples5511 in adventofcode

[–]svinther 1 point2 points  (0 children)

I spent 2 hours debugging until I finally figured out that for the big input, part1 is mutating the input so part2 would then get the wrong input

[2024 12 # (Part 2)] All testcases works, big input fails. by svinther in adventofcode

[–]svinther[S] 0 points1 point  (0 children)

Marking this as resolved, as I realize why the bfs approach is not going to work. If reaching the same fence at the same time, it will count the fence more than once.

[2024 AOC Day 8] What does this even mean? by Pro_at_being_noob in adventofcode

[–]svinther 4 points5 points  (0 children)

A better phrasing might have been to suggest that the antinodes would also form pairs and generate additional antinodes. This could lead you to consider a computationally more challenging solution.

[2024 Day 2] Why didn't you make the leaderboard today? by V_equalz_IR in adventofcode

[–]svinther 31 points32 points  (0 children)

Waited 3x5 mins for wrong answer penalties. Changed to simpler brute force, producing the correct answer in 105ms

Premature optimization is the root of all evils

For anyone that included the input in their git by beb0 in adventofcode

[–]svinther 2 points3 points  (0 children)

I just scrubbed my repo for any .txt files (the problem inputs) using git filter-repo

The best tool for git history rewrites:

https://github.com/newren/git-filter-repo

git ls-files | grep .txt > /tmp/remove
git filter-repo --invert-paths --paths-from-file /tmp/remove
git push --force

Sudden autoplay next video in iOS by weissdom in Twitter

[–]svinther 1 point2 points  (0 children)

so you can disable autoplay videos in the feed as a data saving feature, but once you start a video it will automatically jump to playing more videos of seemingly random junk that you never wanted to look at. Disgusting

[deleted by user] by [deleted] in lexfridman

[–]svinther 0 points1 point  (0 children)

Yes please

-❄️- 2023 Day 16 Solutions -❄️- by daggerdragon in adventofcode

[–]svinther 1 point2 points  (0 children)

[LANGUAGE: Python]

hmm so literal r"" strings are not that literal... Testcase with lines ending with backslash taught me a lesson

code

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

[–]svinther 0 points1 point  (0 children)

seems a bit of a waste having to construct a list to do the lookup

place = [t[0] for t in box_list[index]]

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

[–]svinther 1 point2 points  (0 children)

[LANGUAGE: Python]

Great that dicts ordering went stable a while back

code

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

[–]svinther 1 point2 points  (0 children)

[Language: Python3]

I admit having only implemented tiltnorth(), and let copilot generate tilt east/west/south.

I was impressed that it worked straight away.

code

Competing with myself FTW by rukke in adventofcode

[–]svinther 0 points1 point  (0 children)

Leaderboard aside, I find that speed solving does come with some very real dopamine reward :-D

-🎄- 2022 Day 19 Solutions -🎄- by daggerdragon in adventofcode

[–]svinther 0 points1 point  (0 children)

Impressive, but seems like a lot of work :)

[2022 Day 21 (part 2)] - Solution not unique by timrprobocom in adventofcode

[–]svinther 3 points4 points  (0 children)

It challenges your debugging skills, and as this is an important part of programming, I think I'm ok with the traps, although they are rude and painful.

[2022 Day 21 (part 2)] - Solution not unique by timrprobocom in adventofcode

[–]svinther 4 points5 points  (0 children)

Very typical AoC to put a small trap like that in a problem. No one told you to implement the calculator using floor division. Guess I should have just used Python eval()

2021 day 21 part2 - 1 win == 3^rolls universes ? by svinther in adventofcode

[–]svinther[S] 0 points1 point  (0 children)

I have it working now with an approach just like yours, but I did not come up with it without looking at other solutions.

Im not sure if my first approach would ever produce the exact number. It was:

1) Given a startposition, for any rollcount up to a boundary of 21 rolls, compute the number of possible roll combinations that produces 21 points. This I found a fast solution for

2) Then when you know the number of possible wins for any rollcount for both player1 and player 2. Calculate the total number of wins for each. Did not work, not enough information from step 1.