Skip to content

mop

mop is “track stocks the hacker way” — a small Go TUI that displays current market indices and a customizable list of individual stocks, refreshing every 600 seconds by default. The keybinding surface is unapologetically terse — + add, - remove, f filter, F unset filter, o sort, O reverse sort, g group, G ungroup, p pause, ?/h/H help, q/esc quit — and the configuration lives in a single dotfile .moprc so a user’s portfolio + settings persist across sessions.

Two specific patterns are worth lifting for KN-86: the filter expression engine (f opens a prompt where the user types a Python-ish boolean expression like last <= 5 and the list filters in real time) and the dot-file profile as the unit of personalization.

  • Terse single-key bindings are the right baseline. mop confirms the audium / l123 “one key per action” doctrine: meaningful actions are single-keystroke, no chord required for primary surfaces. KN-86 already commits to this by hardware constraint (31 physical keys); mop is contemporary confirmation that it’s also good UX in software.
  • Expression-filter as a sanctioned KN-86 pattern. last <= 5 parsed and evaluated against each row’s fields. For KN-86 this is the right pattern for surfaces that show many-rows-of-something (mission board with rep:>50, dispatch log with phase:active, cart manifest with kind:terminal) — a tiny query DSL on Row 24, modeled on the Wireshark-style filter from NetWatch and now reinforced by mop. The grammar should be whatever the cart’s KEC Lisp interpreter already understands so cart authors don’t have to define a second DSL — (<= last 5) in KEC Lisp form works fine, or a small infix layer on top.
  • Single dot-file profile (.moprc). Confirms the audium “human-editable JSON portable library” lineage from a different angle. For KN-86 the equivalent is nosh-config.toml + Universal Deck State on the microSD (ADR-0011); the principle (one file, text format, hand-editable) is the same.
  • Row shading as a low-cost layout cue. mop alternates row backgrounds subtly to make the table scannable. KN-86 on a monochrome amber device can do the same with intensity delta rather than color delta — slightly dimmer amber on alternate rows. Worth a small entry in docs/software/cartridges/authoring/ui-patterns.md alongside the data-density discipline.
  • Sort + group + pause as three orthogonal verbs. Each is a single key (o / g / p); each is independently toggleable. KN-86 list surfaces should expose the same three: sort the list, group rows by some axis, pause auto-refresh. Three keys, three independent state bits.

No image downloaded.

  • The expression-filter idea is the standout single takeaway. Promote: a small filter-expression-on-Row-24 pattern for KN-86 list surfaces, evaluated in the cart’s KEC Lisp scope. Cross-references the existing NetWatch Wireshark-display-filter promote item.
  • Cross-link audium and l123 for the keyboard ergonomics confirmation. mop is the third independent witness for “single key per action” as the right baseline.
  • The Go + termbox-go choice is itself worth noting: mop predates Bubble Tea and shows a more direct termbox-go-driven style. Reading it shows the simpler shape of a TUI that doesn’t need the Elm architecture — which is the right reading if KN-86 ever wants to scope down from the Charm stack.