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

* *
Sep 27, 2020
Update on stress-testing Mu

I'm continuing to play with my prototype postfix calculator. Who knows, it may even become Mu's mythical level-3 language[1].

Today's video demonstrates function definitions that look different from concatenative languages, and a visualization for drilling down into function calls. All in an environment that updates as you type, built up from machine code.

https://archive.org/details/akkartik-2min-2020-09-27

(More details: https://github.com/akkartik/mu)

[1] http://akkartik.name/post/mu-2019-1

permalink

* *
Sep 21, 2020
Some tweaks to my text-mode RPN calculator built up from machine code, thanks to lots of helpful comments on the Future of Coding community.

Visualizing the evolution of the stack in a postfix calculator using deterministic but random background colors.

Varying foreground rather than background colors.

An early version highlighting just the top of the stack.

Stress-testing the layout algorithm.

https://github.com/akkartik/mu/tree/main/linux/tile

Project page: https://github.com/akkartik/mu

permalink

* *
Sep 20, 2020
New demo: a text-mode RPN calculator built up from machine code

https://archive.org/details/akkartik-2min-2020-09-20

Inspirations:

Unlike these, however, this version tries to hew to two principles:

Project page: https://github.com/akkartik/mu

permalink

* *
Sep 16, 2020
Funny story

A few weeks ago I built a function to read keystrokes from the keyboard. (In machine code, of course.) I planned to support just ASCII keys to begin.

Today I tried to force myself to work on the rest. Terminal escape sequences like arrow keys, UTF-8, and somehow distinguishing between the two.

Surprise: both were already working! I just had to read 32 bits rather than 8 from stdin. Legal UTF-8 doesn't conflict with terminal escapes in 32-bit space.

https://github.com/akkartik/mu/commit/e403d15732

permalink

* *
Sep 11, 2020
3 months ago I built a little prototype text-mode browser for a tiny subset of Markdown. Today it's a prototype no longer; it has fairly thorough tests. See how I write tests for the rendering in a language that maps 1:1 to machine code:

test for rendering headings in Markdown

test for rendering bold text in Markdown

http://akkartik.github.io/mu/html/apps/browse/main.mu.html#L81

Old demo: https://archive.org/details/akkartik-2min-2020-05-29

Repo: https://github.com/akkartik/mu

permalink

* *
Sep 3, 2020
Mu now has support for Unicode. Just graphemes that map to single code points; no combining characters.

Mu also is starting to gain a fake screen that (interactive) programs can print to in tests.

Here's how it looks: https://archive.org/details/akkartik-2min-2020-09-02

Strings are arrays of bytes. To iterate over the graphemes in a string, store it in a stream and read graphemes from the stream.

https://github.com/akkartik/mu

permalink

* *
Aug 30, 2020
My brain is exploding after playing with https://github.com/nakst/flip. I've been looking for years for a simple pedagogical OS that boils things down to their essence and is yet easy to get running on any computer.

I've always had a question in my mind about how to bootstrap the OS. I knew about BIOS but vaguely considered it "cheating" when compared to the "purer" way of working within the processor's ISA. But I'm starting to realize that BIOS is part of the ISA.

Mu will soon drop Linux. Watch.

permalink

* *
Jul 29, 2020
Update on the Mu computer's memory-safe language

Mu now has streams: http://akkartik.github.io/mu/html/linux/404stream.mu.html

I had to really force myself to do this. Streams are generic types, but support for them is hard-coded into the language (just like arrays, and just like in Go). If I need a third generic type I'm going to think hard about just supporting generic type definitions. But my mantra today: YAGNI, YAGNI.

(Mu already supports generics in function declarations.)

https://github.com/akkartik/mu

permalink

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