65

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
  • 9
    As a git enthusiast and someone who has a Master's in applied mathematics, I suspect the answer is "No". Commented Sep 16, 2014 at 21:14
  • 1
    Sounds like someone tried to read a math book, but failed.
    – tp1
    Commented Sep 16, 2014 at 21:34
  • 13
    I don't understand why people are voting to close on the basis that what I am asking is unclear. I am asking if the phrase I quoted is factual. (The phrase I quoted is widespread, as you can confirm with Google.) Commented Sep 16, 2014 at 22:39
  • 5
    Once you've spent some time attempting to get the meaning of that sentence, Git really might seem comparatively easier to understand than before…
    – stakx
    Commented Sep 17, 2014 at 20:08
  • 2
    This tweet has also inspired questions on Mathematics Stack Exchange and on Computer Science Stack Exchange. Commented Aug 18, 2015 at 18:02

2 Answers 2

82

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:

  1. it tries to explain abstract mathematical jargon with even more mathematical jargon, which is even more abstract
  2. however, the explanation is actually correct
  3. 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
  • 18
    That's disappointing. Commented Sep 16, 2014 at 22:44
  • 6
    @amon: I added a quote by the author of that joke, wherein he explains that any sense that statement would potentially make is purely coincidental: "Attempts to analyze it in this fashion should be futile, but due to a bug in reality, you can actually make any sufficiently hand-wavy statement fit if you try hard enough." Commented Sep 17, 2014 at 8:21
  • 11
    I've always assumed that the author of the joke did get the monad joke but was purposely descending in to gibberish as a parody. One of those things that starts out plausible and becomes steadily less so until only at the end can you be sure its gibberish. It seems uncharitable to conclude he didn't get the monad joke.
    – psr
    Commented Sep 19, 2014 at 22:56
  • 2
    You might find this explanation git bisect useful in explaining the joke. Note the author.
    – user40980
    Commented Sep 20, 2014 at 13:53
  • 5
    This is a bit of a quibble - overall I think your explanation is great and the contrast with the monad joke is well-taken - but I never actually intended this as a mirror of the monad joke. I'm not even sure I had heard the joke at the time. It's actually (as you point out later) based off the tartley blog post. I was mainly going for gibberish - I had no intent of mirroring a "sounds like gibberish but is actually technically correct" joke. But I love the thoroughness of your answer! It's just not (as far as I can remember, of course) actually correct.
    – agnoster
    Commented Jan 5, 2017 at 10:16
13

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
  • Also, Darcs is written in Haskell, so it's built on monads. :-)
    – Wyzard
    Commented Aug 19, 2015 at 1:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.