Set up a Python virtual environment in a new, empty directory:
brew install python # or equivalent on your OS
python3 -m venv venv
source venv/bin/activate
theory | |
Consensus_Demo | |
imports | |
Network | |
begin | |
datatype 'val msg | |
= Propose 'val | |
| Accept 'val |
const ROOT_ID = '00000000-0000-0000-0000-000000000000' | |
/** | |
* Miniature implementation of a subset of Automerge. Supports the following: | |
* - only map, list, and primitive datatypes (no table, text, counter, or date objects) | |
* - no undo/redo | |
* - no conflicts on concurrent updates to the same field (uses last-writer-wins instead) | |
* - no API for creating new changes (you need to create change objects yourself) | |
* - no buffering of changes that are missing their causal dependencies | |
* - no saving or loading in serialised form |