home.social

#day04 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #day04, aggregated by home.social.

  1. Day 4: 'London's Safest Milk: A north London milkman. The three-wheeled trolley of the milkman in a fairly small way is disappearing in favour of the motor van.' An Advent Calendar of London a century ago, from 'Wonderful London', 1925, 📷Donald Macleish. #AdventLondon100 #Day04

  2. Calendrier de l'Avent des fromages
    Jour 04: Munster AOP / Munster-géromé

    Famille: vache
    Lait: cru
    Type de pâte: molle à croûte lavée
    Région: Grand-est
    Matières grasses: 26%

    Inventé par les moines de Géromé, petit bourg au sud du massif Vosgien, ce fromage a une odeur plus intense que son goût.

    Un bon Munster. J'aurais peut-être dû l'accorder avec un verre de Gewurztraminer.

    Note: 7/10

    #AdventsCalendar #Cheese #Fromage #CalendrierDeLAvent #Munster #Jour04 #Day04 #LaBoiteDuFromager2025

  3. CW: Advent of Code 2025 Day 4 solution

    Day 4 done. This was probably the easiest one so far, but it might be because I'm so used to the grid problems from previous years.

    I felt like just doing the count for part 1 would end up forcing me to rewrite something, so I returned the coordinates, hoping they'd come in handy for part 2. Fortunately, they did, and my part 2 was a 10-second addition, just adding a loop around the part 1 function. The whole thing runs in about 86 milliseconds. I could probably optimize it by storing a neighbor count in each live cell, decrementing those in accessible neighbors on each removal, and maybe keeping them in a sorted vector via Rc<RefCell> or an internal Cell, but I'm happy with this right now.

    Edit: I ended up doing the optimization anyway

    This runs in 10ms now. It might even run a bit faster if I make the rolls keep track of their neighbors with weak refs too, to prevent lots of extra neighbor lookups in the HashSet. I'll experiment with that a tiny bit, but I'm not going to spend all too much effort on it, and probably won't add an update unless it is a big speed boost.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day4 #AdventOfCode2025Day04 #Day4 #Day04 #Rust #RustLang #Programming #codingchallenges

  4. CW: Advent of Code 2025 Day 4 solution

    Day 4 done. This was probably the easiest one so far, but it might be because I'm so used to the grid problems from previous years.

    I felt like just doing the count for part 1 would end up forcing me to rewrite something, so I returned the coordinates, hoping they'd come in handy for part 2. Fortunately, they did, and my part 2 was a 10-second addition, just adding a loop around the part 1 function. The whole thing runs in about 86 milliseconds. I could probably optimize it by storing a neighbor count in each live cell, decrementing those in accessible neighbors on each removal, and maybe keeping them in a sorted vector via Rc<RefCell> or an internal Cell, but I'm happy with this right now.

    Edit: I ended up doing the optimization anyway

    This runs in 10ms now. It might even run a bit faster if I make the rolls keep track of their neighbors with weak refs too, to prevent lots of extra neighbor lookups in the HashSet. I'll experiment with that a tiny bit, but I'm not going to spend all too much effort on it, and probably won't add an update unless it is a big speed boost.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day4 #AdventOfCode2025Day04 #Day4 #Day04 #Rust #RustLang #Programming #codingchallenges

  5. CW: Advent of Code 2025 Day 4 solution

    Day 4 done. This was probably the easiest one so far, but it might be because I'm so used to the grid problems from previous years.

    I felt like just doing the count for part 1 would end up forcing me to rewrite something, so I returned the coordinates, hoping they'd come in handy for part 2. Fortunately, they did, and my part 2 was a 10-second addition, just adding a loop around the part 1 function. The whole thing runs in about 86 milliseconds. I could probably optimize it by storing a neighbor count in each live cell, decrementing those in accessible neighbors on each removal, and maybe keeping them in a sorted vector via Rc<RefCell> or an internal Cell, but I'm happy with this right now.

    Edit: I ended up doing the optimization anyway

    This runs in 10ms now. It might even run a bit faster if I make the rolls keep track of their neighbors with weak refs too, to prevent lots of extra neighbor lookups in the HashSet. I'll experiment with that a tiny bit, but I'm not going to spend all too much effort on it, and probably won't add an update unless it is a big speed boost.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day4 #AdventOfCode2025Day04 #Day4 #Day04 #Rust #RustLang #Programming #codingchallenges

  6. CW: Advent of Code 2025 Day 4 solution

    Day 4 done. This was probably the easiest one so far, but it might be because I'm so used to the grid problems from previous years.

    I felt like just doing the count for part 1 would end up forcing me to rewrite something, so I returned the coordinates, hoping they'd come in handy for part 2. Fortunately, they did, and my part 2 was a 10-second addition, just adding a loop around the part 1 function. The whole thing runs in about 86 milliseconds. I could probably optimize it by storing a neighbor count in each live cell, decrementing those in accessible neighbors on each removal, and maybe keeping them in a sorted vector via Rc<RefCell> or an internal Cell, but I'm happy with this right now.

    Edit: I ended up doing the optimization anyway

    This runs in 10ms now. It might even run a bit faster if I make the rolls keep track of their neighbors with weak refs too, to prevent lots of extra neighbor lookups in the HashSet. I'll experiment with that a tiny bit, but I'm not going to spend all too much effort on it, and probably won't add an update unless it is a big speed boost.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day4 #AdventOfCode2025Day04 #Day4 #Day04 #Rust #RustLang #Programming #codingchallenges

  7. CW: Advent of Code 2025 Day 4 solution

    Day 4 done. This was probably the easiest one so far, but it might be because I'm so used to the grid problems from previous years.

    I felt like just doing the count for part 1 would end up forcing me to rewrite something, so I returned the coordinates, hoping they'd come in handy for part 2. Fortunately, they did, and my part 2 was a 10-second addition, just adding a loop around the part 1 function. The whole thing runs in about 86 milliseconds. I could probably optimize it by storing a neighbor count in each live cell, decrementing those in accessible neighbors on each removal, and maybe keeping them in a sorted vector via Rc<RefCell> or an internal Cell, but I'm happy with this right now.

    Edit: I ended up doing the optimization anyway

    This runs in 10ms now. It might even run a bit faster if I make the rolls keep track of their neighbors with weak refs too, to prevent lots of extra neighbor lookups in the HashSet. I'll experiment with that a tiny bit, but I'm not going to spend all too much effort on it, and probably won't add an update unless it is a big speed boost.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day4 #AdventOfCode2025Day04 #Day4 #Day04 #Rust #RustLang #Programming #codingchallenges

  8. #AdventOfCode #AoC

    I completed #Day04 of #AdventOfCode2023.

    Part 1:
    - Difficulty: 1/10
    - Workout: 1/10

    Part 2:
    - Difficulty: 4/10
    - Workout: 4/10

    More than 2 hours of intense work!

    Part 1 was straightforward: 3 splits, number conversions, array difference, a simple scoring function, and a sum.

    Then, part 2 threw me a curveball: an entirely different problem! Had to read and check more than thrice to actually understand it.

    After an infinite recursion, and another that ended too early (don't stop if a card has no prize!), I managed to make it run correctly, but s-l-o-w-l-y: it was allocating the cards as they were replicated. Refactoring got rid of the card allocations: a Map from card number to (# of matching numbers, card count) is enough.

    BTW, my answer to the 2nd part was a number upwards of 14 million. That's *a lot* of cards! ;-P

  9. #AdventOfCode #AoC

    I completed #Day04 of #AdventOfCode2015, just for the fun of it.

    Part 1:
    - Difficulty: 0/10
    - Workout: 2/10

    Part 2:
    - Difficulty: 0/10
    - Workout: 0/10

    Done in less than a hour, and a good part of it was searching for a md5 package on npm. The program is straightforward (a loop with a substring condition), and would be trivial if I didn't want to console.log() the search progress. Part 2 is immediate from part 1.

  10. We are in a village near the Pyrenees in Eastern Spain visiting friends from Buenos Aires. Kristie & I were pregnant together with Joaquin & David. So seven years later the boys meet up once again. Their family has grown & it was lovely to see and meet the rest of the children. The afternoon was spent at the skate park & I was amazed how little fear David had on the scooter. So much fun and we drank some mates. #Day04 #365happydays2023 #childhood #friendship #argentinosporelmundo #photography

  11. A repeat for day 4 of Whisky Advent: Glenfiddich's 21-year-old Reserva Rum Cask Edition, which was 2020's day 14 (and is the 3rd 21-year-old in a row this year.) Paired well flavor-wise with the orange-glazed gingerbread I made last night, so paired them in the photo as well.

    #whiskyadvent #whiskyadvent2022 #drinksbythedram #day04 #whisky #speyside #singlemalt #scotch #whisky #weedram