A Wiki Page has a journal that records the history of how the page was made and where it has traveled.
glossar
The journal lists each Action that contributed to the page being what and where it is now.
When the journal is accurate it can be replayed to recreate every version of the page through its History.
When the journal identifies sites from which it has been copied (forked) those sites will be added to the Neighborhood upon display.
See our glossary for more Names of Things. page
meta
This page is a Class.
See also Story.
addToJournal
The `addToJournal` function is called when the origin server response that the network operation is complete. search , code
frame
The page journal is now accessed via a frame in the page that surrounds the frame:
We send a message to the Frame asking it to send us info about the page surrounding it. mdn
window.addEventListener("message", handler) let message = { action:"sendFrameContext" } window.parent.postMessage(message, "*")
We stop listening then process the data we got.
function handler ({data}) { if (data.action == "frameContext") { window.removeEventListener("message", handler) const {slug, item, page} = data show(page) } }
The page we show is the page on the screen which might be a ghost, maybe retrieved from history.
function show (page) { let actions = page.journal.map(item => [ item.type, item.id ]) let html = `<pre>${actions.join("\n")}</pre>` output.innerHTML = html }
Note: page.journal.[…] – the information stored must support path playback and path visualization.
We change the show function to see actions as objects. An action, i.e. a page.journal.item, has an ID, a text and a type.
Note: item.text seems to be something special.
Actions: [⇒ Updating Events and Causal Dependence]
//localhost:3000/assets/pages/snippet-template/basicjs.html?snippet-template HEIGHT 200
~
See Array.prototype.map() mdn
Element list?
item.text: Object.prototype.toString() mdn
Event-Driven System Domain
See also Journal Optimization and Embrace Event Sourcing
> We rely on the journal to construct important points in the past history of a story. Any adjustment of the journal is tampering with this history but we can probably agree that tampering with unimportant history could be useful. One that use to show up a lot was adding a blank paragraph and then immediately deleting it. No historian will miss this. This, by the way, was a quirk of the text editor that has since been removed.
references
ONG, TeongJoo and LEGGETT, John J., 2004. A genetic algorithm approach to interactive narrative generation. In: Proceedings of the fifteenth ACM conference on Hypertext and hypermedia. Online. New York, NY, USA: Association for Computing Machinery. 9 August 2004. p. 181–182. HYPERTEXT ’04. ISBN 978-1-58113-848-1. DOI 10.1145/1012807.1012856. [Accessed 20 December 2022]. We discuss the design of the Hybrid Evolutionary-Fuzzy Time-based Interactive (HEFTI) storytelling engine. HEFTI uses genetic algorithms at its core to recombine and evaluate story components generated from a set of story templates. The system allows authors to rely on HEFTI to perform recombination, mutation and selection operations that generate logically congruent variants of the original story via traversal, generation and deletion of (links in) the story elements.
navigation