SlicTranspilerStanBlocks → Stan
Spotlight
StanBlocks.jl ↗

StanCon 2026

Composed observation semantics

∅ unavailable — The slide is a compact fragment. Open authoring/observation-combinators for the complete runnable model.

This stable URL preserves the pinned source reference. It is intentionally source-only under the current public authoring boundary.

Using SlicTranspiler

StanBlocks (SLIC) → Stan, in the browser

What this does

SlicTranspiler turns editable Julia/StanBlocks source into Stan, checks the generated program with stanc, and keeps source and output side by side. Most prepared Library examples transpile as soon as you open them; large workspaces and shared links stay review-first until you choose Transpile.

The workbench

  • Compose data, functions, anonymous submodels and endpoint models in one copyable Julia script. Section summaries keep their global line ranges visible while collapsed; Data starts collapsed.
  • Arrange the source and generated-code panes with the center divider. Drag it, focus it and use the arrow keys, or use its edge buttons to collapse either pane completely; your layout stays in this browser.
  • Edit the bluish-outlined code in place. Binding names live in the code itself, so there is no second label to drift out of sync.
  • Transpile an endpoint with its button or ⌘/Ctrl + Enter; the Stan program and its stanc result appear on the right and that endpoint is highlighted.
  • The Function tab transpiles a single @deffun into its emitted Stan function.
  • The Library collects runnable examples and a guided Model spotlight; call any Library function by name.
  • Share builds a link that reopens the editor with your source.

SLIC in a nutshell

y ~ normal(mu, sigma)
A ~ statement — a prior on a parameter, or a likelihood when the left side is data.
mu = alpha + beta * x
An = assignment — a deterministic transform.
beta::vector[k] ~ normal(0, 1)
A typed declaration. Left bare (beta::vector[k]) it becomes a flat-prior parameter.
No loops or if in a model body
Control flow lives in a @deffun Stan function (the Function tab); the model calls it straight-line.
theta ~ plate(y; outer=N) do yi … end
The one sampling loop — a fresh parameter and observation per group.
Submodels
Name a reusable fragment and pass its inputs by keyword: eta ~ regression(; x).
Observations
weighted, truncated, censored and interval_censored wrap a family; missing outcomes are imputed automatically.

Try a Spotlight model

These prepared examples open editable and already transpiled:

Browse every prepared source in the Library.

StanBlocks documentation ↗

Send feedback

Tell me what worked, or what broke
Your workspace source — every editor's contents — is attached so I can reproduce exactly what you saw. Uncheck to send only your message.