master
Michael Murtaugh 4 years ago
commit 237a819e78

@ -0,0 +1,629 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# The House of Dust\n",
"\n",
"Alison Knowles\n",
"\n",
"> Fall 1967. Composer James Tenney conducts a workshop on FORTRAN programming with the following participants: Phil Corner, Dick Higgins, Nam June Paik, Alison Knowles, Jackson Mac Low, Max Neuhaus and Steve Reich. The workshop takes place at Alison Knowles and Dick Higginss apartment in New York. Tenney was a composer in residence at Bell Labs from 1961 to 1964 and then at the Polytechnic institute of Brooklyn.\n",
">\n",
"> The poem is generated by James Tenney using the language FORTRAN IV and the computer from the Polytechnic Institute of Brooklyn. At the time, it is entitled Proposition N°2 for Emmett Williams. 50 pages are printed.Fall 1967. Composer James Tenney conducts a workshop on FORTRAN programming with the following participants: Phil Corner, Dick Higgins, Nam June Paik, Alison Knowles, Jackson Mac Low, Max Neuhaus and Steve Reich. The workshop takes place at Alison Knowles and Dick Higginss apartment in New York. Tenney was a composer in residence at Bell Labs from 1961 to 1964 and then at the Polytechnic institute of Brooklyn.The poem is generated by James Tenney using the language FORTRAN IV and the computer from the Polytechnic Institute of Brooklyn. At the time, it is entitled Proposition N°2 for Emmett Williams. 50 pages are printed. [source](https://hub.xpub.nl/bootleglibrary/read/465/pdf#page=8)\n",
"\n",
"[See Knowles' letter asking for further funding for a short overview/history of some of the outcomes of the project](https://hub.xpub.nl/bootleglibrary/read/465/pdf#page=15)\n",
"\n",
"> Please find inclosed a brief history of the project from its inception as a computer poem, which I compose by using a Fortran computer, to the placement of the fibreglass sculpture or object/poem on the campus of the California Instutute of the Arts.\n",
">\n",
"> The significance of the House of Dust, and the reason for moving it and transforming it in a new setting is that it is the materialization of a poem that has a cyclical structure that invites constant renewal.\n",
"\n",
"[See some example output from the original script](https://hub.xpub.nl/bootleglibrary/read/465/pdf#page=5)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python\n",
"https://pzwiki.wdka.nl/mediadesign/Python"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Some useful visualisations code being parsed + performed\n",
"* *Parsing* what you type: A visualisation of the [syntax tree](https://vpyast.appspot.com/)\n",
"* Watching how code is performed or *executed* using [frames](http://www.pythontutor.com/visualize.html#mode=display)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"17"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"17 + 29"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Hello"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Hello python"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"Hello python\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"17\" + 29"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"This is some text\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"(\"One\", \"Two\", \"Three\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"17\" + \"29\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"one\" + \"two\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"type(25)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"type(\"twenty five\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Built-in symbols"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import keyword"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"keyword.kwlist"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import builtins"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dir(builtins)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Variables"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x = 17"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x + 29"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"len"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"len(\"hello\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"l = (\"one\", \"two\", \"three\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"len(l)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# String formatting"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"hello {}\".format(name)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"f\"hello {name}\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print (\"hello python\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"n = \"your name\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"Hello\" + x"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some key part of the original FORTRAN [code](https://hub.xpub.nl/bootleglibrary/read/465/pdf#page=9):\n",
"\n",
"```\n",
"DIMENSION MAT(3,17),SIT(8,25),LIT(4,4),INH(11,22)\n",
"...\n",
"JM=1.+RAND(17.)\n",
"JS=1.+RAND(25.)\n",
"JL=1.+RAND(4.)\n",
"JI=1.+RAND(22.)\n",
"...\n",
"FORMAT(1H0,5X,1IHA HOUSE OF ,3A6/12x,8A6/18X,6HUSING ,4A6/24X,13HIINHABITED BY ,11A6)\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Loops"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for x in range(10):\n",
" print (\"hello python\")\n",
" print (x)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"x is 1\n",
"x is 2\n",
"x is 3\n",
"x is 4\n",
"x is 5\n",
"x is 6\n",
"x is 7\n",
"x is 8\n",
"x is 9\n"
]
}
],
"source": [
"x = 1\n",
"while x<10:\n",
" print (f\"x is {x}\")\n",
" x = x + 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Random"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import random"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dir (random)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"random.random"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function Random.random>"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"random.random?"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<bound method Random.randint of <random.Random object at 0x21c0b38>>"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"random.randint"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"random.choice"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from random import choice"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading…
Cancel
Save