I studied this code for a long time. I have lots of notes, going through everything almost line by line. I would be embarrassed of making them public because I never finished (at some point, I was just rewriting the x64 reference), but if somebody is interested I do not mind sharing.<p>I would recommend everyone doing C to have a very careful look at this. The code is full of nice tricks and you start appreciating the terse style after a while. I understand why this style is not more commonly used, but I really like it.
For those interested but needing a little help deciphering Thomas Lackner has a handy repo:<p><a href="https://github.com/tlack/b-decoded" rel="nofollow">https://github.com/tlack/b-decoded</a>
Q is one most important language here at BitMEX. Complicated or not, it's on KDB that all our trades happen, up to $8B in 24H volume last summer - it's highly efficient at its task, and never made us or any of our customers, loose a single Satoshi.
Doesn't look like B. I'm a bit irritated.<p><a href="https://en.wikipedia.org/wiki/B_(programming_language)" rel="nofollow">https://en.wikipedia.org/wiki/B_(programming_language)</a>
Whitney is so fascinating to me. His code is simultaneously awe-inspiring and horrifying. It's like he struck a Faustian bargain to gain programming powers beyond the ken of mere mortals, and is now cursed to write transcendently beautiful code that manifests as unintelligible gibberish to everyone else.
I think a good introduction to this style of coding is the first "proof of concept" prototype interpreter for a small subset of J, also written by Whitney:<p><a href="https://code.jsoftware.com/wiki/Essays/Incunabulum" rel="nofollow">https://code.jsoftware.com/wiki/Essays/Incunabulum</a><p>Once I realized it was K&R C, I thought it was pretty straightforward.
This was helpful to me: <a href="https://en.wikipedia.org/wiki/K_(programming_language)" rel="nofollow">https://en.wikipedia.org/wiki/K_(programming_language)</a>
This is from 2015. I really wish something more from Whitney/kparc would materialize.<p>Whitney/kparc previously covered on HN:<p><a href="https://news.ycombinator.com/from?site=kparc.com" rel="nofollow">https://news.ycombinator.com/from?site=kparc.com</a>
This code is a horrid abomination. I don't care if this guy is a genius and could single-handedly write the best OS in the history of computing; his code is write-only, unmaintainable garbage. There's nothing elegant or praiseworthy about this at all.
Programming is not telling the machine what to do. That's the easy part.<p>What programming is about, and what's hard, is telling <i>the next programmer</i> what the machine does.<p>This makes the easy part a bit easier, and the hard part much harder, than using C. And I already disliked C to begin with, for similar reasons.