YAML
5th December 2002
I forget quite how I got there, but the other day I found myself reading about YAML—YAML Ain’t Markup Language. It looks really interesting. YAML aims to be an easily human readable format for storing and transferring structured data—so far, so XML. Where it differs from the IT world’s favourite buzzword is that YAML is specifically designed to handle the three most common data structures—scalars (single values), lists and dictionaries. Here’s a sample (taken from the official specification):
Time: 2001-11-23 15:01:42 -05:00 User: ed Warning: > This is an error message for the log file
YAML has a number of obvious influences, including Python and MIME. Implementations already exist for Perl, Python and Java. XML-RPC aptly demonstrates how powerful the combination of lists, dictionaries and arrays can be for exchanging data between different systems and YAML looks like it offers a very nice alternative to XML based data structure syntax. I have to admit to being slightly concerned by the length of the specification—while YAML is definitely human readable it looks like it could take a while for a human to learn to write it. Then again, the actual generation of the format is meant to be handled by computers (I imagine that humans will make simple edits to YAML files more often than they create them from scratch) so the complexity of the more advanced parts of the specification is probably not too much of a problem.
More recent articles
- Claude 3.5 Haiku - 4th November 2024
- W̶e̶e̶k̶n̶o̶t̶e̶s̶ Monthnotes for October - 30th October 2024
- You can now run prompts against images, audio and video in your terminal using LLM - 29th October 2024