💾 Archived View for kvothe.one › gemlog › 2020-08-11.gmi captured on 2020-10-31 at 01:07:08. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
I installed the community fork of Plan 9 from Bell Labs, 9front, on a QEMU virtual machine on Sunday and I'm having SO MUCH fun playing around with it. Here's a Fediverse post with a screenshot of me compiling and running my first "hello world" C program from the Plan 9 `acme` editor:
https://mastodon.sdf.org/@kvothe/104668329780438685
Getting 9front installed on a QEMU VM wasn't too terribly bad. Pulled down the amd64 ISO from 9front.org, and followed the FQA instructions to install 9front:
FQA general installation instructions.
The only difference being that I omitted the KVM and CPU args.
Here's installing the ISO on the VM:
qemu-system-x86_64 -m 1024 \ -net nic,model=virtio,macaddr=52:54:00:00:EE:03 -net user \ -device virtio-scsi-pci,id=scsi \ -drive if=none,id=vd0,file=9front.qcow2.img \ -device scsi-hd,drive=vd0 \ -drive if=none,id=vd1,file=9front.iso,format=raw \ -device scsi-cd,drive=vd1,bootindex=0
And here's running the VM post install:
qemu-system-x86_64 -m 1024 \ -net nic,model=virtio,macaddr=52:54:00:00:EE:03 -net user \ -device virtio-scsi-pci,id=scsi \ -drive if=none,id=vd0,file=9front.qcow2.img \ -device scsi-hd,drive=vd0
To get the VM's system clock to sync properly with an NTP server, I added `TIMESYNCARGS=(-n pool.ntp.org)` to the top of `/rc/bin/cpurc` and `/rc/bin/termrc` inside the 9front VM.
Actually using 9front is taking a little getting used to, largely because it's natively graphical and the three-button mouse interface is a bit different than I'm familiar with. Also, Ctrl-F is tab completion in the terminal. Most of the unix commands are there, like `ls`, `man`, and `cat`.
Russ Cox's "A Tour of the Acme Editor" is a great starting point to get the gist of how to use `acme` and how the mouse interface works:
For a deeper dive into the system design of Plan 9, the Plan 9 papers have been a great introduction:
http://doc.cat-v.org/plan_9/4th_edition/papers/
No splitting hairs here: Plan 9 is a bare-bones operating system. When you boot it up, you get a terminal and a box of cpu/mem/network monitoring graphs on a gray background. It's reminiscent of starting up the X11 windows system with a lone `xterm` window.
But, like gopher and gemini, the joy for me has been in the minimalism and discovering a new way of computing. Under that garish beige, blue, and grey UI, under the unflinching gaze of `games/catclock`, there's a really neat system design.
the unflinching gaze of `games/catclock`.
For one, nearly EVERYTHING is presented to the user as a raw file. A TCP connection, for instance, winds up being a directory specific to that connection, e.g. `/net/tcp/2`, containing files such as `ctl` and `data`. To connect to localhost port 8000, you would just append "connect 127.0.0.1!8000" to `/net/tcp/2/ctl`.
What sold me on trying Plan 9 was Devine Lu Linvega's toot sharing that GUI programming was built into Plan 9's C dialect, natively:
https://merveilles.town/@neauoire/104654700563809371
This reminded me of the Squeak VM, which is sort of an all-in-one kit for Smalltalk programming. I LOVED tinkering around with Squeak back in college, but doing the same sort of thing in C? YES, PLEASE.
Plan 9 delivers on the imagined promise of an all-in-one tinkering kit in spades.
It's a bit like getting new painting supplies. The canvas is ready, the brushes fresh and ready to make art. I'm not quite sure *what* art I'm going to sketch out on Plan 9, but its possibilities bring me tangible joy.
Until next time, be well!
kvothe.