Archive for December 13, 2010

Monday, December 13, 2010 [Tweets] [Favorites]

Derivative Parsing

Matthew Might and David Darais (via Lambda):

This work introduces parsers based on the derivative of context-free languages and upon the derivative of parser combinators. Parsers based on derivatives meet all of the aforementioned requirements: they accept arbitrary grammars, they produce parse forests efficiently (and lazily), and they are easy to implement (less than 250 lines of Scala code for the complete library). Derivative-based parsers also avoid the precompilation overhead of traditional parser generators; this cost is amortized (and memoised) across the parse itself. In addition, derivative-based parsers can be modified mid-parse, which makes it conceivable that a language could to modify its own syntax at compile- or run-time.

An interesting approach. The paper is actually called “Yacc Is Dead,” which I think is true in the sense that for a variety of pragmatic reasons most programmers today do not write their parsers using Yacc-style generators.

Update: Might has as follow-up blog post.

Please Turn Off Your Pseudocode Jokes

Jesper, on his new programming blog:

Programming jokes based on emulating code are not ever funny. They chafe at the mind of their target audience the way the question whether a conjoined twin has “bonded” with its fellow twin must be. Not only are they focused on the form instead of the meaning, they are tired and predictable and don’t bring along insights nor laughs.

Saving Documents by Proxy

Lukas Mathis:

In many cases, simply dragging an icon to save a document is much more convenient than using the «save document» file browser and searching for a directory whose window you’ve probably already opened in the Finder.

And, actually, when I do use the standard save panel I often choose the location by dragging my destination folder into the panel, rather than using the panel’s built-in file browser.

Google Maps & Label Readability

Justin O’Beirne (via Jasper Hauser):

Google uses a variety of techniques and visual tricks to help make its city labels much more readable than those of its competitors. From the use of different shadings to the decluttering of areas outside of major cities, it sure seems like Google has put a lot of thought into how it displays the labels appearing on its maps.

I also enjoyed his posts on Google Maps’s corporate logo icons and the clutter in Apple’s online store.

LittleIpsum Rejected From Mac App Store

Dustin Senos:

LittleIpsum v1.1.1 has been officially denied at the Mac App store due to not meeting the following guideline:

2.8 Apps that are not very useful or do not provide any lasting entertainment value may be rejected

It actually seems like a useful and polished little program for generating placeholder text. Fortunately, Mac software is still available outside the App Store.

Some Notes on Threading

Brent Simmons:

KVO is a trickier thing. Here’s how I handle that: anything happening in a background thread is not observable (by convention). Whatever is going on is private. When it’s time to set public stuff, stuff that could be observed, those things are set on the main thread.

Some good techniques for keeping things simple.

One Man’s Realistic Backup Strategy

Michael B. Johnson (via Daniel Jalkut):

[For] less than $300, you can have a pretty fool proof backup scheme for all but the craziest home setup. I have, I like to think, one of the crazier home Mac setups, and so I thought I’d share my current specifics.

I also recommend the Western Digital Caviar Green drives for backups. With 2 TB bare drives now at $90 and a variety of good “toaster” docks to choose from, there’s little excuse not to rotate through several hard drive clones.