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
    C

    Chris Okasaki

    okasaki.blogspot.com · Personal blog · on HN since 2008

    Chris Okasaki, author of Purely Functional Data Structures, writes about functional programming, teaching, puzzle games and data structure design.

    Visit blogHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    Commenters recommend it to programmers generally, call it eclectic and very good, and link it alongside his book.

    Stats for nerds
    31HN people shared it
    23linked in comments
    289story points
    Jun 2026last shared
    2008people per year2026

    Top posts on HN

    1. 1
      Ten Years of Purely Functional Data Structures (2008)
      1 person · 170 points · first shared 2013 · 24 comments on HN
    2. 2
      Teaching, Playing, and Programming: Ten Years of Purely Functional Data Structures
      6 people · 28 points · first shared 2008 · 2 comments on HN
    3. 3
      In praise of mandatory indentation for novice programmers
      6 people · 18 points · first shared 2008 · 4 comments on HN
    4. 4
      What the heck is a math trade?
      2 people · 11 points · first shared 2008 · 3 comments on HN
    5. 5
      In Search of Epiphany
      1 person · 10 points · first shared 2008 · Discussion on HN
    6. 6
      Functional Programming in...Ada?
      1 person · 10 points · first shared 2008 · 2 comments on HN
    7. 7
      Teaching, Playing, and Programming: Designing a Data Structure
      2 people · 9 points · first shared 2008 · 1 comments on HN
    8. 8
      Games for Programmers: Zendo
      2 people · 8 points · first shared 2008 · Discussion on HN
    9. 9
      Binomial queues as a nested type
      1 person · 8 points · first shared 2009 · Discussion on HN
    10. 10
      Other disciplines outside the arts also require creativity: we need to teach them that way
      1 person · 7 points · first shared 2008 · 5 comments on HN

    What HN people wrote when they linked it

    • svatJan 2019

      I think if you find those algorithms obvious and you're able to write memoized solutions, then you already know most of what you need to know about dynamic programming. For example, Dijkstra's algorithm for shortest paths can be seen as DP.

      The main thing is to write down a formulation for the answer for n in terms of answers for smaller n, or the answer for (n, k) in terms of answers for smaller (n, k). (And don't worry about how you'd compute them, just focus on getting a correct expression in terms of smaller ones. http://okasaki.blogspot.com/2008/10/score-one-for-induction.html)

      It can be tricky to formulate exactly what you're counting / measuring (e.g. what's "k" and what's the quantity you're optimizing for (n, k)), but once you have that, and once you have the recurrence, you can consider it a separate (and independent) step to figure out in which order to compute the values, so that you have each value by the time you need it (i.e. the bottom-up formulation that you said is the tricky part for you).

      Beyond that I guess lots of practice with problems… e.g. about a decade ago there used to be weekly(?) TopCoder contests with editorials written later explaining the solutions (and the problems were graded by difficulty and even how many people solved it), and the DPs could get quite tricky. I believe those are still happening, and now there are other resources like LeetCode or whatnot.

      Do you have an example of a problem that you struggled with, to see what's…

    • loup-vaillantMar 2011

      The syntax is more cumbersome than actually needed. It probably should use mandatory indentation as well. We lovers of curly brackets may not like that, but it makes things easier for beginners.[1] In this case, the first listing would have looked like that:

      hello = ^name -> "Hello " + name
      repeat {times: 3}
      print hello {name: "John"}

      Or, without the keyword arguments:

      hello = ^name -> "Hello " + name
      repeat 3
      print hello "John"

      (the last line is meant to be a function. Indentation is used instead of ^{}) Note that for a syntax that use juxtaposition for function application, I was very surprised to see that

      print hello "John"

      == print (hello "John")
      != (print hello) "John"

      It looks like a misfeature (doesn't work well with currying), but maybe there's some justification?

      (Edit: the language does look very simple, and I like that. Very good for "I'll show you programming in 10 minutes". For that purpose, fixing the syntax would make it even better.)

      [1]: http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-indentation-for.html

    • vintermannJun 2026

      Many years ago, on Boardgamegeek, there was a game trading system called "Math Trades", where participants would list a number of trades they were willing to make, and they ran some complicated calculations to figure out how to let as many as possible trade.

      CS professor Chris Okasaki, known for his book on purely functional data structures, also played board games and he came across this phenomenon. He realized that it could be modelled as a bipartite matching problem, and wrote a MUCH faster program to manage math trades.

      https://okasaki.blogspot.com/2008/03/what-heck-is-math-trade.html

      I guess it can be made even faster now in theory.

    • raganwaldApr 2008

      You're very welcome :-)

      BTW, if you like the article, even briefly... consider subscribing to his feed. Very interesting, very eclectic. He is the author of "Purely functional data structures" which goes into some depth on high-performance data structures. He also write fun things about games and thinking and...

      Oh for Pete's sake stop reading my rambingss and read his well-chosen words instead ;-)

      http://okasaki.blogspot.com/

    • telemachosFeb 2010

      From Okasaki's blog:

      Sales were steady but trending downward, until 2004, when a book review by Andrew Cooke appeared on Slashdot. After that, sales doubled and have stayed at that level for several years. Of course, I can't be sure this increase was because of Slashdot, but it seems likely. Thanks, Andrew!

      http://okasaki.blogspot.com/2008/02/ten-years-of-purely-functional-data.html

    • jackfoxyMar 2011

      Chris Okasaki has some high praise for languages implementing indentation as part of the syntax http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-indentation-for.html

      Personally I think Coffeescript is a big step forward. A pity it will likely never gain enough momentum to see native implementations on the major browsers.

    Related

    Lambda the Ultimatelambda-the-ultimate.org615 people

    Simon Peyton Jones Elected into the Royal Society Fellowship

    Lambda the Ultimate
    Publication · last shared 2026
    Enfranchised Mindenfranchisedmind.com36 people

    Apple is just Microsoft with better marketing

    Enfranchised Mind
    Publication · last shared 2012
    F# for Fun and Profitfsharpforfunandprofit.com334 people

    Railway-Oriented Programming (2015)

    F# for Fun and Profit
    Personal · last shared 2026
    Andrej Bauermath.andrej.com114 people

    Seemingly impossible functional programs (2007)

    Andrej Bauer
    Personal · last shared 2026
    Reg Braithwaiteraganwald.com94 people

    How I Learned to Stop Worrying and Love the State Machine

    Reg Braithwaite
    Personal · last shared 2026
    Jeremy Kunjeremykun.com194 people

    A Programmer's Introduction to Mathematics

    Jeremy Kun
    Personal · last shared 2026
    Computational Complexityblog.computationalcomplexity.org98 people

    When did computer science theory get so hard?

    Computational Complexity
    Personal · last shared 2026
    Nick Drozdnickdrozd.github.io25 people

    Signed Char Lotte

    Nick Drozd
    Personal · last shared 2026