DHCMRLCHTDJ

Jorge Luis Borges’s infinite ‘Library of Babel’ has been digitized

Imagine a labyrinthian library containing all possible written works—even the configurations of letters, words and sentences that don’t make any sense. First described by Argentinian writer Jorge Luis Borges in his iconic 1941 short story The Library of Babel, that fantasy of an infinite space for language has inspired everything from Umberto Eco’s debut novel to an interactive Burning Man installation.

Today, the Library of Babel is also a web project.

“The Library of Babel is a place for scholars to do research, for artists and writers to seek inspiration, for anyone with curiosity or a sense of humor to reflect on the weirdness of existence,” writes creator and DC-based coder Jonathan Basile on the website’s About page. “In short, it’s just like any other library.”

Except it isn’t. Drawing from its namesake, the site contains every possible combination of 1,312,000 characters, including the lowercase letters, space, comma, and period. In other words, everything that could ever be written, including every masterpiece, joke, and chat conversation.

How does it work? The digital library has 29 possible characters (26 letters, space period, and comma) that are each randomly assigned to the 3,200 spaces on a page. The site uses a pseudorandom generator whose algorithm allows you to browse randomly-generated books and pages by creating them on the spot as you click-navigate through different floors and shelves. Or, you can enter a string of text—be it a song lyric or Bible verse—and the library will find it for you, mixed in with apparent gibberish.

library-babel-1
(Courtesy Library of Babel)

“If you tried to read through all the books, the sun would expand into its red giant phase and engulf the earth before you finished,” claims Basile. “This is expected to happen in about five-and-a-half billion years, long before you could ever read through all the books.”

But with Babel comes babble. The problem of the virtual library is the same as the library of Borges’ imagination: There’s simply so many permutations of text that the probability of finding rational letters by simply browsing is exceedingly rare. “It’s just a statistical impossibility,” says Basile. “You’d actually have a better chance of quantum-tunnelling (or disappearing and reappearing) through a wall.”

But when I searched specifically for the lyrics to Bad Blood, this is the page I got in return:

bad-blood-babel
(Courtesy Library of Babel)

In theory, at least, the digital Library of Babel recreates Borges’ vision, perfectly embodying the tension of both a limited infinity, and an orderly realm of nonsense. Since the project’s inception, responses have ranged from general delight—one forum comment likens stumbling upon the library to going out for milk and seeing a dinosaur—to deep mathematical investigations on this Reddit thread to comprehend the monumental scale of the library.

But today we live in an increasingly visual society, in which Twitter capitulates to Instagram or password can be emojis. Naturally, Basile’s efforts have followed suit: he recently released the Babel Image Archives, an image library of even greater ambitions.

babelimagearchives
(Courtesy Library of Babel)

“Most programming languages can only calculate with numbers of up to 64 bits, or about 17 digits,” explains Basile. “The text library’s code works with numbers with about 5,000 digits to render about 10^5,000 possible books. By contrast, the Babel Image Archives are capable of producing around 10^1,000,000 possible images.”

Instead of 29 characters, the image library has 4,096 color permutations (from 16 possibilities each for red, green, and blue values). Each is randomly assigned to about 250,000 pixels on an image. As with the text library, one can either search for specific images by upload or URL, or explore the images at random.

These different modes of discovery highlight a key element of both Borges’ story and the websites, which is the paradox of desiring both the familiar and the novel. If you opt to use the library’s search function, note that you can only find an image you already have seen and know to look for, whether it’s a photo of the world’s oldest woman or a selfie from your last vacation. It may be easy to read the randomly generated images as visual white noise, but the project highlights the fact that even these have potential for meaning—in the past or the future.

“There’s really no such thing as meaninglessness,” says Basile. ”Any random-seeming group of letters or pixels could signify a powerful god in some language we don’t know or some language that hasn’t been created yet.”

Enter the Library of Babel and the Babel Image Archives to begin browsing.

Follow Joyce on Instagram at @joyceslee. We welcome your comments at ideas@qz.com.

home our picks popular latest obsessions search