Hacker News new | past | comments | ask | show | jobs | submit login
Library of Babel (libraryofbabel.info)
110 points by klunger on May 3, 2015 | hide | past | web | favorite | 40 comments

For those who haven't read the Borges short story, this might seem a bit confusing.

For those who have, another book to read is The Unimaginable Mathematics of Borges' Library of Babel.

It definitely confirms my suspicion that sometimes Borges wrote horror stories for anyone who touches combinations.

Yes, quite right, I should have included some context. Here we go:


Original text, translated into English: http://hyperdiscordia.crywalt.com/library_of_babel.html

Wow, I just found the refutation for P=NP in your library: it's at ... NOOOO, I accidentally closed the other tab damn should have written it down

Reopen the tab from your browser history :p

Cursed are those that search in private browsing mode.

It should be possible to link to individual pages. ( So that one can show where the opening line of Neuromancer or the first paragraph of The Library of Babel is located.) But otherwise really cool.

On average, the link would be at least as long as the book.

I think yk's idea is excellent - I'm actually working on it right now. You're correct that the book locations need to be about as long as the book to provide sufficient unique values - but it isn't humanly or temporally possible for people to bookmark that many pages - so a separate index of bookmarked pages could use much shorter urls.

and please make the bookmarks unguessable and private. I want to sent moderately private letters, that where already "written" in the library :)

I'm glad you suggested that - will do.

letters where sent :)

I'm still amazed at the project, thank you

Not if you let the first linked page be site.com/1, the next one site.com/2 and so on, I think.

Yes, even then.

Sure "1" and "2" are pretty short. And even "57834573495879436129386943" is pretty short.

But the average link would have so many digits, I couldn't post it in this comment.

The bookmarks would only need to map to the book locations - you would only need sufficient values for the number of bookmarked pages, not the entire range of possibilities.

How does that even make sense? Taking a lower base will only require more characters.

I created a bookmarkable link on the book pages - and you can title them yourself, so they will remain private if you like.

Thank you for the excellent suggestion.

Very cool. First thing I did was to search for "it was the best of times, it was the blurst of times".

However, I notice that the site routinely locks up my Chrome browser. What client-side processing is it doing that causes everything to freeze?

Hey DanAnderson,

I'm the programmer of libraryofbabel.info - thanks for letting me know about this. Which pages is it happening on?

When I'm at the search results at http://libraryofbabel.info/search.cgi and I try to click the "Location" link for a result, everything freezes for about 15-30 seconds.

By the way - also a fan of the Simpsons. I'd be lying if I said that scene wasn't a partial inspiration for the site.

For what it's worth, I have the same locking behaviour in my Chrome browser.

How long will it take for the takedown for copyright violation notices to start coming in?

First of all is there a source code you can share? Just in case something was to happen to the Library, we wouldn want to lose all the knowledge like we did with Library of Alexandria (Although I'm sure we can find all the missing manuscripts in this library :) )

Second, maybe it would be worth adding ability to flag pages/books but also include a flag that signifies that there is nothing really worth reading there. :)This way you could have people flag content that does not make sense in any known human language.

Hey mariusz - interesting ideas. for the first, I was new to coding when i started this project, so i dont really know how people go about sharing their code. I imagine I could put it on github or something like that - but I'm a little apprehensive that someone might be able to find a way to do something malicious to the site if they were to know its inner workings. So I'm not sure - I too think about the posterity of the library, though.

As for the second idea, the forum exists for librarians to share any sorts of discoveries they make in or thoughts they have about the library. But I would never say there could be a page with nothing interesting on it! After staring at these pages for a possibly unhealthy length of time, I can tell you that there's something interesting to be found in all of them.

and keep in mind what Borges said: "In truth, the Library includes all verbal structures, all variations permitted by the twenty-five orthographical symbols, but not a single example of absolute nonsense. It is useless to observe that the best volume of the many hexagons under my administration is entitled The Combed Thunderclap and another The Plaster Cramp and another Axaxaxas mlö. These phrases, at first glance incoherent, can no doubt be justified in a cryptographical or allegorical manner; such a justification is verbal and, ex hypothesi, already figures in the Library. I cannot combine some characters - dhcmrlchtdj - which the divine Library has not foreseen and which in one of its secret tongues do not contain a terrible meaning. No one can articulate a syllable which is not filled with tenderness and fear, which is not, in one of these languages, the powerful name of a god."

Putting the code up on, say, GitHub would also help with stopping people from doing malicious things to the site, because people aren't always mean and villainous, they can be nice as well and help out. One of the benefits is people fixing your code for you!

If you're worried that somebody will do something malicious... what is there that one could maliciously do? As long as you don't have, for example, credit cards on there, not much to steal then. Perhaps somebody is malicious enough to decide to take down your website for their perverse pleasure, in that case anybody can have their own, local copy of the library in case the internet-facing one goes down.

EDIT: What I meant and managed to completely fail to convey well in the first paragraph is that by obscuring the code, the vulnerabilities that you're afraid of people finding don't go away. And people can find them nonetheless. By opening the code, other people can fix vulnerabilities, etc. But keeping this paragraph in mind, to relate it to the others, seeing as how your library still exists, nobody seems to have bothered to try to destroy the library in the first place using their own means, so what difference will putting the source up make? :)

tl;dr: Security by obscurity? For shame. Put the source on GitHub! There's nothing to lose, and everything to gain. :)

Neat. How on earth does search work? (Particularly the "with random English words" part)

Oh. Nevermind. Duh.

(Since the address is the content, just generate a random block of text that has whatever properties you want, and then "re-encode" it as an address. "Search" complete!)

Is this actually valuable in some fashion to humanity? (not hating, serious question). It seems more efficient to store every book than to predict every book ever by holding GB's of nonsensical sequences. Or is this just a for fun thing?

"Others, inversely, believed that it was fundamental to eliminate useless works. They invaded the hexagons, showed credentials which were not always false, leafed through a volume with displeasure and condemned whole shelves: their hygienic, ascetic furor caused the senseless perdition of millions of books."

The whole site takes up a few MB! It doesn't store any books at all.

As to your other question, I'd say 1)The library undermines the integrity of rational thought or endeavor, and thus teaches us to reconfigure our thought to do without purpose. 2)On the other hand, when decontextualized pieces of language can take on new, unforeseen meanings - they can become more meaningful, not less.

The library is a paradoxical place. It's up to us to do what we will with it.

the best part is that you can search for a particular string.

I notice that all books seem to be exactly 410 pages long.

The parameters of the books are mostly set by the story - you can take a look at the link klunger posted, or read a pdf here: http://libraryofbabel.info/Borges/libraryofbabel.pdf

How long did it take to generate all of the books?

I didn't pre-generate the books - that would have taken longer than the lifespan of the earth (that didn't stop me from trying, though!). The books are generated by a pseudo-random algorithm which uses the "location" as the seed. So you get random seeming text, but the same page is in the same place every time. I described some of the coding process here: http://libraryofbabel.info/theory4.html


I found an interesting tidbit:

    axropabbwz  xplxvzny,putmgqmcgbyftxqzdp
    uwdlwdnzdmxeynijv.oazyxminlztkcqmwer.m fi
    mkvchlofjdlmvriu lnqcghyzqaboxlicq taggnj
    hc sfcadlbkn,ln,
    lcnjgtsufin the beginning god created the 
    heaven and the earthhu
It tells me that this is at:

Volume 28 on Shelf 4 of Wall 4

But when I go directly there using browse, it doesn't seem to be the same text.

Hey hliyan! I'm glad you're deeply exploring the library - did you make note of the page number?

Sorry, I just saw this. Sadly, I've forgotten the page number. But I'm sure it's recreatable.

Thanks for this. The Library of Babel was one of those ideas that first got me thinking deeply about the nature of knowledge as a kid.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact