Delta
Rate of change. The language's soul. Sequential code reasons about state — what IS the value right now? Z+ reasons about change — what is the value DOING right now?
Delta is not a library function. It's a keyword. The OS maintains temporal history on every signal. t, t-1, t-2 exist. Delta is just t - t-1.
Derivatives
// first derivative — velocity
delta(temp) // how fast is it changing?
// second derivative — acceleration
delta(delta(temp)) // is the change speeding up?
// third derivative — jerk
delta(delta(delta(temp))) // is this losing control?A temperature climbing at a steady rate is predictable. One where the rate is accelerating is concerning. One where the acceleration is jerking is a system on the edge of chaotic failure. Three levels of delta(). No calculus library. No numerical differentiation. No buffer management.
Delta vs. State Logic
// state logic — triggers when temperature crosses threshold
temp -> gate(> 80C) -> alarm
// delta logic — triggers when temperature is rising fast
delta(temp) -> gate(> 2C) -> alarm
// 40C and climbing at 3C/s is more dangerous
// than 79C and stable. delta knows this.Baseline + Deviation
Learn what's normal over time, then measure how far the current signal deviates from that learned normal.
// learn what's normal
signal -> baseline(window: 7d) -> normal
// measure deviation from normal
signal -> deviation(from: normal) -> dev
// gate on standard deviations
dev -> gate(> 2σ, knee: 1σ) -> anomalySeasonal Baselines
Monday at 9am is different from Sunday at 3am. Baselines can be segmented by temporal dimensions.
// seasonal baseline — accounts for patterns
cpu -> baseline(window: 7d, by: day_of_week, hour) -> seasonal_normalSigma
The σoperator measures standard deviations from baseline. Combined with a knee gate, it creates smooth anomaly detection that doesn't trigger on normal variance.
// anomaly: more than 2 standard deviations from normal
// with a 1-sigma knee for smooth transition
dev -> gate(> 2σ, knee: 1σ) -> anomaly
// different severity levels
dev -> gate(> 2σ) -> warning
dev -> gate(> 3σ) -> critical
dev -> gate(> 4σ) -> emergencyTemporal Access
Every signal carries its history. Access any previous value directly.
// t is now, t-1 is previous, t-N is N steps back
signal.t // current value
signal.t-1 // previous value
signal.t-2 // two steps back
// delta is simply t - t-1
delta(signal) == signal.t - signal.t-1Failure Horizon
Predictive logic built from delta. Not machine learning — just calculus expressed as language primitives on signals with temporal history.
// predict when a metric will reach a threshold
// using rate and acceleration
goya_3.thermal -> failure_horizon(85C) -> {
gate(< 30s) -> emergency_migrate,
gate(< 5m) -> gentle_migrate,
gate(< 1h) -> note_it
}
// "how long until this card overheats?"
// answered continuously, in real time