Mar 3, 2021
Have you cloned the Mu repo and tried to make sense of it? Do you have any suggestions for improving the directory organization? I'm starting to revisit it, so would appreciate any thoughts you have. (Even if this gets you to clone the repo for the first time.)

https://github.com/akkartik/mu

permalink

* *
Feb 25, 2021
Drilling into computations on the Mu shell

This was one of the more difficult things I've built, and yet all I've gotten working so far is some rudimentary tokenization. The reason is one little feature.. well, take a look for yourself.

https://archive.org/details/akkartik-2min-2021-02-24 (video; 2 mins)

Screenshot of the Mu computer running within Qemu, showing a command typed in in cyan, results in grey and an overview (trace) of the computation performed in blue.

As always, built all the way up from machine code, and designed primarily to be easy to build, easy to run, comprehensible to others. Also this time with lots of tests.

https://github.com/akkartik/mu

permalink

* *
Feb 21, 2021
I'm working through Make a Lisp with Mu

So far I'm done with https://github.com/kanaka/mal/blob/master/process/guide.md#step-0-the-repl, albeit with some tweaks since it's baremetal

https://github.com/akkartik/mu/tree/main/baremetal#readme

REPL stub running in Qemu that always returns

permalink

* *
Feb 19, 2021
An experimental way to do control flow in the postfix Mu shell

The screenshot below shows an idea I've been playing with.

Screenshow showing the Mu shell running without an OS within Qemu. Below each word typed in is the state of the stack after the word was executed. Most words push things to the stack. The <code>break</code> word skips future words until a <code>}</code>, so some later words don't show stacks.

The conventional way Forth does control flow is a little confusing with words like if and then showing up at the end.

Factor uses quotations to put code blocks on the stack. But then you see a potentially complex chunk of code executing "all at once".

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

permalink

* *
Feb 14, 2021
The Mu shell is now off Linux

https://archive.org/details/akkartik-mu-shell-20210214

Screenshot of a postfix arithmetic expression within Qemu showing the stack after each word.

Starting point for the sources: http://akkartik.github.io/mu/html/baremetal/shell/line.mu.html

The architecture is now much cleaner. Functions contain lines, lines contain words, words contain gap buffers. Rendering a thing renders its constituent things. Render takes a top-left coordinate and returns a bottom-right coordinate. Each thing knows which constituent thing has its cursor, shows its cursor when rendering, redirects incoming keystrokes to it.

https://github.com/akkartik/mu

permalink

* *
Feb 13, 2021
I've been reimplementing my from-scratch live-updating postfix shell to really from scratch (no more OS kernel), while at the same time rewriting the prototype with lots of tests and actually giving the language some sort of rigorous basis. No demos yet, but in the meantime here's Conway's Game of Life running on baremetal Mu.

Screenshot of Conway's Game of Life within a Qemu window.

https://archive.org/details/akkartik-mu-life-2021-02-13

Sources: http://akkartik.github.io/mu/html/apps/life.mu.html

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

Standing offer: I would love to collaborate on a computing stack for a non-English language by forking https://github.com/akkartik/mu. It's very barebones and not afraid of radical experiments. It already has an API for rendering arbitrary UTF-8 strings and returning arbitrarily-sized bounding boxes for what was rendered. So the work is mostly creating glyphs for combinations of codepoints. And rules for segmenting. And lots of testing.

permalink

* *
Jan 23, 2021
It took a while, but I've finally ported a pre-existing Mu program to baremetal (not atop Linux): an RPN calculator.

Screenshot showing an RPN calculator written in Mu being built into a bootable disk image, and a session of the calculator inside Qemu. The session includes a half-written command and a cursor working as expected.

This was hard, purely because of cursor management. I have a greater appreciation for everything that display hardware and terminal emulators provide for text mode. Mu so far puts the onus on the programmer.

http://akkartik.github.io/mu/html/baremetal/rpn.mu.html

In the end it's interesting to visualize the changes I had to make:

vim -d apps/rpn.mu baremetal/rpn.mu

Screenshot showing a diff between the old apps/rpn.mu and the new baremetal/rpn.mu. All the changes are in `main`. The rest of the program is folded away at the bottom because it's identical.

They're entirely in main; the rest is unchanged.

permalink

* *
Jan 13, 2021
I built a game of "snakes", but it came out more like an etch-a-sketch 😄

simple line drawing of a manhattan skyline, green on black

http://akkartik.github.io/mu/html/baremetal/ex7.mu.html

Play it on any non-windows:

git clone https://github.com/akkartik/mu
cd mu
./translate_mu_baremetal_emulated baremetal/ex7.mu
qemu-system-i386 disk.img

h/j/k/l to draw.


I made an art! On a computer without an OS.

permalink

* *
Jan 12, 2021
I've been trying to visualize the default 256-color palette I get on baremetal.

256 vertical lines, each 4px wide, showing the 256 default colors in VGA mode (without messing with the palette).

http://akkartik.github.io/mu/html/baremetal/vga_palette.html

To my eyes it looks like I can/should just live in the first 128 colors.

permalink

* *
Jan 12, 2021
A more international interface for rendering text

New 2-minute video:
https://archive.org/details/akkartik-2min-2021-01-12

Screenshot showing Mu computer displaying text within a Qemu window.

You get just one fixed screen resolution: 1024x768, 256 colors. Widely available on modern machines, no drivers needed.

You get just one fixed-width bitmap font. No bold/italics, no anti-aliasing.

BUT it won't make assumptions about English and left-to-right order. I eventually want anybody to be able to customize it to their language.

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

permalink

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