Older blog entries for Monty (starting at number 3)

I've been having quite a bit of fun goofing off and programming my entry for Bruce Sterling's Embrace Decay Contest. The contest starts with a 612x800 jpeg of a typing excersize. The contest is to make a series of images that will fade to each other, showing decay.

I started with Diffusion-limited aggregation and then tweaked it to get something interesting. Take a look at my entry! I used to work at Trilobyte, a game company Graeme Devine cofounded. I had forgotten how much fun it is to program graphics. And how tedious. Consider entering.

My other claim to fame in the ANTLR world is the AREV to VB translator I wrote. This was not open source, but it was a whole lot of fun! AREV BASIC is a knockoff of PICK BASIC. There were no reserved keywords; IF IF=ELSE THEN ELSE=IF ELSE IF=ELSE is valid code; it used less-than and greater-than in condtions as well as delimiters for array access; a CASE statement really translated to a series of IF/ELSE statements, etc.

In the end I translated 240,000 lines of AREV into VB with an eight-pass translator. Each pass was an ANTLR tree parser which transformed the tree a bit at a time. One of the really cool things about trees and ANTLR's subclassing was having a supergrammar with rules for both AREV and VB in the same tree (using distinct node types) and as I translated I would have a tree with both languages represented. Each pass would inherit from that supergrammar and then specialize certain rules to have translation actions. For instance one pass would change expressions into VB-compatible expressions but leave control structures as AREV. Each intermediate stage was a mixture of AREV and VB nodes in the tree, but the tree parser could handle both simultaneously because each node has a type. Try writing a parser that simultaneously parses two languages -- you can't because you don't know if that IF is from AREV or VB. But in a tree you know because you have the type as well as the text.

Although what I did was essential, the real work was done by nine others who wrote the VB libraries to emulate AREV functionality such as screen handling or string processing. My part of it was definately the most fun, though! Read my article about this project at http://www.codetransform.com/fun_with_antlr.html

My favorite tool is ANTLR. It implements lexers, parsers and tree parsers via the same conceptual framework: LL(k) analysis. The generated code is designed to be very close to what you would write by hand, which makes it straightforward to debug and understand. ANTLR is a tool for programmers by programmers, with an emphasis not on theory but on problem solving.

My main contributions have been some source code, including an ANSI C and GCC C translation framework including lexer, parser, tree parser, and tree emitter. The GCC Translation Toolkit goes from preprocessed source to tree and back to source and makes it easier to get to the fun part -- the actual translations.

I'm also the primary answerer of questions on the antlr-interest list, which is currently the main forum for ANTLR questions. I have a lot of fun solving those types of problems.

Also, thanks to Bram for pointing out BitTorrent for movie distribution. If I understand correctly, it seems BitTorrent is best suited to a "release" instead of occasional downloading, but I'll still make sure it's one of the primary options for getting it.

I've been researching p2p stuff to help distribute a movie I interned on, described on a page about Tom Hayes. So far Alluvium and Open Content Network look reasonable. The main thing I need is to reduce the bandwidth costs for distributing it.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!