prologic

twtxt.net

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

In-reply-to » Ending three luxurious do-what-I-please weeks; tomorrow is back to work. What do you all do during your break (and this assumes you had one, even if short)? I mostly did nothing, which in itself was truly something! So much, I long to do it all over again. A man can dream, right? Haha!

I basically worked through the Christmas break last year. I already had my holidays in Vietnam a few weeks earlier. 😆

⤋ Read More

Trying to build a native heap allocator that grows and isn’t statically wired into the binary’s image is fuck’n hard™ as 🤣

⤋ Read More

Mu (µ) is now getting much closer to where I want it to be, it now has:

  • A process stdlib module (very basic, but it works)
  • An ffi stdob module that supports dlopen / dlsym and calling C functions with a nice mu-esque wrapper ffi.fn(...)
  • A sqlite stdlib module (also very basic) that shows off the FFI capabilities

😅

⤋ Read More
In-reply-to » @eldersnake

@movq@www.uninformativ.de What I wish for once on this miserable planet is for coporations one day ohave a different set of reasons to exist and thrive other than:

but since the only goal of that manufacturer is to make money, they do it

Life becomes very boring and uninteresting when your only goal in life is to “make more fucking money” 💰 Fuck 🤬 Fuck this Corporatocracy we live in 🤦‍♂️

⤋ Read More
In-reply-to » With RAM crazy prices being what they are, I guess my PC is gonna be stuck on 16GB RAM for some time. I originally bought the DDR4 16GB kit for like $49 AUD, and I thought I'd just buy another 16GB or more later down the track (this was like a year and a half ago), thinking it would be similarly priced or even cheaper...

@eldersnake@we.loveprivacy.club da fuq?! 🤯

⤋ Read More
In-reply-to » @lyse A "Hello World" binary is ~372KB in size. I currently have peephole optimization and deac code optimizations in play, and a few other performance related ones, but nothing too fancy. I have a test case that ensures fib(35) doesn't regress too badly as I continue to evolve the language.

@lyse@lyse.isobeef.org It’s actually not nearly as half bad as I really thought it would be. Just having to eventually deal with the “lowering down” to machine code / ARM64 assembly in the end once you’ve verified the semantics in the VM.

⤋ Read More
In-reply-to » Nice! 😊 Here are the startup latencies for the simplest Mu (µ) program. println("Hello World"):

@lyse@lyse.isobeef.org A “Hello World” binary is ~372KB in size. I currently have peephole optimization and deac code optimizations in play, and a few other performance related ones, but nothing too fancy. I have a test case that ensures fib(35) doesn’t regress too badly as I continue to evolve the language.

⤋ Read More

Opinion / Question time…

Do you think Mu (µ)’s native compiler and therefore emitted machine code “runtime” (which obviously adds a bit of weight to the resulting binary, and runtime overheads) needs to support “runtime stack traces”, or would it be enough to only support that in the bytecode VM interpreter for debuggability / quick feedback loops and instead just rely on flat (no stacktraces) errors in natively built compiled executables?

So in effect:

Stack Traces:

  • Bytecode VM Interpreter: ✅
  • Native Code Executables: ❌

⤋ Read More

Hmmm 🤔

Excluding merges, 1 author has pushed 171 commits to main and 175 commits to all branches. On main, 294 files have changed and there have been 52880 additions and 18269 deletions.

From the Mu (µ) Gitea Activity Tab

⤋ Read More
In-reply-to » It totally sounds like an active warzone around here. So, I just went on a very, very, very quick stroll to check out our sunset from ontop our hill (were all the bangs are way more horrible): https://lyse.isobeef.org/abendhimmel-2025-12-31/

@movq@www.uninformativ.de This is fuck’n great shit™ Where did you find this? 🤔 Got any more shit™ like this? 🙏

⤋ Read More

mu (µ) now has builtin code formatting and linting tools, making µ far more useful and useable as a general purpose programming language. Mu now includes:

  • An interpreter for quick “scriptinog”
  • A native code compiler for building native executables (Darwin / macOS only for now)
  • A builtin set of developer tools, currently: fmt (-fmt), check (-check) and test (-test).

⤋ Read More
In-reply-to » @lyse Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) 😅

@lyse@lyse.isobeef.org I can tell you this right now, writing assembly / machine code is fucking hard work™ 😓 I’m sure @movq@www.uninformativ.de can affirm 🤣 And when it all goes to shit™ (which it does often), man is debugging fucking hard as hell! Without debug symbols I can’t use the regular tools like lldb or gdb 😂

⤋ Read More
In-reply-to » Whoo! I fixed one of the hardest bugs in mu (µ) I think I've had to figure out. Took me several days in fact to figure it out. The basic problem was, println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector 🤦‍♂️

@lyse@lyse.isobeef.org Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) 😅

⤋ Read More

Whoo! I fixed one of the hardest bugs in mu (µ) I think I’ve had to figure out. Took me several days in fact to figure it out. The basic problem was, println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector 🤦‍♂️

⤋ Read More

@zvava@twtxt.net The problem you now then is you lose integrity of the message content if you compute the hashes at runtime rather than on the way in. So if your message content or database becomes corrupt in any way, so do your hashes.

⤋ 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