Operators

The entire language. Every operator describes a relationship between signals. No assignment. No arithmetic. Connections.

Flow

How signals move through the graph. Every program is built from these.

OperatorNameMeaning
->flowSignal flows from left to right
~>tapObserve without affecting (read-only)
-x>severCut a wire (disconnect, unfollow, block)
<->exchangeBidirectional — request/response, ack
@pinRun on specific hardware
.zpflow operators
// signal flows left to right
sensor -> gate(> 20cm) -> motor

// tap observes without affecting
controller -> motor
controller ~> dashboard

// sever cuts a connection
user -x> feed

// exchange is bidirectional
request <-> handler -> response

// pin to hardware
detect @ goya(0) -> objects

Structure

How signals combine and split. Merge converges. Fork diverges. Chain sequences.

OperatorNameMeaning
|mergeMultiple signals converge into one point
{}forkOne signal splits to multiple paths simultaneously
-> chainchainA -> B -> C — signal flows through a pipeline
.zpstructure
// merge — three signals converge
sonar  -> |
camera -> | -> decision
lidar  -> |

// fork — one signal, multiple paths
camera -> {
    display,
    detect -> classify -> act
}

// chain — pipeline
raw -> filter -> normalize -> store

Logic

Signal evaluation. Gates pass or block. Delta measures change. These are keywords, not functions.

OperatorNameMeaning
gate()gateSignal passes or doesn't
knee:kneeSmooth transition zone (no hard cutoff)
delta()deltaRate of change: t - t-1
.zplogic
// gate — threshold
signal -> gate(> 80C) -> alarm

// gate with knee — smooth transition
temp -> gate(< 72F, knee: 3F) -> heater

// delta — rate of change
delta(temp) -> gate(> 2C) -> rising_fast

Temporal

Time is a first-class dimension. Every signal has history. The OS maintains it.

OperatorNameMeaning
tnowCurrent signal value
t-1previousOne step back
t-NhistoryN steps back
on_silence()silenceNothing arrived for duration
on_blockblockedGate rejected the signal
sustained:sustainedGate must hold for duration
within()confluenceSignals must arrive within time window
thensequenceA then B — ordered temporal coincidence
debounce()debounceCollapse rapid signals into one
throttle()throttleLimit signal rate
decay()decaySignal strength decreases over time
tick()clockEmit signal at fixed rate
.zptemporal
// sustained — must hold for duration
errors -> rate(per: 1m) -> gate(> 10, sustained: 5m) -> alarm

// silence detection
sensor -> on_silence(> 100ms) -> failover

// confluence — within a time window
a -> |
b -> | within(100ms) | -> fused

// clock
heartbeat : tick(rate: 60Hz) -> frame

Value

Pattern matching on signal values. Range, any-of, negation, sigma.

OperatorNameMeaning
~rangeBetween two values: 0.6 ~ 0.9
any()or-matchMatch any of several values
not:negateExclude matches
σsigmaStandard deviations from baseline
.zpvalue
// range
signal -> gate(0.6 ~ 0.9) -> tier_general

// any-of
signal -> gate(command: any("set", "del")) -> writes

// negation
signal -> gate(not: "*.tmp", ".git/*") -> clean

// sigma
dev -> gate(> 2σ, knee: 1σ) -> anomaly