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
    S

    SIGPLAN Blog

    blog.sigplan.org · Publication · on HN since 2019

    The blog of ACM SIGPLAN, the programming languages special interest group, with accessible articles by researchers on language topics.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters link it for explanations of e-graphs and defunctionalization, and for pieces on floating point and undefined behavior.

    Stats for nerds
    61HN people shared it
    160linked in comments
    2.7Kstory points
    Apr 2026last shared
    2019people per year2026

    Top posts on HN

    1. 1
      My First Fifteen Compilers
      3 people · 469 points · first shared 2019 · 77 comments on HN
    2. 2
      How to Give a Good Talk
      2 people · 276 points · first shared 2025 · 82 comments on HN
    3. 3
      Teaching Compilers Backward
      2 people · 271 points · first shared 2021 · 80 comments on HN
    4. 4
      AI models need a virtual machine
      3 people · 260 points · first shared 2025 · 121 comments on HN
    5. 5
      Defunctionalization: Everybody Does It, Nobody Talks About It
      11 people · 123 points · first shared 2019 · 26 comments on HN
    6. 6
      Programming language notation is a barrier to entry
      3 people · 120 points · first shared 2020 · 187 comments on HN
    7. 7
      Provably space-efficient parallel functional programming
      1 person · 117 points · first shared 2022 · 24 comments on HN
    8. 8
      High Performance Correctly Rounded Math Libraries for 32-Bit Floating Point
      2 people · 116 points · first shared 2021 · 73 comments on HN
    9. 9
      Story of the Flash Fill Feature in Excel
      4 people · 112 points · first shared 2021 · 45 comments on HN
    10. 10
      A DSL for Implementing Math Functions
      2 people · 106 points · first shared 2024 · 13 comments on HN

    What HN people wrote when they linked it

    • chriswarboApr 2021

      > A game written in Haskell or Scheme probably has a main loop implemented via recursion, but it's still called a main loop

      If such a 'main loop' is a single function which (a) dispatches to one of a bunch of 'handlers' then (b) calls itself recursively, I would still call it a 'main-loop anti-pattern'.

      More formally, it's likely to be in "defunctionalised" form https://blog.sigplan.org/2019/12/30/defunctionalization-everybody-does-it-nobody-talks-about-it

      The problem with such 'main loops', whether actual loops or self-recursive functions, is that control flow has to keep doubling-back to this 'central dispatcher'. In the case of actual 'main loops' this is often an unavoidable consequence of lacking tail-call elimination. In languages with tail-call elimination, we're just over-complicating the problem.

      > This sounds like a recipe for spaghetti.

      The control flow for a 'main loop' program goes like this:

      main function fooHandler barHandler
      |
      +------call-------+
      |
      +-----return------+
      |
      +------call---------------------+
      |
      +-----return--------------------+
      |
      ...

      If we have tail-call elimination, the handlers can just call the 'main loop' instead of returning (this is just a CPS transformation), e.g.:

      main function fooHandler main function barHandler main function
      |
      +----call--------+
      …

    • trealiraJun 2024

      I have heard this said, mainly because some patterns can be made unnecessary with first-class functions and pattern matching. Closures are emulated with explicit objects, and the visitor pattern is equivalent to pattern matching. Something that's pretty interesting, though, is that it's a transform called defunctionalization. There's an article about it [1] that has been shared before on HN.

      One form of defunctionalization is the well-known transformation of a recursive function into one that uses an explicit stack.

      The thing is, I don't think defunctionalization (from the equivalent functional form) present in object-oriented languages is strictly worse. Defining things with explicit objects may sometimes be more understandable, and more extensible; for example, the command pattern could be implemented as a closure, but then you can't later add an "undo" method to it later.

      Here's an example where defunctionalization makes the code more readable, not less.

      Haskell has a difference list [0] data structure; the purpose of it is that you can concatenate two difference lists in constant time, and then turn it into one long normal linked list in O(n) time. This gives much better performance than concatenating lists directly all the time. It's a lot like a rope, except for lists, not strings, and it's immutable.

      But the code is somewhat cryptic; it makes use of partial application and stores the tree in terms of partially applied functions. The "Demystifying DList" [0]…

    • DonaldPShimodaOct 2019

      > When you're a small startup, what matters is the expressiveness of your language, and the ability do do a lot of things very very quickly. Type safety, performance, readability, those things don't matter. You're just a bunch of engineers who know the whole codebase inside out, you're pretty certain of what you're doing.

      I'm not familiar with this use of the term "expressiveness".

      My understanding is that expressiveness (as per "On the expressive power of programming languages", Felleisen 1991 [0]) has to do with capabilities that a language has that separate it from another language. C is more expressive than Python in that it gives you direct access to memory management, whereas Python is more expressive than C in that it provides inheritance/OO. (These are just examples.)

      Type safety, performance, and readability are all wholly separate from expressiveness, I think. A language's type system and performance benchmarks have nothing to do with the expressive power of a language outright, and "readability" is entirely subjective to begin with.

      So: would you mind elaborating on what you mean, exactly, by "expressiveness of [a] language" here?

      ---

      In fact, most of what you (and the linked article) are talking about has to do with the dynamic/static spectrum, not this "wizarding/engineering" spectrum you've coined (though I do kind of like the idea of that for discussing development methodologies).

      The article is all about how the dynamically-typed nature of Python…

    • p4bl0Aug 2021

      I've been teaching a compiler class for 5 years. My experience has been that writing and teaching to write compiler is more efficient using horizontal step rather than vertical steps.

      What I call vertical steps are lexing, parsing, typing, compiling, emitting output code.

      What I call horizontal steps are language features going through all the vertical steps.

      For example it is far better to start with a compiler for the "int language" (valid programs consist in a single integer and that's it), and then progressively add horizontal layers (features) to the language, being able to tests these new features each time. For example adding additions, then other binary operation, then multiple instructions, then variables and affectation, etc.

      Next fall I will try the backward approach in my course (still using horizontal steps for building the project, but teaching the vertical steps backward). I'm quite convinced it will work better since I read this article: https://blog.sigplan.org/2021/02/23/teaching-compilers-backward/

    • vanderZwanJan 2023

      This made me wonder if RLibm has been extended to doubles yet[0]. Sadly that doesn't seem to be the case. It's a floating point math library that always produces correct rounding results, but it is limited to 32-bit floats (and posits, for that matter). Interestingly, despite being the only library that always rounds correctly, it also claims to be faster than other libraries (at same bit-depth).

      I can recommend the papers, they're quite accessible and there is something very satisfying about the math tricks they came up with to build the polynomials.

      They do seem to have added more rounding modes though, which presumably makes the library more generally useful.[1]

      [0] https://people.cs.rutgers.edu/~sn349/rlibm/

      [1] https://blog.sigplan.org/2022/04/28/one-polynomial-approximation-to-produce-correctly-rounded-results-for-multiple-representations-and-rounding-modes/

    • svatMar 2020

      > So.... this is just a fancy name for the advice "give your functions a name"?

      Not quite: "defunctionalization" is a name for replacing functions with not-functions (data structures). (And IMO it's the most unfancy name one can give to that activity, as the name literally just indicates "removing functions"... I can't think of a less fancy name for it: maybe "un-function-ize"? But that's pretty much the same as "defunctionalization".)

      BTW I recommend reading the 3 linked articles in this order:

      1. https://blog.sigplan.org/2019/12/30/defunctionalization-everybody-does-it-nobody-talks-about-it/

      2. http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-heard.html (with accompanying video)

      3. https://www.gresearch.co.uk/article/defunctionalisation/ (this one actually shows how you can incrementally adopt this)

    Related

    Jon Purdyevincarofautumn.blogspot.com28 people

    Why Concatenative Programming Matters

    Jon Purdy
    Personal · last shared 2026
    beza1e1beza1e1.tuxen.de120 people

    A collection of things that are Turing-complete by accident (2013)

    beza1e1
    Personal · last shared 2026
    programming is terribleprogrammingisterrible.com124 people

    Write code that is easy to delete, not easy to extend

    programming is terrible
    Personal · last shared 2026
    The Craft of Codingcraftofcoding.wordpress.com18 people

    Fortran is easy to learn

    The Craft of Coding
    Personal · last shared 2025
    SIGARCH Blogsigarch.org72 people

    Coping with Copilot

    SIGARCH Blog
    Company · last shared 2026
    a3nma3nm.net15 people

    Can you be sure to clear a line at Tetris?

    a3nm
    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
    Zig NEWSzig.news64 people

    TinyVG: A challenger to the throne of vector graphics

    Zig NEWS
    Publication · last shared 2025