グラスゴー大学で英文学を教えるかたわら、創作活動をした人物で、実験的な詩も多く残している。
その作品群の中に、"Message clear"という作品がある。
http://www.elgin.free-online.co.uk/misc/message.htm
1968年出版の詩集に含まれ、「コンピュータが文章を書いたらどうなるか」という当時流行した議論をテーマに書かれている。
この作品で人格を与えられたコンピュータが最終的に伝えたい言葉は、
"i am the resurrection and the life"
「ヨハネによる福音書」11章25節でつづられる「わたしは復活であり、命である」という言葉である。
この大変面白い詩にインスピレーションを受け、この詩をプログラム言語で表現してみたいと考えた。
しかし、プログラムは、モーガンの書いた「言葉にできずに迷う人格」を表現することはできない。なぜなら、プログラムは、コンピュータを決定論的に動作させるために用いられる言語だからである。
まぁ、それはそうなのだけれど、プログラム言語でその世界をなんとか表現しようと試みてみた。
"i am the resurrection and the life"という文字列のそれぞれの文字のインデックスに対して、どの文字を出力するか。その数列を、コンピュータの迷いの表現に見立てて書いてみた。
それがこれ。
https://gist.github.com/2900182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.gist.daiksy | |
/** | |
* エドウィン・モーガンという現代詩人の作品に | |
* "message clear"というものがあります. | |
* http://www.elgin.free-online.co.uk/misc/message.htm | |
* | |
* これは,1968年の彼の詩集に含まれている作品で, | |
* コンピュータが文章を書いたらどうなるか, | |
* という当時流行した議論をテーマに作られた作品です. | |
* | |
* これをScalaで表現してみました. | |
* hesitationList は和訳すると「ためらいリスト」 | |
* コンピュータのためらいを,このList[List[Int]]によって | |
* 表現しています. | |
* | |
* もう少しエレガントに書ける方法ないかなー,とも思います. | |
*/ | |
case class MessageClear() { | |
private val message = "i am the resurrection and the life" | |
private val hesitationList = List( | |
List(2,3,31), | |
List(31,32), | |
List(0,2,3,27,28), | |
List(6,7,9,19), | |
List(6,12,13,17), | |
List(5,6,7,9,10,22,23,24), | |
List(6,7,15,16,22,23,24), | |
List(6,7,9,10), | |
List(2,20,24), | |
List(5,6,7,9,28), | |
List(0,2,3,9,31,32,33), | |
List(18,20), | |
List(11,18,19,20,22,23,24), | |
List(0,24,31,33), | |
List(2,3,7,9,10,11,15,16,17), | |
List(2,3,7,9,10,11,15,16,17,18,19,20), | |
List(19,32), | |
List(5,6,7,30,31,32,33), | |
List(19,32), | |
List(3,7,20), | |
List(11,12,13,15), | |
List(5,6,7,24,31,33), | |
List(0,11), | |
List(11,15,17,22,23,24), | |
List(0,2,3,5,6,7,11,12,13,24), | |
List(2,5,9,10,11,17), | |
List(19,30,31,32,33), | |
List(0,2,3,6,7,9,33), | |
List(0,2,16,17), | |
List(0,9,12,20), | |
List(0,3,7,10,17), | |
List(0,17,31,33), | |
List(0,11,17,22,23,24), | |
List(0,2,3,5,6,19,26,27), | |
List(0,2,3,9,22), | |
List(0,2,3,5,6,7,11,12,20), | |
List(0,2,3,5,6,7,11,19,20), | |
List(0,2,3,5,6,7,10,14,15,16,17,19,20,28,31,32), | |
List(0,2,3,9,10,20,26), | |
List(0,2,3,11,22,32,33), | |
List(0,2,3,11,15,20,26), | |
List(0,6,7,10,24), | |
List(0,5,7,11,17), | |
List(0,9,10,22,24), | |
List(2,5,6,9,10,22,24), | |
List(2,11,17,19,20,28), | |
List(2,5,9,10,22,24), | |
List(2,5,6,9,19,20,28), | |
List(0,9,10,11,12,13,14,15,16,17), | |
List(22,30,31,32,33), | |
List(0,2,3,18,20,30,31,32,33), | |
List(0,2,3,9,10,11,12,13,14,15,16,17,18,19,20), | |
List(0,2,3,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24), | |
List(0,2,3), | |
List(0,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) | |
) | |
private def hisWhisper(outIndex: List[Int]) = { | |
message.zipWithIndex.map {case (v, i) => | |
i match { | |
case i if outIndex.contains(i) => v | |
case _ => " " | |
} | |
}.mkString + "\n" | |
} | |
lazy val write = hesitationList.map(hisWhisper).mkString | |
} |
まぁ。なんとなくそれっぽくなったんじゃないだろうか。
0 件のコメント:
コメントを投稿