"Darling sweetheart you are my avid fellow feeling. My affection curiously clings to your passionate wish."
The prose might not trouble Shakespeare but it does represent the first expression of love by a machine. The sentiment stems not from mawkish infatuation but from random number generation, an algorithmic representation of the language of love being crunched by one of the earliest computers, the UK-built Ferranti Mark I.
The program to generate love letters was created by computer scientist Christopher Strachey in 1952, to explore his interest in artificial intelligence - the idea that a machine could be capable of sentient thought.
The Ferranti Mark I processed instructions some million times more slowly than a high-end modern PC and its memory held a fraction of the data of a single MP3 album track today. Yet despite working with computer hardware with only a fraction of the capabilities of a modern machine, Strachey managed to build his LoveLetters program.
Five decades later, the artist and theorist Professor David Link embarked on an ambitious project to revive the software and the Ferranti Mark I it ran on. On Thursday his work in restoring the Ferranti and LoveLetters program was honoured in London with the inaugural Tony Sale Award for computer conservation.
Bringing dead software back to life
Recreating dormant code designed for a long-dead computer is no simple task. With no working Ferranti to use as reference, and without documentation to describe how the machine worked, Link struggled to recreate LoveLetters by reading its source code, which he found in the Bodleian Library in Oxford.
"You see that number C is written from location A to location B, [but] you won't get any clue on what the program actually does because writing this from A to B could be anything," he said.
To understand how LoveLetters might have worked, Link created an emulated version of it. But Link didn't stop at reviving Strachey's software, he also decide to attempt to recreate the Ferranti computer itself, in homage to a machine that marked a leap forward in computer capability.
The Ferranti Mark I was a commercial version of the Manchester Baby, the University of Manchester research machine built in 1948. In many ways was the Baby was the first modern computer - in that it was the first machine with an electronic memory from which it could run programs and access data.
Being able to read instructions from electronic memory gave the machine a massive speed boost over its contemporaries, whose pace was limited by the mechanical paper-tape inputs generally used to feed them instructions.
Its memory was built from cathode ray tubes (CRT) - which at the time were more commonly used in TVs and radar displays. CRT memory writes information in a similar fashion to the way an old CRT TV displays a picture. It fires an electron beam at a phosphor screen to either write a binary 0 or 1 to memory.
Of course, the memory capacity was, tiny by modern standards. The machine used eight CRTs for its primary memory - each capable of storing 32 40-bit words.
Manchester Mark I's significance
"I discovered that although people knew about Eniac, the Turing Machine, nobody knew about the Manchester Mark I," said Link.
"The Manchester Mark I is the first computer worldwide. It's the first machine that's fully electronic and faster than desktop calculators [at the time]. So I decided to build a memorial to it."
Members of the UK Computer Conservation Society supplied Link with documentation on the architecture of the Ferranti Mark I. But when Link began rebuilding the machine at the end of 1990s he unsurprisingly ran into difficulties sourcing the parts - the external interface and internal electronics - for a machine built five decades earlier.
"It has been really difficult because the components don't exist anymore," said Link.
Instead of building an exact replica of the Ferranti Mark I, Link built an emulator of the machine running on a modern PC that is linked to a full-size replica of the Ferranti console, complete with original switches and lights.
"The switches and the lamps are original. To collect the switches and the lamps took two years of searching eBay and connecting to people."
The finished replica allows users to enter their name into the LoveLetters program in five-bit Baudot code by manipulating switches on its front - allowing them to sign a love letter with their name.
How the LoveLetters program works
LoveLetters stored a list of nouns in the Ferranti's memory. It fed a random value into the B line feature of the Mark I, which looped a set of instructions until a certain condition was met, and then selected a noun from the list and sent it to be printed.
The program relies on about 50 base words, which can generate billions of sentences when combined, albeit with the potential for repeated words. After reading about 10 letters, Link said it becomes easy to spot that the letters are algorithmically-generated because of similarities in their syntactic structure.
Why bother with a 1950s chatbot?
Despite the technical challenge of restoring the machine and the software with very little information to go on, Link doesn't view the project as work - rather as a chance to fulfil his artistic calling.
"I enjoyed it. I may have my special kind of fun. This is what I like to do - it's not a hobby," he said - adding his next project will be to recreate the program that Strachey wrote to run draughts on the Ferranti.
The entire LoveLetters project stems from Link's PhD on computerised text generation. He became fascinated with the idea of recreating Strachey's program when he discovered that chatbots stretched back to the early days of computing.
"Like many, I thought that their history starts in the 1970s, so I was mainly investigating American software from around that time - like [the famous MIT chatbot] Eliza," he said.
"I was wondering why the programs that I was investigating were so complex already. It was only after I'd completed my PhD I found out that actually there's a lot of pre-history. I was absolutely fascinated to hear about the LoveLetters program."
The ability of a machine to converse like a person was posited as a way of answering, "Can a machine think?" by father of computing Alan Turing in 1950, but despite decades of research chatbots are yet to convincingly fool people into believing they are human.
Link says there are some pretty compelling chatbots, citing a bot with 20 years' history that can converse for an hour before repeating itself. But the algorithms at their core are little more sophisticated than those used to get the Ferranti Mark I to profess love in the 1950s.
"What it's good for is to invalidate many claims that are made today about artificial-intelligence programs," he said.
"Nowadays you find many commercial companies working on text generation and if you look at it the technology they use it is exactly the same as what Christopher Strachey was doing in the 1950s."
* David Link's rebuilt Ferranti and the LoveLetters software will be on display as part of the LoveLetters_1.0 exhibition at the is Heinz Nixdorf Forum in Paderborn, Germany from 24 October to 18 November and at the Microwave Festival in Hong Kong from 3 November to 20 November.
Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.