Source code

This topic contains 7 replies, has 3 voices, and was last updated by  Keiwan 1 week, 1 day ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #36157 Reply

    Jonathan Basile

    Better late than never! I uploaded the invertible, multi-precision, pseudo-random number generating algorithm behind I hope you’ll make some weird ass stuff with it, and please share with me what you come up with:

    #36192 Reply

    Ed Gore

    So we don’t have the source code for the library itself, only the image library?

    #36199 Reply


    Fantastic work, Jonathan! The math is still a little bit out of my reach, though I have dabbled in the past with some of the resources you used. In particular, the modular inverses. It’s nice to finally see it in practice, though! Might we be able to also have a peek at the algorithms for, despite being less efficient? Aside from just comparison, it would be great to have an offline solution for the Library of Babel 3D (which currently makes requests to the website):

    #36206 Reply

    Ed Gore

    @delengroth when was the 3D added to this site? I’ve never seen it before

    #36209 Reply


    It’s a fan game by Keiwan (, but re-hosted on this website. It was added around January 2016:

    #36268 Reply

    Ed Gore

    have you had the experience in the game where when I’m searching for text, it suddenly says some “out of memory” error and then the game freezes?

    #36700 Reply

    David Coleman

    Hi Jonathan. I emailed you recently regarding a C# implementation of a ‘similar’ library. It currently runs as a Window program and generates a ‘different’ library from yours basically because I use and encryption/decryption scheme (Rijndael) rather than an invertible RNG. It really doesn’t matter what the data scrambling method is as long as it is invertible and scrambles well.

    The C# code actually became quite simple to implement because the ultra large precision numbers and the encryption are already provided as namespaces in the C# framework.

    My approach though was a little different. To ‘search’ my code basically scrambles a 3200 character page of characters (base 29) into an array of 3200 bytes which is then encoded into an address: hexagon, wall, shelf, volume, page. The result of this gives a much larger hexagon address than your implementation – around 4,950 base 36 characters! instead of your 3,500 or so.

    However, once the string is ‘located’ in the library, it is always in the same place and can be ‘browsed’ to by entering the hexagon,wall,shelf,volume,page.

    You may want to read my email as it has some other info there.

    #37233 Reply


    The WebGL version of my 3D version hosted here is long outdated. You should download the latest version from the page (, the App Store or Google Play Store.

    I can’t host the WebGL version myself (or on due to cross origin access restrictions and it’s too much of a hassle for both Jonathan and myself to try to debug and update that version remotely via e-mail communication.

    I would add the original library algorithm to the 3D version to allow for it to be used offline, if I had the code. I want the 3D version and the website to have the same page locations, since the page generating implementation is still Jonathan’s work.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Source code
Your information: