Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    P

    Patrick Thomson

    blog.sumtypeofway.com · Personal blog · on HN since 2016

    Patrick Thomson writes about Haskell, recursion schemes, build systems, and functional programming in industry.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN links it for his recursion schemes introduction, and commenters discuss its ideas about recursion, functors, and teaching functional programming.

    Stats for nerds
    15HN people shared it
    12linked in comments
    233story points
    Apr 2022last shared
    2016people per year2022

    Top posts on HN

    1. 1
      An Introduction to Recursion Schemes (2014)
      3 people · 73 points · first shared 2016 · 8 comments on HN
    2. 2
      Existential Haskell
      2 people · 70 points · first shared 2020 · 28 comments on HN
    3. 3
      Ode to a Streaming ByteString
      1 person · 69 points · first shared 2021 · 18 comments on HN
    4. 4
      Bazel, Haskell, and Build-System Joy
      2 people · 7 points · first shared 2020 · Discussion on HN
    5. 5
      An Introduction to Recursion Schemes
      4 people · 5 points · first shared 2020 · 1 comments on HN
    6. 6
      Towards Faster Iteration in Industrial Haskell
      1 person · 5 points · first shared 2020 · Discussion on HN
    7. 7
      Fluent Polymorphism with Visible Type Applications
      1 person · 2 points · first shared 2020 · Discussion on HN
    8. 8
      Recursion Schemes, Part 6: Comonads, Composition, and Generality
      1 person · 2 points · first shared 2019 · Discussion on HN
    9. 9
      Homepage
      1 person · first shared 2018

    What HN people wrote when they linked it

    • KirinDaveOct 2018

      Gosh, I have a few!

      Fistly, wavelet trees! Wavelet trees with something like RRR encoding for the bit vectors lets you work with massive datasets in positively tiny space and constant time. They're not even expensive to construct! My favorite introduction to the whole space of rank/select-friendly structures is Alex Bowe's tutorial: https://alexbowe.com/wavelet-trees/

      I constantly agitate for people to realize that we now have an algorithm for O(n) generalized sorting. It's called discrimination sort, and while it's a complex subject its quite elegant once you internalize the algorithm. There's a talk by Prof. Henglein here: https://www.youtube.com/watch?v=sz9ZlZIRDAg

      2017 saw the recommendation of a truly phenomenal approach to indexing data, using simple leaning structures. These indexes are poorly explored, there's still a ton of headroom here, but the paper is an incredibly cool read and very approachable: https://arxiv.org/abs/1712.01208

      Another really cool family of algorithms and associated structures in distributed systems is CRDTs. They're poorly understood, but in research they have largely superseded operational transforms. The Wikipedia page branches off into lots of good research: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type

      If we slightly broadened the lens of what is an algorithm, my favoriate category-theoretic approaches to solving problems include Recursion Schemes which are a technique to totally separate the specification of…

    • tominatedAug 2020

      Not quite - think of the functor as a container for the recursive field, not the values attached to leaves. The leaf is your base recursive case and doesn't have a value to map over. Having your functor instance map over this recursive field is what allows you to write a non-recursive function that expects the field to have the already processed value from it's children!

      And yeah, the compiler can derive the functor instance! I don't know the mechanism for how it works but I think it might assume the last type parameter is the 'container' field (think the values in a list or maybe)

      It's not in the standard lib, but you can find a few implementations (it's usually called cata for catamorphism) available on hackage. I have used recursion-schemes and it works pretty well.

      I learned about this stuff via this excellent blog series: https://blog.sumtypeofway.com/posts/introduction-to-recursion-schemes.html

    • noelwelshSep 2016

      I disagree somewhat, but I don't have time to write a detailed answer. Instead here's a quick sketch that is likely only intelligible if you have a fair bit of PLT background.

      The basic point is this: you don't need to teach "raw" recursion, just like you don't teach control-flow using goto. Just like structured programming introduced for/while/do loops to structure control flow, you can structure recursive programs into a few major groups. The most important one is good old structural recursion over algebraic data types. It's follows a very set formula, so there isn't much opportunity to go wrong. It helps to have pattern matching in your language to do this.

      This is the approach taken by How to Design Programs (http://htdp.org/)

      Example blog post you might read if you want to know more about the theoretical background: http://blog.sumtypeofway.com/an-introduction-to-recursion-schemes/

    • chasApr 2022

      This is a great paper, but I found it to be very challenging to read when I first ran into it, even though I had some experience programming in Haskell. As a one sentence pitch, this paper is to recursion what if and while are to goto. For a more detailed intro to the concepts see: https://blog.sumtypeofway.com/posts/introduction-to-recursion-schemes.html If you are comfortable with Haskell, it should be relatively accessible. If you aren’t, but want a bit more flavor than my one sentence, the intro section in that blog post is still worth a read.

    Related

    Alexis Kinglexi-lambda.github.io172 people

    Parse, Don’t Validate

    Alexis King
    Personal · last shared 2026
    FP Complete Blogfpcomplete.com201 people

    Monads and GATs in Nightly Rust

    FP Complete Blog
    Company · last shared 2025
    Apfelmusapfelmus.nfshost.com22 people

    How Does Lazy Evaluation Work in Haskell? (2014)

    Apfelmus
    Personal · last shared 2023
    Edward Kmettcomonad.com25 people

    Letter to a Young Haskell Enthusiast

    Edward Kmett
    Personal · last shared 2023
    Apocalispapocalisp.wordpress.com23 people

    Imperative vs Functional Programming

    Apocalisp
    Personal · last shared 2025
    Justin Leblog.jle.im36 people

    Typesafe Neural Networks in Haskell with Dependent Types

    Justin Le
    Personal · last shared 2026
    Chris Pennerchrispenner.ca27 people

    Tail recursion in Python

    Chris Penner
    Personal · last shared 2026
    Lambda the Ultimatelambda-the-ultimate.org615 people

    Simon Peyton Jones Elected into the Royal Society Fellowship

    Lambda the Ultimate
    Publication · last shared 2026