Day 1: YAML

Today was my first "real" day. Sure I'd been over to work last week too, but that was not a full day and I spent a lot of it just getting set up. Plus I worked mainly on my thesis research (as I said before, we're going to continue that a little).

But today I worked a full day, literally nine-to-five, on the DIAL project. I'm still very much in the "how" phase; I'm just trying to figure out how I'll be doing it. Even the implementation platform isn't set in stone yet (I'm trying my best to get them to let me do it in .Net :) ).

One thing that I do know is that I need a way to communicate with the server, and so far that can be done in four ways: via the Perl modules, via a command line interface, via a web interface, and a YAML interface. Since my stuff won't necessarily be running on the main DIAL server the first two are out. A web interface that tries to communicate with a server through another web interface is too weird even for my tastes, so that leaves YAML. A brief look at YAML didn't reveal any problems with this.

Unfortunately, a detailed look reveals more than a few problems! For one thing, good YAML parsers are scarce. Really the only decent ones I could find are for Perl or Python. There is as far as I can tell only one parser for .Net and it doesn't work properly. That means I have two options: roll my own parser, or convince the DIAL guys to give me a different interface.

Since the YAML spec is very hard to read, and YAML in general is extremely hard to parse (it's designed for human-readability, severely compromising machine-readability), writing my own parser wouldn't be fun. The grammar for YAML is context-sensitive, determines scope by indentation, and has far too many ways to do the same thing. I could decide to limit myself to the subset of YAML that the server seems to be using, which makes it slightly more possible, but it's still not my first choice.

That leaves trying to get a different interface. I've briefly looked at the DIAL code, and the YAML generation is pretty much a matter of calling YAML::Dump from the YAML CPAN module. Which to me at least makes it seem like he could pretty easily use the XML::Dumper module instead. Here's to hoping.

Categories: University
Posted on: 2006-12-04 18:47 UTC.

Comments

No comments here...

Add comment

Comments are closed for this post. Sorry.

Latest posts

Categories

Archive

Syndication

RSS Subscribe