fidwell's recent activity

  1. Comment on Day 10: Factory in ~comp.advent_of_code

    fidwell
    Link Parent
    If you're checking every possible combination of button presses, yeah you are probably going to be waiting for eons. I don't think this is the kind of puzzle that can be solved this way; the...

    If you're checking every possible combination of button presses, yeah you are probably going to be waiting for eons. I don't think this is the kind of puzzle that can be solved this way; the numbers are just too big.

  2. Comment on Day 9: Movie Theater in ~comp.advent_of_code

    fidwell
    Link Parent
    I see. I wound up representing everything as a hash set of known coordinates, instead of simulating the whole grid. So, at least for my solution, compressing the coordinates wouldn't have made any...

    I see. I wound up representing everything as a hash set of known coordinates, instead of simulating the whole grid. So, at least for my solution, compressing the coordinates wouldn't have made any practical difference.

    1 vote
  3. Comment on Day 9: Movie Theater in ~comp.advent_of_code

    fidwell
    Link Parent
    I had this idea too, mostly because I wanted to visualize the output, and it's too big to print uncompressed. It didn't lead me to any insights though. Can you explain what you thought?

    my idea of compressing the coordinates for visualization purposes turned out to actually be a key idea to quickly solve part 2.

    I had this idea too, mostly because I wanted to visualize the output, and it's too big to print uncompressed. It didn't lead me to any insights though. Can you explain what you thought?

    1 vote
  4. Comment on Day 4: Printing Department in ~comp.advent_of_code

    fidwell
    Link
    Finally, a character grid problem. If you've done one of these before, hopefully you've saved up some utility methods from previous years to solve this one in a snap. Thoughts My old utility code...

    Finally, a character grid problem. If you've done one of these before, hopefully you've saved up some utility methods from previous years to solve this one in a snap.

    Thoughts

    My old utility code already had methods for (1) parsing the input into an array of chars; (2) give you an IEnumerable of all coordinates in the grid; (3) find the coordinates of the eight neighbors of a coordinate; and (4) replace the character at a coordinate. All I had to write is checking if the neighbor count of `@` is less than 4., and write a loop to replace them until we can't anymore. Nothing really challenging here, and the code runs mighty fast without the need for any micro-optimizations.

    C# code

    3 votes
  5. Comment on Day 3: Lobby in ~comp.advent_of_code

    fidwell
    (edited )
    Link
    Top of the leaderboard baby! (I know it will not last but lemme enjoy it!!) It's always nice when my intuitive solution turns out to be (1) correct and (2) about as fast as you can get. I guess...

    Top of the leaderboard baby! (I know it will not last but lemme enjoy it!!) It's always nice when my intuitive solution turns out to be (1) correct and (2) about as fast as you can get. I guess I'm getting better at these now that I've done them for a couple years.

    Thoughts

    Another relatively straightforward problem today. For part 1, with only 2 digits, it's a simple check to find the biggest digit (as long as it's not the last one) and pair it with the biggest digit to its right.

    For part 2, it's simply a matter of expanding that to a more general solution. I chose to write it recursively—to find the biggest 12-digit number, find the biggest digit (as long as it's not in the 11-rightmost ones); then take the rest of the digits and find the biggest 11-digit number. Repeat until you're down to finding the biggest one-digit number.

    There are a couple micro-optimizations I found that probably didn't change much (my solution already ran in under 1ms):

    • Don't bother to parse strings as their respective numerical values. The character `'9'` still has a bigger underlying value than the character `'8'`, so comparing them will give you the same result as comparing `9` to `8`.
    • There's no need to actually build your number as you go. I originally did some math to multiply the resulting digit by a power of 10 and then add the rest of the value to it, but that's not necessary. It's more efficient to just build an array of the desired characters (`['4', '3', '4', ...]`). Then only when it's finished, you parse it to a `long` for the final summation.

    C# code

    3 votes
  6. Comment on Advent of Code starts tomorrow/tonight! Are you participating? Do you have any specific plans for this year? in ~comp.advent_of_code

    fidwell
    Link Parent
    Feel free to post in the day 1 thread if you need hints!

    Feel free to post in the day 1 thread if you need hints!

    3 votes
  7. Comment on Day 1: Secret Entrance in ~comp.advent_of_code

    fidwell
    Link
    Welcome back to AoC! Part 1 was pretty easy as usual, although part 2 took me a little longer than I would have liked, due to a couple finicky edge cases. Overall, a pretty typical day 1 puzzle...

    Welcome back to AoC!

    Part 1 was pretty easy as usual, although part 2 took me a little longer than I would have liked, due to a couple finicky edge cases. Overall, a pretty typical day 1 puzzle and a nice warmup back into it.

    Minor general spoilers

    There were some fun micro-optimizations to make in this puzzle as well, such as parsing all the input up-front instead of one line at a time. Speaking of, there is also the trick of replacing L in the input with - and R with nothing, to improve numeric parsing.

    Full code (C#) — As always I'm sure there are ways to make this more concise and maybe even faster, but as-is my benchmarks put both parts' runtime under 500 µs, which is well within my threshold.

    1 vote
  8. Comment on I think nobody wants AI in Firefox, Mozilla in ~tech

    fidwell
    Link Parent
    Kagi is also introducing anti-AI features too, though; they just put out a thing where you can report and deweight AI search results. So they're on both sides of the fence there.

    Kagi is also introducing anti-AI features too, though; they just put out a thing where you can report and deweight AI search results. So they're on both sides of the fence there.

    4 votes
  9. Comment on I think nobody wants AI in Firefox, Mozilla in ~tech

    fidwell
    Link Parent
    What a lot of people in the forum thread seemed to think is that Mozilla developing this feature is taking up human time and effort that could be better spent on making Firefox better. That...

    What a lot of people in the forum thread seemed to think is that Mozilla developing this feature is taking up human time and effort that could be better spent on making Firefox better. That they're trend-chasing instead of building in better privacy features, for example, that would differentiate them from all the Chromium browsers. And I think I agree; if only a small percentage of Firefox users would be interested, surely they already have their own preferred tools they use instead of whatever gets shoehorned into Firefox?

    10 votes
  10. Comment on Psychostick - Æt (2025) in ~music

    fidwell
    Link Parent
    A decade? I still get "Girl Directions" stuck in my head every few months, and that's gotta be pushing twenty now, maybe? I'm amazed they're still around, but maybe I shouldn't be. This song is...

    A decade? I still get "Girl Directions" stuck in my head every few months, and that's gotta be pushing twenty now, maybe? I'm amazed they're still around, but maybe I shouldn't be. This song is pretty darn good for a parody.

  11. Comment on Changes to Advent of Code starting this December in ~comp.advent_of_code

    fidwell
    Link
    This is probably great for everyone. I have noticed that the amount of sleep I get in December has gone down the last couple of years, from waiting until midnight for puzzles to pop... it will be...

    This is probably great for everyone. I have noticed that the amount of sleep I get in December has gone down the last couple of years, from waiting until midnight for puzzles to pop... it will be nice to not have that happen again.

    2 votes
  12. Comment on The day return became enter in ~tech

    fidwell
    Link Parent
    I get that, but if it existed I'd still take a nice PDF version and read it wherever I could. Oh well.

    I get that, but if it existed I'd still take a nice PDF version and read it wherever I could. Oh well.

    3 votes
  13. Comment on The day return became enter in ~tech

    fidwell
    Link Parent
    Yeah me too, but there doesn't even seem to be an eBook version?

    Yeah me too, but there doesn't even seem to be an eBook version?

    2 votes
  14. Comment on CGA-2025-09 🕹️🚂 INSERT CARTRIDGE 🟢 The Last Express in ~games

    fidwell
    Link
    I've never heard of this game 'til now, but I do love me a point-and-click and for only a couple bucks that's an easy buy. After I got it, I read that the gold edition is a little hand-holdy? Are...

    I've never heard of this game 'til now, but I do love me a point-and-click and for only a couple bucks that's an easy buy.

    After I got it, I read that the gold edition is a little hand-holdy? Are there settings for that? I don't mind hints, but I also like at least some challenge.

    1 vote
  15. Comment on The Common Pile v0.1: An 8TB dataset of public domain and openly licensed text in ~tech

    fidwell
    Link Parent
    (off topic but) the word is "piqued".

    (off topic but) the word is "piqued".

    6 votes
  16. Comment on Reducing the digital clutter of chats in ~tech

    fidwell
    Link Parent
    And neither of these services should be setting a timer for you in the first place. Your phone has a clock app, and that clock app has a timer. No internet, bots, or "AI" required.

    Gemini doesn’t do any better a job of setting a timer than Google assistant does.

    And neither of these services should be setting a timer for you in the first place. Your phone has a clock app, and that clock app has a timer. No internet, bots, or "AI" required.

    4 votes
  17. Comment on Dogma 25: Group of Scandi filmmakers launching refreshed manifesto in ~movies

    fidwell
    Link Parent
    From what I remember reading, most of the "official" Dogme 95 films broke or bent at least one of the rules anyway. I'm sure some didn't, but I bet they were in the minority.

    From what I remember reading, most of the "official" Dogme 95 films broke or bent at least one of the rules anyway. I'm sure some didn't, but I bet they were in the minority.

    2 votes
  18. Comment on If you enjoy very difficult puzzle games, try Epigraph in ~games

    fidwell
    Link Parent
    Yes.

    is the language structured differently than English?

    Yes.

    2 votes
  19. Comment on Chai Tea: fight me about it in ~humanities.languages

    fidwell
    (edited )
    Link Parent
    Whoever told you it was called it that was wrong. It's normally called a "pumpkin spice latte" because it's made with the spices you'd put in pumpkin pie.

    pumpkin latte has nothing to do with pumpkins

    Whoever told you it was called it that was wrong. It's normally called a "pumpkin spice latte" because it's made with the spices you'd put in pumpkin pie.

    3 votes
  20. Comment on <deleted topic> in ~food

    fidwell
    Link Parent
    Install yourself some SponsorBlock. I didn't even notice the ad read.

    Install yourself some SponsorBlock. I didn't even notice the ad read.

    7 votes