Hello World
The smallest useful Patch program: create text and show it.
hello-world.patchPatch handbook · Examples
The repository examples are exercised by Patch's test suite. Use the small programs to learn one idea at a time, Workshop Desk for the Current Ready native path, and Patch Studio Showcase for the complete current Studio/Web authoring surface.
window "Hello" size 360, 180: text "Hello, Patch!" at 24, 24 size 220, 32
The smallest useful Patch program: create text and show it.
hello-world.patchA tiny Window application for learning Form and Text syntax.
hello-window.patchPersistent number state, interpolation, a Button event and explicit change.
counter-window.patchA compact if/else example without GUI noise.
Use these when you want a working source pattern for common controls and event semantics.
| Example | What it teaches | Source |
|---|---|---|
| Checkbox Window | Boolean state, Checkbox changed event and explicit persistence. | checkbox-window.patch |
| Combo Window | ComboBox options and transient text selection. | combo-window.patch |
| TimePicker Window | Studio/Web source-backed # @input-mode time with local HH:MM text and explicit native fail-closed behavior. | timepicker-window.patch |
| Calendar Window | Studio/Web inline month grid via # @input-mode calendar, transient month navigation and explicit ISO-date persistence. | calendar-window.patch |
| Counter Window | Button click, bound Text and source-backed geometry. | counter-window.patch |
| Chrome Window | Window chrome controls such as Panel, Timer, StatusBar and Picture on the supported product path. | chrome-window.patch |
| Workshop Desk | Seven Forms, a revision-aware quote workflow, Current Ready native controls, source-backed events, Designer stress and Native GUI IR 1.9 / runtime v1.10 acceptance. | workshop-desk.patch |
| Patch Studio Showcase | A running review desk on Project v4: Things, recipes, ranged calls, repeat and if, plus Registry 0.10 and the Studio/Web surface, including Memo, PasswordEdit, MaskedEdit, NumberEdit, DatePicker, TimePicker, Calendar, CheckedListBox and passive ProgressBar. | patch-studio-showcase.patchproject |
GUI selection remains transient unless your handler performs an explicit Patch change. ProgressBar is intentionally passive and has no control event. The exact supported component/target combination is checked fail-closed by current build readiness.
Bound semantic authority by target, direction and magnitude.
change-capabilities.patchA small program inside the direct WebAssembly numeric subset.
direct-wasm.patchConditions and bounded literal repeat on the direct backend.
direct-wasm-control.patchRanged recipe parameters and calls in the supported direct subset.
direct-wasm-recipes.patchThese are for users who want to inspect the mechanized assurance pipeline. The formal claim remains deliberately narrower than the full Patch language and current RAD product.
| Example | Focus | Source |
|---|---|---|
| Formal calls | Acyclic ranked recipe environments and bounded call arguments. | formal-calls.patch |
| Arithmetic calls | Arithmetic argument binding inside the mechanized range fragment. | formal-calls-arithmetic.patch |
| Callee trace | Structured source-visible callee effect trace. | formal-callee-trace.patch |
| Guarded callee | Parameter guard selection and exact branch witness. | formal-callee-guard.patch |
| Transitive repeated calls | Frame identity when identical call sites execute repeatedly. | formal-transitive-calls-repeated.patch |
| Mixed guards | Repeated call frames with different guard paths. | formal-transitive-calls-mixed-guards.patch |
The canonical multi-file Project-v4 acceptance project is a running review desk. Save profile stores the account on a Thing, scores the review with a ranged recipe, and branches on the active flag. It also covers every Registry 0.10 component, source-backed R4 presets and advanced Table columns. Its Component Gallery demonstrates source-backed per-column width/alignment alongside PasswordEdit, MaskedEdit, NumberEdit, DatePicker, TimePicker, CheckedListBox and a passive ProgressBar using # @slider-mode progress. It is selectable directly in hosted and Offline Studio.
Workshop Desk is the running Current Ready acceptance application. Its seven Forms take a ticket from quote to ready, then open settings, job details, inventory, a customer profile, diagnostics and a native component gallery. Studio/Web-only presets stay out of Native GUI IR 1.9.
Repository tests compile and exercise both boundaries deliberately. The Showcase can demonstrate Studio/Web-only controls while native builds fail closed; Workshop Desk continuously proves the Current Ready Native GUI IR 1.9 / payload v19 / runtime v1.10 path.