Introduction Last updated: 2025-02-04

Papyrus is a custom implementation of the Library of Babel, originally written by Jorge Luis Borges in 1941, and made by popular by Jonathan Basile's libraryofbabel.info. In Borges's story, the library contains every possible combination of letters, spaces, and punctuation, holding all possible texts—both meaningful and random—across an infinite series of books.

This means that Papyrus contains every text ever written, every text that could be written, and every text that will ever be written. In essence, it holds every thought, script, and scientific discovery that has ever existed or will ever exist.

Libraries

This section documents the various libraries offered by Papyrus.

2.1 Library v1

This is the first version of the Papyrus Text Library. Although Library v2 is now recommended, you can still explore the first edition if you so wish. At first glance, v1 may look more or less the same, the two versions are very different in what they offer.

Library v1 uses a deterministic algorithm, meaning that for any given address, the content generated will always be the same.

The content generation is driven by a seeded random number generator, ensuring consistency across sessions while still producing pseudo-randomized text based on the unique address.


v1 Algorithm Overview

The content generation relies on the following process:

Seeded Randomization: A unique seed is generated for each page based on the hexadecimal address of the book, as well as its location on a wall, shelf, and the specific page number. This guarantees that each page is always the same for the same address.

Text Generation: For each page, a series of pseudo-random characters are generated using a deterministic randomization function. The text is constructed from a set of characters (e.g., letters, punctuation, and spaces), ensuring that every page has a consistent, randomized pattern based on the address.

Mixing Seeds: The seed used for each random number generation is mixed from the address input, ensuring that small changes in the address lead to significant changes in the generated text.


Addresses

v1 allows for the following values to be set by the user:

Value Setup
Hex Numbers (0-9), lowercase letters (a-z), with a max length of 3260 characters
Wall 1 to 4
Shelf 1 to 5
Book 1 to 32
Page 1 to 410

For example, if the user inputs:
b8rt2f98abk783 as the hex;
3 as the wall;
2 as the shelf;
26 as the book;
and 311 as the page, the full address would be: b8rt2f98abk783-3-2-26-311.

v1 addresses are seperated by dashes to function in URLs. The example above can be visited by going to:
https://kiyantk.nl/dev/papyrus/library-v1/?address=b8rt2f98abk783-3-2-26-311

Upon visiting a URL with an address, all the fields are automatically filled and the page is shown instantly.

If you visit the address mentioned above, you will see:


Size

Library v1 can generate a VERY large amount of pages (practically infinite). To be precise:

  • The total possible combinations in the hex alone is 363260, which is roughly 3e+5073 (that's a 3 with 5073 zero's!).
  • Additionally, each hex has 4 walls, within that 5 shelves, within that 32 books and within those 410 pages each.
  • That brings the total equation to: (36^3260)*4*5*32*410.
  • If we calculate that, we see that there are about 9.228185843596...67035965e+5078 pages (basically a 9 with 5078 zero's!)

Even if you had trillions of years worth of time, you wouldn't get anywhere close to even reading 0.01% of the library.

Every page contains 3200 characters.

Functionality

Library v1 allows you to:

  • Enter each part of the address seperately;
  • Load a specific address quickly by URL;
  • Load a specific address quickly by entering it in the Address input field;
  • Navigate the current book (Previous page, Next Page, Specific Page);
  • Go to a random address in the library.

Limitations

Library v1 lacks:

  • A search function;
  • Export options;
  • Book titles.

Besides that, v1 is practically identical to v2. Library v2 does result in a different output given the same address, however.

2.2 Library v2

This is the second version of the Papyrus Text Library. Version 2 offers many additional functionalities.

Just like v1, v2 uses a deterministic algorithm, meaning that for any given address, the content generated will always be the same.

The content generation is driven by a seeded random number generator, ensuring consistency across sessions while still producing pseudo-randomized text based on the unique address.


Addresses

v2 allows for the following values to be set by the user:

Value Setup
Hex Numbers (0-9), uppercase letters (A-Z), with a max length of 3260 characters
Wall 1 to 4
Shelf 1 to 5
Book 1 to 32
Page 1 to 410

For example, if the user inputs:
B8RT2F98ABK783 as the hex;
3 as the wall;
2 as the shelf;
26 as the book;
and 311 as the page, the full address would be: B8RT2F98ABK783:3:2:26:311.

v2 addresses are seperated by colon's. The example above can be visited by going to:
https://kiyantk.nl/dev/papyrus/library-v2/#B8RT2F98ABK783:3:2:26:311

Upon visiting a URL with an address, all the fields are automatically filled and the page is shown instantly.

If you visit the address mentioned above, you will see:


Size

Library v2 can generate a VERY large amount of pages (practically infinite). To be precise:

  • The total possible combinations of the hex alone is 363260, which is roughly 3e+5073 (that's a 3 with 5073 zero's!).
  • Additionally, each hex has 4 walls, within that 5 shelves, within that 32 books and within those 410 pages each.
  • That brings the total equation to: (36^3260)*4*5*32*410.
  • If we calculate that, we see that there are about 9.228185843596...67035965e+5078 pages (basically a 9 with 5078 zero's!)

Even if you had trillions of years worth of time, you wouldn't get anywhere close to even reading 0.01% of the library.

Every page contains 3200 characters.

Below is the structure of the Papyrus Library:

  • Papyrus Library
    • Hex
      • Wall
        • Shelf
          • Book
            • Page
              • Title
              • Content

Functionality

Library v2 allows you to:

  • Enter each part of the address seperately;
  • Load a specific address quickly by URL;
  • Navigate the current book (Previous page, Next Page, Specific Page);
  • Go to a random address in the library;
  • Export the current book as PDF or TXT;
  • View the full address as plaintext in a new window;
  • Download a bookmark (the full address) as a .papyrus file;
  • Search for a specific string (up to 3200 characters, as many that fit into a page) with three search options;

v2 also provides improved user feedback with Toastify.

Search

The Search tab allows you to find where a specific string is located in the library. When you search, three addresses are output:

Search option Meaning
Exact Match Page contains only your string, rest is filled with spaces
With Random Characters Your string will be among other text
Title Match Your string, limited to 25 characters if it is longer, as the book title

2.3 Library v2 Expanded

Library v2 Expanded is an expanded version of Library v2. This version uses more characters. v2 Expanded adds numbers and various special characters to the supported page content. So on top of all the content v2 contains, v2 Expanded also contains every phone number, hashtag and (basic) mathematical equations (among other things). v2 Expanded is internally referred to as v2e.

The algorithm from v2e is the same as v2, only with an expanded character list.

Library v2 Expanded adds the following characters to the pages: '!', '?', '@', '#', '$', '%', '&', '+', '=', ':', '(', ')', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-'.

Library Setup
v2 abcdefghijklmnopqrstuvwxyz, .
v2 Expanded abcdefghijklmnopqrstuvwxyz, .!?@#$%&+=:()0123456789-

With the expansion of the character list for content in pages, the allowed characters in Hexes are also increased. v2 Expanded adds lowercase letters a-v to the supported Hex characters.


Addresses

v2 Expanded allows for the following values to be set by the user:

Value Setup
Hex Numbers (0-9), uppercase letters (A-Z), lowercase letters (a-v), with a max length of 3260 characters
Wall 1 to 4
Shelf 1 to 5
Book 1 to 32
Page 1 to 410

For example, if the user inputs:
cR4g40tNCSW as the hex;
3 as the wall;
2 as the shelf;
26 as the book;
and 311 as the page, the full address would be: cR4g40tNCSW:3:2:26:311.

v2 Expanded addresses are seperated by colons. The example above can be visited by going to:
https://kiyantk.nl/dev/papyrus/library-v2e/#cR4g40tNCSW:3:2:26:311

Upon visiting a URL with an address, all the fields are automatically filled and the page is shown instantly.

If you visit the address mentioned above, you will see:


Size

Library v2 Expanded can generate even more pages than Library v2, because the hex can use 57 different characters for each of it's maximum of 3260 characters.

  • The total possible combinations of the hex alone is 573260, which is roughly 1e+5724 (that's a 1 with 5724 zero's!).
  • Additionally, each hex has 4 walls, within that 5 shelves, within that 32 books and within those 410 pages each.
  • That brings the total equation to: (57^3260)*4*5*32*410.
  • If we calculate that, we see that there are about 3.723859810361146...016284424676962e+5729 pages (basically a 3 with 5729 zero's!)

If we compare the numbers between v2 and v2 Expanded, we can see that the total amount v2 Expanded pages is a number with 651 more 0's than v2.

Every page contains 3200 characters.

Functionality

Library v2 Expanded has the same functionality as Library v2.

Search

The Search functionality is also identical to v2, but here supports the added characters.