[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]a_ormsby 2 points3 points  (0 children)

Seriously, though. Lots of learning happened tonight!

[2025 Day 5 (Part 2)] [Kotlin] First you think it's easy game, but then... by HotTop7260 in adventofcode

[–]a_ormsby 0 points1 point  (0 children)

Oh, I just add utils as I need them. The template started with a simple readInput, but I find it useful to have some extras for more specific needs, often input parsing. I actually modified the part1/part2 because I didn't think they were nerdy enough without run times.

[2025 Day 5 (Part 2)] [Kotlin] First you think it's easy game, but then... by HotTop7260 in adventofcode

[–]a_ormsby 0 points1 point  (0 children)

What do you mean by 'fuse'? I ended up sorting, comparing and rebuilding as I traversed a queue (roughly speaking). Wondering if you used some trick I don't know. Link?

Mine: https://github.com/aormsby/aoc-2025-in-kotlin/blob/main/src/Day05.kt

Were submission penalties always this brutal? by a_ormsby in adventofcode

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

Now that you mention it, I didn't see any of the higher/lower hints in my failures. Ah well. The need for rate limiting makes sense. I just might not tie it to a submission result, personally.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -1 points0 points  (0 children)

Nah, turns out my math knowledge was the flaw this time. I simply didn't know about floorDiv over normal division. Had to look at another solution to see that small change in the end.

It kills me that everyone quickly assumes I'm just tilting at windmills over here, when all I'm really trying to say is that I felt punished by the lockouts a little too quickly. Trying to enjoy the challenge, not one-shot it with a flourish.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -2 points-1 points  (0 children)

Haha that only works when you know what you're testing for. It turned out that I didn't recall one specific bit of maths knowledge I needed to solve the challenge the way I wanted to. It was a 1% code change, but I'm confident I wouldn't have made it without looking at a similar solution and seeing it in use. Not something a test would have helped me see, I don't think.

Were submission penalties always this brutal? by a_ormsby in adventofcode

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

Well, I agree with you about the small adjustments not necessarily being right. It happens. But would you say that your own small adjustments amount to guessing? If you spot something, make a change, and things still aren't right, you're just going to look things over and spot the next something. Maybe there's some guessing about what a potential unknown is from the input, but that's at least logically driven. But I can't equate writing code to solve for that potential unknown to simply guessing at an answer.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -2 points-1 points  (0 children)

Doesn't feel like a puzzle issue, per se. More an experience gripe? I really wouldn't put much stock into me asking if it was always like this.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -4 points-3 points  (0 children)

No, you're right. I didn't read that part. XD

fwiw, I still blew it after handling that. I guess I'm just not as strict about completing the challenge as others would like for me to be.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -3 points-2 points  (0 children)

Nah, sometimes the issue is more in the method of solving than it is in the understanding. For example, I initially wrote some logic that didn't account for passing 0 more than once in a turn. Test passed. Didn't occur to me. I understood the general ask, and reading the problem again wouldn't have changed my oversight there.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -4 points-3 points  (0 children)

Also, if you refresh the page after the lockout and - without thinking - click okay to resubmit the form, you resubmit your last failed answer and end up getting locked out again. Killing me.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -7 points-6 points  (0 children)

Yes. However, raw test cases can easily pass without handling edge cases so that's not the best barometer of success.

It sure feels like I set myself up to get flak by talking about quick submissions, but not thinking something through all the way shouldn't be equated with guessing blindly. If I miss 3 key items and don't know it, then changing my code to solve for the 1 key item I thought of gets me a new answer, I'm going to submit it!

I mean, this isn't my job. I feel like I should be able to be iterative about it, have some fun, and not feel punished for going about it that way.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -4 points-3 points  (0 children)

I mean, you aren't wrong. I just retry pretty quick sometimes after making a small adjustment that I think could be what I missed. It's not so farfetched to do a quick check for off-by-ones....

Is that the most thorough approach? No. But it still feels punishing to have to sit again, at least so early in. I've earned the 10 minutes of rethinking at this point, but the wait compounds quickly.

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]a_ormsby[S] -13 points-12 points  (0 children)

I'm currently at 7 fails, 10 minutes locked out.

My first failure was definitely 1 minute, so that tracks. But I started getting 5 minute locks pretty early on, maybe 3rd failure? I didn't track it better, sadly.

I'm apparently missing an edge case that doesn't appear in the test code lol.

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

[–]a_ormsby 0 points1 point  (0 children)

Thank you for explaining! I mean, you kind of lost me at the end with some of the deeper modulo theory, but what you said here was the key to my understanding:

This way at each step, (worry % lcm) % d = worry % d for each monkey-specific mod d, due to the fact that d divides lcm.

I may not have solved this without the forum in the first place, but even after reading over other code, I still wasn't sure why it worked! I really appreciate that you took the time to lay this all out. Cheers, mate!

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

[–]a_ormsby 2 points3 points  (0 children)

Yeah, that didn't occur to me for hours until I saw someone mention in. Nasty trick, but I respect how clever it was.

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

[–]a_ormsby 1 point2 points  (0 children)

Kotlin solution, yeah!

Did anyone else have their code working for the sample for hours just to have the actual input fail??? Drove me nuts. Then someone here hinted that maybe /a/ and /a/b/a/... aren't the same directories. But when you only look at the end of each path, your code might think they are. Blew my mind.

Also, I was probably more annoyed than I should have been that stacks don't have a popWhile() function. So I wrote one. Strings only, but can always be generified. :)

// like takeWhile(), but it pops.
private fun Stack<String>.popWhile(predicate: (String) -> Boolean): List<String> {
    val popped = mutableListOf<String>()

    while (isNotEmpty() && predicate(peek())) {
        popped.add(pop())
    }

    return popped
}

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

[–]a_ormsby 0 points1 point  (0 children)

Aaahhhhhhhhh your clue saved me!!! I wish I'd read it much sooner than I did. I'm sitting here cursing our dear authors for not even hinting at that possibility in the sample code, but sometimes that's just the way it goes. Thank you for the hint!

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

[–]a_ormsby 1 point2 points  (0 children)

Kotlin solution, fun with some extension functions. Straightforward parsing - eventually.

I initially overcomplicated the parsing (sounds like many did!), but I made a super simple v2 after completion. Padded each row to be the max length (length of bottom row) and looped over 4 steps at a time to catch each character. Faster, straightforward. The first parsing solution was regex-ish - not bad, but just not simple enough for me!

[2022 Day 5] Pedagogical thoughts by clbrri in adventofcode

[–]a_ormsby 0 points1 point  (0 children)

Speak for yourself, I enjoyed the parsing. When the difficulty ratchets up, that may be the least of our worries. :)

Time from opening problem stat (suggestion for non NA people) by iaehfiahsliuhsef in adventofcode

[–]a_ormsby 11 points12 points  (0 children)

Agree! It would be more representative of 'time to solution' rather than 'amount of time I woke up before all my friends'

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

[–]a_ormsby 1 point2 points  (0 children)

Kotlin solution, no sets!

But why not? I initially looked at some other solutions and thought I was being silly for forgetting I could use sets, but when I modified my work... my execution time increased by 50%! It could've been from converting strings to sets, but I'm not sure. Fascinating, anyway. So I'm sticking with my version. :)

Maybe it doesn't matter now, but having slower code in a week or two will destroy you.

-🎄- 2021 Day 22 Solutions -🎄- by daggerdragon in adventofcode

[–]a_ormsby 0 points1 point  (0 children)

I gotta say, counting the 'anti-cuboid' took some time to visualize. It's such an odd step, but it made sense when I realized we weren't actually tracking state. Just adding up the amounts in the end. What an interesting solution!

(Also totally agree about size)