ezyang’s blog

the arc of software bends towards understanding

Frivolity

Calculating Shanten in Mahjong

Move aside, poker! While the probabilities of various poker hands are well understood and tabulated, the Chinese game of chance Mahjong [1] enjoys a far more intricate structure of expected values and probabilities. [2] This is largely due in part to the much larger variety of tiles available (136 tiles, as opposed to the standard […]

  • April 1, 2014

Food-related functional humor

Fall is coming, and with it come hoards of ravenous Freshmen arriving on MIT’s campus. I’ll be doing three food events... all of them functional programming puns. Whee! Dumpling Hylomorphism Anamorphism: the building up of a structure. Catamorphism: the consumption of a structure. Hylomorphism: both an anamorphism and a catamorphism. This event? A hylomorphism on […]

  • July 29, 2011

If it has lots of comments, it’s probably buggy

Yesterday we had guest speaker Byron Cook come in to give a talk about SLAM, a nice real-world example of theorem proving technology being applied to device drivers. Having worked in the trenches, Byron had some very hilarious (and interesting) quips about device driver development. After all, when a device driver crashes, it's not the […]

  • May 25, 2011

Someone is wrong on the Internet

The perverse incentive structure of the Internet Suppose you have a Random Question™ that you would like answered. For example, “Did Sir Francis Galton have any children?” It’s the type of thing you’d type into Google. Answers.com is not a terribly good source, but it is something to at least see if you can scrounge […]

  • March 14, 2011

Blog name changed…

...because I don’t live in a room numbered 245s anymore. Yep. :-) This is a cow. They munch grass next to the River Cam. Pop quiz. What do matrix-chain multiplication, longest common subsequence, construction of optimal binary search trees, bitonic euclidean traveling-salesman, edit distance and the Viterbi algorithm have in common?

  • October 27, 2010

Quote Day

Unattributed to protect the innocent. (But you can probably guess.) “And so these poor programmers, they had to drink this much whiskey to get the job done.” [triumphantly produces a bottle of whiskey and places it on the table.] “And this group of programmers did X, and how hard was that? Two bottles of whiskey.” […]

  • October 13, 2010