Est. 1996 Intermediate

Yorick

An interpreted array language from Lawrence Livermore National Laboratory for numerical computing, interactive scientific graphics, and steering large physics simulations.

Created by David H. Munro

Paradigm Procedural, Array-oriented
Typing Dynamic
First Appeared 1996
Latest Version Version 2.2.04 (May 2015)

Yorick is an interpreted programming language for scientific computing, created by physicist David H. Munro at Lawrence Livermore National Laboratory (LLNL). It was designed for three jobs that dominate life at a national laboratory: crunching numbers over large multidimensional arrays, plotting the results interactively, and steering large simulation codes — driving, configuring, and post-processing physics programs too big to recompile for every question. With a compact C-like syntax, a powerful array-indexing model whose broadcasting rules anticipate what NumPy users now take for granted, and the bundled Gist graphics library, Yorick offered an open, BSD-licensed take on the interactive numerical environment years before Python’s scientific stack matured. Its source files carry the distinctive .i extension, and the language remains freely available and runnable today.

History & Origins

Yorick grew out of the day-to-day needs of computational physics at Lawrence Livermore in the first half of the 1990s. Munro — a physicist working on inertial confinement fusion, and also the author of the Gist scientific graphics library — wanted an interpreted front end that could talk to enormous compiled simulation codes: set up their inputs, examine their binary output files, and visualize results without the edit-compile-run grind. The language was publicly described in 1995, when Munro and LLNL colleague Paul F. Dubois published “Using the Yorick Interpreted Language” in the journal Computers in Physics; 1996 is the year conventionally given for Yorick’s first appearance.

The name is a nod to the skull addressed in Hamlet’s graveyard scene — fitting for a language whose specialty is examining the remains of finished simulations.

Unlike most laboratory tools of its era, Yorick escaped the lab. It was distributed freely, and its open-source life was later formalized under a BSD license, with releases hosted on SourceForge from the mid-2000s and development moving to GitHub around 2014, where both Munro’s repository and an LLNL mirror live today.

Design Philosophy

Yorick’s design reflects a few firm convictions about scientific computing:

  • Arrays are the unit of thought. Scalars are just the degenerate case. Nearly every operator and mathematical function in Yorick works elementwise over arrays of any size and dimensionality, so most numerical code contains no explicit loops — and runs at the speed of the interpreter’s compiled array kernels rather than one interpreted statement per element.
  • Syntax should feel like C, not like a calculator. Yorick borrows C’s expressions, control flow, and general look, so the physicists writing it — who typically maintained C or Fortran simulation codes by day — had almost nothing new to learn syntactically.
  • The interpreter is a steering wheel. Yorick was built to be extended with compiled C or Fortran routines via dynamic linking, and to read, write, and translate large binary files across machine formats. The interpreted layer handles logic and orchestration; compiled code handles the heavy arithmetic.
  • Graphics belong in the box. The Gist 2D graphics library ships with the language, making publication-quality x-y plots, contour plots, and cell arrays available from the first interactive session.

The Language

Yorick source is stored in .i include files, and functions are declared with func. A session mixes C-flavored code with array expressions:

1
2
3
4
5
6
7
8
// Define a function in a .i file or at the prompt
func gaussian(x, sigma) {
  return exp(-0.5*(x/sigma)^2) / (sigma*sqrt(2*pi));
}

x = span(-4, 4, 200);      // 200 points from -4 to 4
y = gaussian(x, 1.0);      // evaluated over the whole array at once
plg, y, x;                 // plot a graph with Gist

The indexing model is where Yorick shines. Arrays are 1-based and sliced with start:stop:step ranges; a bare - pseudo-index inserts a new dimension so that differently-shaped arrays can combine — the same idea NumPy later popularized as broadcasting (and PDL calls threading). The rubber index .. stands for “however many dimensions are left,” and the + index marks dimensions to contract, giving matrix multiplication without a special operator:

1
2
3
4
a = [[1,2],[3,4]];         // 2x2 array
b = a(::-1, );             // reverse the first dimension
c = a(,+) * a(+,);         // matrix product via index contraction
total = sum(a);            // reductions: sum, avg, min, max, ...

Key Features

AreaCapabilities
ArraysElementwise operators over N-dimensional arrays; slices, strides, arbitrary index lists
BroadcastingPseudo-index - for dimension insertion; rubber index ..; + index for tensor contraction
GraphicsBundled Gist library for interactive 2D scientific plots (curves, contours, cell arrays)
Binary I/OReads, writes, and translates large binary files of numbers across machine formats
ExtensibilityDynamic linking of compiled C (and Fortran-derived) libraries as plugins
PortabilityWritten in ANSI C; official documentation lists Unix-like systems, macOS, and Windows

Evolution

Yorick’s evolution has been unhurried and pragmatic. After its 1990s emergence inside LLNL and free distribution to the wider scientific community, the project settled into open-source maintenance: the 2.1 series saw regular releases on SourceForge between roughly 2005 and 2010, and the 2.2 series culminated in version 2.2.04 in May 2015, which remains the stable release. Around 2014 the project’s home moved to GitHub, and Yorick continues to be packaged for Debian and Ubuntu.

What changed more than the language was the world around it. In 1996, an open, fast, array-oriented interpreted environment with built-in plotting was a rarity; commercial systems like MATLAB and IDL dominated the niche. Over the following two decades Python’s NumPy/SciPy/Matplotlib stack absorbed most of that territory, and Yorick’s community contracted to the laboratories and observatories where it was already load-bearing.

Current Relevance

Yorick today is a working specialist’s tool rather than a growing ecosystem. Its most visible modern footprint is in high-energy-density physics and astronomy: LLNL’s pF3D laser-plasma code — used to model experiments at the National Ignition Facility — has long been steered by Yorick scripts, and the lab still publishes Yorick-based benchmarks like PF3DIO for testing parallel file systems. In astronomy, the Yao adaptive optics simulator, the Gyoto relativistic ray-tracer from the Observatoire de Paris, and Éric Thiébaut’s MiRA interferometric imaging code all use Yorick as their scripting layer, with performance-critical kernels in C. The interpreter itself builds from source on modern Unix-like systems and remains a comparatively small install by contemporary standards.

Why It Matters

Yorick is one of the clearest early demonstrations of a pattern that now defines scientific computing: a dynamic array language steering compiled numerical kernels. Its broadcasting-style indexing, elementwise operations, and interpreted-glue-plus-C-plugins architecture map almost one-to-one onto how NumPy-based Python is used today — but Yorick was doing it, open-source and free, in the mid-1990s at the biggest simulations then running. It also stands as a reminder of how much foundational software came out of the national laboratories: written by a physicist to answer physics questions, released to everyone, and still quietly running the diagnostics behind fusion experiments and telescope instrumentation three decades later.

Timeline

1995
David H. Munro and Paul F. Dubois publish "Using the Yorick Interpreted Language" in Computers in Physics, describing the language Munro had been developing at Lawrence Livermore National Laboratory
1996
Yorick's conventional first-appearance year; the interpreter, together with Munro's Gist scientific graphics library, circulates freely in the scientific computing community from LLNL
2005
Yorick 2.1.01 is published on SourceForge in September 2005, where the BSD-licensed open-source project is hosted for the following decade
2010
Yorick 2.1.06 ships in April 2010, closing out the 2.1 series after steady maintenance releases through the late 2000s
2014
Project development moves from SourceForge to GitHub (dhmunro/yorick, mirrored at LLNL/yorick), with the SourceForge downloads marked as outdated
2015
Yorick 2.2.04, the current stable release, is published in May 2015

Notable Uses & Legacy

pF3D at the National Ignition Facility (LLNL)

LLNL's massively parallel laser-plasma interaction code pF3D has for much of its existence been steered by user code written in Yorick, giving physicists interactive control and diagnostics over simulations of NIF experiments; the lab's PF3DIO parallel file-system benchmark is itself written in Yorick.

Yao adaptive optics simulator

Yao, a Monte-Carlo adaptive optics simulation package begun by François Rigaut, is built as a Yorick plugin with CPU-intensive routines in C, and has been used to model wavefront sensors, deformable mirrors, and full SCAO/MCAO/GLAO systems for major observatory projects.

Gyoto (Observatoire de Paris)

The general-relativistic ray-tracing framework Gyoto, which computes orbits and lensed images around black holes and other compact objects, ships a Yorick plug-in as one of its primary scripting interfaces.

MiRA interferometric imaging

Éric Thiébaut's Multi-aperture Image Reconstruction Algorithm, written in Yorick, reconstructs astronomical images from optical interferometry data and won the 2008 edition of the community's image-reconstruction Beauty Contest.

Language Influence

Influenced By

Running Today

Run examples using the official Docker image:

docker pull
Last updated: