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
    B

    Ben Lynn

    crypto.stanford.edu/~blynn · Personal blog · on HN since 2009

    Ben Lynn, a Stanford-affiliated programmer, writes on functional programming, compilers, lambda calculus, geometric algebra and security, including a self-hosting Haskell compiler.

    Visit blogHN submissions
    Languages & CompilersProgrammingMath
    What HN says

    Commenters praise his series on building a self-hosting Haskell compiler, his IOCCC entry, and his lambda calculus pages as helpful for learning language theory.

    Stats for nerds
    51HN people shared it
    28linked in comments
    1.6Kstory points
    Oct 2025last shared
    2009people per year2025

    Top posts on HN

    1. 1
      All Hail Geometric Algebra
      6 people · 290 points · first shared 2018 · 80 comments on HN
    2. 2
      64-Bit Linux Return-Oriented Programming
      4 people · 218 points · first shared 2015 · 18 comments on HN
    3. 3
      Why Learn Haskell? (2018)
      1 person · 207 points · first shared 2021 · 113 comments on HN
    4. 4
      C vs GO
      1 person · 202 points · first shared 2012 · 175 comments on HN
    5. 5
      Get a Life
      1 person · 176 points · first shared 2021 · 21 comments on HN
    6. 6
      C Craft
      1 person · 148 points · first shared 2009 · 58 comments on HN
    7. 7
      APL and J (2015)
      5 people · 85 points · first shared 2019 · 38 comments on HN
    8. 8
      Compilers for Contrarians
      6 people · 74 points · first shared 2020 · 2 comments on HN
    9. 9
      Git Magic
      1 person · 73 points · first shared 2017 · 2 comments on HN
    10. 10
      The Ghost of Statistics Past
      1 person · 51 points · first shared 2015 · 18 comments on HN

    What HN people wrote when they linked it

    • jartMar 2022

      It's a good question, if we consider that it's been unanswered on the computer science stack exchange for four years. https://cs.stackexchange.com/questions/83533/practical-usage-of-the-%CE%BB-calculus-self-interpreter-and-the-self-reducer

      Basically, it does beta normal form reduction. In these kinds of situations, I sometimes feel like it's just as valuable to know how to get the darn thing to run, and then the rest explains itself. So for the purposes of this explanation, I'll share a Hello World example for this interpreter, that should hopefully get you going. This won't cover beta reduction or any of that jazz. Just the simplest possible usage that you can type into the web page at https://crypto.stanford.edu/~blynn/lambda/ and see something happen.

      (\a.(\b.a(b b))(\b.a(b b)))(\a.\b.b(\c.c)(\c.\d.a c(a d))(\c.\d.a(c d)))(\a.\b.\c.c(\d.\e.\f.\g.e d))
      # a.k.a. Y(λab.b(λc.c)(λcd.ac(ad))(λcd.a(cd)))(λabc.c(λdefg.ed))
      # a.k.a. [[Y λλ [[[0 λ 0] λλ [[3 1] [3 0]]] λλ [3 [1 0]]]] λλλ [0 λλλλ [2 3]]]

      It should spit out the identity function:

      λd.d

      Why did this happen? It's because Y(λab.b(λc.c)(λcd.ac(ad))(λcd.a(cd))) is the reducer a.k.a. E and λabc.c(λdefg.ed) is the argument. What is λabc.c(λdefg.ed)? It's an encoded version of the identity function λd.d. So in other words, all it did was output exactly what was inputted. Except the input had to be encoded. Why is it encoded? Normally in LISP, if we wanted to pass a program to a self-interpreter, we've wrap…

    • smabieAug 2020

      I think there's a conflict between the essence of array languages (building a DAG of monadic (in the FP sense) operations and letting arrays flow through it) and the one dimensionality of a stream of symbols in a text file. Ben Lynn [https://crypto.stanford.edu/~blynn/c/apl.html] puts it best:

      "Worse still, tacit hooks, forks, and ranks obscures the beautiful category theory connections: hooks and forks are function composition and application within the Reader monad, while adjusting the rank of a function corresponds to applying functors."

      Hooks are a structured approach to this problem, while stacks are an unstructured one. And there will always be tension between the two for as long as the current textual model of programming is used (or maybe no matter what representation we use). How obscure are we willing to get in order to get closer to the beautiful DAG we have in our head?

      I of course don't have a good answer to that, and I think the dominant paradigm of array languages has set to be discovered. APL gets us close, but we clearly agree that there's more work yet to be done.

      Looking at your bytecode design, I was reminded of this old paper about building APL hardware: http://www.softwarepreservation.org/projects/apl/Papers/197002_An%20APL%20Machine-Abrams.pdf . Not sure how relavent that is, but maybe it'll be the inspiration of a beautiful VM architecture!

    • wyagerJun 2024

      > unit quaternions also don’t form a vector space

      Unit quaternions are the lie group. If you want something you can add willy-nilly, you want the lie algebra of all quaternions, which represent rotational velocities, just as axis-angle represents rotational velocities.

      Comparing unit quaternions to axis-angle is a bit of a category error - it would be more appropriate to compare unit quaternions to rotation matrices, and all quaternions to axis-angle.

      > One advantage of using quaternions is how easy the exponential map is to compute—if you don’t need a rotation matrix, it’s a good option.

      You rarely need a rotation matrix at all when using quaternions. As mentioned in the article, you can compute rotations using `pqp^-1`.

      I think the easiest way to understand quaternions is just to read about geometric algebra. It took hundreds of years to invent quaternions, but once you understand geometric algebra (which is shockingly simple), you can invent quaternions in just a few minutes. I found this article to be a good intro several years ago: https://crypto.stanford.edu/~blynn/haskell/ga.html

    • infinity0Nov 2018

      The way this text does the geometric product is trying to be intuitive by immediately giving a "physical" interpretation as the sum of the inner and outer products. However the physical interpretations breaks down when trying to multiply three of these together.

      I think Ben Lynn's approach is actually better: https://crypto.stanford.edu/~blynn/haskell/ga.html (Part 1)

      It starts off more abstract, defining the geometric product simply as string concatenation (as in "free monoid" if you're familiar with that term, which you would if you have intermediate Haskell knowledge) plus a very natural constraint. From this natural constraint one can then deduce the sum-based interpretation that the OP gives.

      The natural constraint is then further generalised and justified in more detail in Part 3: https://crypto.stanford.edu/~blynn/haskell/cga.html

    • eggyMay 2019

      I would think Clojure vs. Java would be used given immutability. I like both Haskell and Racket for math, especially this article on geometric algebra with Haskell:

      https://crypto.stanford.edu/~blynn/haskell/ga.html

      I am personally learning Shen[1] because Lisp, optional typing (great type system), and the formal work done within it, and for it in proving, verification and other related endeavors. It seems to tick the Haskell, Lisp, Prolog and logic boxes for me. Its portability is great[2], however, it is still young and building libraries. I am thinking on trying to mimic the DL work done by Dragan Djuric[3] for Clojure in Shen. We'll see how that goes...

      [1] http://www.shenlanguage.org/
      [2] https://shen-language.github.io/
      [3] https://dragan.rocks/

    • bmc7505Feb 2022

      > "What are recent developments in linear algebra?"

      Have you heard of geometric algebra? It takes a while to wrap your head around, but unifies a lot of mathematics in a very elegant way. For instance, you can view Euclidean geometry as a special case, and concepts like quaternions and rotations can be explained in a very natural way. There are a few good resources below if you're interested.

      [0]: http://geometry.mrao.cam.ac.uk/2020/06/euclidean-geometry-and-geometric-algebra/

      [1]: https://www.youtube.com/watch?v=ipqKvNHnABs

      [2]: https://alexkritchevsky.com/2020/10/15/ea-operations.html

      [3]: https://www.youtube.com/playlist?list=PLpzmRsG7u_gqaTo_vEseQ7U8KFvtiJY4K

      [4]: https://crypto.stanford.edu/~blynn/haskell/ga.html

      [5]: https://bivector.net/

    Related

    John Tromptromp.github.io49 people

    Number of legal 18x18 Go positions computed. One more to go

    John Tromp
    Personal · last shared 2026
    Stephen Diehlstephendiehl.com209 people

    What I Wish I Knew When Learning Haskell

    Stephen Diehl
    Personal · last shared 2026
    A Neighborhood of Infinityblog.sigfpe.com185 people

    Why is nuclear fusion so hard?

    A Neighborhood of Infinity
    Personal · last shared 2026
    Brent Yorgeybyorgey.wordpress.com84 people

    Conversations with a six-year-old on functional programming

    Brent Yorgey
    Personal · last shared 2026
    Jeremy Kunmedium.com/@jeremyjkun16 people

    Habits of highly mathematical people

    Jeremy Kun
    Personal · last shared 2025
    Lambda the Ultimatelambda-the-ultimate.org615 people

    Simon Peyton Jones Elected into the Royal Society Fellowship

    Lambda the Ultimate
    Publication · last shared 2026
    Well-Typed Blogwell-typed.com60 people

    Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

    Well-Typed Blog
    Company · last shared 2026
    Neil Mitchellneilmitchell.blogspot.com54 people

    The Four Flaws of Haskell

    Neil Mitchell
    Personal · last shared 2025