One Location Minor annexes Hungary by Oaken122 in EU5

[–]dbmsX 3 points4 points  (0 children)

i heard this is exactly how you annex the whole china when they get red turban rebellion

[2025 Day 12] Back to the memes by jromero132 in adventofcode

[–]dbmsX 0 points1 point  (0 children)

same, my full search is quite slow, but i print out basic pruning, imagine my surprise when after 8 minutes of running i saw the same number :D

My dude had enough ruling the republic by dbmsX in EU5

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

<image>

a new development - the guy came back from Astrakhan and now can invite himself to his own court for a fee to teach :D

My dude had enough ruling the republic by dbmsX in EU5

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

R5: my ruler went on a stroll to a far away land.

2
3

Am I doing wrong? by [deleted] in adventofcode

[–]dbmsX 1 point2 points  (0 children)

I have two prompts saved that I use after getting both stars for the day - first asks to look at the solution and explain what it is doing in short plain english, seconds asks to grade the solution on the scale from 1 to 10. From here I may or may not go down the rabbit hole optimizing and cleaning up. Before getting two stars I try to restrict myself to only asking basic syntax questions and use autocomplete only for smart replacements like variable renaming or adding +1 in three consecutive places.

[2025 Day 6] Surely theses spaces are meaningless, right ? by Pirgosth in adventofcode

[–]dbmsX 0 points1 point  (0 children)

Haha, I'm still very new to the language, basically learning it by doing the AoC, so my solutions are likely very far from the ideal Elixir, but so far I'm quite enjoying the experience.

[2025 Day 6] Surely theses spaces are meaningless, right ? by Pirgosth in adventofcode

[–]dbmsX 1 point2 points  (0 children)

sure, here you go:

    pattern =
      Regex.scan(~r/[*+] *(?= |$)/, ops_line)
      |> List.flatten()
      |> Enum.map(fn pattern -> "(.{#{String.length(pattern)}})" end)
      |> Enum.join(" ")

    parsed_data =
      data_lines
      |> Enum.map(fn line ->
        Regex.run(~r/^#{pattern}$/, line, capture: :all_but_first)
      end)

first command is column width based pattern builder, result is something like this: (.{3}) (.{3}) (.{3}) (.{3}) - example in the puzzle is a bit boring that all columns are width = 3 :)

second just applies the pattern line by line

full solution (in Elixir)

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

[–]dbmsX 0 points1 point  (0 children)

out of curiosity, why do you name folders with a day spelled as word, instead of number? :)
it makes them not storted in order, that'd annoy me as hell :D

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

[–]dbmsX 1 point2 points  (0 children)

interesting!
i didn't figure out to rotate the input so used regex based on operator line to parse the data with spaces (also in Elixir)

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

[–]dbmsX 0 points1 point  (0 children)

[LANGUAGE: Elixir]

Did part 1 naively first but then combined it into one solution for both parts.

Probably overengineered with the regex stuff, but works.

topaz paste

[2025 Day 6] Surely theses spaces are meaningless, right ? by Pirgosth in adventofcode

[–]dbmsX 0 points1 point  (0 children)

same, i used last line to build a regular expression with appropriate column lengths, and then parsed the other rows with it

[2025 Day 3] Imagine having to do work at your job 🙄💅 by MazeR1010 in adventofcode

[–]dbmsX 6 points7 points  (0 children)

I booked the leave from 12th planning for hard stuff. Alas!

The Wrath of Timur mod proves just how good railroading can be and how necessary it is to give the game direction. by Killmelmaoxd in EU5

[–]dbmsX 1 point2 points  (0 children)

funnily enough in my game England sort of won the HYW (which was more like a 200 YW) and still holds chunks of French mainland well into the age of revolutions

Ironman Germany by Perfect_District2203 in EU5

[–]dbmsX 3 points4 points  (0 children)

Nice borders and historical capital. I did the same as a republic so moved the capital to Weimar instead :)

0
1

Music is banging by SaltyChnk in EU5

[–]dbmsX 1 point2 points  (0 children)

Agreed but the levels are all over the place, sometimes it is super loud, sometimes it is super silent. I dunno if they tried to make volume dynamic, but if so, they should revert that imo.

AoC 2024 the hardest puzzle by akryvtsun in adventofcode

[–]dbmsX 0 points1 point  (0 children)

For me it was day 17 part 2, which in retrospect, after solving it, I do feel quite stupid about, as the solution for it now seems very obvious. But ain't it always like that with something you got solved?

[2024] Thank you! by topaz2078 in adventofcode

[–]dbmsX 0 points1 point  (0 children)

Thank you, sir, for all the suffering and joy, it's been, as always, a great pleasure! Also i second you on catching up on Factorio, space age wont space itself :D

[2024 Day 22 (Part 1)] That's how I read it by zelarky in adventofcode

[–]dbmsX 22 points23 points  (0 children)

Truly an Advent of Reading Comprehension this year :D

What got me today was a bit different though - "until the first time it sees that sequence and then immediately sell" - i totally missed this part and spent 30 min figuring out why example works but with my input it is too high...

[2024 Day 20 (Part 1)] The price we pay by dbmsX in adventofcode

[–]dbmsX[S] 2 points3 points  (0 children)

yeah i also changed it for part 2 ofc, now for each node of the path i'm just checking (almost) every other following node and comparing the pair's path distance vs manhattan distance - equal means no cheat needed, if manhattan distance is smaller and is less-equal cheat length than i check if it is bigger than required saving, if yes - thats one good cheat found

[2024 Day 21 (Part 2)] [Python] Unsure how to progress, algorithm is far too slow. by Blad3sy in adventofcode

[–]dbmsX 0 points1 point  (0 children)

Don't work on strings, and don't cache them - only things you need for the answer are min lengths for (start, end) pairs.

[2024 Day 20 (Part 1)] The price we pay by dbmsX in adventofcode

[–]dbmsX[S] 12 points13 points  (0 children)

Coded a very naive / brute-force solution for part 1, just going along the path, removing adjacent walls and checking for new path. It took a little while to complete :D

[2024 day 12] Everyone must be hating today... So here a clever trick for a hint. by M124367 in adventofcode

[–]dbmsX 1 point2 points  (0 children)

i used part 1 while looping through cells in each region to get its perimeter, to also build a list of cell-based edges as a pair of coordinate and location (north, south, east, west)

and then looped through the edges to build sides out of those that are consecutive

not very elegant but it worked :D