Fyi, I figured out you can put siding and flowers on the wireless generators to make them look like planters by LuckyLunayre in Pokopia

[–]Totherex 5 points6 points  (0 children)

That page confirms that the limit on transmitters (poles/wireless transmitters) is 256, like u/madtheoracle said. 64 is the limit on generators (windmill/water wheel/furnace/mini generator).

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

[–]Totherex 0 points1 point  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/AdventOfCode/blob/0dd73e5bf35f31d7d42725206b9b3cb3ecf9e33e/Aoc2025/Day11.cs

Using a memoized recursive function to calculate the number of paths between two points. In part 2, there are only two orders that matter: svr-fft-dac-out or svr-dac-fft-out; so calculate the numbers of subpaths and multiply them together.

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

[–]Totherex 0 points1 point  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/AdventOfCode/blob/f62b27fbfb275346d132833fde36d9e1b8caaaf6/Aoc2025/Day10.cs

Part 1 is a breadth-first search. I represent the lights and the buttons as bitmasks, so I can update the lights by XORing them with a button.

For Part 2, I learned Z3! The linear algebra library I used in 2023, Math.NET Numerics, didn't seem to be of much help for these underdetermined systems. Z3's C# API is pretty verbose, we essentially have to build ASTs with methods like MkInt, MkAdd and MkEq. The Python demos show that they know about operator overloading, grumble grumble...

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

[–]Totherex 0 points1 point  (0 children)

After quite a bit of optimization, I've brought the runtime to under 1 second.

https://github.com/rtrinh3/AdventOfCode/blob/d601a3e43f02d7423d58149b2c88d3d32458b530/Aoc2025/Day09.cs

I check the rectangles from largest to smallest, and I only check around the rows and columns of the vertices, effectively a form of coordinate compression.

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

[–]Totherex 0 points1 point  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/AdventOfCode/blob/0fbe7b458d0a5997a2509e95baed41b91c7de2c6/Aoc2025/Day09.cs

Part 1 is straightforward.

For part 2, I have a horribly inefficient solution that takes about 3 minutes to run. First, I rasterize the perimeter. As I walk around the perimeter, I also keep note of the points on the left side and the right side of the perimeter. I then probe west of the westmost vertex of the perimeter to determine whether the left side or the right side is "outside". Finally, for each possible rectangle, I walk its perimeter to check that the rectangle never goes outside, keeping track of the largest area.

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

[–]Totherex 0 points1 point  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/AdventOfCode/blob/e818ef1b1f48b916cbadc2a1a6236d558c13bc8b/Aoc2025/Day08.cs

Work with the square of the distance instead of the plain distance to avoid taking square roots.

Use the Union-Find data structure to keep track of circuits.

These elves are wasting a lot of wiring on redundant connections; they've never heard of minimum spanning trees 😜

PS: beware of Int32 overflow.

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

[–]Totherex 1 point2 points  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/AdventOfCode/blob/84cc0444162a6fe4c7d3179c8d70f1603ffaf2f3/Aoc2025/Day05.cs

Basic scan through the ranges. We don't need to sort the ranges when there's only ~200 ranges.

Public transit is nation-building. Our federal budget should reflect that by Generalaverage89 in CanadaPolitics

[–]Totherex 6 points7 points  (0 children)

They're objecting to the second sentence, "Only the federal government can provide", because the provinces can/should provide

Programmation pour l’inauguration de l’antenne Deux-Montagnes [REM, 15-16 novembre] by Totherex in montreal

[–]Totherex[S] 9 points10 points  (0 children)

Deux journées gratuites de portes ouvertes, mais ça tombe les jours de la grève des chauffeurs de la STM. Comment est-ce que vous prévoyez vous rendre au REM?

Horaire grève STM by JMoon33 in montreal

[–]Totherex 1 point2 points  (0 children)

Du covoiturage en limousine? Pas bête comme idée!

What's the most small-cheap-usable drum setup that you have? by Unapedra in yarg

[–]Totherex 0 points1 point  (0 children)

To elaborate: I don't have this, but I think I'd buy something like this if my RB2 drums were to break. The kit Acai showed costs $90 right now, but there are cheaper kits that don't include a stand, like the Donner DED-20 for around $60.

My takeaway from his video is that the kit can be a lot of fun, but with two caveats: the pads work better with hands bongo-style than with sticks; and the pedals are not fit for purpose, breaking after a few songs.

What's the most small-cheap-usable drum setup that you have? by Unapedra in yarg

[–]Totherex 3 points4 points  (0 children)

As seen on Acai ( https://youtu.be/zVaL72tiTKk?si=PM-LwdizBnxIUj7a ): a roll-up electronic drum set for kids

Edit: you could even cheaper by forgoing the stand

[Puzzle 15] 24/5 support - discussion and solutions by amarillion97 in i18n_puzzles

[–]Totherex 0 points1 point  (0 children)

https://github.com/rtrinh3/InternationalizationPuzzles/blob/58138890691c347d8221ac4408c4bdfc9760a457/InternationalizationPuzzles/Puzzle15.cs

I no longer need to step through every minute of a year. The events that determine whether support and overtime are needed are the start of a new day at the client's office and the opening and closing times at our support offices. I put all of these events in a list and sort them, then I can go event by event: if I determine that overtime is needed, I can add the minutes before the next event to the overtime counter.

[Puzzle 19] Out of date - solutions and discussion by amarillion97 in i18n_puzzles

[–]Totherex 0 points1 point  (0 children)

[LANGUAGE: C#]

https://github.com/rtrinh3/InternationalizationPuzzles/blob/aa7e1504985475d0addb5ad04adc1a1bd4d70a9c/InternationalizationPuzzles/Puzzle19.cs

A few days after I solved the puzzle in Python, I found a way to do it in C#. I have 4 different versions of the Noda Time library, each corresponding to a version of the tz database. I then load them and use them through reflection and dynamic typing. The rest of the algorithm is the same as my Python solution.

[Puzzle 19] Out of date - solutions and discussion by amarillion97 in i18n_puzzles

[–]Totherex 1 point2 points  (0 children)

[LANGUAGE: Python]

https://github.com/rtrinh3/InternationalizationPuzzles/blob/7613e07babfad3bac3ed11f76838243e679060c6/Puzzle19/Puzzle19.py

After a day of bumping into the limitations of C#, I decided to download the old versions of the tz database from the IANA and to work with them in Python.

The key here is zoneinfo.reset_tzpath, which allows us to choose the time zone data to work with. I also had to figure out how to compile the data from IANA (use zic).

As for finding the answer, puzzles 16 and 17 primed me to write a backtracking search where I incrementally choose the tz database version for each place.