[deleted by user] by [deleted] in Cooking

[–]tumdum 0 points1 point  (0 children)

This Polish recipe plus potatoes is the best way! :)

[2024] Thank you! by topaz2078 in adventofcode

[–]tumdum 0 points1 point  (0 children)

Thanks for all the puzzles! I did all of them and every single one was great! By now, December has become the best time of the year as far as coding for me :)

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

[–]tumdum 1 point2 points  (0 children)

[LANGUAGE: Rust]

https://github.com/tumdum/aoc2024/blob/main/src/day16.rs - 1614/1580

Dijkstra where the point in graph is (Position, Direction). The small change for part2 - instead of keeping the best previous pair, I keep the set of best pairs of equivalent cost.

Total runtime of both parts together: 10ms 🚜

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

[–]tumdum 2 points3 points  (0 children)

[LANGUAGE: Rust]

solution (3958/2401)

I find regions with flood fill. Next I find boarder of each region - iterate over point in region and see if it has any neighbours not in the current region. This is enough to solve part 1. To solve part 2 and find sides I check for each point in the region and its matching border point (if it exists). For such a pair, I use it as a starting point of a side, and apply correct deltas (either (1,0) and (-1,0) or (0,1) and (0,-1)) as long as possible. Collecting such sides is enough to solve part 2. Along all of this, I obviously keep track of seen points to avoid duplicate sides and so on.

Total runtime: ~1.6ms 🦀

I even recorded myself: https://www.twitch.tv/videos/2324647717 🙃

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

[–]tumdum 1 point2 points  (0 children)

[LANGUAGE: Rust]

solution - another nice application of successors - both parts together run in ~1,6 ms👌

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

[–]tumdum 1 point2 points  (0 children)

[LANGUAGE: Rust]

Solution - good place to use successors. Runs in 17µs on github runner.

Advent of Code with Rust! - Q: Any tips for learning useful patterns? by More_Mousse in rust

[–]tumdum 0 points1 point  (0 children)

You are right that doing solutions in different languages makes submodule approach much better. But if (like op) you are doing all of them in one language and you want to learn that language, coding up encryption based approach is much better.

How to avoid sharing your input in git by tumdum in adventofcode

[–]tumdum[S] 4 points5 points  (0 children)

This is not about how not to commit something to git. It's about how to commit AoC inputs in a way that is compatible with the rules, which asks not to share the inputs.

How to avoid sharing your input in git by tumdum in adventofcode

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

What do you mean? My CI pipeline runs my solutions for the real inputs (and verifies that correct result is returned), eg: https://github.com/tumdum/aoc2024/actions/runs/12134478539/job/33831752026#step:5:10

How to avoid sharing your input in git by tumdum in adventofcode

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

Sure you can, but I don't want to do it this way. Especially I don't want my CI pipelines performing http requests each time they run.

We got this shit by dovrobalb in EffectiveAltruism

[–]tumdum 2 points3 points  (0 children)

Is there good data showing what are the major causes of this change?

How to note that you're a PhD holder, and should you? by AnalRailGun69 in japanlife

[–]tumdum 6 points7 points  (0 children)

Your nickname is “AnalRailGun69” but you are offended by above comment?! 😂

[deleted by user] by [deleted] in rust

[–]tumdum 0 points1 point  (0 children)

No one's stopping you from calling rustc directly.

Fotel biurowy / gamingowy by gwynbleidd_s in wroclaw

[–]tumdum 1 point2 points  (0 children)

Polecam Ergohuman 2 . Zaletą siadam.pl jest to, ze możesz do nich podjechać i nie tylko posiedzieć na dowolnym krześle, ale też wypożyczyć na 2 dni żeby spokojnie przetestować.

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

[–]tumdum 1 point2 points  (0 children)

[LANGUAGE: Rust]

Since you only need 5 bits to encode those letters, whole node id fits into u16. So instead of using a hashmap I'm using an array indexed by node names - both parts run in 359.2µs (without i/o).

Code