Archive

Archive for October, 2007

The pain of having competitors

October 5th, 2007 Josh 2 comments

Today I happened to be googling about parsing, and I came across GOLD: Grammar Oriented Language Developer. It’s a parsing system that takes my approach of separating grammar definition from the grammar actions. Except it’s been around since 2002. Agh!

Immediately I go on the defensive and think about what it doesn’t have that I will have:

  • it’s based on LALR, which based on people’s general attitude towards YACC, makes for some really unfriendly error messages (reduce-reduce conflict, uh, wha..?) and unnatural looking grammars.
  • no JIT
  • author hasn’t figured out that you just plain need an imperative language sometimes. for example, there is no way anyone is going to implement the JSON’s encoding auto-detection (section 3 of the JSON spec) in straight BNF.
  • immature/incomplete encoding support. says it supports “Unicode”, but makes no mention of what encoding(s) it supports (UTF-?), and some of the language runtimes (like C) don’t support non-ASCII encodings at all
  • builder is closed source, and Windows-only
  • it takes the approach of writing the parsing runtime in each supported language, instead of wrapping a high-performance C/JIT version.
  • doesn’t appear to have a strategy for doing whitespace-preserving transformations

In spite of all this, I’m still annoyed that I haven’t heard of this project until today.

The stakes are getting higher for me. I’ve now invested many months worth of spare time into this, because my vision is that the end product will be the best product of its kind out there. If something comparable already exists, then my time has been wasted, and time is about the most valuable currency there is.

This happened once before, when I discovered SDF. I simultaneously felt annoyed that this project isn’t better publicized, worried that I had been wasting my time, and an urge to differentiate my work.

Whenever this happens, I always find my solace by thinking about the MP3 decoding library MAD. When MAD came out, the state of MP3 decoding engines was kind of like the state of parsing engines today: there were several of them floating around which were decent but had problems. One day Rob Leslie released the first version of MAD, and it was just plain better than everything else. It was faster, more accurate, more portable. Almost overnight everyone dropped whatever they had been using and switched to MAD. Now everyone uses it.

The lesson I take from this is: there’s always room at the top to do something better, especially if the existing contenders are lackluster.

Categories: Gazelle Tags: