-
Notifications
You must be signed in to change notification settings - Fork 0
/
house of dust editing.html
123 lines (116 loc) · 4.94 KB
/
house of dust editing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!--
A House of Dust reimplementation
copyright (c) 2014 Nick Montfort <[email protected]>
based on a 1967 program by Alison Knowles and James Tenney
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Updated 10 March 2015 to remove a duplicate value in "place".
Updated 17 November 2015 to remove a near-duplicate value in "inhabitants".
Updated 18 November 2015 to add "IN A DESERT" & "ON OPEN GROUND" to "place".
Updated 28 August 2019 to add a link to an image of the chapbook.
-->
<style type="text/css">
/* <![CDATA[ */
body {
background:#000;
color:#ccc;
margin:0 0 0 18pt;
font-family:Optima, sans-serif;
font-size:16pt;
}
a {
color:#117;
text-decoration:none;
}
#main {
padding-top:18px;
width:70%;
}
#main div {
font-weight:bold;
padding-bottom:9px;
}
#info {
top:0;
right:0;
bottom:0;
position:absolute;
height:100%;
width:25%;
color:#333;
background:#999;
margin-left:6px;
border-left:thin #000 solid;
border-bottom:thin #000 solid;
padding:9px;
font-size:80%
}
/* ]]> */
</style>
<script type="text/javascript">
var t = 3,
material = ['SAND', 'DUST', 'LEAVES', 'PAPER', 'TIN', 'ROOTS', 'BRICK', 'STONE', 'DISCARDED CLOTHING', 'GLASS', 'STEEL', 'PLASTIC', 'MUD', 'BROKEN DISHES', 'WOOD', 'STRAW', 'WEEDS'],
place = ['IN A GREEN, MOSSY TERRAIN', 'IN AN OVERPOPULATED AREA', 'BY THE SEA', 'BY AN ABANDONED LAKE', 'IN A DESERT', 'IN A DESERTED FACTORY', 'IN DENSE WOODS', 'IN JAPAN', 'AMONG SMALL HILLS', 'IN SOUTHERN FRANCE', 'AMONG HIGH MOUNTAINS', 'ON AN ISLAND', 'ON OPEN GROUND', 'IN A COLD, WINDY CLIMATE', 'IN A PLACE WITH BOTH HEAVY RAIN AND BRIGHT SUN', 'IN A DESERTED AIRPORT', 'IN A HOT CLIMATE', 'INSIDE A MOUNTAIN', 'ON THE SEA', 'IN MICHIGAN', 'IN HEAVY JUNGLE UNDERGROWTH', 'BY A RIVER', 'AMONG OTHER HOUSES', 'IN A DESERTED CHURCH', 'IN A METROPOLIS', 'UNDERWATER'],
light_source = ['CANDLES', 'ALL AVAILABLE LIGHTING', 'ELECTRICITY', 'NATURAL LIGHT', 'THE LIGHT OF THE BLAZING SUN'],
inhabitants = ['PEOPLE WHO SLEEP VERY LITTLE', 'VEGETARIANS', 'HORSES AND BIRDS', 'PEOPLE SPEAKING MANY LANGUAGES WEARING LITTLE OR NO CLOTHING', 'ALL RACES OF MEN REPRESENTED WEARING PREDOMINANTLY RED CLOTHING', 'CHILDREN AND OLD PEOPLE', 'VARIOUS BIRDS AND FISH', 'LOVERS', 'PEOPLE WHO ENJOY EATING TOGETHER', 'PEOPLE WHO EAT A GREAT DEAL', 'COLLECTORS OF ALL TYPES', 'FRIENDS AND ENEMIES', 'PEOPLE WHO SLEEP ALMOST ALL THE TIME', 'VERY TALL PEOPLE', 'AMERICAN INDIANS', 'LITTLE BOYS', 'PEOPLE FROM MANY WALKS OF LIFE', 'FRIENDS', 'FRENCH AND GERMAN SPEAKING PEOPLE', 'FISHERMEN AND FAMILIES', 'PEOPLE WHO LOVE TO READ'];
function rand_range(maximum) {
"use strict";
return Math.floor(Math.random() * (maximum + 1));
}
function choose(array) {
"use strict";
return array[rand_range(array.length - 1)];
}
function stanza() {
"use strict";
return 'A HOUSE OF ' + choose(material) + '<br \> ' + choose(place) + '<br \> USING ' + choose(light_source) + '<br \> INHABITED BY ' + choose(inhabitants);
}
function litany() {
"use strict";
var last, text, main = document.getElementById('main');
if (8 > t) {
t += 1;
} else {
main.removeChild(document.getElementById('main').firstChild);
}
last = document.createElement('div');
last.innerHTML = stanza();
main.appendChild(last);
}
function produce_litany() {
"use strict";
litany();
setInterval(litany, 3000);
}
</script>
<title>A House of Dust</title>
</head>
<body onload="produce_litany();">
<div id="info">
<h2>A House of Dust</h2>
<h3>Alison Knowles<br />
James Tenney</h3>
1967<br />
Seimens System 4004, <a href="https://eastofborneo.org/wp-content/uploads/2016/08/a-house-of-dust-alison-knowles-and-james-tenney-1967-406x500.jpeg">line printer</a><br />
FORTRAN IV<br />
<br />
Reimplemented by<br />
<a href="http://nickm.com">Nick Montfort</a><br />
for <a href="http://nickm.com/memslam/">Memory Slam</a><br />
Also: a <a href="a_house_of_dust.py">Python 2/3</a> version
</div>
<div id="main"></div>
</body>
</html>