C

Conor McBride

strictlypositive.org · Personal blog · on HN since 2009

Conor McBride, a type theory researcher, publishes papers on dependent types, applicative programming, and differentiating data types.

What HN saysHN links his paper on the derivative of a type as its one-hole contexts whenever zippers come up in discussion.
24HN people shared it
21linked it in comments
4stories submitted
6story points
2 years agolast shared
2009people per year2026

Most-shared posts

  1. 1
    Taking the derivative of an algebraic data type [pdf]
    13 people · 1 points · first shared 2012 · discussion on HN
  2. 2
    Applicative Programming with Effects [pdf]
    2 people · 2 points · first shared 2015 · discussion on HN
  3. 3
    CJ.pdf
    2 people · first shared 2014
  4. 4
    Differential Calculus with Datatypes: the hole story
    1 people · 2 points · first shared 2018 · discussion on HN
  5. 5
    Winging It
    1 people · 1 points · first shared 2009 · discussion on HN
  6. 6
    Idiom.pdf
    1 people · first shared 2020
  7. 7
    Slicing jpgs
    1 people · first shared 2012
  8. 8
    Homepage
    1 people · first shared 2024
  9. 9
    Publications
    1 people · first shared 2011
  10. 10
    Easy.pdf
    1 people · first shared 2013
  11. 11
    Dfordata.pdf
    1 people · first shared 2025

What HN people wrote when they linked it

mikhailfranco · 2024-05-19
As an aside on an aside, there is also the related classic: Conor McBride, The Derivative of a Regular Type is its Type of One-Hole Contexts http://strictlypositive.org/diff.pdf related to Huet's Zipper and Hinze, Paterson Finger Trees, with a huge of follow-on literature: https://personal.cis.strath.ac.uk/conor.mcbride/Holes.pdf https://conal.net/blog/posts/differentiation-of-higher-order-types and numerous old posts by sigfpe (Dan Piponi), e.g. http://blog.sigfpe.com/2008/06/blessed-mans-formula-for-holey.html
cstrahan · 2018-12-03
I'll preface: this is more of an interesting connection, rather than a direct answer to your question. Zippers can be seen as (or at least isomorphic to) the derivative of a type with respect to one of its type parameters. This is described in Conor McBride's paper "The Derivative of a Regular Type is its Type of One-Hole Contexts." http://strictlypositive.org/diff.pdf If a video is more your speed, Kenneth Foner gave a great talk titled "`choose` your own derivative" that takes the concept of derivatives of types and takes it a step further. You can skip to the 11 minute mark to watch his explanation of zippers as derivatives here: https://www.youtube.com/watch?v=79zzgL75K8Q&t=11m With that said, the standard go-to paper for Zippers would probably be "The Zipper" by Gerard Huet: http://gallium.inria.fr/~huet/PUBLIC/zip.pdf
mananaysiempre · 2024-07-14
Joke titles and/or author lists are also quite popular, e.g. the Greenberg, Greenberger, Greenbergest paper[1], a paper with a cat coauthor whose title I can’t seem to recall (but I’m sure there’s more than one I’ve encountered), or even the venerable, unfortunate in its joke but foundational in its substance Alpher, Bethe, Gamow paper[2]. Somewhat closer to home, I think computer scientist Conor McBride[3] is the champion of paper titles (entries include “Elimination with a motive”, “The gentle art of levitation”, “I am not a number: I am a free variable”, “Clowns to the left of me, jokers to the right”, and “Doo bee doo bee doo”) and sometimes code in papers: letmeB this (F you) | you == me = B this | otherwise = F you letmeB this (B that) = B that letmeB this (App fun arg) = letmeB this fun `App` letmeB this arg (Yes, this is working code; yes, it’s crystal clear in the context of the paper.) [1] https://arxiv.org/abs/hep-ph/9306225 [2] https://en.wikipedia.org/wiki/Alpher%E2%80%93Bethe%E2%80%93Gamow_paper [3] http://strictlypositive.org/
gatane · 2025-01-16
A more theoretical read on the same topic: - Differentiating Data Structures (2005) http://www.strictlypositive.org/dfordata.pdf - Performance analysis of Zippers (2020) https://arxiv.org/pdf/1908.10926
earleybird · 2022-08-15
However, regular types do: "The Derivative of a Regular Type is its Type of One-Hole Contexts" [0] http://strictlypositive.org/diff.pdf
steven741 · 2019-05-26
The theory of computation doesn't really have anything to do with math. It's based on logic, machines, automata, etc. You can use it for math but, in principal it has nothing to do with math. For example, the automata may not be calculating anything. It may be describing a process of doing something more abstract. Solving DE in computation is an interesting point to make tho. I've seen analysis style arguments, like real analysis or calculus, in symbolic languages like lisp. Actually, there's a really interesting set of papers very much related to this topic. Link below. http://strictlypositive.org/calculus/
eru · 2019-04-20
And for a completely different application of differentiation to programming, see http://strictlypositive.org/diff.pdf
intuitionist · 2019-03-29
Conor McBride has some very memorable paper names. His generalization of Huet's zippers [1] gave rise to the "Clown" and "Joker" bifunctors in Haskell, and his paper [2] introducing quantitative type theory (on which Idris 2 is provisionally based) is called "I Got Plenty o' Nuttin'" after Gershwin. [1] http://strictlypositive.org/CJ.pdf [2] https://personal.cis.strath.ac.uk/conor.mcbride/pub/Rig.pdf
mathgenius · 2017-08-25
"The Derivative of a Regular Type is its Type of One-Hole Contexts" - Conor McBride, http://strictlypositive.org/diff.pdf This shows how you end up "differentiating" datatypes in the context of strict functional programming, in order to do things like "mutate" lists. It is essentially the same as what mathematicians call "combinatorial species".
nwhitehead · 2015-05-27
The derivative of a type is its "zipper", a datatype for representing a "hole" that moves around the data structure. http://strictlypositive.org/diff.pdf
scentoni · 2015-03-01
Q: "What’s the derivative of a data structure anyway?" A: The Derivative of a Regular Type is its Type of One-Hole Contexts http://strictlypositive.org/diff.pdf
Tyr42 · 2014-03-08
https://ghc.haskell.org/trac/ghc/wiki/ViewPatterns That's the haskell extension. To see a very nice use of them, check out this paper (pdf) http://strictlypositive.org/CJ.pdf
tikhonj · 2013-02-17
If you're interested in something similar but a little more theoretical, take a look at "Simply Easy"[1], a little paper on implementing a couple of variations on the lambda calculus. The main idea is to demonstrate how to evaluate a dependently typed language. It starts by looking at how to evaluate the simply typed lambda calculus and then going from that to a dependently typed lambda calculus. Surprisingly, the transformation is not all that complicated! The actual code is in Haskell. [1]: http://strictlypositive.org/Easy.pdf
flebron · 2013-02-10
If you want to see how crazy this can get, know that you can actually take the derivative of a type (with respect to another type), and this yields useful information. See McBride's paper http://strictlypositive.org/diff.pdf , or this guy who is discovering it by himself: http://stackoverflow.com/questions/9190352/abusing-the-algebra-of-alge…
gtani · 2012-12-16
http://strictlypositive.org/slicing-jpgs/ http://www.fing.edu.uy/inco/cursos/proggen/Transparencias/PolitipicasH… (on about the 17th google page for "haskell cheat" ___________________ also symbolhound works pretty well for searching stackoverflow for symbolic operator/function names, e.g. haskell <$> http://symbolhound.com/?q=haskell+%3C%24%3E
scott_s · 2011-04-27
I didn't get the + operation on types until he compared it to C's union. I don't know why he didn't appeal to the logical operations "and" and "or" for * and +, because that's what finally made them click and be consistent for me. For example, you can read int * int as "A type with an int and an int," and you can read int + int as "A type with an int on the left or an int on the right." The links to the papers by Conor McBride are broken, but you can find them here: http://strictlypositive.org/publications.html
siraben · 2022-05-29
> I wish i could apply f x y instead of lift $ f <$> x <*> pure y. In "Applicative Programming with Effects"[0], the authors use such a notation, and even leave it as an exercise to implement it in Haskell using MultiParamTypeClasses: > Given Haskell extended with multi-parameter type classes, enthusiasts for overloading may replace ‘⟦’ and ‘⟧’ by identifiers i[ and ]i with the right behaviour. So they have code that looks like eval :: Exp v -> Env v -> Int eval (Var x) = fetch x eval (Val i) = ⟦ i ⟧ eval (Add p q) = ⟦ (+) (eval p) (eval q) ⟧ > Yes so why doesn’t some GHC extension do this? It's possible to derive the functor instance automatically if the data type is built from products, sums and arrows. However even for Applicatives you can't do this in general because there can be many lawful Applicative instances for the same type, for instance[1] for lists. [0] http://strictlypositive.org/IdiomLite.pdf [1] https://hackage.haskell.org/package/base-4.16.1.0/docs/Control-Applica…
crntaylor · 2013-06-02
Author of the blog post here. It's amusing to see this submitted by Don Stewart, since it was his explanation[0] of algebraic data types that first made them "click" for me! I think I forgot to mention him in this post, but I remembered in the talk[1]. If anyone's interested in this and where else it might go, I recommend read Don's SO answer[0], this SO question and the related answers[2] and these papers [3,4] on derivatives and dissections by Conor McBride. There are also several good blog posts[5] and a paper[6] by Brent Yorgey on the topic of combinatorial species, and of course Dan Piponi's blog[7] is a treasure trove of interesting insights at the intersection of math, physics and computer science. [0] http://stackoverflow.com/a/5917133/546084 [1] http://www.youtube.com/watch?v=YScIPA8RbVE (shitty audio for the first minute or 2 - it gets better). [2] http://stackoverflow.com/questions/9190352/abusing-the-algebra-of-alge… [3] http://strictlypositive.org/diff.pdf [4] https://personal.cis.strath.ac.uk/conor.mcbride/Dissect.pdf [5] http://byorgey.wordpress.com/ [6] http://www.cis.upenn.edu/~byorgey/papers/species-pearl.pdf [7] http://blog.sigfpe.com/2010/08/divided-differences-and-tomography-of.h… Edit: It should go without saying, but because a few people last time around seemed to think I was trying to pass this off as my own ideas, let me state that there is nothing original in this blog post. It's a repackaging of the…
bmc7505 · 2021-05-02
Surprisingly, there is an interesting proof-theoretic connection between differential and sequent calculus! For a more detailed account of differential linear logic (DiLL), see Erhard [1] and Kerjean [2]. More generally, the same rules from differential calculus have reappeared in strange and marvelous places throughout computer science, including formal language theory [3], parsing [4], type theory [5] and automata theory [6]. We do not attempt to cover all these topics, research is just beginning to understand how they are related. The general theme seems to be, how do you propagate local changes through a computation? Can you compute changes incrementally without restarting from scratch? [1]: https://arxiv.org/pdf/1606.01642.pdf [2]: https://lipn.univ-paris13.fr/~kerjean/papers/EDP18.pdf [3]: https://en.wikipedia.org/wiki/Brzozowski_derivative [4]: https://dl.acm.org/doi/10.1145/2034773.2034801 [5]: http://strictlypositive.org/diff.pdf [6]: https://en.wikipedia.org/wiki/Boolean_differential_calculus

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close