####################################################################################### # # 'love2' (Description: This is the working title of my simulated Manchester University Computer (MUC) Emulator's Loveletters: see, # http://www.alpha60.de/research/muc/ # Loveletters is a program from 1952 by Christopher Strachey that ran on the Manchester Mark 1 computer . # The Emulator is the creation of David Link. # I have not seen David's program, therefore any shortcomings here are my fault.) # Copyright (C) 2009 Wayne Clements # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # See . # # The program is presented as it is on my website. # The html and links are as found in www.in-vacua.com. You can change this as necessary. # Wayne Clements, www.in-vacua.com. email: invacua_at__btinternet[Do T]com # #########################################################################################!/usr/bin/perl -w use strict; use CGI qw(:all); srand; my (@s10, @s20, @s30, @s40, @s50, @s60, @s70, @s80, @s90, @s100, @s200, @s300, @s400, @s500, @s600, @s700, @s800); my ($s102, $s202, $s101, $s201, $s100, $s200, $s300, $s400, $s500, $s600, $s700, $s800, $s1, $s2, $s3, $s4, $s5, $s6, $s7, $s8, $s9, $s10, $s11, $s12, $s13, $s14, $line1, $line2, $line3, $line4, $line5, $line6); @s10 = ("MOPPET ", "DARLING ", "JEWEL ", "DUCK ", "LOVE ", "SWEETHEART ", "DEAR "); @s20 = ("MOPPET", "DARLING", "JEWEL", "DUCK", "LOVE", "SWEETHEART", "DEAR"); @s30 = ("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "TENDER", "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "SEDUCTIVE"); @s40 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "CHARM", "HEART", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); @s50 =("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "TENDER", "SEDUCTIVE"); @s60 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); @s70 = ("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "TENDER", "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "SEDUCTIVE"); @s80 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); @s90 = ("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "TENDER", "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "SEDUCTIVE"); @s100 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "CHARM", "HEART", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); my @s101 = ("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "TENDER", "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "TENDER", "SEDUCTIVE"); my @s201 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); my @s102 = ("CRAVING", "CURIOUS", "AFFECTIONATE", "SWEET", "EAGER", "WINNING", "PRECIOUS", "ANXIOUS", "AMOROUS", "LOVABLE", "PASSIONATE", "BURNING", "ADORABLE" , "TENDER", "LOVING", "COVETOUS", "FERVENT", "EROTIC", "DEAR", "UNSATISFIED", "WISTFUL", "FOND", "SEDUCTIVE"); my @s202 = ("SYMPATHY", "WISH", "PASSION", "ARDOUR", "FERVOUR", "YEARNING", "LONGING", "EAGERNESS", "AFFECTION", "TENDERNESS", "FONDNESS", "LOVE", "THIRST", "HEART", "CHARM", "INFATUATION", "AMBITION", "FEELING", "ENTHUSIASM"); @s200 = ("SYMPATHETIC", "DARLING", "DEVOTED", "PRECIOUS", "LITTLE", "AVID", "LOVESICK", "LOVELY", "KEEN", "LOVABLE", "AMOROUS", "CURIOUS", "TENDER ", "EAGER", "EROTIC", "FERVENT", "DEAR", "",""); @s300 = ("WISH", "LUST", "INFATUATION", "DESIRE", "CRAVING", "LONGING", "SYMPATHY", "FERVOUR", "LIKING", "ENCHANTMENT", "THIRST", "APPETITE", "PASSION", "EAGERNESS", "FONDNESS", "AFFECTION", "CHARM", "DEVOTION", "HEART", "YEARNING", "FANCY", "WISH", "AMBITION", "ADORATION"); @s400 = ("WISTFULLY", "LOVINGLY", "AVIDLY", "PASSIONATELY", "FONDLY", "WINNINGLY", "CURIOUSLY", "DEVOTEDLY", "SEDUCTIVELY", "ARDENTLY", "BEAUTIFULLY", "TENDERLY", "ANXIOUSLY","",""); @s500 = ("PRIZES", "ATTRACTS", "HOPES FOR", "LONGS FOR", "TREASURES", "CLINGS TO", "HOLDS DEAR", "IS WEDDED TO", "THIRSTS FOR", "ADORES", "PRIZES", "YEARNS FOR", "PANTS FOR", "TEMPTS", "LOVES", "HUNGERS FOR", "ADORES", "CARES FOR", "WOOS", "LUSTS FOR", "PINES FOR", "SIGHS FOR"); @s600 = ("KEEN", "CRAVING", "BURNING", "DEVOTED", "AMOROUS", "LITTLE", "PASSIONATE", "SEDUCTIVE", "LOVING", "EROTIC", "LOVESICK", "BEAUTIFUL", "WINNING", "TENDER", "EAGER", "ARDENT", "SWEET", "AFFECTIONATE","COVETOUS", "",""); @s700 = ("PASSION", "RAPTURE", "ENTHUSIASM", "DEVOTION", "INFATUATION", "FANCY", "DEVOTION", "FONDNESS", "TENDERNESS", "LONGING", "AFFECTION", "CHARM", "AMBITION", "CHARM", "FELLOW FEELING", "THIRST", "RAPTURE", "YEARNING", "SYMPATHY", "ENCHANTMENT", "APPETITE", "HUNGER", "LUST"); @s800 = ("FERVENTLY", "FONDLY", "TENDERLY", "SEDUCTIVELY", "WINNINGLY", "BEAUTIFULLY", "LOVINGLY", "IMPATIENTLY", "ARDENTLY", "CURIOUSLY", "BREATHLESSLY", "ANXIOUSLY", "EAGERLY", "AVIDLY", "KEENLY", "BURNINGLY"); $s1 = $s10[int(rand(@s10))]; $s2 = $s20[int(rand(@s20))]; $s3 = $s30[int(rand(@s30))]; $s4 = $s40[int(rand(@s40))]; $s5 = $s50[int(rand(@s50))]; $s6 = $s60[int(rand(@s60))]; $s7 = $s70[int(rand(@s70))]; $s8 = $s80[int(rand(@s80))]; $s9 = $s90[int(rand(@s90))]; $s10 = $s100[int(rand(@s100))]; $s11 = $s101[int(rand(@s101))]; $s12 = $s201[int(rand(@s201))]; $s13 = $s102[int(rand(@s102))]; $s14 = $s202[int(rand(@s202))]; my $a = $s200[int(rand(@s200))]; my $b = $s300[int(rand(@s300))]; my $c = $s400[int(rand(@s400))]; my $d = $s500[int(rand(@s500))]; my $e = $s600[int(rand(@s600))]; my $f = $s700[int(rand(@s700))]; my $g = $s800[int(rand(@s800))]; $line1 = join '', ($s1, $s2,); $line2 = join '', ('YOU ARE MY ',$s3,' ',$s4,'. '); $line3 =join '', ('YOU ARE MY ',$s5,' ',$s6,':  MY ',$s7,' ',$s8,'. '); $line4 =join '', ('YOU ARE MY ',$s13,' ',$s14,':  MY ',$s9,' ',$s10,':  MY ',$s11,' ',$s12,'. '); my @keywords; push @keywords, $line2, $line3, $line4; my $rand11 = int(rand 3) + 1; #a random number is chosen...not 0...size adjustable my %seen = (); $seen{int(rand(@keywords))}++ while scalar keys %seen<$rand11; my @select = @keywords[keys %seen]; $line5 = join '', ('MY ' , $a,' ', $b,' ',$c,' ',$d, ' YOUR ', $e, ' ', $f,'. '); my $aa = $s200[int(rand(@s200))]; my $ba = $s300[int(rand(@s300))]; my $ca = $s400[int(rand(@s400))]; my $da = $s500[int(rand(@s500))]; my $ea = $s600[int(rand(@s600))]; my $fa = $s700[int(rand(@s700))]; my $line5a = join '', ('MY ' , $aa,' ', $ba,' ',$ca,' ',$da, ' YOUR ', $ea, ' ', $fa,'. '); my @keywordsa; push @keywordsa, $line5, $line5a; my $rand11a = int(rand 2); #a random number is chosen... my %seena = (); $seena{int(rand(@keywordsa))}++ while scalar keys %seena<$rand11a; my @selecta = @keywordsa[keys %seena]; $line6 = join '', ('                                        ', ' YOURS ', $g); my @lastwords; push @lastwords, @select, $line5, @selecta; shuffle(\@lastwords); my $LETTER = join '', @lastwords; print "Content-type: text/html\n\n"; print " love2

                   Home    About    Contact     Links     Work    CV                    


Hi, welcome to 'love2'!

This is a simulated version of the Manchester University Computer's Loveletters, the first electronically generated text.
Loveletters is a program that generated texts and the original dates from 1952. It was by Christopher Strachey and ran on the Ferranti Mark I computer.

The Emulator is the creation of David Link.

'love2' was reverse-engineered by working back from the version that runs on David's website.
This was without having seen David's program, therefore any shortcomings are not his fault. The code is here.

This page auto-refreshes and writes a new loveletter every 15 seconds.

This version was included in exhibitions in Poitier ('make art', 7th-13th December 2009)
and Groningen, ('chmod+xART', 2nd-7th March 2010). Also, in 'Chercher le texte' (Labo BnF | BnF Francois-Mitterand, 21st Sept-1st Dec 2013).





$line1
        $LETTER
                                        $line6
                                        M. U. C. [admirer]








"; # fisher yates shuffle sub shuffle { my($lastwords) = shift(); for (my $i = @$lastwords; --$i; ) { my($j) = int(rand($i + 1)); next() if ($i == $j); @$lastwords[$i, $j] = @$lastwords[$j, $i]; } } #EOSub exit();