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
* *
Jul 1, 2020
I made a fun little demo today using Mu. Fun for me, anyway :)
https://archive.org/details/akkartik-2min-2020-07-01
Mini rant on prototypes. While a prototype like this would possibly be less work to build on say Python, I think building it atop Mu provides some significant advantages. Research prototypes are not entirely throw-away; the goal with them is to accumulate learning even while the codebase churns. Because it relies on so few dependencies, Mu is more robust to bitrot. This makes it easy for someone else to reproduce an experiment. Even relatively far in the future. I really hope we can converge on a shared platform something like this for research prototypes. It does still need graphics and sound, though..
https://github.com/akkartik/mu
permalink
* *
Jun 21, 2020
Update on the Mu computer's memory-safe language
Mu now checks for most variable accesses if the variable is still live, and it's register hasn't been clobbered by some other variable. The extra-burdensome parts of programming in Mu are hopefully now not very burdensome.
Next up: testable syscalls for screen and keyboard. But I might take a break first. My RSI has been acting up.
https://github.com/akkartik/mu
permalink
* *
Jun 18, 2020
Update on the Mu computer's memory-safe language
Mu now checks all function calls.
Pass in the wrong type = error.
Save a result to the wrong type = error.
Save a result to the wrong register = error.
There are automated tests for error messages.
I estimate this change protects against 60% of the most common mistakes. Checking the most recent variable in a register should provide another 20%. And I hopefully have TODOs for the remainder to gradually whack away.
https://github.com/akkartik/mu
permalink
* *