aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Show a bool as true or false, and make the examples' flags boolseunhhu2026-09-303-4/+4
| | | | | | | | | | | | | | aup and Pure now have a bool (Pure 016): a view or column may be one. vega_text writes it as true or false, as a string's interpolation does, so every surface shows the same words: the CLI, the TUI's cells, speech and the web surface's JSON (a value's text) and page. An app that wants other words picks them with a conditional (if t.done { "done" } else { "" }). The flags of the examples are bools: todo's done and urgent, today's done, the stopwatch's running. vega.when takes the bool as it took the number. bools checks a bool field and a bool column on the CLI, the TUI, speech and the web surface: true and false, never 1 and 0.
* Add a board two nodes shareeunhhu2026-09-301-0/+96
| | | | | | | | | | | | | | | | examples/shared-board.aup is the board grown in Pure's research 105: each node sends a changed card whole to the other (send changed { ..at }) and takes the other's whole when it is the later change (cards[k] = Card { ..remote }), by its time and then by the node's name, so both boards end the same whatever order changes come in. The input the other node sends to is the output's like (message like). A new field goes in the card and the output alone. tests/check.py shared_board runs Alice's and Bob's nodes linked both ways over pure://, sealed, each taking the other as its sender: cards added, moved and given on either agree; Bob cut off, both give one card (Bob first, Alice after) and Bob adds one; joined again, both boards take Alice's and Bob's card.
* Add a messenger between two nodes, sealed end to endeunhhu2026-09-271-0/+55
| | | | | | | | | | | | | examples/messenger.aup keeps the lines typed here and sends each to the other node, and keeps the other's. The check runs Alice's and Bob's nodes, each with a key of its own, sealing to the other's and taking lines only from the other (pure-serve --key, --send, --seal, --sender), each drawn by Vega in the node, with a relay between them: a line typed on Alice's display reaches Bob's node and is drawn on his, Bob's answer posted by a program is drawn on hers, each last frame is the one the vega command draws from that node's store, and the relay saw no line's text nor a field's name, only one sealed session each way naming the sender's key.
* Add a board used by people and programs alikeeunhhu2026-09-261-0/+58
| | | | | | | | | | examples/board.aup is a kanban board: people add and move cards on Vega's surfaces, programs post JSON to the same module served by pure-serve, with no routes written. The checks write cards with the CLI into a store, serve that store over HTTP where a program moves one and adds another, and read it again with the CLI, the focus still on the card it was on.
* Give live surfaces a clock and run timers; add a stopwatcheunhhu2026-09-261-0/+43
| | | | | | | | | | | | | The terminal and the web page set the time events see to the wall clock and tick an app's timers on time: each round ticks what is due, draws, then waits for input, a frame or the next tick, and a tick is news to every open page at once. Scripts have no clock: time MS sets the time the next events see and tick TIMER ticks, so an app that uses time replays exactly. A module swap reschedules the timers. examples/stopwatch.aup runs on every surface; the checks drive it by script, on a pseudo-terminal by the clock, and on the web page.
* Add a tally example: a keyed list on every surfaceeunhhu2026-09-261-0/+38
| | | | | | | | examples/tally.aup counts typed words in a list keyed by the word: the screen stays sorted with each word once, typing a word again counts it and moves the focus to it. It runs on the three surfaces with the other examples, and vega check finds nothing in it.
* Show filtered lists and their shared focuseunhhu2026-09-261-0/+39
| | | | | | | | | | | | | | | | A list may now be filtered (each t in tasks where !t.done), and several filtered lists over one list share one focus: the focus view names an item, so Vega asks Pure which row shows it and highlights it only in the list that holds it; the other lists have no focus (null in the web surface's JSON, and the spoken surface names the item where it is). A click or point on a row points at the item that row shows, and the wheel on a list without the focus focuses the row under it. Pure's rows now take a mutable app. examples/today.aup shows what is open and what is done; its CLI output matches a model over random adds, moves, toggles and points into either list, and the web surface leaves the other list without a focus.
* Count the open tasks in the todo exampleeunhhu2026-09-261-1/+1
| | | | | | | | The left field said how many tasks there were; it now says how many are still open, "2 of 3", with aup's count(t in tasks where !t.done), which Pure runs as a fold over the list on every surface. The reference model counts the same, and in the browser the field follows a task marked done.
* Add the first component and three surfaceseunhhu2026-09-252-0/+75
Vega reads a verified Pure module by convention: a table view with a label column is a list (with optional badge, detail and tone), any other table is a table, <table>_focus is its focused row, a title view is the title and other views are fields. lib/vega.aup gives aup apps the tones, which say what a row means; each surface decides how it looks or sounds. vega tui draws the screen in a terminal, keeps the focused row in view and evaluates only the cells on screen; vega cli prints plain lines for pipes; vega say speaks the screen and each focus change as sentences. Display width handles Hangul, CJK, emoji, combining marks and controls. tests/check.py compares the CLI and NUI output with a reference model of examples/todo.aup line for line, checks 9,600 TUI frames for scrolling, focus, badge alignment and the number of cells evaluated, drives the interactive TUI on a pseudo-terminal, and runs every aup example on every surface.