Top all-time · #5279
adventures in uncertainty
Personal blog · blog.sumtypeofway.com/postsprogramming
adventures in uncertainty is a personal blog at blog.sumtypeofway.com about programming. Since 2016, 15 different Hacker News readers have linked it 20 times, most often “An Introduction to Recursion Schemes”. The last post was in 2021, but the archive is still widely read.
Too few sampled comments (8) to say how often HN recommends it.?
Why HN links it
HN readers link this blog's recursion schemes series and introduction to recursion schemes in functional programming. Commenters point to it as a clearer route than the original Bananas paper.
Summarised by Claude from a sample of 8 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- An Introduction to Recursion Schemes4 people · 7 mentions · first linked 2020-08-05
- Bazel, Haskell, and Build-System Joy2 people · 2 mentions · first linked 2020-09-11
- /an-introduction-to-recursion-schemes/2 people · 2 mentions · first linked 2016-09-15
- Existential Haskell2 people · 2 mentions · first linked 2020-11-25
What Hacker News says?
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…
Comment linking /
on “Ask HN: What's your favorite elegant/beautiful algorithm?”Submitted An Introduction to Recursion Schemes (2014) as a story · 73 points
HN discussionProgrammer warning: this is the math jargon heavy version, you don't need to know the math jargon to make use of these tools for writing day-to-day programs. There are too many applications for me to do justice in one message and it is a bit messy because all of these are related, but there are roughly three ways that category theory gets applied to computing: - Reasoning about data within computer programs. In "Gen…
Comment linking /posts/introduction-to-recursion-schemes.html
on “Emily Riehl is rewriting the foundations of higher category theory”Submitted Existential Haskell as a story · 66 points
HN discussionThe first thing that got me really enthusiastic in category theory was seeing the definition of the categorical product in terms of universal properties. It's a very simple, but very different way of defining objects that makes it easy to see the relationships between similar objects in different contexts. For example, multiplication, the cartesian product, least common multiple, logical conjunction (&&), and struct…
Comment linking /posts/introduction-to-recursion-schemes.html
on “Emily Riehl is rewriting the foundations of higher category theory”Submitted Ode to a Streaming ByteString as a story · 55 points
HN discussionYes, but from a functional perspective you need to do extra work to make generalized recursive applications possible. If you're interested, the name is "Recursion Schemes". Avoid the paper, its notation is too challenging. This blog has a long running series which is much better: http://blog.sumtypeofway.com/an-introduction-to-recursion-sc...
Comment linking /an-introduction-to-recursion-schemes/
on “Zero-Overhead Tree Processing with the Visitor Pattern”Submitted Ode to a Streaming ByteString as a story · 14 points
HN discussionIn addition to CT's application to commutative algebra, it's pretty nice for reasoning about programs and logic. Programs: http://cseweb.ucsd.edu/~rtate/publications/proofgen/proofgen... , https://blog.sumtypeofway.com/posts/introduction-to-recursio... , the Functor/Applicative/Monad hierarchy in Haskell et al Logic: https://publish.uwo.ca/~jbell/catlogprime.pdf CT as a bridge between programs and logic: https://exi…
Comment linking /posts/introduction-to-recursion-schemes.html
on “Category theory is a universal modeling language”Submitted Towards Faster Iteration in Industrial Haskell as a story · 5 points
HN discussionThis 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-recursio... If you are comfortable with Haskell, it should be relatively accessible.…
Comment linking /posts/introduction-to-recursion-schemes.html
on “Functional programming with bananas, lenses, envelopes and barbed wire [pdf] (1991)”Submitted An Introduction to Recursion Schemes as a story · 4 points
HN discussionNot 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…
Comment linking /posts/introduction-to-recursion-schemes.html
on “Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire”Submitted Object Oriented Dynamic Dispatch in Haskell as a story · 4 points
HN discussionI 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…
Comment linking /an-introduction-to-recursion-schemes/
on “How the right syntax can help teach recursion”Submitted Bazel, Haskell, and Build-System Joy as a story · 4 points
HN discussionSubmitted Bazel, Haskell, and Build-System Joy as a story · 3 points
HN discussionSubmitted Fluent Polymorphism with Visible Type Applications as a story · 2 points
HN discussionSubmitted Recursion Schemes, Part 6: Comonads, Composition, and Generality as a story · 2 points
HN discussionSubmitted An Introduction to Recursion Schemes as a story · 1 points
HN discussion