Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Categorical Theory of Patches
Search
Hunter Madison
August 24, 2016
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Categorical Theory of Patches
Hunter Madison
August 24, 2016
More Decks by Hunter Madison
See All by Hunter Madison
Vala and Objective C
hmadison
0
260
Sutures
hmadison
0
78
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
Navigating Team Friction
lara
192
16k
Being A Developer After 40
akosma
91
590k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
280
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
The untapped power of vector embeddings
frankvandijk
2
1.9k
Amusing Abliteration
ianozsvald
1
290
Transcript
A Categorical Theory of Patches Hunter Madison
[email protected]
@355E3B lobste.rs/3553eb
Version Control
Time • One direction (forward) • Events (commits) have a
distinct order
Files • Things on disk • Contain stuff we want
to version
Patches • Instructions that let us transform one file into
a second one
Groups and Categories
Group • Set of elements, with an operation which combines
any two elements to form a third element • The operation satisfies the group axioms (Closure, Associativity, Identity and Invertibility)
Category • Objects linked by morphisms (functions) • We only
care about Associativity, Identity • Mesh Like
Category By IkamusumeFan - Own work, CC BY-SA 4.0, https://
commons.wikimedia.org/w/index.php?curid=36599484
Pushout • Two new morphisms which go to some new
object
Pushout (Yes, this came from the Wikipieda page)
Categorical Theory of Patches
Linking this up • Files -> Objects • Morphisms ->
Patches
L • Is the set of all files and patches
• Is partially ordered (vs linearly ordered) • We can use a pushout to resolve our merges
Merging
Merging • I’m skipping this • Myers or Patience diff
handles this.
Implementation
Implementation • Darcs* - http://darcs.net/ • Camp - http://projects.haskell.org/camp/ •
Pijul - http://pijul.org/
Demo Time
None
This paper, I love • Its not going to replace
the one true VCS • But, we can use it to recast to a different model
Recasting • Instead of focusing on how to solve corner
cases, we can instead find a general solution and build a concrete description • In general, we can do this for any problem
Reading List • “A FORMALIZATION OF DARCS PATCH THEORY USING
INVERSE SEMIGROUPS” - ftp:// ftp.math.ucla.edu/pub/camreport/cam09-83.pdf • “Camp Path Theory” - http://projects.haskell.org/ camp/files/theory.pdf • “The Theory of patches-vector” - http:// liamoc.net/posts/2015-11-10-patch-theory.html