aboutsummaryrefslogtreecommitdiffstats
path: root/examples/editor.aup
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-18 19:30:16 +0100
committereunhhu <[email protected]>2026-10-18 19:30:16 +0100
commit26658fea927aa87e861c936b2d7aa4163d38bdb4 (patch)
tree860799d514d6705bc4d0d11415ade1eda7dcb08a /examples/editor.aup
parent8709c7fdb9d18e30e6bb776f536aa230389fa527 (diff)
downloadaup-26658fea927aa87e861c936b2d7aa4163d38bdb4.tar.gz
aup-26658fea927aa87e861c936b2d7aa4163d38bdb4.zip
Module format v7 (Pure 027's 4b-2): keyed documents gone from the language: no bytes by key, message by key, name[key] or .replace(first .. last, value), the opcodes DOC, DOC_SIZE and REPLACE (those after them moved up), the header 38 bytes; examples/editor.aup and bounded-editor.aup gone (examples/documents.aup does their work in a keyed list), and with them the parity with the earlier editor (documents_model checks the new one); diagnostics on documents rewritten for plain messages or gone (304); a module's records counted at their v7 place; a field changed by '=' said so where a call was written
Diffstat (limited to 'examples/editor.aup')
-rw-r--r--examples/editor.aup20
1 files changed, 0 insertions, 20 deletions
diff --git a/examples/editor.aup b/examples/editor.aup
deleted file mode 100644
index 621c8ba..0000000
--- a/examples/editor.aup
+++ /dev/null
@@ -1,20 +0,0 @@
-# Revision-checked byte edits of keyed documents. The runtime owns the
-# documents: an edit is a transaction on the key's working version, which
-# commits only if the sender's revision is still current.
-state documents: bytes by key
-
-input show = message by key
-input edit = message by key {
- start: u32
- remove: u32
- insert: bytes
-}
-
-on show {
- reply documents[key]
-}
-
-on edit {
- documents[key].replace(edit.start .. edit.start + edit.remove, edit.insert)
- reply edit.insert
-}