Constraint-Based Text
Oulipo writing experiments
The Oulipo — Ouvroir de littérature potentielle, or "workshop of potential literature" — was founded in 1960 by Raymond Queneau and François Le Lionnais. Their radical idea: constraint enables creativity. By imposing arbitrary rules on writing, they discovered, you force yourself into creative territories you'd never otherwise explore. This page lets you experiment with three classic Oulipo constraints in real-time.
The Lipogram: Writing Without
The lipogram is perhaps the purest Oulipo constraint: simply omit a letter. The challenge scales with letter frequency — omitting 'z' is trivial; omitting 'e' transforms English into an alien tongue. Consider this sentence you just read: it contains seventeen 'e's. Without them, it becomes: "This sntnc you just rad: it contains sntn 's." The lipogram forces you into linguistic territories you'd never otherwise visit.
// Lipogram detection: mark violations
function analyzeLipogram(text, forbidden) {
let violations = 0;
const re = new RegExp(forbidden, 'gi');
const highlighted = text.replace(re, (match) => {
violations++;
return `${match}`;
});
return { violations, highlighted };
}
Georges Perec's La Disparition (1969), translated as A Void, runs 300 pages without a single 'e'. Perec chose the hardest constraint — 'e' appears in: the, be, he, she, they, there, here, where, then, when... nearly every verb conjugation, pronoun, article. To write without 'e' is to exile yourself from the language's everyday pathways.
The Pangram: Everything Included
The pangram inverts the lipogram: instead of exclusion, inclusion. Write a sentence containing all 26 letters. The classic "The quick brown fox jumps over the lazy dog" appears in every font preview dialog, but it's inefficient with 35 letters. Minimal pangrams achieve full coverage with fewer characters: "Pack my box with five dozen liquor jugs" uses only 32 letters. The constraint teaches compactness.
// Pangram detection: find missing letters
function analyzePangram(text) {
const letters = 'abcdefghijklmnopqrstuvwxyz'.split('');
const present = new Set();
// Extract all letters from text
text.toLowerCase()
.replace(/[^a-z]/g, '')
.split('')
.forEach(c => present.add(c));
const missing = letters.filter(l => !present.has(l));
return {
letterCount: present.size,
missingLetters: missing,
isComplete: missing.length === 0
};
}
Pangrams reveal distribution patterns. Some letters (e, t, a, o, i, n) appear constantly. Others (j, q, x, z) require deliberate insertion. The constraint surface: you can write naturally until you need 'z', and then you must find a way — quartz, jazz, puzzle. The difficulty teaches vocabulary distribution.
The Alliteration Chain: Linked Letters
The alliteration chain creates a word-by-word constraint: each word must begin with the last letter of the previous word. "Time" must be followed by something starting with 'e' — "eat", "end", "every". Then 'y' — "year", "yellow", "yesterday". The chain binds each word to the last, creating a constrained walk through vocabulary.
// Alliteration chain: enforce sequential letter constraint
function analyzeAlliteration(text) {
const words = text.trim().split(/\s+/);
let breaks = 0;
for (let i = 1; i < words.length; i++) {
const prev = words[i - 1].replace(/[^a-zA-Z]/g, '');
const curr = words[i].replace(/[^a-zA-Z]/g, '');
const expectedStart = prev.slice(-1).toLowerCase();
const actualStart = curr[0]?.toLowerCase();
if (expectedStart !== actualStart) {
breaks++;
}
}
return { breaks };
}
Unlike the lipogram (which forbids) or pangram (which requires), the alliteration chain propagates. Each word determines the constraint for the next. You can't pre-plan — you must respond to what you just wrote. This creates a generative constraint that builds its own path.
What This Reveals
Constraints seem to limit creativity, but the Oulipo discovered the opposite: freedom from choice enables creative depth. When 'e' is forbidden, your vocabulary shifts. When all 26 letters are required, your grammar adapts. When each word constrains the next, your attention focuses.
The mathematical concept here is constraint satisfaction — a space of possibilities with rules pruning branches. Without constraints, the space is too vast; with too many, it becomes empty. The Oulipo navigated a productive middle: tight enough to force exploration, loose enough to allow expression.
Try the lipogram. Pick 'e'. Write a paragraph. You'll discover words you'd forgotten — synonyms buried by familiarity. The constraint doesn't remove meaning; it reveals alternate paths to it.
Related: Wave Function Collapse — constraint propagation for procedural generation.