Not fragments. Each one is a file in catalog/ that runs as
it stands — a real problem from measurement, signals, or data, solved end to end.
The build runs every one of them, so the printed output and the figure on each page
are what the engine produced, not what someone typed.
Read one near your own work and change it. That is the fastest way into the language, and it is why these exist.
a script that runs end-to-end on the M2 interpreter.
demo_signal.qu
2D grid interpolation with `interp2`.
qu_bilinear_interp2.qu
recovering a signal from far fewer samples than Nyquist demands, six different ways.
qu_compressed_sensing.qu
complex numbers and the DFT on the reference engine.
qu_fft_spectrum.qu
digital IIR filter design, diagnostics, and zero-phase filtering of a noisy signal.
qu_filter_design.qu
signal-aware interpolation, elementwise transforms, and range extraction (commit 48ea648).
qu_interpolate_apply_cut.qu
multisine synthesis with a per-tone figure breakdown.
qu_multisine.qu
the same multisine, several ways to compute it, and what "accelerated" actually buys you here.
qu_multisine_acceleration.qu
putting noise in, and taking it out again.
qu_noise_and_removal.qu
findpeaks() on a noisy multi-tone signal + spectrum.
qu_peak_finding.qu
RC low-pass filter: transient step response and Bode plot.
qu_rc_filter.qu
a filter you can feel, as a page you can send.
qu_signal_explorer.qu
the `signals.` namespace sugar for the five periodic-waveform generators (square, impulse, pwm, sawtooth, triangle).
qu_signal_generators.qu
bridge structural health monitoring (SHM) via distributed vibration sensors: synthetic-but-realistic simulation plus a real spectral-analysis damage-detection pipeline.
qu_bridge_shm.qu
regularized linear Kramers-Kronig (rLKK) validation and reconstruction of an impedance spectrum.
qu_impedance_rlkk.qu
a lighter-weight, general-purpose companion to qu_serial_realtime.qu, focused specifically on `serial_ports()` discovery and on `serial_open`/`.write()`/`.close()` in isolation, WITHOUT the full real-time acquisition loop (that's already
qu_serial_ports_discovery.qu
a genuine real-time serial capture + processing demo: open a real UART/RS-232/USB-serial port, read incoming lines AS THEY ARRIVE (a blocking read bounded by a timeout, not a fixed-length buffer), convert each one to a number, and print running statistics (a moving
qu_serial_realtime.qu
corrcoef(X) + heatmap(corrcoef(X)).
qu_corrcoef_heatmap.qu
the classic 2-state Hidden Markov Model ("a patient is Healthy or has a Fever; a doctor only observes symptoms") used to hand-verify HMM forward/Viterbi implementations against a well-known reference answer.
qu_hmm_healthy_fever.qu
a constant-velocity Kalman filter tracking a noisy 1-D position sensor.
qu_kalman_tracking.qu
a two-state Markov chain modeling Sunny/Rainy weather, simulated forward in time and compared against its analytically hand-solved stationary (long-run) distribution.
qu_markov_weather.qu
a GPU-dispatchable particle filter tracking a noisy 1-D constant-velocity target.
qu_particle_filter.qu
a discretized Wiener-process-style random walk with a real, nonzero drift, checking that the walk's mean per-step increment converges toward the specified drift as n_steps grows (the Law of Large Numbers applied to `random_walk`'s own definition).
qu_random_walk.qu
classical AR(2) autoregressive fitting via the Yule-Walker equations, recovering KNOWN generating coefficients from a synthetic series, then forecasting beyond the observed data.
qu_ar_model_forecast.qu
train a k-NN classifier on two synthetic clusters, evaluate on a held-out split, and inspect a confusion matrix.
qu_classification_report.qu
nonlinear least-squares curve fitting and general multivariate minimization.
qu_curve_fit.qu
tabular reinforcement learning on a grid world: Q-learning (off-policy) vs SARSA (on-policy), trained side by side.
qu_gridworld_rl.qu
an LSTM cell/sequence unroll over a short, real noisy sine wave, checking that the resulting hidden-state sequence is well-behaved (finite, non-exploding) rather than just "it runs".
qu_lstm_forecast.qu
battery health data: tables, an OLS model, and a report
qu_ml_report.qu
Gaussian Naive Bayes on a small, hand- understandable 2-feature, 3-class dataset: three well-separated clusters arranged so the correct class for any held-out point is obvious by eye.
qu_naive_bayes_classifier.qu
fitting PCA and projecting data onto its principal components.
qu_pca_projection.qu
a tiny Sequential neural net learns XOR.
qu_sequential_xor.qu
synthetic binary image, morphological cleanup, and connected-component (blob) analysis.
qu_image_blobs.qu
the Voronoi diagram of a small, hand-chosen 2-D point set, built on a real Delaunay triangulation (the `spade` crate), checked against a hand-derivable geometric fact rather than just printed.
qu_voronoi_diagram.qu
a small acquisition-loop simulation showing why a real sensor pipeline needs BOTH a `fifo` and a `double_buffer`, not just one or the other.
qu_fifo_double_buffer.qu
three real filesystem extensions in one flow: `touch(path)` (Unix `touch` semantics), streaming reads via ordinary `fopen`/`read_line` (no longer an eager whole-file load internally), and read-only memory-mapped random access (`mmap_open`/`mmap_len`/
qu_file_extensions.qu
the data-format conversion builtin family (§ format conversion builtins, 2026-09-01, Ahmed's ask -- BACKLOG.md's "Format conversion builtins" entry): three formats (JSON/CSV/XML), each with an `xify(value) -> str` / `parse_x(str) -> value` primitive pair,
qu_format_conversion.qu
a genuine HTTP(S) GET over the real network, using Qu's `http_get(url)` builtin (§ HTTP fetch, see docs/qu-language-tour.md §21). `http_get` is GET-only, has a fixed 30-second connect+read timeout, and always returns the response body as
qu_http_get.qu
a double-ended `linked_list` used to build a small road network's edge list, then a weighted `graph` over the same five towns, solved with Dijkstra's algorithm via `.shortest_path`.
qu_linked_list_and_graph.qu
`StreamFile(path)` and `StreamURL(url)` (§ StreamFile/StreamURL polymorphic streams, see docs/qu-language-tour.md §23) are two different constructors that expose the SAME method names -- `read_line`/`read_all`/`eof`/`close` -- so one
qu_streamfile_streamurl.qu
a genuine client/server TCP round trip on loopback.
qu_tcp_echo.qu
the local-worker half of Qu's distributed job-dispatch machinery (§ resource-limited pools/queues, see book/src/stdlib/concurrency.md's "Worker pools, deferred queues, and `run ... on`" section): a persistent, resource-limited `pool` of real
qu_distributed_pool.qu
explicit GPU matrix multiplication, with an honest CPU fallback when the GPU feature isn't compiled in.
qu_gpu_matmul.qu
`memoize function` result-caching and `lazy` deferred-variable evaluation, each proven with real evidence rather than just asserted: a memoized recursive Fibonacci is timed with `tic()`/ `toc()` to show the cached second call is essentially instant, and a
qu_memoize_lazy.qu
shared mutable state across real worker threads.
qu_mutex_semaphore.qu
`sandbox_mode(on)`, `profiling_mode(on)`, and `profile_stats()` as in-program controls, distinct from the CLI's process-wide `--sandbox`/`--profile` flags: a script can profile or sandbox just the one section it cares about, mid-run, and read the
qu_sandbox_profiling.qu
a GUI declared by the script itself.
qu_gui_controls.qu
QuStudio's Interactive Mode, as an actual catalog demo (previously this feature had NO dedicated demo -- only an inline default script baked into QuStudio's InteractiveModePanel.tsx component, never saved as a real, standalone .qu file anyone could open,
qu_interactive_sliders.qu
describe a symbol once, place it forty times.
qu_layers_schematic.qu
user-overloadable functions, dispatched on type.
qu_multiple_dispatch.qu
user-overloadable operators on a tagged record type (multiple dispatch phase 3).
qu_operator_overload.qu
an animated Starry Night, drawn entirely in Qu.
qu_starry_night.qu
all three `watch` trigger forms (`watch file(path)`, `watch <variable>`, `watch url(...)`), each firing exactly once on a genuine change and staying silent on an unchanged `pump_watches()` call.
qu_watch_reactive.qu
clean up a noisy measurement with a lowpass filter.
demo_filter.qu
timing code with a real stopwatch object.
demo_timer.qu
Every line style Qu draws.
qu_line_styles.qu
Every marker Qu draws, at the size a figure actually uses.
qu_markers.qu
Every kind of plot Qu draws, one panel each.
qu_plot_types.qu
reads a Re-Volt (RVGL) .PRM 3D mesh file, built entirely on the existing packed-struct binary readers (`read_structs`) and typed scalar reads (`read_int16`) -- no new engine code.
qu_prm_loader.qu
loads a Re-Volt .PRM mesh (via load_prm, see qu_prm_loader.qu) and renders it as a single shaded, vertex-coloured 3D object: orthographic projection, painter's-algorithm depth sorting, per-face Lambertian shading from the file's own vertex normals, filled
qu_prm_viewer.qu
a tqdm-style progress indicator for a long loop.
qu_progress_bar.qu
Spectrogram - Time-Frequency Analysis
qu_spectrogram_interactive.qu
A two-panel figure of the shape journals actually print: a distribution with its two summary statistics called out, and a dual-axis panel whose axes are colour-bound to their own series.
qu_twin_axis_reference.qu