https://archive.org/details/akkartik-mu-2021-06-09 (video; 6 minutes)
Main project page: https://github.com/akkartik/mu
https://archive.org/details/akkartik-mu-2021-06-09 (video; 6 minutes)
Main project page: https://github.com/akkartik/mu
https://archive.org/details/akkartik-mu-2021-05-31 (video; 2 minutes)
The Mu computer's prototyping environment uses traces to explain and debug programs. But traces are expensive to compute and made the environment slow and laggy.
I fixed things by collecting only a shallow trace at first, and iteratively deepening on demand by rerunning programs. This only works because it's safe to rerun functions. There are no side-effects in Mu.
Main project page: https://github.com/akkartik/mu
Now I'm back to my long-term plan: a prototyping environment that nudges people to write tests, so that it's easier to throw away the prototype and rewrite it from scratch. Making codebases rewrite-friendly.
Main project page: https://github.com/akkartik/mu
https://archive.org/details/akkartik-mu-2021-05-17 (video; 3.5 minutes)
Putting more animation and control of time into the debugging experience.
More info on Hest: https://ivanish.ca/hest-podcast
Main project page for Mu: https://github.com/akkartik/mu
The current implementation is quite naive. Copies one byte at a time, makes several redundant copies per byte. In spite of all that, it makes a huge difference in video quality.
This was not fun. And the debug information in the second half of the code disk is now larger than the code itself.
On the other hand, I hope debugging will now be more fun!
Apologies for the garish colors. Still a work in progress.
I recorded this on Qemu on a Mac, then sped it up 8x. I estimate that makes it 3x slower than Qemu on my Linux computer accelerated with KVM.
Main project page: https://github.com/akkartik/mu
(Much faster on Linux, thanks to -enable-kvm.)
git clone https://github.com/akkartik/mu
cd mu
dd if=/dev/zero of=data.img count=20160
dd of=data.img conv=notrunc < shell/data.limg
./translate shell/*.mu # gen code.img
qemu-system-i386 -enable-kvm -m 2G -hda code.img -hdb data.img
Here's the Bresenham algorithm for drawing circles using a few macros. My current style is to keep line width to 41 characters and lay out two columns of functions.
Caveats:
Main project page: https://github.com/akkartik/mu
Robert Frost:
"Before I built a wall I'd ask to know
What I was walling in or walling out"
(https://www.poetryfoundation.org/poems/44266/mending-wall)
With computers, this strategy doesn't work. Inside and outside have a way of switching places.
In Unix, the crown jewels were the root user; other user accounts were sandboxed. Code (in C) ran all types erased.
Time passed. Root grew vestigial, people stopped sharing computers. The crown jewels moved to user accounts.
Some possible lessons to draw from these sample points.
Sandboxing isn't about a single boundary. When designing VMs for adoption, build for isolation within the VM in addition to the boundary. Allow people to collaborate and run untrusted code within a single sandbox.
Oh, and don't erase types.
Constraint: I only have 256 colors.