From: why the lucky stiff <yaml-core@wh...> - 2003-07-26 19:09:36
I've just completed a short tutorial for YAML beginners called "YAML in
Ruby 1.8.0 Preview 4 was just released and the final release is due on
approx. July 31st. As many of you know, this next release of Ruby will
include native support for YAML parsing and emitting.
I've spent a bit of time working on the wiki site
[http://yaml.freepan.org/]. I'd like to start targetting beginners to
YAML with very basic sets of tutorials, explaining YAML in simple terms
without treating people like idiots. Then, hopefully, move on to more
involved tutorials, eventually building a solid set of documents for
people who don't want to read the spec or the cookbook.
Please check out the Five Minute tutorial and let me know if it's too
simple or too much. Does the name fit? Is it a proper introduction?
Things like that.
From: why the lucky stiff <yaml-core@wh...> - 2003-07-27 01:13:26
mso@... (mso@...) wrote:
> The tutorial is great but I think the !omap example needs to be expanded.
> You're presenting two topics at once. One is the one-item-dict-in-list
> syntax, which is YAML's way of handling ordered dicts (or duplicate dicts,
> not that you want to mention that). Whether you use !omap or not, the
> value is legal YAML. Without !omap you'd get a list of one-item dicts,
> which you can then convert yourself to another data structure.
Yeah, I guess that example might have a bit much. I suppose I wanted a
light introduction to transfer methods and I figured that would be a
good place to do so. But I don't want it be confusing, which could be
the case. I'm sure someone will think, "But what is this example if the
!omap is left off?"
Anyone have suggestions for improving this section? Cut the transfer
method? Go with something simpler?
From: why the lucky stiff <yaml-core@wh...> - 2003-07-27 05:04:11
I'm going to use your recommendation below and separate types into a
As for private types, I've left governance of those types up to the
user. They can add a handler if they like, but I think the namespace is
designed to be left completely open for the user.
Although I know Showell used '!!include' for adding references to
external documents. I'm not sure if this was on by default or not. I
guess I need to play with PyYaml again.
mso@... (mso@...) wrote:
> I would put the ordered dict without the transfer method first, and say
> it's moderately useful. Then add a minute after that with the transfer
> method and say here's how it can be more useful. Then talk about how
> transfer methods can be used to give YAML a hint which data structure to
> use, and show how !omap yields a list of pairs or whatever it does in
> You can have a second and third set of five minuteses for more advanced
> topics. That would be the place to get into universal types (!omap) vs
> language-specific types (!php/array) vs private types (!!custom_class).
> (BTW, for private types, does the parser just assume it can "import
> custom_class" and find a same-name class? I think that's what PyYaml
> curently does.)
> -- Mike Orr (mso@...)
* mso@... [2003-07-27T01:21:46]
> mso@... (mso@...) wrote:
> >> You can have a second and third set of five minuteses for more advanced
> >> topics.
> The second one could be titled, "Five More Minutes with YAML". :)
"Yet Another Five Minutes with YAML."
From: why the lucky stiff <yaml-core@wh...> - 2003-07-27 01:31:44
Rich Morin (rdm@...) wrote:
> I plan to go over both this document and the YAML Cookbook, making notes
> and such. I'll let you know what I find. My initial reaction to the
> Cookbook is that it needs to be cloned/extended to cover Perl, Python,
> etc. Do you have a preference for how this is done?
The Cookbook is generated from our testing suite, which contains some
Perl and Python examples as well. I'll get up a complete version soon.
> http://www.yaml.org gives mixed messages on whether Syck supports Perl. Can
> you point me to a simpleminded installation procedure that should get
> me up and running with it on FreeBSD and/or Mac OS X?
There is currently no Syck binding for Perl. Although, Iain Truskett
was working on a binding (I think -- I may be way off).
You can download the Syck distribution at:
There are instructions for installing Syck and the PHP, Python and Ruby
extensions inside the tarball.