As we all know:
Git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space
Which seems like jargon, but on the other hand,
All told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.
is funny because it is true.
Can I avoid merging mistakes by reading this simple text?
7
It’s a joke, that is based on the monad joke, but without actually getting the monad joke.
The monad joke is funny on three levels:
- it tries to explain abstract mathematical jargon with even more mathematical jargon, which is even more abstract
- however, the explanation is actually correct
- and once you dive deeper into category theory, you will actually start to see monads as “just a monoid in the category of endofunctors”
The Git thing, however, is just random gibberish. It is meant to resemble the monad joke, and might also be a jab at the darcs patch theory, but fundamentally, the person making the joke didn’t understand the monad joke.
Sources:
This is the original tweet containing the quote:
Wil Shipley (@wilshipley): Sweet god I hate git.
Isaac Wolkerstorfer (@agnoster): @wilshipley git gets easier once you get the basic idea that branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space.
And this is a comment on Quora by the original author of the tweet:
To confirm what Leo said, it was intended as a joke. […]
It was intended as firmly tongue-in-cheek. I actually love git, and I think its complexity is greatly overblown. At the same time, I’m sympathetic to the fact that advice from git gurus to novices can end up sounding like inscrutable gibberish.
It’s not intended to have any deeper meaning. […]
The Leo he is referring to is another answerer in the same thread, a mathematician, who basically explains why that is nonsense. (Hilbert spaces are continuous, patches and branches are discrete.)
He also explains that he was inspired by this blog post (A Guide to GIT using spatial analogies), which actually does make sense.
9
It’s a joke, as confirmed by the author and Jörg W Mittag’s answer explains in more detail.
But truth can be stranger than fiction…
There has been work of formalizing version control, in particular patch theory by David Roundy which is the basis of Darcs (a distributed version control system that preceded the more popular Bazaar, Git and Mercurial by a couple of years but never reached their popularity). The main objective of the theory is to model merging and, in particular, conflict resolution. The Darcs wiki has an introduction to the theory and a few pointers as well as a bibliography (unmaintained so outdated if you want a recent view on the subject, but it does list a 2009 survey paper by Petr Baudiš) and a list of talks (which includes more recent material). There’s also a wikibook. One seminal paper is A Principled Approach to Version Control by Andres Löh, Wouter Swierstra and Daan Leijen3.
Patch theory does lead to a categorical model, which has been more recently explored in A Categorical Theory of Patches by Samuel Mimram and Cinzia Di Giusto and Homotopical Patch Theory by Carlo Angiuli, Ed Morehouse, Daniel R. Licata and Robert Harper. In Mimram and Di Giusto’s work, the model has files as objects and patches as morphisms. I think that makes merging a branch a functor — an endofunctor if you’re working in a single repository. “Homeomorphic endofunctor” doesn’t make sense to me. And with homotopy theory involved (a concept from calculus — that’s the branch of mathematics that studies things like manifolds and Hilbert spaces — which has recently been applied to a fundamental model of mathematics called homotopy type theory), submanifolds of a Hilbert space might not be so far out…
1