Top picks:

Jasper Van der Jeugt shows how you can write an intuitive, obviously correct LRU cache perfectly polymorphic in both the key and value types of the cache lookup function. (Reddit discussion.)

Core is broken! Well, no, ticket 9858 reported previously is still open, and it's about translating an exotic species of Haskell into Core. But Javran Cheng found out that the documented specification of Core's operational semantics is incomplete.

Neil Mitchell removes the error-prone wart of withSocketsDo in Windows network programming. Moving in for the kill is the triple combo of evaluate, NOINLINE, and unsafePerformIO. (Reddit discussion.)

Can you write a sorting algorithm? Can you write a fancy sorting algorithm? Can you write a sorting algorithm so fancy it hides a subtle bug? Can you write a sorting algorithm so fancy that it hides a bug so subtle that it evades even QuickCheck because the smallest testcase is 2^49 big? But the good news is that QuickCheck doesn't see any regression in the bugfix. (Hacker News discussion.)

The consequence of misspelling pragmas, Or: when stumped on a compile error, turn on -Werror to see if you aren't missing something obvious.

Quote of the week:
garry__cairns: The trouble with learning #haskell is the more I expose myself to it the more I dislike what I have to work with to pay the bills.

Repo of the week: Kalium: Turn Pascal into Haskell


-- Kim-Ee