*Update on the Mu computer*

A few days ago I found out about a hobbyist OS called Soso: github.com/ozkl/soso

Today I've gotten Mu running on it well enough to make it a first-class supported platform alongside Linux.

github.com/akkartik/mu#readme

LoC of C I depend on thus goes down from 12M to 33k.

It's not a complete replacement, though. I still plan to work with Linux, particularly for its networking support. But it's *so* cool to have a minimal stack supporting graphics!

@vertigo @rain

I've mentioned this a few times but never publicly announced it, so consider this the announcement.

Yes, I have ported #Wayland (along with a few Weston clients and wl-clipboard) to the #Hurd (that's what I wrote the epoll server for!)

I've also ported Owl, my Cocoa Wayland compositor, from OS X to the Hurd using GNUstep.

Here's a screenshot of weston-terminal and weston-flower, running on Owl on GNUstep on Hurd, with X forwarded from a QEMU VM via SSH.

The #C programming language was invented in 1972.

#APL was invented in 1966.

My current thought experiment: what if #unix had been built in an APL environment instead of a C one?

*Update on the Mu computer*

Syntax sugar for function calls is done. Here's factorial with no sugar, addressing modes and function calls, respectively.

Time now to start building a proper language, to occupy C's niche on this new stack. Type-safe, memory-safe, manual (but safe) memory management, manual (but safe) register allocation.

Though I might build a toy Lisp first. I figure I've earned some fun. Seeing a computer boot into a REPL would qualify.

github.com/akkartik/mu#readme

@rain @vertigo

I'm also taking the Oberon-inspired point of view that I *should* be able to write the entire software stack in high-level code. Register-level procedures would be implemented in language-provided intrinsics. Applying my experience from writing the assembler, especially while it's still fresh in my mind.

@akkartik
Stick *that* in your company's 80-columns max coding conventions and smoke it!! 馃槣
@rain

How SubX code has evolved over the past year

2018/Jul/30: mastodon.social/@akkartik/1004

2019/Sep/03: akkartik.name/images/20190903-

The first thing that pops out is that lines have gotten narrower.

Or have they? Scroll down and some long lines start to show up. Even if you ignore trailing comments. Check out the screenshot. Lines wider than 80 characters translate to 2-byte jump instructions. I wonder if I've lost my sense of proportion somewhere along the way.

@rain @vertigo

wondering if the commodore 64 had any etymological relation to toilets, TIL:

- "commode" comes from the latin and french words for "convenient"
- "a commode" meant a cabinet or chest of drawers in 1700s france
- it wasn't until british english that it meant "chamber pot chair"
- it wasn't until americans that a flush toilet was a commode

i wonder if humans of american descent will ever decide en masse to abandon americanisms that obviously came from guessing a meaning and sticking to it

I'm beginning to be increasingly convinced that TDD isn't the best approach for building out a lexer or parser. The lexer can be tested well enough, and code generator can be tested well enough, but the parser seems to be the program which drives and coordinates the whole package.

Towards this end, then, I think I'm going to skip TDD for the assembler, and resort to more traditional software testing methods (mostly integration testing).

*Update on the Mu computer*

Now that we have a notation for addressing modes, we're designing syntax for function calls.

It's easiest to parse if we start with a paren and avoid commas. However, the similarity to s-expressions is only skin deep. There can only be 2 levels of parens, and args can't do arbitrary arithmetic.

Pseudocode: akkartik.github.io/mu/html/app
Uses the just-created addressing mode notation! (mastodon.social/@akkartik/1026)

More info: github.com/akkartik/mu#readme

@rain @vertigo

More deletions later, LoC in my fork of the Linux kernel are down from 27.1M to 12.3M. Goal is to only support lowest-common-denominator devices.

github.com/akkartik/mu#readme

(My line-counting was way off earlier in this thread.)

Reason #83 to fork open-source projects

You get to see your name and picture on a git log alongside luminaries like Linus Torvalds.

github.com/akkartik/kernel#rea

*Update on the Mu computer*

Now that we have a bootstrapped (quasi-) language[1] and (kinda) bootstrapped OS[2], we're finally starting to think about less error-prone notations.

This week two of us built a notation for x86 addressing modes:

direct: %ecx
indirect: *ecx
indirect with displacement: *(ecx+4)
indirect with index, scale and displacement: *(ecx + edx<<3 + 4)

Not yet sure this is a good approach. But it'll be fun to playtest.

[1] mastodon.social/@akkartik/1024
[2] mastodon.social/@akkartik/1025

@kusuriya These days I click 'Reader View' the moment something pops up.

@mdhughes Try my example on zsh before you say that 馃槀 馃槀 馃槀 馃槶 I use zsh as well, but there's a reason my original toot said "shell".

@kingcons @rain @alcinnz @carbontwelve @someonetellmetosleep @hirojin @grainloom @gcb

Show more
Mastodon

Server run by the main developers of the project 馃悩 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!