Top all-time · #3553
Heinrich Apfelmus
Personal blog · apfelmus.nfshost.com/blogprogramming
Heinrich Apfelmus writes apfeλmus, a personal blog at apfelmus.nfshost.com about programming. Since 2009, 22 different Hacker News readers have linked it 24 times, most often “Monoids and Finger Trees”. The last post was in 2021, but the archive is still widely read.
Too few sampled comments (13) to say how often HN recommends it.?
Why HN links it
HN readers link Heinrich Apfelmus's Haskell articles on finger trees, lazy evaluation, operational monads and functional reactive programming. Commenters value them as introductions to these topics.
Summarised by Claude from a sample of 13 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Overview of Heinrich Apfelmus\' website.
Most-linked posts?
- Monoids and Finger Trees4 people · 4 mentions · first linked 2012-01-01
- Fast implementations of data structures using monoids and finger trees3 people · 3 mentions · first linked 2018-02-16
- /articles/quicksearch.html2 people · 2 mentions · first linked 2010-08-02
What Hacker News says?
I'm happy to see finger trees got mentioned. Finger trees[0] are extremely useful and general data structure that can be used to implement persistent sequences, priority queues, search trees and priority search queues. (Haskell's Data.Sequence[1] uses specialized 2-3 finger trees internally) They can form the basis of all sorts of interesting custom structures by supplying the appropriate monoid[3], but this does ma…
Comment linking /articles/monoid-fingertree.html
on “What are the lesser known but useful data structures?”Submitted How Does Lazy Evaluation Work in Haskell? (2014) as a story · 72 points
HN discussionKiselyov et al have an interesting paper on logic programming in Haskell [1]. They introduce a backtracking monad transformer with fair disjunctions, and negation-as-failure and pruning operations. And the implementation is based on continuation, so it's more efficient than reification-based approaches such as e.g. Apfelmus's operational monad [2] [1]: http://www.cs.rutgers.edu/~ccshan/logicprog/LogicT-icfp2005....…
Comment linking /articles/operational-monad.html
on “Clojure: All grown up”Submitted Fun with Morse Code as a story · 23 points
HN discussionBecause so far noöne has figured out the set of extensibility points needed for a language-agnostic one that doesn’t result in horrible bloat and sprawling API surfaces. The original language-agnostic IDE—Emacs—is probably the simplest, and it’s still quite complex. Acme[2] is interesting, but Spartan when it comes to actual IDE-ish features, and its UI always rubbed me the wrong way. I feel this is somewhat related…
Comment linking /blog/2012/03/29-frp-three-principles-bidirectional-gui.html
on “CodePerfect 95 – A fast IDE for Go”Submitted Excellent video explaining GADTs in Haskell as a story · 22 points
HN discussionFrom the paper "RRB-Trees: Efficient Immutable Vectors" I ended up reading about finger trees. This blog post is a very nice intro: http://apfelmus.nfshost.com/articles/monoid-fingertree.html
Comment linking /articles/monoid-fingertree.html
on “The best things and stuff of 2011 by Fogus”Submitted Fast implementations of data structures using monoids and finger trees as a story · 5 points
HN discussionThis is where "event switching" comes in. Unfortunately, I have not used Elm or FlapJax, so I am not sure if the terminology is the same there. Traditional FRP has two main concepts: behaviors, which are values that can change continually, and stream of events. Scanning over this blog post, these ideas correspond roughly to Properties and EventStreams respectively in Bacon.js. Event switching is just having an event…
Comment linking /blog/2012/09/03-frp-dynamic-event-switching-0-7.html
on “Functional Reactive Programming with Bacon.js”Submitted Monoids and Finger Trees as a story · 3 points
HN discussionDrop me a line at ben@rocinanteresearch.net and I'll let you know when we can open-source some of it. None of it is really all that magical btw, so you should take a whack at it yourself! One thing that wouldn't have occurred to me that one of the Haskell geniuses I work with identified to use is the notion of a "free"/"operational" monad: https://apfelmus.nfshost.com/articles/operational-monad.html .
Comment linking /articles/operational-monad.html
on “Safety: A comparaison between Rust, C++ and Go”Submitted The best of explanation of Finger Trees (data structure) I have seen as a story · 3 points
HN discussionFirst, going straight to "How do I understand Monads?" is not a good idea. I remeber when this article showed up on the web, and I remember wishing it had been written before I started learning Haskell: https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti... If you want to understand monads, start hacking and watch for patterns. > But, just to be super honest -- and possibly completely wrong -- the terminolo…
Comment linking /articles/monoid-fingertree.html
on “JavaScript Promises Discussion: Make Them Monadic? (2013)”Submitted HyperHaskell is a graphical Haskell interpreter (REPL) as a story · 2 points
HN discussion1. Install reactive-banana and read its docs and Apfelmus' intro (i). 2. Write a simple, 80s-style game using it. 3. Write a short tutorial explaining it. 4. ??? 5. Profit. (i) http://apfelmus.nfshost.com/blog.html#functional-reactive-pr...
Comment linking /blog.html
on “Purely Functional Retrogames”Submitted Haskell FRP – Release of reactive-banana 1.0 as a story · 2 points
HN discussionThe first in a series of articles, a list of which can be found here https://apfelmus.nfshost.com/articles/lazy-eval.html
Comment linking /articles/lazy-eval.html
on “How Does Lazy Evaluation Work in Haskell? (2014)”Submitted Reasoning about space leaks with space invariants (2013) as a story · 1 points
HN discussionHmm. HN likes substantive articles and dislikes sketchy tactics. Those two almost never conflict. When they do, though, we tend to favor the substantive article, which this one clearly is. It's an elementary tutorial, yes, but an unusually well-crafted one, and had it appeared on the author's website ( http://apfelmus.nfshost.com/blog.html ), there'd be no question. Perhaps the positive reinforcement of seeing what…
Comment linking /blog.html
on “How Lazy Evaluation Works in Haskell”Submitted Monoids and Finger Trees as a story · 1 points
HN discussionI found this article referencing the O(n) complexity for the 'head . sort' http://apfelmus.nfshost.com/articles/quicksearch.html As far as I can understand from the blog and and the cited mailing lists, it works but it requires a carefully coded sorting method, otherwise O(n log n) as expected.
Comment linking /articles/quicksearch.html
on “Why isn't Haskell popular in industry?”- ch · 2015-11-21
Submitted Forklift – a pattern for performing monadic actions in a worker thread (2012) as a story · 1 points
HN discussion If you want to work in an environment where a lot of people are thinking like this routinely, instead of a few lone voices in a vast sea of otherwise uninterested people, the Haskell community is doing a lot of work in this area, and able to move much faster since it's so much easier in Haskell than C++ templates (which isn't really a criticism of C++ templates, a lot of their capabilities are accidental rather than…
Comment linking /articles/monoid-fingertree.html
on “Why is the C++ STL so heavily based on templates?”Interesting blog post about how this could be done in Haskell using a suitable mergesort (or quicksort): http://apfelmus.nfshost.com/articles/quicksearch.html (pointed out in a similar discussion some time ago). Having used Haskell in university only, articles like this really make me want to revisit the language. (Algorithms aside, the full sort of 10M numbers, apparently using an underlying C implementation, looks…
Comment linking /articles/quicksearch.html
on “Finding the top K items in a list efficiently”