Permutation City

My first test of Python running in the browser using pyp5.js! Python code running in the browser (using Pyodide) allowing you to write Processing sketches that run on the web.

This sketch is based on Permutation City, a fascinating novel set in the near future where human consciousness can be copied into a computer – with some awesome and terrifying possibilities. I wanted to explore creating the book’s cover using Python and Processing.

Permutation City book cover. The title of the book is embedded into a grid of random characters.
Python generated cover running in web browser. This cover instead spells out “Python on the web!” – rather than the book’s actual title.

Part of the story concerns itself with a kind of steganography where the copy’s running code (aka a person in a virtual world) needs to be hidden into an existing area of active memory. I think that the designer of the cover was trying to visualize this aspect of the the story by embedding the title of the book into a grid of random text.

In this Python / Processing sketch you can encode your own message into the book cover and change the rate at which it randomizes the cover. The sketch is able to use input from the form and update the graphical output.

I am excited about the possibilities of being able to write code and have it run on the web. I hope to publish soon some notes about the steps I followed.