← BACK TO THE CABINET THE LITERARY MACHINE CHAPTERSEPUBPDF

OBJECT 020 // WRITING // E-BOOK

The Literary
Machine

Computers, Code and the Invention of New Ways to Tell Stories

What happens when a book becomes something you can run? Sixteen chapters, nineteen small experiments you can operate in the page, about 96,000 words.

Begin reading ↗ Introduction

Original diagram: words pass through rules and emerge as stories

THREE WAYS IN

01 / IMAGINE

Computers in stories

The machine as character, subject and warning.

02 / READ

Code on the page

A second language inside the literary text.

03 / EXECUTE

The book as program

Rules that generate worlds and words.

THE STUDY / 16 CHAPTERS / 4 PARTS

Enter the machine

PART I — THE IMAGINED MACHINE

PART II — THE WRITTEN MACHINE

PART III — THE EXECUTABLE BOOK

PART IV — THE FUTURE OF THE WORD

Three Ways to Put a Computer in a Book

Imagine finding three books on a library shelf.

The first describes an enormous computer hidden beneath a mountain. It controls a city's electricity, transports its citizens, answers their questions and secretly begins to wonder whether human beings are still necessary.

The second is a detective story. Halfway through, the detective discovers a computer program printed across several pages. It appears to be a harmless collection of instructions, but when she works out what they do, she realises that the program is also a confession.

The third book is stranger.

Its pages change whenever you read them. Characters behave differently depending on your choices. Entire chapters appear or vanish. Some passages have been assembled by a computer from a collection of words and grammatical rules. The story is not merely describing a program. It is a program.

All three are works of literature. All three involve computing. But they involve computing in fundamentally different ways.

That distinction is the foundation of this book.

In the first case, the computer is the subject of the literature. We can call this literature about computers. It belongs to a tradition that includes science fiction, technological thrillers, speculative philosophy and stories about artificial intelligence.

In the second case, computer code is part of the literary text. Its syntax, structure or behaviour contributes to the story. Understanding what the program does might be essential to understanding what the author means.

In the third case, code is part of the machinery that produces or presents the literature. The written work may change while it is being read. Different readers may encounter different sentences. The author might specify rules rather than write every word that appears.

These three possibilities can overlap. A story about an artificial intelligence might contain actual software, while the story itself is produced by a generative algorithm.

But keeping them separate initially allows us to ask three unusually powerful questions.

What did literature teach us to imagine computers could become?

What happens when the language of programming enters the language of storytelling?

And what happens to literature when the book itself becomes a machine?

To answer them, we must start long before the electronic computer.

We must begin with a machine made of words.

Chapter 1: The Machine That Dreamed of Words →

About this edition

This is the reading edition of The Literary Machine, built from the approved release manifest of its editorial repository: every chapter's text is checked against a recorded SHA-256 digest before it is published here. The introduction and Chapters 1 and 2 were supplied by Peter from an earlier ChatGPT conversation; later chapters were generated in that conversation and imported by an automated Codex workflow, which also prepared diagrams, experiments and review notes. The website, diagrams and browser experiments were prepared with AI assistance. Editorial approval was granted by Peter; source-verification notes remain in the project's source ledger.

Diagrams are original explanatory artwork, not historical reconstructions. Photographs come from Wikimedia Commons; each carries its creator and licence in its caption. Interactive examples are small, fixed rule systems, not demonstrations of machine consciousness. No external scripts, analytics or AI services run in your browser; nothing you type leaves the page.

Each chapter can be downloaded as Markdown from its own page. The whole book is available as EPUB and as an A5 PDF (built with the project's Pandoc + WeasyPrint pipeline); in those static editions the experiments are replaced by a note pointing back here.

← Back to the cabinet