prologic

twtxt.net

Problems are Solved by Method\" 🇦🇺👨‍💻👨‍🦯🏹♔ 🏓⚯ 👨‍👩‍👧‍👧🛥 -- James Mills (operator of twtxt.net / creator of Yarn.social 🧶)

In-reply-to » Hmmm I need to figure out a way to reduce the no. of lines of code / complexity of the ARM64 native code emitter for mu (µ). It's insane really, it's a whopping ~6k SLOC, the next biggest source file is the compiler at only ~800 SLOC 🤔

@movq@www.uninformativ.de Thanks! 🙏

⤋ Read More
In-reply-to » Hmmm I need to figure out a way to reduce the no. of lines of code / complexity of the ARM64 native code emitter for mu (µ). It's insane really, it's a whopping ~6k SLOC, the next biggest source file is the compiler at only ~800 SLOC 🤔

@shinyoukai@neko.laidback.moe Nah it’s more like there’s a lot of repeated code, because when you go from source language to intermediate representation to machine code, well you just end up writing a lot of the same patterns over and over again. I need to dedupe this I think.

⤋ Read More
In-reply-to » Hmmm I need to figure out a way to reduce the no. of lines of code / complexity of the ARM64 native code emitter for mu (µ). It's insane really, it's a whopping ~6k SLOC, the next biggest source file is the compiler at only ~800 SLOC 🤔

The compiler technique I’m using here is to not “emit” most of the runtime if it’s actually never used in your program, and also dropping dead code in the SSA pass.

⤋ Read More
In-reply-to » Hmmm I need to figure out a way to reduce the no. of lines of code / complexity of the ARM64 native code emitter for mu (µ). It's insane really, it's a whopping ~6k SLOC, the next biggest source file is the compiler at only ~800 SLOC 🤔

@movq@www.uninformativ.de I’ve managed to bring a simple “Hello World!” in mu (µ) (at least on macOS / Darwin / ARM64) down to ~86KB (previously ~146KB) 🥳

⤋ Read More

Hmmm I need to figure out a way to reduce the no. of lines of code / complexity of the ARM64 native code emitter for mu (µ). It’s insane really, it’s a whopping ~6k SLOC, the next biggest source file is the compiler at only ~800 SLOC 🤔

⤋ Read More
In-reply-to » My little toy operating system from last year runs in 16-bit Real Mode (like DOS). Since I’ve recently figured out how to switch to 64-bit Long Mode right after BIOS boot, I now have a little program that performs this switch on my toy OS. It will load and run any x86-64 program, assuming it’s freestanding, a flat binary, and small enough (< 128 KiB code, only uses the first 2 MiB of memory).

@movq@www.uninformativ.de I think I can get binaries even smaller with a bit more work and effort 🤔 But yeah still working on the native code generation (at least for macOS targets)

⤋ Read More
In-reply-to » My little toy operating system from last year runs in 16-bit Real Mode (like DOS). Since I’ve recently figured out how to switch to 64-bit Long Mode right after BIOS boot, I now have a little program that performs this switch on my toy OS. It will load and run any x86-64 program, assuming it’s freestanding, a flat binary, and small enough (< 128 KiB code, only uses the first 2 MiB of memory).

@movq@www.uninformativ.de Oh that’s fine, Mu can compile to native code and so far binaries. at least on macOS are in the order of Kb in size 😂

⤋ Read More
In-reply-to » My little toy operating system from last year runs in 16-bit Real Mode (like DOS). Since I’ve recently figured out how to switch to 64-bit Long Mode right after BIOS boot, I now have a little program that performs this switch on my toy OS. It will load and run any x86-64 program, assuming it’s freestanding, a flat binary, and small enough (< 128 KiB code, only uses the first 2 MiB of memory).

@movq@www.uninformativ.de It’d be cool if you could get µ (Mu) running in your little toyOS 🤣 You’d technically only have to swap out the syscall() builtin for whatever your toy OS supports 🤔

⤋ Read More
In-reply-to » Hey EU friends 👋 wtf happened to the EU Internet today for about 40 minutes or so?

@movq@www.uninformativ.de From 2:50 PM to 3:23 PM AEST (+10 UTC) there was an outage. Everything went “up” on Down Detector, my EU region went offline, numerous sites were unavailable, and so on. Basically everything to/from the EU appeared to basically go kaput.

⤋ Read More

@movq@www.uninformativ.de @kiwu@twtxt.net it just so happens to be a happy coincidence that I’m extending mu’s capabilities to now include a native toolchain-free compiler (doesn’t rely on any external gcc/clang or linkers, etc) that lowers the mu source code into an intermediate representation / IR (what @movq@www.uninformativ.de refers to as “thick layers of abstractions”…) and finally to SSA + ARM64 + Mach-O encoder to produce native binary executables (at least for me on my Mac, Linux may some later?) 🤣

⤋ Read More
In-reply-to » If your very popular project with lots of stars on GitHub is over 10 years old, and you’re still at a pre-1.0 version because you’re using SemVer and a 1.0 would mean making some kind of commitment and that’s somehow not desirable for you, then I think you’re doing something wrong. 🤔

@movq@www.uninformativ.de Hmmm 🧐

⤋ Read More

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 More
In-reply-to » 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 🤣

@movq@www.uninformativ.de 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.

⤋ Read More

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 More

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©, where R = rows, C = columns. Polynomial/linear in grid size.

⤋ Read More

I’m having to write my own functions like this in mu just to solve AoC puzzles :D

fn pow10(k) {
    p := 1
    i := 0
    while i < k {
        p = p * 10
        i = i + 1
    }
    return p
}

⤋ Read More
In-reply-to » Come back from my trip, run my AoC 2025 Day 1 solution in my own language (mu) and find it didn't run correctly 🤣 Ooops!

That’s the right answer! You are one gold star closer to decorating the North Pole. [Continue to Part Two]

Whoo! Making progress! With AoC 2025 solutions implemented in my own toy language 🤣

⤋ Read More
In-reply-to » Come back from my trip, run my AoC 2025 Day 1 solution in my own language (mu) and find it didn't run correctly 🤣 Ooops!

Ahh that’s because I forgot to call main() at the end of the source file. mu is a bit of a dynamic programming language, mix of Go(ish) and Python(ish).

$ ./bin/mu examples/aoc2025/day1.mu 
Execution failed: undefined variable readline

⤋ Read More

Come back from my trip, run my AoC 2025 Day 1 solution in my own language (mu) and find it didn’t run correctly 🤣 Ooops!

$ ./bin/mu examples/aoc2025/day1.mu
closure[0x140001544e0]

⤋ Read More
In-reply-to » My current PC is from 2013, so I never even bothered to check, but as it turns out: My motherboard still has a serial port. 🤯 I thought these had long died out by then. To be honest, I didn’t have the need for one, either, not until recently … So I completely lost track if PCs have these things or not.

@movq@www.uninformativ.de I think even modern PC still come with serial ports they just don’t wire them up anymore right? They’re still there in the board itself, though just unwired.

⤋ Read More
In-reply-to » I kind of hate conventional commit messages: https://www.conventionalcommits.org/en/v1.0.0/#summary

This is an example of the kind of garbage release notes from this conventional commit autogenerated crap 🤣

⤋ Read More
In-reply-to » I kind of hate conventional commit messages: https://www.conventionalcommits.org/en/v1.0.0/#summary

@lyse@lyse.isobeef.org I couldn’t agree more! I think good commit messages are very useful, however, and I’d much prefer the conventional mood style for Commit messages, but rather prefer telling a story rather than this weird syntax all over the shop!

⤋ Read More
In-reply-to » (#jldcvba) @shinyoukai yeah, that's the only reason why I use sub-domains when trying anything federated (I believe Matrix has the same problem), in case things didn't go as planned I can just migrate and take it down.

@bender@twtxt.net actually I think it’s a little more nuance than that because for example with salty chat, we have support for DNS based delegation via SRV records and your identity is associated with your Apex Dom name and of course the keys.

I actually don’t understand why Federation and activity pub is so goddamn hard to migrate from one instance to another 🧐

⤋ Read More
In-reply-to » @bender yeah, I've been reading through the documentation last night and it felt overwhelming for a minute... +1 point goes to GTS's docs. but hey, I'll be taking the easy route: podman-compose up -d they provide both a container image and an example compose file in a separate git repo but I'm wondering why that is not mentioned anywhere in the docs, (unless it is and I haven't seen it yet)

@shinyoukai@neko.laidback.moe Yes! 🙌

⤋ Read More
In-reply-to » @bender yeah, I've been reading through the documentation last night and it felt overwhelming for a minute... +1 point goes to GTS's docs. but hey, I'll be taking the easy route: podman-compose up -d they provide both a container image and an example compose file in a separate git repo but I'm wondering why that is not mentioned anywhere in the docs, (unless it is and I haven't seen it yet)

@shinyoukai@neko.laidback.moe that has to be one of my stupid designs of activity pub 😆

⤋ Read More
In-reply-to » @aelaraji Ahhh! That would be even funnier and even more brilliant! 🤣 If you can find this, I would happily employ this tactic next time and make 'em pay 💰 Bahahahaha 🤣

@aelaraji@aelaraji.com I like the sounds of this technique a lot redirecting these AI crawling assholes to multi gigabyte files! The only concern I have is how do you do it in such a way that you don’t end up destroying your own ISP speed test servers?

⤋ Read More
In-reply-to » I'm gonna ask here again because I'm really frustrated and literally no one else is responding anywhere can u guys please help me find a good video camera the biggest think I want is long battery life but I also want it to be cheap like under $200, if you yourself don't know please ask a friend because I am not a tech nerd and looking for stuff like this is very hard for me

@kiwu@twtxt.net I’d recommend the one i linked you to a 2nd hand Sony 👌

⤋ Read More
In-reply-to » I'm gonna ask here again because I'm really frustrated and literally no one else is responding anywhere can u guys please help me find a good video camera the biggest think I want is long battery life but I also want it to be cheap like under $200, if you yourself don't know please ask a friend because I am not a tech nerd and looking for stuff like this is very hard for me

Before smartphones people used to use the Sony Camcorders, but even though they still exist today, they’re uber expensive 😂

⤋ Read More
In-reply-to » I'm gonna ask here again because I'm really frustrated and literally no one else is responding anywhere can u guys please help me find a good video camera the biggest think I want is long battery life but I also want it to be cheap like under $200, if you yourself don't know please ask a friend because I am not a tech nerd and looking for stuff like this is very hard for me

@kiwu@twtxt.net Only thing i can find that meets your requirements is the ORDRO HDV-V12 HD 1080P Video Camera Recorder Is 80m of video rexorsinimg enough for you?

⤋ Read More