Jul 10, 2021
Starting to render images on the Mu computer

This screenshot shows a greyscale image dithered using just black and white pixels.

Before:

a greyscale version of the standard Barbara image using 256 levels of grey.

https://dsp.stackexchange.com/questions/18631/who-is-barbara-test-image

After:

a screenshot showing a Qemu window containing a dithered version using just black and white pixels.

I rather suspect this isn't quite right. There are some suspicious streaks in various places. Rounding error, maybe.

Credit: https://tannerhelland.com/2012/12/28/dithering-eleven-algorithms-source-code.html. I'm using standard Floyd-Steinberg.

Main project page: https://github.com/akkartik/mu

permalink

* *
Jun 23, 2021
Syntax sugar in the Mu shell

I like Lisp. But I also strongly believe anyone should be able to boot into a computer and immediately type in '1+1'. Get started using the computer as just a calculator. It's surprising how few computers satisfy that property. Now the Mu computer does.

https://archive.org/details/akkartik-mu-2021-06-23 (video; 8 minutes)

Main project page: https://github.com/akkartik/mu

A screenshot implementation of Bresenham's circle-drawing algorithm in a Lisp dialect with some syntax sugar.

permalink

* *
Jun 15, 2021
Collaborating on a problem from Advent of Code in Mu

If anybody is into long and rambling 100-minute videos that taper off without a certain conclusion:

https://archive.org/details/2021-06-02-akkartik-sumeet

Mostly by Sumeet Agarwal

Here's the working solution if anyone wants to try it out it: http://akkartik.github.io/mu/html/linux/advent2017/1a.mu.html

Main project page: https://github.com/akkartik/mu

permalink

* *
Jun 13, 2021
One idea that got dropped on the editing floor for this post: the long shadows cast over our lives by the very first systems we program on.

I started programming (in undergrad) on an IBM PC descendant running DOS. I moved on to more sophisticated systems, but over a period of decades keep returning to seemingly little things about that first system that I could never replicate. Little things I turn out to be willing to give up big things for.

For others, it was some game console. NES, GBA, etc. I wonder how common it is to actually escape the gravitational pull of our first systems, how much of the differences between our projects stems from having our brains colonized by different first systems.

permalink

* *
Jun 9, 2021
Some live-coding in my programming environment, running on my computing stack built up from scratch.

https://archive.org/details/akkartik-mu-2021-06-09 (video; 6 minutes)

Snapshot of a session within the Mu computer's prototyping environment running on Qemu. There's a REPL sandbox on the right, a few function definitions on the left, a list of available primitives for reference on the bottom left, and a list of available keyboard shortcuts along the bottom.

Main project page: https://github.com/akkartik/mu

permalink

* *
May 31, 2021
Managing side-effects on the Mu computer

https://archive.org/details/akkartik-mu-2021-05-31 (video; 2 minutes)

Screenshot of the Mu prototyping environment running in a Qemu window. There's a code editor on the left and a REPL on the right. The REPL can show prints to a picture-in-picture fake screen. It also permits drilling down into the execution of a run to understand or debug what the computer did.

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

permalink

* *
May 20, 2021
The Mu shell's error handling is now much improved. Errors in programs you typed in were already showing up consistently in a trace without crashing the computer. However, _writes to the trace_ could cause it to crash in cryptic ways. No more.

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

permalink

* *
May 17, 2021
Using Mu to play with some ideas from Hest by Ivan Reese

https://archive.org/details/akkartik-mu-2021-05-17 (video; 3.5 minutes)

Mysterious picture showing a few squares connected by red and orange edges. There's a counter ticking off instants of time on the top right.

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


I was just reminded of the existence of an idea called double-buffering.

It's easy to add.

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.

permalink

* *
May 15, 2021
The Mu computer now dumps a snapshot of the call stack when it fails catastrophically

The Mu computer running on Qemu, showing a session of the Lisp-based shell that has failed catastrophically. On the top left it prints out, all in a pinkish red, an error message and dumps the function calls in the call stack at the time of the error.

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!

permalink

* *
May 9, 2021
Zooming into the Mandelbrot set on the Mu computer

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.

Sources

Main project page: https://github.com/akkartik/mu


Same video but replacing floating point numbers with fixed-point (8 bits of fractional precision)

Sources

permalink

* *
archive
projects
writings
videos
subscribe
Mastodon
RSS (?)
twtxt (?)
Station (?)