Top all-time · #2261
Justin Le
Personal blog · blog.jle.improgrammingmath
Justin Le writes in Code, a personal blog at blog.jle.im about programming and math. Since 2013, 36 different Hacker News readers have linked it 57 times, most often “IO Monad Considered Harmful”. It is still writing: the last post was on 2026-08-04, and you can follow it by feed.
Weblog of Justin Le, covering various adventures in programming and explorations in the worlds of computation physics, and knowledge.
Most-linked posts?
- IO Monad Considered Harmful5 people · 5 mentions · first linked 2015-01-23
- The Baby Paradox in Haskell3 people · 3 mentions · first linked 2025-08-21
- Haskell Nuggets: K-Means3 people · 3 mentions · first linked 2024-07-26
- Purely Functional Approach to Typed Trainable Models3 people · 3 mentions · first linked 2018-05-14
- Shuffling Things Up: Solving Advent of Code with Group Theory and Haskell3 people · 3 mentions · first linked 2020-11-18
- Hamiltonian Dynamics in Haskell3 people · 3 mentions · first linked 2017-11-27
- Typesafe Neural Networks in Haskell with Dependent Types2 people · 4 mentions · first linked 2016-05-25
- First Class Statements2 people · 3 mentions · first linked 2015-05-17
- Sum Types and Subtypes and Unions2 people · 2 mentions · first linked 2025-03-06
- Faking ADTs and GADTs in Languages That Shouldn't Have Them2 people · 2 mentions · first linked 2025-04-01
What Hacker News says?
Don't get me wrong; I'm not knocking it. I definitely see the value in these kinds of features. Like zippers, I'm sure it's another case of "If you understand it, it's really useful." The point is, you don't necessarily need it to get the job done, and you certainly don't need to be intimidated about it or feel obligated to learn it right off. Even Haskell isn't actually so difficult to grasp the basics of, if you k…
Comment linking /entry/io-monad-considered-harmful
on “Clojure 1.7 is now available”Submitted Typesafe Neural Networks in Haskell with Dependent Types as a story · 140 points
HN discussion> No mon[a|oi]ds necessary. Mon[a|oi]ds are everywhere, but in some languages you just don't know about it. Which of course lets you not have to learn those concepts knowingly, but they're still there and you still could be a better developer for at least knowing they're there and they're behind some of the repeating patterns you see (string concatenation / promises / etc.) I believe "not worrying about them at firs…
Comment linking /entry/shuffling-things-up.html
on “Why is learning functional programming so damned hard? (2019)”Submitted IO Monad Considered Harmful as a story · 90 points
HN discussionTo the extent that I understand your complaint, there is a functional architecture that alleviates this concern: arrowized functional reactive programming. https://blog.jle.im/entry/intro-to-machines-arrows-part-1-st... talks about it.
Comment linking /entry/intro-to-machines-arrows-part-1-stream-and.html
on “F# is gaining independence from .NET”Submitted First Class Statements as a story · 48 points
HN discussionIn other words, IO Monad Considered Harmful. https://blog.jle.im/entry/io-monad-considered-harmful.html
Comment linking /entry/io-monad-considered-harmful.html
on “A monad is a monoid in the category of endofunctors, what’s the problem?”Submitted Functors to Monads: A Story of Shapes as a story · 41 points
HN discussionFolks who are into this may also like the "Type Safe Neural Networks in Haskell" https://blog.jle.im/entry/practical-dependent-types-in-haske... I'm also starting work on a set of bindings to libdarknet for Idris with similar properties.
Comment linking /entry/practical-dependent-types-in-haskell-1.html
on “Neural Networks, Types, and Functional Programming (2015)”Submitted Inside My World – Ode to Functor and Monad as a story · 12 points
HN discussionThis post builds the intuition for something like the Netwire library http://blog.jle.im/entry/effectful-recursive-real-world-auto...
Comment linking /entry/effectful-recursive-real-world-autos-intro-to-machine
on “The Elm Architecture”Submitted The Baby Paradox in Haskell as a story · 6 points
HN discussionSee https://blog.jle.im/entry/practical-dependent-types-in-haske... where you get this function definition: https://github.com/mstksg/inCode/blob/master/code-samples/de... I liked this article: https://ren.zone/articles/safe-money where they get e.g. an ExchangeRate "USD" "JPY" type from input that has a different type from ExchangeRate "EUR" "JPY" (and thus can't be used to convert euros, only US dollars).
Comment linking /entry/practical-dependent-types-in-haskell-2.html
on “Typesafe Neural Networks in Haskell with Dependent Types”Submitted Faking ADTs and GADTs in Languages That Shouldn't Have Them as a story · 5 points
HN discussionI don't think the Julia implementation makes much use of typing. A related Haskell codebase for Hamiltonian (not Lagrangian) mechanics that I found really helpful to scan was https://blog.jle.im/entry/hamiltonian-dynamics-in-haskell.ht... -
Comment linking /entry/hamiltonian-dynamics-in-haskell.html
on “How to Turn Physics into an Optimization Problem”Submitted Haskell Nuggets: K-Means as a story · 5 points
HN discussionhttps://blog.jle.im/entry/lenses-products-prisms-sums.html
Comment linking /entry/lenses-products-prisms-sums.html
on “Lens: Lenses, Folds and Traversals”Submitted The Baby Paradox in Haskell as a story · 4 points
HN discussionIn truth, you don't actually have to climb the IO monad learning curve. IO in Haskell has nothing to do with monads.[1] It's simply a type which encodes input and output effects. Simple and elegant. The fact that people so thoroughly confuse the issue by mixing the disparate topics of IO and monads, is a shame. [1] http://blog.jle.im/entry/io-monad-considered-harmful
Comment linking /entry/io-monad-considered-harmful
on “Haskell in Production”Submitted Seven Levels of Type Safety in Haskell: Lists as a story · 4 points
HN discussionHe even says explicitly "(never mind how we deal with uniqueness)" in the solution section and has already acknowledged that there are only around 2 million combinations to check. ETA since he mentions the implementation is a translation of this Haskell implementation: http://blog.jle.im/entry/unique-sample-drawing-searches-with... presumably the uniqueness is done by updating the list of remaining possibilities for…
Comment linking /entry/unique-sample-drawing-searches-with-list-and-statet
on “Using Monads in C++ to Solve Constraints: 1. The List Monad”Submitted Haskell Nuggets: K-Means as a story · 4 points
HN discussionYou can have types in haskell that represent finite length lists. Here's a blog post giving an overview of several methods of doing so (and several examples of libraries in the wild that provide this): https://blog.jle.im/entry/fixed-length-vector-types-in-haske... There's a tradeoff here between generality and how important it is to encode all invariants about a piece of data. Many haskell list processing functions…
Comment linking /entry/fixed-length-vector-types-in-haskell.html
on “Types and Tests”Submitted Haskell nuggets: functional k-means with dependent types as a story · 4 points
HN discussionIn the same vein, http://blog.jle.im/entry/first-class-statements
Comment linking /entry/first-class-statements
on “Imperative Functional Programming (1996) [pdf] ”Submitted Solving Advent of Code Day 5 w Group Theory (free groups, group homomorphisms) as a story · 4 points
HN discussionHere's an explanation of how IO works in Haskell: http://blog.jle.im/entry/first-class-statements If you go through it and understand it, you will find that it is completely "pure".
Comment linking /entry/first-class-statements
on “Once you go functional, you can never go back”Submitted The Compromiseless Reconciliation of I/O and Purity as a story · 4 points
HN discussionIgnore them all, use these: http://blog.sigfpe.com/2006/08/you-could-have-invented-monad... http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba... http://blog.jle.im/entry/io-monad-considered-harmful
Comment linking /entry/io-monad-considered-harmful
on “Outcome-Oriented Programming”Submitted Faking ADTs and GADTs in languages that shouldn't have them as a story · 3 points
HN discussion