home.social

#aoc2023 — Public Fediverse posts

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

  1. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

  2. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

  3. CW: Still catching up with some later AoC puzzles

    So I’ve just solved day 24 part 2… by writing out 9 equations for the first 3 hailstones in #wxMaxima and letting it solve them for me.

    Now I just need to figure out how to write a solver for this kind of equations system myself in #RustLang

    #Maxima #AoC2023 #AdventOfCode2023 #Aoc #AdventOfCode

  4. Advent of Code Day 22 — Sand Slabs

    I almost gave up on this one. Then I started playing around with it in a 3D render package and I found the issue.

    chasingdings.com/2023/12/22/ad

    #AdventOfCode #aoc2023 #babylonjs #jenga #pygame #python

  5. CW: Advent of Code Day 12 Spoilers

    2023 Day 12

    Oh my god, I had too much trouble with this. Haven't done in years, so I completely spaced it until my solution was taking forever.

    Memoization gave at a considerable speed boost. It's not the best solution, and it's far from readable, but it gets the job done and still takes under a second on my machine.

    codeberg.org/Taywee/AdventOfCo

  6. - Skipped #AoC2023 Day 4, Part 2 for now; on to Day 5.
    - Brief 7am check-in with the Japanese client.
    - One of our larger clients today remarked that they like working with us because we are "80% meticulous and 20% pragmatic". The perfect can be the enemy of the good when it comes to getting a project across the line, but boy – quality is still the bulk of it.
    - Blockchain is a dirty word again nowadays, but I had to spend quite some time sorting out transfers of ERC-721/1155 tokens for a Fanfire client today. I really love this tech, especially the magic of #Web3 authentication rather than brokering my identity through one of the MANGAs.
    - Finished Day 5, Part 1 of #AdventOfCode. Half the effort was parsing the input; #OCaml made the list folding a cinch. Got Part 2 mostly done, so might wrap it up later. ⭐
    - Late afternoon trail run in the beautiful #Helderberg.
    - My wife and I kicked back for an episode or so of #TheBear, Season 2. What an absolutely brilliant series. There are even some small vignettes that I want to tie up with a ribbon and send to people who would appreciate it.

    #lifelog

  7. - Finally got round to doing #AoC2023 Day 3 before work.
    - Starting to actively box in "greedy" commitments that demand attention and time, and disrupt the well-behaved projects. I'm working towards a much less reactive daily workflow. Keep #sente, avoid gote.
    - A fun aspect of #AdventOfCode is the second part of each day's puzzle which you don't get to see until you successfully complete the first part. If you write your code for Part 1 in a modular way that's easy to reuse and refactor, Part 2 is sometimes really easy. Happy that this worked out for me today ⭐⭐
    - A year ago I would have been very uncertain about the role of an Industrial Engineer in a technology development firm like Octoco. We've just hired our second one, and my current "golden ratio" is 1 IE per ~20 Software/Electronic engineers – for us, these are the people who engineer our work processes; both internal and external.
    - Some admin before bedtime, then finished AoC Day 4, Part 1. Set types in #OCaml are finicky at first, what with comparator witnesses and all, but really powerful and concise.

    #lifelog

  8. Yay, tonight i skipped #aoc2023 in favor of getting my vault items decrypted via #rbw crate for my #BitWarden #VaultWarden mobile client. Now i think i know everything in regards to the libraries, so i can finally start with filling architecture gaps.

  9. Let me just say this, many languages exist that are better suited for code golfing than Go 🤣

  10. : I solved day 2 using the parser in and my solution takes 6-8 µs on my machine.

    Of couse, we are dealing with the category "BLAZINGLY FAST" 🚀😜

    You are welcome to benchmark your code against mine and start performance wars 🥊

    codeberg.org/mo8it/advent-of-c

    EDIT: @corpsmoderne came up with a version about twice faster than mine with even less code! See his comment below 🏆️

    PS: I know about premature optimizations, but let me have my fun 😝

  11. Es ist nur Teil eins des Advent of Code #aoc2023 von heute, aber das war sehr spaßig, und ich bin stolz überhaupt, den Emulator des #x16 in Betrieb zu nehmen, und die Puzzledaten aus einer Datei gelesen zu haben.

    Hübsch ist das alles noch nicht, und es scheitert z.T. auch daran, dass ich keine Zeichen in eine Zeile einfügen kann (löschen geht) - OTOH weiß ich gar nicht, ob das auf dem C64 überhaupt ging.

    Das ist übrigens der Emulator des Commander x16 und das hauseigene #BASIC