Stephen Diehl, a London-based developer, writes about Haskell, compilers, LLVM, cryptocurrency criticism, and security.
HN commenters link his essays calling crypto a scam as must-reads, and recommend his LLVM JIT compiler tutorial, though one found it outdated.
I'm not an unequivocal fan of cryptocurrencies or any particular cryptocurrency by any means, but it appears this author really hates cryptocurrency and this is just an opportunity for them to argue that governments should ban cryptocurrency. Which is completely understandable and obviously in good faith given ransomware is bad and they think cryptocurrencies are bad, but I just wanted to point out their stance and that this is an anti-cryptocurrency blog rather than a security/tech blog.
Every blog post they've ever published is about why they think cryptocurrency is awful: https://www.stephendiehl.com/blog.html
>The Oncoming Ransomware Storm - May 11, 2021
>Et tu, Signal? - April 7, 2021
>The Political Case for a Blanket Cryptocurrency Ban - March 30, 2021
>Bitcoin: The Postmodern Ponzi - February 27, 2021
>The Crypto Chernobyl - February 10, 2021
>Gamestop, Bitcoin and the Commoditization of Populist Rage - February 3, 2021
>Facebook Libra is Architecturally Unsound - November 2, 2019
I think they make many valid criticisms, but they remind me of the inverse of the standard Bitcoin maximalist. It seems there are a lot of people who think Bitcoin or Ethereum or something else should become the universal currency of the world and is the best and most innovative thing ever, and a lot of other people who think they should all be made illegal and are the worst thing ever. Also somewhat reminiscent of pg's fanboy/hater dichotomy: http://www.paulgraham.com/fh.html
Precisely said.
> It seems like some people, just because they are smart in one area, think they know everything. We see this with many VCs, Elon Musk, Vitalik etc.
Totally correct. Elon's wild claims on solving FSD (Fools Self Driving) seemed to be a total disaster, and Vitalik's claims on his decentralized slot machine utopia 'Ethereum' on how using a generalized blockchain to solve 'anything' from voting, social networks, DAOs, NFTs, etc has manifested into a tinkerbell griftopia [0] as feared by even the most fierce critics of blockchains.
Finally, VCs really don't care on being wrong on thousands of failed investments. They just need one massive return to make up for all of it hundreds of times over and somehow they are viewed as 'experts' which is a great example of the Texas sharpshooter fallacy. We don't hear them screaming about Clubhouse which was hyped to the extreme since it is isn't doing great as expected after being copied to death.
Also reading this article in particular, it is gearing close to sophistry.
[0] https://www.stephendiehl.com/blog/tinkerbell.html
I liked the Haskell content on his blog, I'm not sure about his new political line against crypto. This started a bit more than a year ago with this post https://www.stephendiehl.com/posts/crypto.html, which ends on a bizarre claim about a link between crypto and right-wing extremism:
> David Golumbia’s excellent book The Politics of Bitcoin: Software as Right-Wing Extremism outlines the rabbit-hole effect that this ecosystem is having on software engineers onboarding them into deeper forms of right-wing extremism.
This is not crypto-specific, I'd rather read software blogs than political blogs in general. In the spirit of Drew DeVault (https://drewdevault.com/2021/04/26/Cryptocurrency-is-a-disaster.html), I'll disclose my stake in cryptocurrency: I currently own ~1000€ in Bitcoin, that I bought for something like 800€ earlier in the year. Those ~200€ are the only profit I made on crypto. I use Monero from time to time for stuff where Monero is useful.
What blockchains solve is the whole pesky problem of following the law and paying taxes, and being a normal member of society. No wonder that much of the early crypto literature was all about anarchy. To this day, the only useful thing that crypto has enabled (on a very small scale) international asset transfer that bypasses mainstream financial systems. As Diehl[1] wrote, decentralized trustless systems are only useful to criminals -- every other social system on the planet has "trust" embedded in it, because that is more efficient, socially constructive, and powerful. Oh, and crypto isn't actually decentralized or trustless either, as you still need to trust the developers that wrote the code, and the people that run your exchanges, because otherwise you will get robbed by them, as it happens on a regular basis in the crypto world.
[1] https://www.stephendiehl.com/blog/nothing-burger.html
tldr: I am NEVER nervous about refactoring some Haskell code.
Good:
After working in a variety of organizations using, typed but also dynamic languages I'm now writing all my back-end code in Haskell. I'm becoming more and more convinced that for multi-year, multi-programmer applications (a language like) Haskell is the only way to make it sustainable, while still being able to add features.
Stephen Diehl has a great writeup on "what he wish he knew when he was learning haskell" http://dev.stephendiehl.com/hask/
It's difficult to say to someone "Just go read books for a couple of months because you need to understand purity, laziness, cross compilation, monad transformers (go read The Book of Monads), 20+ language pragmas. etc etc"
It does however feel like I'm learning useful stuff, and it's a lot of fun to get an executable that runs FAST.
Yeah, I’ve found Haskell a pleasure to work with for writing compilers. There’s no single thing, just a combination of language features and libraries. The bulk of a compiler is transforming trees of stuff, which Haskell makes very easy, and it nudges you pretty strongly in the direction of making code testable and refactorable.
I don’t have any particular recommendations. Mostly I’ve just been figuring things out as I go along, reading papers and asking for help. I’d written compilers & interpreters before, but got into using Haskell for it with Write Yourself a Scheme[1]. I’ve also heard good things about Implementing a JIT Compiled Language with Haskell and LLVM[2].
[1]: https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
[2]: http://www.stephendiehl.com/llvm/