Beyond The Case Against Books one could ask, if books are not enough and if computational notebooks could be, then how?

The most basic implementation would be to have text, like so, intertwine with code, like so

addNewNote("jxr loadPageRange("+ (Math.random()*100).toFixed() +")")

and clarify what the shared code is. As is the code itself might not be interpretable by neither the reader nor the device they are using to read the content.

Here this single line is quite specific to the target environment, namely SpaSca. That environment defines 2 new functions, addNewNote() (a core function of that environment) and loadPageRange() (a function specific to books and now computational notebooks or rather books with code) and the ability to parse jxr code. This means this example is very specific. One should not expect this code to run anywhere else (for now).

That being said it does demonstrate the ability to intertwine text and code in an environment where code is usually shown, e.g Ffmpeg or Hubs, as documentation but is not expected to be ran anywhere else, beisde a copy/paste. The reader is thus doing the work of providing the environment to run the code.

Here, following from past explorations running containers in VR allowing to run code from any language, the compatibility of the environment is assumed. This is a significant shortcut but that could be overcomed. As briefly mentioned in Principle a Dockerfile could be specified, either entirely as textual content or as a URL. This means not only text, as code, to container to text, as result, would work but even visual environment, as shown streaming a container back to VR.

Consequently this short explanation with this single line of code does show a starting point for considering books with code in XR.

Key concepts still to address :

See also