søren peter mørch

Timeline

Recent posts from feeds followed by sorenpeter@darch.dk

prologic (twtxt.net)

@kiwu evening!!!

In reply to: #4k4z3la 11 months ago
prologic (twtxt.net)

@movq Haha 😆

In reply to: #fqh5rnq 11 months ago
prologic (twtxt.net)

I cleaned up all my of AoC (Advent of Code) 2025 solutions, refactored many of the utilities I had to write as reusable libraries, re-tested Day 1 (but nothing else). here it is if you're curious! This is written in mu, my own language I built as a self-hosted minimal compiler/vm with very few types and builtins.

https://git.mills.io/prologic/aoc2025

Read replies 11 months ago
prologic (twtxt.net)

I finished all 12 days of Advent of Code 2025! #AdventOfCode https://adventofcode.com — did it in my own language, mu (Go/Python-ish, dynamic, int/bool/string, no floats/bitwise). Found a VM bug, fixed it, and the self-hosted mu compiler/VM (written in mu, host in Go) carried me through. 🥳

Read replies 11 months ago
prologic (twtxt.net)

@movq I shrank Day 9 Part 2 from “cover the whole map” to “only track the interesting lines.” By compressing coordinates to just the unique x/y breakpoints, the grid got tiny. I still flood-fill and do the corner-pair checks, but now on that compact grid with weighted prefix sums for instant rectangle checks. Result: far less RAM, way less CPU, same correct answer.

In reply to: #te6p5oa 11 months ago
prologic (twtxt.net)

Day 9 also required some optimizations, if you aren't careful, you end up with really inefficient algorithms with time/memory complexity beyond what a typical machine has 🤣

Read replies 11 months ago
prologic (twtxt.net)

Ooops, I've run into a bug or limitation with mu for Day 9 🤔

Read replies 11 months ago
prologic (twtxt.net)

Day 7 was pretty tough, I initially ended up implementing an exponential in both time and memory solution that I killed because it was eating all the resources on my Mac Studio, and this poor little machine only has 32GB of memory (I stopped it at 118GB of memory, swapping badly!), This is what I ended up doing before/after:

  • Before: Time O(2^k · L), memory O(2^k), where k is the number of splitters along a reachable path and L is path length. Exponential in k.
  • After: Time O(R·C) (or O(R·C + s) with s split events), memory O(C), where R = rows, C = columns. Polynomial/linear in grid size.
Read replies 11 months ago
prologic (twtxt.net)

@shinyoukai Good 😊

In reply to: #hbz2oeq 11 months ago
prologic (twtxt.net)

I just completed "Printing Department" - Day 4 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/4 – Again, I’m doing this in mu, a Go(ish) / Python(ish) dynamic langugage that I had to design and build first which has very few builtins and only a handful of types (ints, no flots). 🤣

Read replies 11 months ago
Reply via email