Skip to content

Instantly share code, notes, and snippets.

View ept's full-sized avatar

Martin Kleppmann ept

View GitHub Profile
theory
Consensus_Demo
imports
Network
begin
datatype 'val msg
= Propose 'val
| Accept 'val
@ept
ept / micromerge.js
Last active November 15, 2021 12:59
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
@ept
ept / _README.md
Last active September 16, 2024 19:03

Decentralised access control project

Set-up

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