Root

Root is the set of omega programs that ship with Subverge, and you can edit all of them while the system is running (editing the OS you're currently using is as fun as it sounds). This page explains how the units are organised, how to edit them and what an edit costs you.

Units

There is no filesystem, so programs are kept as units in the root/ directory of the source tree, one unit per file. The units are linked into the image with ld -r -b binary and parsed at boot, and the first line of each one must be #>> name. Type root to list the units inside the running system together with their sizes and the words they define.

Unit Contents
00-core.om the helpers sq inc fmt bar header watch timeit
05-apps.om apps, the list of programs, which is written by hand
10-sys.om the logo, sys, welcome and startup
20-top.om top
30-inspect.om pcils memls cpuinfo
40-infinity.om count ord-demo powerset pairing diagonal supertask
50-fun.om fortune snake life rain
55-mandel.om mandel mandel-at
56-toys.om sieve bounce sorting stars
57-tools.om clock stopwatch timer todo bases convert password ascii colors pong
60-install.om disks install
70-dev.om xray bench
80-learn.om learn

Editing a unit

'word open opens the unit that defines a word in the built-in editor. Press Ctrl-S to save and Ctrl-Q to leave, and the unit is rebuilt when you close the editor.

The rebuild runs the edited unit and every unit after it again, on top of the dictionary that the earlier units left. If that builds, the root pointer is swapped and the change is visible in all four tabs. If it does not, the source is kept as a draft and the old root stays live.

Units before the edited one are reused, so editing a late unit is cheap and editing an early one is expensive (edit the late ones if you can).

Adding a unit

"name" unit creates an empty unit at the end of root and opens it. What is defined there is available in every tab and is saved on installed disks. A name can contain lowercase letters, digits and -, up to 20 characters, and root can hold at most 32 units (don't go fucking wild).

A new program is not listed by apps until you add a line for it with 'apps open.

Startup

Tab 1 runs startup at boot, which is sys followed by welcome. 'startup open edits it.

Check the tour for screenshots of editing and adding units.

See also