Terms and Truth-Conditions
https://www.michaelpj.com/blog/ (RSS)
For a few years now I have been working on the Haskell Language Server (HLS), and the lsp library for the LSP protocol and writing LSP servers. Unsurprisingly, I have developed some opinions about the design of the LSP! Recently I gave a talk about HLS and LSP at the Haskell Ecosystem Workshop at Zurihac 2024. One slide featured a hastily-written...
Note: this post assumes you know quite a bit about defunctionalization. If you don’t read this post first.
Note: this is from my drafts. I think I had more to say, but it is sufficiently long since I read the book that I don’t remember what it was. Re-reading it I think it holds up okay so I’m publishing it. This book changed how I think about women, and about feminism. De Beavoir’s analysis of the position of women is a clear, historical meterialist...
If you spend enough time in risk-tolerant places (e.g. startups, blockchain) you start to notice a particular pattern. A charismatic founder, call them Alice, starts a new project. The project seems to be transparently stupid or bullshit, but somehow they manage to secure a lot of funding and/or users. After a while, the project fails, probably...
The Haskell Language Server (HLS) codebase has a lot of CPP conditionals. A lot of them look like this: #if MIN_VERSION_ghc(9,2,0) which says that the version of the ghc library has to be at least 9.2; or this #if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0) which says that the version of the ghc library has to be between 9.2 and 9.3; or...
It was good, but I didn’t find myself as blown away as some people seem to have been. I did have some thoughts, so here they are (spoilers!).
Previously I wrote about how you can use explicit Traversals from lens to simplify some aspects of tree manipulation. I recently had another win using this, so here’s another case study! It also provides a better example for when you want to fold over things than the previous post had.
Programmers like to go on about how you should or should not comment your code. This is my contribution. But first, go read Antirez’s take on this which is fantastic and says almost everything that needs to be said, I agree with essentially all of it.
I’ve been reading quite a few psychiatric/therapeutic/self-help books recently. This post is some notes on a common thread I noticed in a few of them about the positive sides of “bad” behaviours.
What’s the difference between this program mapMaybe :: (a -> Maybe b) -> [a] -> Maybe [b] mapMaybe f [] = Just [] mapMaybe f (a:as) = (:) f a mapMaybe f as and this one? mapMaybe :: (a -> Maybe b) -> [a] -> Maybe [b] mapMaybe = traverse The second one is certainly shorter, but I believe it would also be considered to be better by many Haskell...
I work in software. A perennial bugbear of software project management is: why do so many software projects go over time? Moreover, why do they do this when so much time is spent trying to break down projects and get engineers to estimate how long the pieces will take? The answer is simple: things take longer than we expect. And we know that...
“Orphan” typeclass instances are instance declarations instance T A that occur in any module other than the module where the class T is defined, or the module where the type A is defined The orthodox Haskeller viewpoint is that orphan instances are bad and you should never write them, because they can lead to incoherence. Incoherence is where we...
If there’s one thing compiler writers spill a lot of ink over, it’s tree traversals. Tree traversals are infuriatingly simple conceptually, but can be a lot of boilerplate to actually write. This post covers a couple of tricks that I’ve found useful recently using tools from lens.
Certain people (myself included) have a habit of reflexively attacking new arguments or ideas. Amanda Askell calls this “shark curiosity”: sharks bite things partly because their only real way of interacting with the world is their mouth, so biting is their way of finding out what something is. Taken literally this implies a rather bleak picture...
From Annihilation by Jeff VanderMeer: “So we have nothing.” The surveyor ignored that, said “What do we do now?” It was clear she hated asking the question. “Eat dinner,” I said. “Take a little stroll along the perimeter to make sure the psychologist isn’t hiding in the bushes. Think about what we’re doing tomorrow. "”I’ll tell you one thing...
John cares about nothing but making the most amount of money that he can. He comes to believe that the best way to do this is to start a new company, but also that companies are most likely to succeed when the founder is intrinsically motivated by the work of the company. So John immerses himself in a domain and cultivates an interest. When he...
From The Precipice: Existential Risk and the Future of Humanity by Toby Ord: Growing up, I had always been strongly pro-technology. If not for the plausibility of these unconsummated catastrophic risks, I’d remain so. But instead, I am compelled towards a much more ambivalent view. I don’t for a moment think we should cease technological...
I read this post by my friend Lulie, and while I have not idea whether this relates to actual Alexander Technique it was interesting. Expanded awareness I tried doing the expanded awareness thing for most of a day, including a fairly long walk. I do think this actually helped my posture: I noticed that if I was even peripherally aware of the...
I’m going to try and write a bit more, blatantly stealing the idea from David MacIver’s Notebook. The main idea is just to have a blog – or in my case, a section of my blog – dedicated to low-effort just-get-something-out writing. After all, quantity frequently beats quality in terms of building skill: The ceramics teacher announced on opening...
I haven’t been doing terribly well at my Giving What We Can pledge recently. This was largely for tactical reasons: for the last couple of years I’ve been getting paid via a limited company and the associated novel accountancy requirements made me a bit leery of giving away large chunks of money I might actually have to give to the government....