YAML's Missing Type

The YAML processing specification defines, in concept, three basic node types: map, sequence, and scalar. In practice, however, the specification requires four: map, sequence, scalar, and string.

 This post looks at: first, why the specification has four types; then, whether typical parsers successfully handle all four types; finally: why it would be okay to simplify down to just three types: map, sequence, and typed string.

See full post...

Catalog Strategies

I've been working at some of the more fussy bits of my book's outline as of late.

One of the issues I keep stumbling on is where and how to introduce packages and catalogs. To get this worked out I thought I'd put my pen to paper ( fingers to keys? ) for a bit to formalize some of my thoughts.I don't expect this actual discussion to appear in the book, I'm gearing things there to be a bit more hands-on than this. Still, sometimes it's just useful to write...

See full post...


I've updated the formatting of a few posts, and fixed the most egregious spelling errors.

Thanks be to the Firefox auto-spell check ( though I honestly think my next mini-project will be an xml transform for Microsoft Word that will create posts straight from properly formatted doc files )

I've also added a short new page to the side bar about my book.
See full post...

About My Book

I'm largely keeping mum about my book until I've had a chance to have a real conversation with my publisher of choice. However, seeing as I have mentioned it in several different posts, I figure its worthwhile to say something here in the interim.

My book focuses entirely on the use of data in games, providing an introduction, for programmers both inside the industry and out, to a variety of everyday problems and their solutions. It's based on both my own personal experiences within the industry as well as a lot of research I've done over the past six months or so.

The writing part of the work is currently still only in the very beginning stages. I have what's known as a "talking outline" and have been working on some chapter samples as of late. If you look through my posts you will probably be able to gather that it will include a bit of Yaml, a bunch of C++, and, most likely, a dash of Python. I'm not sure yet how much of it will appear online.

At the very least, I'd like to have the raw source and descriptions of that source up here on the site. It depends a lot on the publisher of course, but I imagine I will likely stick with a dead trees format for the main content. Essentially, I'd like the site to be one project and the book to be another, but the two would ultimately complement each other.

We'll see. For now, though, you can take a look at my sample chapter: Chapter 8. Templates.
See full post...

A Simple YAML Parser

This post is part tutorial for, part documentation of, the Simple Yaml Parser.

The goal of this parser is to provide something that is simple to use, easy to understand, and trivial to duplicate. While I will talk a bit about the underlying implementation of the parser, this post focuses mainly on the parser's interface and how you go about using it.

For reference sake you can find more elsewhere about simple yaml and and complete yaml.

My first pass implementation of this parser requires the application to understand the basic structure of the data that exists in the file being read. This maps well on to C-like plain old data structures and provides an, albeit very basic, alternative to Syck for these data types.

See full post...

Syck and C/++

I've got a simple parser running that I will post up come Monday. First, some thoughts about Syck in C/++.

Syck does exactly what it sets out to do and does it well.

It's designed to efficiently translate Yaml into the data structures of dynamically typed languages: it's fast and has a fairly low memory overhead. It's fairly easy to use and there's a wide variety of languages that use it to drive parsing of Yaml documents: Python and Ruby to name two of the more popular ones.

For data in statically typed languages like C and C++, however, it's a bad match. The rest of this post examines why.

See full post...

In Search of a Simpler Yaml

As part of my continuing exploration of Yaml I'm putting together a rough spec for a simplified subset of Yaml. I will be updating it from time to time in order to give it a little more polish.

As part of this effort I am also going to put together a simple reference implementation which I will post here as well.

My overall goal is to put together a parser that is easy to understand and easy to duplicate. It won't be fast, and it wont be feature full. I do, however, want it to be completely compatible with the definitive Yaml specification.
See full post...

Simplified YAML

The Simplified Yaml format attempts to define the smallest whole unit of the Yaml language that's still meaningful.

This post introduces the simplified format, touching on areas that relate to the complete Yaml 1.1 Working Draft 2004-12-28 Specification ( "the spec" ) as a whole where appropriate. It's mainly targeted at programmers interested in understanding Yaml better, and is intended to help interested parties implement a simple yaml compliant parser quickly.

See full post...


I love YAML.

It's an easy to understand structural text format with a lot of promise for games. In my book I'm using YAML for all my examples because, even without in-depth explanations on syntax, people can intuitively grasp the meaning of simple YAML documents.

It's eminently grokable.

Yet YAML has a problem, primarily: one of adoption. Work on YAML began in 2001 and the first article that I've found went online in 2002. It has been around for six years, and still gets talked about, but after all this time, few, still, seem to be using it.

My measure of usage comes from a search of the net for articles, books, documentation, mailing list mentions, etc. It's possible that after writing this someone will come to me and show me secret YAML treasure trove, but it does appear I'm not the only one who feels this way. Why isn't YAML used more if it really looks so good?

See full post...

YAML Roadmap

What follows is an attempt to break the Yaml language down into meaningful chunks....

See full post...