Skip to content

Examples

Each example is a complete, buildable project that walks through a real algorithm from scaffold to optimised implementation. Run any of them with just-makeit example <name>.

Example What it demonstrates
Running stats Welford's online algorithm — streaming mean and variance over any sequence of real-valued samples.
FIR filter A 16-tap, real-coefficient FIR filter that processes complex (I/Q) signals.
Sliding power Estimate the instantaneous power of a signal over a rolling window of N samples:
Array processing Every object just-makeit generates can process a block of samples in one call.
Varargs methods A filter object whose runtime configuration is updated through configure(**kwargs).
Delay line A circular delay buffer with runtime-configurable length — the canonical pattern for heap-allocated state with create_impl, reset_impl, and destroy_impl.
Accumulator Two running accumulators in a shared Python extension module — AccF32 (single-precision float) and AccCf64 (double-precision complex) — built with just-makeit from scratch.
Stream source A source is an object that generates samples from internal state with no input — steps(n) hands you n fresh samples.
Stream blockwise A blockwise producer pulls a block of samples per call and returns however many it had — a short or empty block once the source runs dry.
Stream source (async) This is the stream_source example turned asynchronous.
Filter module A two-type filter library where Fir (FIR filter) and Biquad (biquad IIR) live together in a single filter Python extension module.
Module functions Add stateless C functions to a module — no struct, no lifecycle, no state.
IQ file A block-wise converter between cf32 (complex float-32, 8 bytes/sample) and q15 (complex signed 16-bit fixed-point, 4 bytes/sample) — the two most common raw IQ file formats in software-defined radio.
NCO tone Wire a just-makeit object to an external C library — the Doppler NCO — demonstrating find_package, extra_link_libs, and opaque state holding a library-owned handle.
Three faces Demonstrates the combined target just-makeit is architected for: a single C core exposed three ways, all calling the same gain_step() — and jm app generates every face, with no hand-written parsing or I/O loop:
Declarative scaffold Author a complete component in a single TOML fragment — state, types, and the step() body inline — then jm apply it into a buildable Python extension.
Full workflow A complete development lifecycle walkthrough — scaffold two components with both test and benchmark styles, implement, test, run the C header's own examples as doctests, benchmark, measure coverage, and publish API docs — all from a single just-makeit project.
Composites This example builds one jm project that demonstrates the object-of-objects kind = "handle" generator: a single typed CPython class generated over an opaque hand-C resource handle, with RAII lifetime.
Views This example demonstrates jm view: a second Python class over the same generated C core.
Record shapes One object, three methods, three different shapes of result — and the only thing that changes between them is which key the method declares.
Errors and warnings The four ways a component can tell Python that something is wrong — and they are four, not one, because C has more failure modes than it has channels to report them on.
Composer seams A kind = "composer" module — the third and largest of the object-of-objects generators — and specifically the two seams where it hands work back to you as plain C (gh-998).
Kitchen sink This example builds a single jm project that combines the features most likely to break each other: a vendored external C library, cross-component depends_on, GIL release (nogil), component-level extra_link_libs, a hand-written no_generate sibling module, an app face, and every object flavor.

Every example ships with an end-to-end test in src/just_makeit/examples/*/test.py that the CI suite runs, so the steps above are executed, not just described. See src/just_makeit/examples/README.md for contributor notes on the .steps/ naming convention.