Magic Paper

hero.jpg

Last year, I quit my job to work on a project of my own. This was February of 2023. ChatGPT had come out in the fall of the previous year and I was thrilled by the possibilities of LLMs (I still am), but that’s not the whole story. The summer before, I revisited a pivotal influence of mine: Ted Nelson’s Project Xanadu. In short, Nelson had the idea that hypertext (a term he coined) should be baked into the substrate of word processing, not merely bolted on at publication time—and he pursued this project relentlessly through the formative decades of personal computing. That summer—before I got excited about LLMs—I began to see how establishing a few key primitives and nailing the bookkeeping of a word processor could unlock a very powerful workspace for text. In other words, I began to understand the possibilities that had tantalized Ted Nelson all those years.

The funny thing is, I had already gone deep on Project Xanadu years before. In 2018 I met Ted Nelson in person. In 2019 I spent the better part of a month meeting with him, interviewing him, and exploring his personal archives in Richmond, CA. This was what I wrote my senior thesis on. The thing is, when I was working on a thesis I was focused on understanding what this counterfactual personal computing paradigm meant. It was years later when I finally dug into how it could work.

So last year, I decided I’d try to build it. All projects start with a name: I called mine Magic Paper. It would be Xanadu, built on a modern tech stack. In 2023, this meant finding a way to synthesize a paragon of retrofuturism with the bleeding edge of LLMs. As I alluded to earlier, it all came down to a few key primitives and good bookkeeping:

Copy and Paste: When you copy and paste text in normal applications, you just carry over the text content. In Magic Paper, you carry with you a link back to the original document you copied from. Importantly, it’s a granular link–each character that you copy over points to a specific character in the source. This means that even as you edit or paraphrase the copied text, all the pieces of the original will point back to exactly where they came from.

Version History: The same principle underpins how versions are tracked within a document. As you edit the text within a document, all the parts that are left alone will maintain a link back to the previous version. Copy and paste and version history are two instances of a broader concept: all the text in a document will always point to where it came from.

Parallel pages: The first two concepts demonstrate how text editing in Magic Paper adopts a higher-level perspective. Unlike most document editors, Magic Paper proliferates links between documents. In terms of UI, it becomes necessary to present a number of different texts simultaneously. In Magic Paper, open documents stack horizontally. If you click into the origin of a fragment in one text, the source document will snap into place right next to it.

Highlights: With multiple documents open at the same time, it’s important to visualize the relationships between them. The insight I had in designing Magic Paper is something I call highlight portals. When you highlight part of one document, corresponding highlights will appear within the other documents you have open. A simple case is if you highlight a fragment excerpted from another document, it’ll be highlighted in context in the source. Here’s another example: if you open two versions of the same document side-by-side, you can select all of the text in the more recent version to see which pieces were preserved and which pieces were discarded from the earlier version. It works just as well to highlight the older version and visualize what’s been added by the newer one.

Links: The final essential piece are links. Of course, much of what I’ve described so far are kinds of links between documents. But what’s missing is a link between two distinct pieces of content. So far, all links have been between the same content in two different places. When you enable linking two disparate text fragments (in the UI, copy one fragment and paste it on top of another), all of the above functionality around parallel pages and highlight portals becomes much more powerful.

Marginalia: Links are enhanced by a couple of UI details. If you have a document open that links out to a bunch of other ones, you’ll see preview cards in the right-hand margin that show the metadata of the document they link to, as well as a preview of the specific excerpt. You can click one of these cards to open the source document and jump to the linked excerpt. A powerful example: while taking notes based on a source text, you can paste links onto your notes that map them to relevant parts of the source. Then, if you have just the source open, you’ll see all of your notes in the margins with the option to jump to them in context.

The ensemble effect of these primitives is magical: interacting with a text where each character has an origin, a document where each revision is separate from but connected to its precursor, a set of notes where equivalent parts are shared between pages and other parts are distinct but linked between them. All of these relationships are at first hidden, but they become visible as you begin to interact with the system.

All of the above (with the exception of highlights) were in fact features of the earliest sketches of Xanadu. Highlights are a UX decision that worked well in my experiments. The rest are insights into how text editing should be represented on computers that trace back to Nelson’s earliest designs in the 1970s.1

What’s missing from the above is how this project interacts with LLMs. One thing that feels obvious to me is the future of text involves leveraging AI. When we think about the process of drafting a new document or synthesizing notes from an array of sources—the activities that Magic Paper, like Xanadu before it, was designed to improve—we must assume that AI will play a central role.

The next layer of functionality in Magic Paper dealt with LLMs and embeddings, and how they could be implemented on the scaffolding outlined above. Over time, it grew into a toolbox of useful functions: distilling a document to its most essential fragments, annotating a document with notes that relate it to a question you’re trying to answer, or drawing connections between the topics discussed in two different documents. The first two tools generate a document linked to the source, the third draws links between two existing documents. These functions complement the foundational layer of Magic Paper, leveraging all the existing functionality for links, highlights, and parallel pages, and giving them new life by automating the process of creating them. This was the vision I had for the project and it was incredible to watch it take shape at a time when the state of the art in AI was progressing in leaps forward every couple of months.

However, a year after I started work on the project, the time came for me to move on to the next opportunity. I open sourced lots of the code2 and kept the app running until recently. When I started to run low on AWS credits, I had to spin down the Magic Paper servers. That’s when I got inspired to write this post.

When I wrote my thesis on Xanadu five years ago, I called it a “literary dream for the computer age.” I’m certain that LLMs can reinvigorate this kind of vision. However, what inspired me most wasn’t, for example, the idea of computers that understand text. Xanadu was liberating: it stood outside the paradigm of technology that we know. It embraced ways of understanding the world that don’t fit neatly into boxes. It promised to elevate our understanding and bring us into close contact with all the great ideas that came before us.

I’m not quite as idealistic now. I believe in the virtue of all of these premises as much as ever, but I don’t think a technical design can redirect our culture. Xanadu pointed toward ideals and inspired me in ways that have nothing to do with software. However, perhaps because it pointed toward ideals, it was never as readily adopted as competing technologies.

The early proponents of personal computers and the internet said “information wants to be free.” I’m now of the belief that “technology wants to be instrumentalized.” Magic Paper didn’t make it out of the realm of ideas because it didn’t make itself a means to an end. I love big romantic inspiring ideas, but I wonder if perhaps they shouldn’t be attacked head on.

I would build that dome in air,
That sunny dome! those caves of ice!
And all who heard should see them there,
And all should cry, Beware! Beware!
His flashing eyes, his floating hair!
Weave a circle round him thrice,
And close your eyes with holy dread
For he on honey-dew hath fed,
And drunk the milk of Paradise.
Samuel Taylor Coleridge, Kubla Khan


  1. One of the key insights I had when writing my thesis on Xanadu is that the project unfolded gradually: starting with these key primitives for one writer’s workspace, and later growing into a vision for a global interconnected literature. 

  2. salience for distilling documents to essential fragments, attention for visualizing the relationships latent in how LLMs process text, and rhizomes which was the foundational data structure of Magic Paper. 

 
20
Kudos
 
20
Kudos

Now read this

Here’s to the crazy ones

Apple’s most iconic ad featured a cast of famous misfits, rebels, and dreamers. I think Michel Foucault would’ve been a worthy addition. The campaign linked the company to a certain philosophy of the world—and this worldview, with its... Continue →