Qu

Learn Qu

Four routes in. Pick the one that describes you — they overlap on purpose, so starting too early costs you twenty minutes, not a day.

Pick your starting point

Never programmed

Start Here

What a variable is, what an array is, why this beats a spreadsheet. Twenty minutes, and it ends with a graph you made.

Read →

Programmed before

From Zero

A complete first session: signal, spectrum, filter, curve fit, publication figure, scope and tables. Runs as written, no data files.

Read →

Know MATLAB or NumPy

Fundamentals

The language properly: types, contracts, control flow, error handling. Then numerics and DSP, then the specialised domains.

Read →

Porting something

The differences

Written for AI assistants and just as useful to you: every place Qu differs from what you would assume, with the error each mistake produces.

Read →

Twenty minutes, start to finish

If you would rather just see it, this is the whole shape of the language.

  1. Open the prompt

    qu repl
  2. Numbers have names, and many numbers are one value

    fs = 1000
    t  = (0 to 999) / fs        # a thousand time points
    x  = sin(2 * pi * 50 * t)   # every one of them, at once
  3. Ask the data a question

    spectrum = abs(rfft(x))
    peak     = argmax(spectrum)
    print("largest component at {peak * fs / len(x):.1f} Hz")
  4. Fit a model to it

    function resid(p)
        return p[0] * exp(0 - t / p[1]) - decay
    end function
    
    fit = least_squares("resid", [1.0, 1.0], lower = [0.0, 0.01])
  5. Make the figure

    theme("publication")
    plot(t, x, color = "#0072BD", lw = pt(1.2))
    xlabel("time $t$ [s]")
    savefig("figure.pdf")

Every example in the documentation is executed before it is published. tools/check_docs.sh extracts each block and runs it, so a snippet that does not work is a build failure rather than something you find out about.