Running RMS Average
Description
A flow that computes the running RMS (Root Mean Square) average of a stream of numbers read from stdin. Inspired by the running average example from "Lucid, the Dataflow Programming Language" (Wadge & Ashcroft, 1985, page 47).
RMS = sqrt(sum(x²) / n)
This example uses only flowstdlib functions — no custom Rust/WASM code needed.
Root Diagram
Click image to navigate flow hierarchy.
Features Used
- Root flow with no sub-flows
- Library Functions used (
multiply,add,count,divide,sqrtfromflowstdlib) - Context Functions used (
readline,stdout) - Loopback connections for accumulating state across iterations
- Input initializers (
oncefor initial values,alwaysfor constants) - Reading from stdin via
readline/json
Functions Diagram
This diagram shows the exploded diagram of all functions in all flows, and their connections.
Click image to view functions graph.