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:
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
* *
Jul 26, 2020
This looks quite interesting: someone is actually implementing Rob Pike's structural regular expressions.
https://git.sr.ht/~tudor/rwsh
permalink
* *
Jul 25, 2020
I've been thinking lately about spreadsheets. I don't really use them, but I'm trying to understand why they're so popular. As part of that, here's a rudimentary little demo of what a spreadsheet for trees might look like:
https://archive.org/details/akkartik-2min-2020-07-25
No idea yet where I'm going to go with it, but so it goes. I'm now an existence proof that it's possible to build prototypes in not much more than machine code.
https://github.com/akkartik/mu
permalink
* *
Jul 11, 2020
Update on the Mu computer's memory-safe language
Mu now type-checks calls to functions implemented in unsafe SubX machine code. I have to provide signatures explicitly, and they look like this:
http://akkartik.github.io/mu/html/linux/400.mu.html
https://github.com/akkartik/mu
permalink
* *
Jul 6, 2020
Update on the Mu computer's memory-safe language
Since the language is starting to seem stable, and the error messages have been getting better, and I managed to build some little programs without too much trouble, I figured it was time to start actually talking about the Mu language in the documentation. So make way SubX, and yield center-stage to Mu.
https://github.com/akkartik/mu/blob/master/README.md#toolchain
https://github.com/akkartik/mu/blob/master/mu.md
permalink
* *