Apr 9, 2021
Mu's HLL is now Turing-complete, I think.

Things to notice:

  • Wordstar-style menu at the bottom.
  • List of available primitive functions in bottom left.
  • List of globals on the left side that updates as I add definitions.
  • Matching parens highlighted as I type.
  • Drilling down into the trace to understand how the program was evaluated.

https://github.com/akkartik/mu/blob/main/shell/README.md

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

permalink

* *
Mar 29, 2021
What should the signature of a program look like?

Typed languages have a fixed signature for function `main`. A list of strings, a window context, or an IO monad.

Here's the signature on the Mu computer:


fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)

A rudimentary, hokey capability system. No mouse yet. 'screen' is only used for text; pixel graphics currently go around it. 'data-disk' can't access code, and will eventually include finer-grained restrictions.

permalink

* *
Mar 23, 2021
The Mu computer now has drivers for disk and mouse.

Still extremely klunky. IDE disk drives only, and the mouse driver uses polling because configuring IRQ 12 is still beyond me.

Example programs (as usual memory safe and translating 1:1 to x86 machine code)

Disk: http://akkartik.github.io/mu/html/ex9.mu.html

Mouse: http://akkartik.github.io/mu/html/ex10.mu.html

Here's video of the mouse example. There's no pointer so you have to imagine me moving the mouse around.

Video of a Qemu window with mostly black background showing just two fluctuating numbers in bright green, denoting change in x and y coordinates as I move the mouse around.

Like I said. Klunky.

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

permalink

* *
Mar 22, 2021
Mu can now read from an ATA (IDE) disk drive on Qemu.

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

It wouldn't have been possible without the lovely folks over on #osdev. And the inspiration of ColorForth (https://merveilles.town/@akkartik/105906716550232992), though I still don't understand how that driver works.

permalink

* *
Mar 17, 2021
A driver for IDE hard disks in Forth

https://colorforth.github.io/ide.html

It seems to be using https://wiki.osdev.org/ATA_PIO_Mode which transfers data to disk one byte at a time. Super inefficient. And yet, so small! ❤️

permalink

* *
Mar 9, 2021
Today was documentation day

Primitives available in the Mu computer when running without an OS: https://github.com/akkartik/mu/blob/main/vocabulary.md

Primitives available when running on Linux: https://github.com/akkartik/mu/blob/main/linux/vocabulary.md

For starters I focused just on making things more discoverable. These files are optimized for opening in your text editor, jumping to definitions to see type signatures, etc. See https://github.com/akkartik/mu/blob/main/editor/exuberant_ctags_rc for a ctags configuration for Mu and SubX programs.

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

permalink

* *
Mar 7, 2021
Visualizing function calls with anonymous functions

https://github.com/akkartik/mu

A session of the Mu shell running in Qemu. An anonymous function to add two numbers returns the right result, and a partially expanded trace elucidates how it got to the answer.

permalink

* *
Mar 5, 2021
It's alive.

A screenshot of a Lisp running inside Qemu, showing the evaluation steps for (+ 1 1)

The same command expanding steps for tokenization rather than evaluation.

Screenshot taken while debugging the program showing debug by print (of the entire trace at once)

https://github.com/akkartik/mu

permalink

* *
Mar 4, 2021
I really wish I'd read Kragen Sitaker's https://dercuano.github.io/notes/forth-assembling.html before I built SubX.

permalink

* *
Mar 3, 2021
I took a stab at reorganizing Mu's directory tree. It had gradually sprawled from old stuff at the top-level to new stuff in sub-directories. Now the top-level contains what I want people to see first, and build tools for each directory are in a sub-directory.

Building a disk image before:

./translate_mu_baremetal baremetal/life.mu

After:

./translate life.mu

Building an ELF binary before:

./translate_mu apps/hello.mu

After:

cd linux; ./translate hello.mu

https://github.com/akkartik/mu#readme

permalink

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