https://github.com/akkartik/mu/tree/main/linux/tile
Project page: https://github.com/akkartik/mu
https://github.com/akkartik/mu/tree/main/linux/tile
Project page: https://github.com/akkartik/mu
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
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
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
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
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.
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
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
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