1200 × 1500
A 1966 program said it had not been checked. So I ran it.
The one large program in the papers that define CPL, a handwritten warning across the top of it, and a coding agent with a scan.
ABOUT THIS NOTE +
A note about building an interpreter for CPL, the language BCPL was cut down from, out of its 1966 working papers with a coding agent. The papers contain one program of any size, a preprocessor written in CPL, and someone has written across the top of it that the draft has not been fully checked. Typed in as printed it does not compile. With seven slips put right it runs and gives wrong answers in two ways, and in two more places its informal notes disagree with its own text. Corrected, it reads its own text to the last word. The interpreter and the program run in the browser.
01 / A LANGUAGE IN WORKING PAPERS
CPL was designed in the early 1960s by a group at Cambridge and London. Martin Richards cut it down to make BCPL, and BCPL led to B and then C. In July 1966 the group put out a technical report called CPL Working Papers, most of which is a draft of the reference manual. I asked a coding agent to build an interpreter for the language those papers describe: the 1966 language, not the subset that became BCPL.
CPL Working Papers, July 1966 ↗Richards, How BCPL evolved from CPL ↗
02 / ONE PROGRAM OF ANY SIZE
An interpreter built from a manual can only be tested on programs. The examples in the manual are a few lines each, and everything longer the agent wrote itself. The papers contain one exception. Appendix 1 is a preprocessor, about 190 lines of CPL, “intended to be both a description of the transformation from an implementation alphabet to canonical CPL and a general example of a CPL program”. Across the top of its first page someone has written by hand: “This draft has not been fully checked”.
03 / AS PRINTED, IT DOES NOT COMPILE
The agent typed the program in from the scan, keeping the text as printed, with the corrections already written on the copy by hand. It does not compile. Three sections open with one tag and close with another: R.T and R.T., R.U.W and R.U.W., R.S. and R.S. One call is to Proprocessor. One case has no colon. And twice a name that should begin with a capital is typed small, goto switch and standard, which matters in CPL because a small letter is a whole name: standard is eight names side by side.
04 / IT RUNS, AND IS WRONG
With those seven put right the program runs, and what it writes is wrong in two ways. The routine that reads an underlined word starts from the first letter instead of from nothing, so every word begins twice. And after an ordinary comma it loses a character. That one can be followed on the page with a finger: ReadSpaces has already moved on to the next character, and then NextChar moves on again.
05 / WHERE THE NOTES DISAGREE WITH THE PROGRAM
Part 3 of the appendix describes the functions the program uses but does not declare, a sentence or a list for each. In two places those descriptions cannot be what the program needs. One says a function is true for the symbols that can come before a command, where the program uses it for the symbols that cannot. The other turns goto into go, after which nothing recognises it as a jump. These are perhaps better called open questions than slips. Part 3 says of itself that it is informal.
06 / IT READS ITSELF
A preprocessor for CPL written in CPL can be given its own text. Corrected, it reads all 189 lines of itself and writes about 1,100 symbols, ending with finish. What it writes is not wholly canonical: jump on and the rest come out as two symbols each. And whether the “etc.” of Part 3 covers true and false, after which the program would otherwise lose a semicolon, is a reading, not something the page says. Given its own text as printed, it stops a little over 200 symbols in, at the first tag that does not match, and says nothing, because the program has no message for that case. It is doing what it was written to do. A closing bracket with the wrong tag makes every open section jump out through a label it was handed by its caller, and the outermost label is the end of the program.
The interpreter runs in the browser, compiled from the same Rust source as the command-line version, with the preprocessor as one of its examples. The programs on this page are run by it where they sit.
WHAT THIS DOES NOT SHOW
- These are readings of a scan of a typescript, made by one reader, and that reader was a coding agent. Each slip has a page number and a detail of the scan so that it can be checked by eye.
- Whether the program was ever run in 1966, the documents I have do not say. A later draft may have put all of this right.
- The appendix describes thirteen of its functions only informally and never defines seven more names it uses. All of them were supplied. A different reading of those sentences gives a different program.
- The interpreter and the transcription came from the same agent in one session. The seven slips that stop the program compiling can be seen on the page. The two wrong answers also rest on the interpreter doing what the manual means.
- The interpreter is not all of CPL. What it leaves out is listed in the repository, and where the 1966 papers say a section is out of date without giving the new rules, it follows the old ones.
- I have not searched for an earlier list of these slips. Somebody may have made one.
- A second model, OpenAI’s Codex, later reviewed the repository independently. It found that the interpreter grouped division the wrong way, a/bc as (a/b)c where the manual’s table gives a/(bc), that it skipped the second operand of and and or, and that some example programs had been edited without saying so. These are corrected or disclosed, and the review, with what was done about each point, is in the repository.
A program that has never been run has only been proofread. Running it is a different kind of reading.
OPEN
How much of a language that was still a draft can you check by running the one program its authors left?
The preprocessor exercises the parts of CPL its authors reached for when they had real work to do: recursion, strings, a switch, sections with tags, and a label passed as a parameter so that a routine can jump out of its caller. It says nothing about the parts they did not need that day. For those, the interpreter has only the manual’s short examples and programs written by the same agent that wrote the interpreter.
PUBLICATION HISTORY
Each version preserves its manuscript, claims and source references. Research status is recorded separately from publication.
- V1.0 · 2026-11-22 ↗
First publication: the preprocessor of Appendix 1 of the 1966 CPL Working Papers run on an interpreter built from those papers, the eleven corrections it needed, and the limits of one reading by one agent OPEN
- V1.1 · 2026-11-22 ↗
The preprocessor's output for its own text is not wholly canonical; reading Part 3's etc. as including true and false is an interpretation. The eleven corrections are nine slips and two conflicts. An independent review by a second model found the interpreter grouping division the wrong way and skipping operands of and and or; both are corrected. OPEN
SOURCES & PROVENANCE
- University of London Institute of Computer Science and The Mathematical Laboratory, Cambridge, “CPL Working Papers”, technical report, July 1966 ↗
Appendix 1, “The Preprocessor”, begins on page 120 of the PDF. The program is Part 2, on pages 2 to 6 of the appendix; the informal definitions are Part 3, on pages 6 and 7.
- “CPL Elementary Programming Manual”, Edition II, Cambridge, January 1966 ↗
- D. W. Barron, J. N. Buxton, D. F. Hartley, E. Nixon and C. Strachey, “The main features of CPL”, The Computer Journal 6, 1963 ↗
- Martin Richards, “How BCPL evolved from CPL” ↗
- chrishayuk/cpl ↗
The interpreter, its tests, 73 example programs, a tutorial, and the preprocessor as printed and corrected with a detail of the page for each slip.
- Coding-agent session, 22 November 2026
The interpreter, the transcription of Appendix 1 and the functions it leaves informal were written in this session. Every result in this note can be rerun on the interactive study.
AUTHOR / Chris Hay · VERSION / 1.1
PUBLISHED 22 NOV 2026 · REVISED 22 NOV 2026 · VERSION 1.1
CITECITE THIS
Research note · 1.1
Hay, C. (2026). A 1966 program said it had not been checked. So I ran it. (Version 1.1). Chris Hay. https://chrishayuk.com/records/N-CPL/1.1
FOLLOW THE WORK
New notebook entries and recorded work, as they appear. Point a feed reader — or an agent of your own — at an address below. No account, no email address, nothing for this site to keep.
The notebook
New ideas, experiments and essays, as they are recorded. Includes labelled working drafts.
OPEN FEEDhttps://chrishayuk.com/notebook/feed.xmlThe record
Everything published to the Chris Hay record.
OPEN FEEDhttps://chrishayuk.com/record/feed.xml
FOR PROGRAMS · follow.json · JSON Feed