Type System
Signal-oriented. Unit-enforced. The @ operator declares units. The compiler enforces consistency. You cannot connect a distance output to a temperature input. You cannot accidentally mix cm and inches.
Primitives
.zpprimitive types
distance : f32 @ cm | m | in | ft
temperature : f32 @ C | F | K
pressure : f32 @ psi | bar | Pa
speed : f32 @ m/s | rpm | mph
voltage : f32 @ V | mV
current : f32 @ A | mA
frequency : f32 @ Hz | kHz | MHz
time : f64 @ s | ms | us | ns
power : f32 @ W | kW | MW
flow : f32 @ gpm | lpm
angle : f32 @ deg | rad
frame : image @ rgb | gray | depth
audio : stream @ pcm | delta
label : string
trigger : bool
raw : bytes
vec2 : (f32, f32)
vec3 : (f32, f32, f32)Unit Enforcement
Units are not decoration. They are enforced at compile time. The compiler rejects connections between incompatible units.
.zpunit enforcement
// valid — same domain
sensor : gpio(17) -> distance @ cm
distance -> gate(> 20cm) -> motor
// compiler error — incompatible units
// distance @ cm -> gate(> 80C)
// ERROR: cannot compare cm to C
// compiler error — mixed units
// distance_a @ cm + distance_b @ in
// ERROR: cannot mix cm and in without conversionStructured Signals
Signals can carry structured data. No classes. No objects. Signals have structure. That's it.
.zpstructured signals
// a message signal
message : {
author,
content : text | image | file,
timestamp: t
}
// route by structure
message -> gate(content: text) -> text_handler
message -> gate(content: image) -> image_handlerWhat Doesn't Exist
No generics. No inheritance. No classes. If you need a collection, the signal carries multiple values. The OS handles plurality from discovery.
| Concept | Why Not |
|---|---|
| Generics | Signals have concrete types with units. No abstraction needed. |
| Inheritance | Signals don't inherit. They connect. |
| Classes | Signals have structure. That's it. |
| Interfaces | Connection compatibility is type + unit. The compiler checks it. |
| Enums | Use gate matching: gate(status: any("ok", "err")) |
| Arrays | Signals carry values. The OS handles plurality. |
Signal Sources
Signals originate from the world. The OS discovers them. They emit continuously — they don't "run." They exist.
.zpsignal sources
// hardware — discovered at boot
sensor : gpio(17) -> distance @ cm
camera : csi(0) -> frame
fleet : pcie(vendor: habana) -> cards
// filesystem
changes : fs("/home/z13/projects") -> events
// network
server : net.listen(port: 8080) -> requests
feed : net.connect(host, port) -> data
devices : net.discover(proto: zigbee | modbus) -> found
// time
heartbeat : tick(rate: 60Hz) -> frame
daily : tick(rate: daily, at: "00:00 UTC") -> trigger
// OS internals
cores : telemetry.cores -> readings
memory : telemetry.memory -> usage