灵符lingfu
L

ling-sys

↓ 0 downloads

System activity and performance monitor in the Ling Design System — dials, meshes, drums and crosshatch for CPU, GPU, memory, disk, network, board, processes and audio, with every subsystem given a voice. A LingOS app for rpi5: live board/CPU/memory/process stats from the kernel (stats-lingos.ling).

Windows · x86-64macOS · Intel x86-64Linux · x86-64LingOS · x86-64LingOS · Pi 5 ARM64Web · WASM
lingfu install ling-sys
Authorsling-lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (13)

README.md
# LINGSYS

A system activity and performance monitor written in the Ling language and
drawn in the Ling Design System: line work on black, seven semantic hues,
crosshatch as the only fill, Daemon glyphs in tiles, Chesilin on rings —
and every subsystem given a voice, so the machine hums, ticks, pings,
wooshes and dings in step with what it is doing.

## Run

From this folder:

    ling run main.ling

The window sizes itself to the monitor and the layout is proportional, so
it survives resizing. Two PowerShell collectors start automatically
(`collector.ps1` once a second for system stats, `collector-audio.ps1`
twelve times a second for real audio peak meters) and exit by themselves
when the app's heartbeat (`app.beat`) goes stale.

## Tabs

Keys `1`–`9` or click; `TAB` cycles.

| Tab | What it shows |
|---|---|
| OVERVIEW | every instrument on one sheet, round the mainboard map |
| CPU | the big core dial, a core field mesh, clocks, 96-tick history |
| GPU | load dial, VRAM field, heat, fan, power, history |
| MEM | the memory grid mesh, commit and cache, page-fault dial, history |
| DISK | read and write dials, every spindle, every volume, history |
| NET | receive and send dials, session totals, history |
| BOARD | the motherboard map, host facts, context switches |
| PROC | the process drum and the top table |
| AUDIO | real render and capture peaks, devices, the app's own voices |

## The semantic mapping

The seven keys of the design system carry the seven subsystems:

| Key | Hue | Shape | Subsystem |
|---|---|---|---|
| `asm` | red | octagon | mainboard |
| `lit` | orange | cross | GPU and audio |
| `bind` | yellow | circle | memory and disk |
| `ctl` | green | triangle | CPU |
| `call` | blue | diamond | network |
| `fn` | indigo | hexagon | processes |
| `mod` | violet | square | the root: this machine, 灵 at the hub |

Packets flow along the mainboard connectors at constant speed; their count
follows real activity, and each arrival at the hub kicks it and sounds a
soft tup. Dials carry nested rings that counter-rotate, faster when the
subsystem is busier. Hatch density is data: one to four steps, open to
dense.

## The voices

| Sound | Source |
|---|---|
| tick–tock | CPU load sets the pace of the escapement |
| low drone | memory fill sets the pitch |
| whine | GPU load sets the pitch, fan sets the flutter |
| airy hum | network throughput |
| deep drone | the board, always underneath |
| scratches | disk reads (high) and writes (low) |
| pings and wooshes | packets in, packets out |
| ding | the process population changed |

The active tab's voice is brought forward in the mix. SOUND and VOL live
in the CONTROLS panel; the AUDIO tab shows every voice as a meter, plus real
speaker and microphone levels on dB-scaled VU dials (Windows).

## Windows and LingOS

On Windows two PowerShell collectors feed every instrument. The microphone
dial reads a level-only capture stream: nothing is recorded, stored or sent,
and the MIC switch in CONTROLS releases the device.

On LingOS (a Raspberry Pi) the kernel gives apps host, board, uptime, free
memory and the running-app list, so those are live; CPU, GPU, disk and network
load are not exposed to apps and read zero. A running-app change sounds the
ding and a memory change of 4 MiB or more sounds a soft tick. English text
falls back to the kernel's 8x8 pixel font, arcs are drawn from short lines,
and one-shot sounds play on spare tone voices, because LingOS has neither
`draw_arc` nor `audio_blip`.

## Controls

The translucent CONTROLS panel (top right): SOUND, PACKETS, SPIN, LABELS and
MIC toggles; TXT picks the script — 0 all Daemon/Chesilin, 1 stats in English
(default), 2 everything in English; SPD 0–4 is motion speed (0 is still);
VOL 0–4. `F12` saves a screenshot to `screenshots/`; `ESC` quits.

## Files

    main.ling            layout, tabs, instruments, the loop
    lds.ling             the Ling Design System drawn natively
    stats.ling           collector launch, parsing, history
    sound.ling           the synth voices
    collector.ps1        system stats, once a second
    collector-audio.ps1  CoreAudio peak meters, ~12 Hz
    assets/fonts/        Daemon.otf (tiles), Chesilin.ttf (rings)

Runtime files (`stats.txt`, `info.txt`, `audio.txt`, `mic.cfg`, `app.beat`,
`collector*.log`) regenerate on every run and can be deleted freely.

← Back to index