Nov 14, 2020
The Mu shell, compiling down to a subset of 32-bit x86 machine code, then to a Linux ELF binary, packaged up with just a Linux kernel and nothing else, running on a Linux console emulated on Qemu, on a Thinkpad T420s running 64-bit Linux.
Just another 27 million lines of C to take out (Linux kernel), and I'll have a decent computing stack.
I'm also thinking today about what it would take to fork Mu for the Raspberry Pi. It uses ARM processors, a 64-bit instruction since the Pi 3 which was released in 2015. The 64-bit ISA looks quite nice, but it's incompatible with the Pi 1 and Pi 2. Contrast x86, where 64-bit is quite compatible with 32-bit, but grotesque as a result, with bits for a register scattered across multiple bytes. So I might make the opposite choice to x86 and support just the 64-bit ISA. Thoughts?
https://developer.arm.com/documentation/den0024/a
permalink
* *
Nov 12, 2020
Screenception
Visualizing programs with side-effects in a postfix shell with a live-updating text-mode environment. Built all the way up from machine code without any dependencies (except an x86 processor and Linux kernel).
https://archive.org/details/akkartik-2min-2020-11-12
Project page: https://github.com/akkartik/mu
More context
permalink
* *
Nov 6, 2020
In the last 3 days I've written 68 tests for error messages in the Mu compiler, adding up to about 4.5k lines of machine code. Utterly tedious, mind-numbing work with lots of copy-pasta. Just what the doctor ordered.
(https://github.com/akkartik/mu)
permalink
* *
Oct 31, 2020
For a couple of years I've been building up a computing stack without metacircularity, where complex languages are consistently implemented in simpler languages.
For several months now I've been wrestling with a thorny problem in one corner of the core compiler which converts a safe language into unsafe machine code. Today I finally decided to stop agonizing over it, and write up the idea maze to the extent I've explored it.
https://github.com/akkartik/mu/issues/45
Comments and suggestions most appreciated! This is a fairly simple compiler as these things go, and I'd be happy to engage with anyone who wants to learn about these beasts in a realistic setting.
permalink
* *
Oct 27, 2020
My little prototype is starting to look like a shell
https://archive.org/details/akkartik-2min-2020-10-27
Promising in some ways, but I'm not sure how to support concurrency. Currently each operation completes before the next. I could allow "pipe stages" to continue to share data after they drop file handles on the stack, but there are problems: how often we refresh, how we kill processes from past refreshes, how we visualize file handle contents.
(More details: https://github.com/akkartik/mu)
permalink
* *
Oct 25, 2020
Beginnings of an experimental fork of Mu for 64-bit x86
Built in collaboration with @tekknolagi.
https://git.sr.ht/~akkartik/mu-x86_64
I'm not sure this is going to work out. Mu's syntax for 32-bit x86 machine code doesn't map cleanly to x86_64, for reasons outlined in the Readme. But the emulator works, and it has a nice regular subset of x86_64 including floating-point instructions. Comments and suggestions most appreciated.
Main project page: https://github.com/akkartik/mu
permalink
* *
Oct 20, 2020
This week in my postfix language and live-updating environment, I worked on a way to start from a raw computation, and extract functions from it as naturally as possible.
https://archive.org/details/akkartik-2min-20201020
(More details: https://github.com/akkartik/mu)
permalink
* *
Oct 11, 2020
My postfix language and its live-updating environment are starting to look promising. The environment can now expand multiple levels of function calls, laying out the state of the stack at each point. You can't edit a function at its call-site, but you can visualize its working in context.
https://archive.org/details/akkartik-2min-2020-10-10
(More details: https://github.com/akkartik/mu)
permalink
* *
Oct 3, 2020
Detective story of the day
I've been stress-testing Mu's floating-point instructions for a few days using this ray-tracing tutorial.
It's been great; I've found 2 bugs so far.
Today I thought I found a third, in the floating-point reciprocal instruction.
Except it wasn't really. Read on.
permalink
* *
Oct 1, 2020
I just finished adding floating-point to Mu. Took 4 days. Floating-point is where the ugliness of x86 really becomes apparent.
permalink
* *