I’d say my favorite part of the Library of Babel was the description of the shunned practice of using dice, paper, and a writing utensil to effectively do the exact same thing the library is doing, as the chance of getting any information out of reading a page in the library is about the same as if you wrote a page according to the random selection of characters.
Out of respect for this notion, I’ve been considering writing a code to generate a random page, with the intention of posting about one a day if I find the time (I’ll be using Java, as it’s the program I’m most familiar with).
Characters will be determined by Math.random multiplied by 29, truncated into an integer.
A function will index all 29 of the library’s characters into if statements that can be referred to by the random integer.
All characters will be stored in Strings representing individual lines.
Since I don’t believe I can include escape characters, a page will be represented by an ArrayList paramatized to store Strings.
Nested for loops will generate the page according to the 40 line 80 character parameters.