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
    J

    Jon Sterling

    jozefg.bitbucket.org · Personal blog · on HN since 2014

    Danny Gratzer writes about type theory, functional programming, Haskell, ML modules, and compilers.

    Visit blogHN submissions
    Languages & CompilersProgrammingMath
    What HN says

    HN commenters cite it for explanations of ML modules and dependent types, and for its post advising Haskell learners not to start with category theory.

    Stats for nerds
    19HN people shared it
    25linked in comments
    593story points
    Nov 2016last shared
    2014people per year2016

    Top posts on HN

    1. 1
      Leaving Go
      1 person · 214 points · first shared 2014 · 214 comments on HN
    2. 2
      An Explanation of Type Inference for ML/Haskell
      1 person · 101 points · first shared 2015 · 12 comments on HN
    3. 3
      A Tiny Compiler for a Typed Higher-Order Language
      1 person · 71 points · first shared 2015 · 15 comments on HN
    4. 4
      Please Don't Learn Category Theory (2013)
      3 people · 56 points · first shared 2014 · 79 comments on HN
    5. 5
      Compiling a Lazy Language in 1,000 words
      1 person · 37 points · first shared 2015 · 6 comments on HN
    6. 6
      A Crash Course on ML Modules
      5 people · 24 points · first shared 2015 · Discussion on HN
    7. 7
      The Guts of a Spineless Machine
      1 person · 23 points · first shared 2014 · 1 comments on HN
    8. 8
      A Twelf Introduction
      1 person · 23 points · first shared 2015 · 1 comments on HN
    9. 9
      A Proof of Church Rosser in Twelf
      1 person · 14 points · first shared 2015 · Discussion on HN
    10. 10
      Bargain-Priced Coroutines
      1 person · 6 points · first shared 2014 · Discussion on HN

    What HN people wrote when they linked it

    • codygmanNov 2014

      > Go model a square and a rectangle in your favorite statically typed language.
      Okay.

      data Shape = Square Int | Rectangle Int Int deriving (Show)

      > You will find that square extends rectangle and setting the length on a square also sets the width.
      Why? I don't really see a need for square to extend a rectangle.

      > So if I have a collection of rectangles which contains an unknown number of squares of which I set the width on each of them.
      Like this?

      > let unknowns = [(5,4),(3,2),(4,4)]
      > let toShape (x,y) = if x == y then Square x else Rectangle x y
      > map toShape unknowns
      [Rectangle 5 4,Rectangle 3 2,Square 4]

      Tomorrow I'll see if I can make this type-safe by using dependent typing as shown in: [0][1][2]

      This was easily solvable in my staticly typed language as you can see. In something like Idris I could have
      very easily encoded the toShape function the the type signature.

      0: http://www.alfredodinapoli.com/posts/2014-10-13-fun-with-dependent-types-in-haskell.html
      1: https://www.fpcomplete.com/user/konn/prove-your-haskell-for-great-safety/dependent-types-in-haskell
      2: http://jozefg.bitbucket.org/posts/2014-08-25-dep-types-part-1.html

    • z1mm32m4nAug 2016

      Coming from an SML background, one of the things that's always tripped me up about Haskell is that it doesn't have structures, signatures, and functors for grouping code. Instead it has modules, which are not much more than groups of exported functions.

      For Haskellers coming to SML, there's "A Crash Course on ML Modules"[1] which does a nice job of explaining things in the opposite direction.

      Are there any resources like this out there that discuss how best to break down and write modular Haskell programs?

      [1]: http://jozefg.bitbucket.org/posts/2015-01-08-modules.html

      (update: I realized the original article I linked to wasn't the one I thought it was!)

    • bjz_Jul 2016

      > Everybody who does PL theory more seriously probably knows that, but I didn't realize how close type inference and prolog-like systems look.

      Yup! This is more to do with a very specific part of type theory - ie. 'type reconstruction' (more commonly referred to as 'type inference'). One of the most notable examples of this is the so-called 'Hindley-Milner type system' which can be proven to decidable. Here is a good explanation of the constraint-solving algorithm: http://jozefg.bitbucket.org/posts/2015-02-28-type-inference.html

    • maxiepooNov 2016

      The use of the term "witness" here comes from constructive logic, where proofs of propositions have actual computational content. There "witness" means the same thing as "proof" but is more evocative that the proof is data that can actually be manipulated.

      You might like this article if you're interested to learn more: http://jozefg.bitbucket.org/posts/2015-01-09-constructivism.html

    • tomeAug 2016

      > If you want to learn Haskell, forget Category theory

      Yes please. Please Don't Learn Category Theory to Learn Haskell: http://jozefg.bitbucket.org/posts/2013-10-14-please-dont-learn-cat-theory.html

      > learning category theory will likely help you learn Haskell about as much as learning lambda calculus will help you learn Lisp. Maybe a bit less

      Much, much less, I would have said

    • tjrJan 2014

      I like how he wrote a post a few days later, Learn You Some Category Theory:

      http://jozefg.bitbucket.org/posts/2013-10-22-category-theory-in-haskell.html

    Related

    Neil Mitchellneilmitchell.blogspot.com54 people

    The Four Flaws of Haskell

    Neil Mitchell
    Personal · last shared 2025
    Oleg Kiselyovokmij.org251 people

    How the OCaml type checker works (2022)

    Oleg Kiselyov
    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
    Haskell for Allhaskellforall.com190 people

    The category design pattern

    Haskell for All
    Personal · last shared 2026
    FP Complete Blogfpcomplete.com201 people

    Monads and GATs in Nightly Rust

    FP Complete Blog
    Company · last shared 2025
    Existential Typeexistentialtype.wordpress.com157 people

    Haskell Is Exceptionally Unsafe (2012)

    Existential Type
    Personal · last shared 2026
    Well-Typed Blogwell-typed.com60 people

    Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

    Well-Typed Blog
    Company · last shared 2026
    Justin Leblog.jle.im36 people

    Typesafe Neural Networks in Haskell with Dependent Types

    Justin Le
    Personal · last shared 2026