May 1st, 2009


LALR parsers are relics from the 60s.

The fact that I need to mention that yacc is an LALR(1) parser should suggest to the uninitiated how baroque virtually everything to do with parsing actually is. From a users perspective, LALR(1) really means "this thing doesn't parse a lot of things that I quite reasonably would expect it to be able to parse". In other words, yacc will generally refuse to work on most "human friendly" grammars, requiring the user to understand arcane nonsense such as "shift / reduce errors". This is all done in the name of efficiency. However the need for extreme efficiency in these algorithms often dates from the 60's. As we all know, computers were a little bit slower back in the day. What was slow back then often works at the speed of light today. There are parsing algorithms out there - Earley parsing is a particular favourite of mine - which can parse any context-free grammar, which constitutes the vast majority of modern programming languages. They may not be as fast as yacc but for the vast majority of purposes (up to and including full blown compilers) they're absolutely fine, and no user is likely to notice the difference in execution speed. However anyone who uses, say, Earley parsing will most definitely notice the massive ease in which grammars can be expressed and used. Therefore I believe the pain which most people associate with parsing text is the result of a 40 year old obsession with speed that today verges on the masochistic.

My personal favorite replacement for LALR parsers are Packrat parsers. Linear time, but they use more space. Luckily, RAM is a lot cheaper than it used to be and we needn't limit ourselves to 64kb chunks of data any more.

The IMF has seen many financial crises like ours before.

The crash has laid bare many unpleasant truths about the United States. One of the most alarming, says a former chief economist of the International Monetary Fund, is that the finance industry has effectively captured our government—a state of affairs that more typically describes emerging markets, and is at the center of many emerging-market crises. If the IMF’s staff could speak freely about the U.S., it would tell us what it tells all countries in this situation: recovery will fail unless we break the financial oligarchy that is blocking essential reform. And if we are to prevent a true depression, we’re running out of time.


But these various policies — lightweight regulation, cheap money, the unwritten Chinese-American economic alliance, the promotion of homeownership — had something in common. Even though some are traditionally associated with Democrats and some with Republicans, they all benefited the financial sector. Policy changes that might have forestalled the crisis but would have limited the financial sector’s profits — such as Brooksley Born’s now-famous attempts to regulate credit-default swaps at the Commodity Futures Trading Commission, in 1998 — were ignored or swept aside.

The financial industry has not always enjoyed such favored treatment. But for the past 25 years or so, finance has boomed, becoming ever more powerful. The boom began with the Reagan years, and it only gained strength with the deregulatory policies of the Clinton and George W. Bush administrations. Several other factors helped fuel the financial industry’s ascent. Paul Volcker’s monetary policy in the 1980s, and the increased volatility in interest rates that accompanied it, made bond trading much more lucrative. The invention of securitization, interest-rate swaps, and credit-default swaps greatly increased the volume of transactions that bankers could make money on. And an aging and increasingly wealthy population invested more and more money in securities, helped by the invention of the IRA and the 401(k) plan. Together, these developments vastly increased the profit opportunities in financial services.

Not surprisingly, Wall Street ran with these opportunities. From 1973 to 1985, the financial sector never earned more than 16 percent of domestic corporate profits. In 1986, that figure reached 19 percent. In the 1990s, it oscillated between 21 percent and 30 percent, higher than it had ever been in the postwar period. This decade, it reached 41 percent. Pay rose just as dramatically. From 1948 to 1982, average compensation in the financial sector ranged between 99 percent and 108 percent of the average for all domestic private industries. From 1983, it shot upward, reaching 181 percent in 2007.

The great wealth that the financial sector created and concentrated gave bankers enormous political weight—a weight not seen in the U.S. since the era of J.P. Morgan (the man). In that period, the banking panic of 1907 could be stopped only by coordination among private-sector bankers: no government entity was able to offer an effective response. But that first age of banking oligarchs came to an end with the passage of significant banking regulation in response to the Great Depression; the reemergence of an American financial oligarchy is quite recent.