The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Vooly

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christian Neukirchen

Posts: 188
Nickname: chris2
Registered: Mar, 2005

Christian Neukirchen is a student from Biberach, Germany playing and hacking with Ruby.
Vooly Posted: Mar 28, 2005 3:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Christian Neukirchen.
Original Post: Vooly
Feed Title: chris blogs: Ruby stuff
Feed URL: http://chneukirchen.org/blog/category/ruby.atom
Feed Description: a weblog by christian neukirchen - Ruby stuff
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Christian Neukirchen
Latest Posts From chris blogs: Ruby stuff

Advertisement

This is one of these ideas I wished I had about a century ago, because the “world” would have been much better then. I’m talking about my new metalanguage. “Oh, no!”, I hear you scream… “Not another metalanguage! Isn’t it enough we already have XML and YAML and OGML and RLML?”

Yes, you have. And they solve their job. XML is a ok format for writing websites and manuals, but it sucks for RPC, for example. YAML is a nice format for config files, but I don’t like indenting all my text. Every metalanguage was made with a reason, and that (at least, should) be the part where it’s really good at. For the other parts, most languages suck.

Vooly surely is no difference here. It was made by me to allow for expressing hierarchical, as free-form as possible data with low cost of markup (almost no escaping), userfriendlyness (you can learn the language in 2 minutes, I promise) and extremely (not to say trivial) implementation. I already wrote two implementations of it in Ruby, one Push-API and the same again for pulling. Both are about 30 lines of pretty Ruby. :-)

Vooly is soo damn easy, everyone can pick it up in two minutes. A Vooly document is a text file, for example, let’s markup an recipe:

Cuba Libre
- 2 ounces Rum (White)
- 3/4 ounce Lime Juice
- 5 ounces Cola
Put lime juice and a twist of lime into highball glass. Add
rum and fill with cola.

Now, let’s markup the different parts of the document, by surrounding them with << and >>:

<<
  << Cuba Libre >>
  <<
     << 2 ounces Rum (White) >>
     << 3/4 ounce Lime Juice >>
     << 5 ounces Cola >>
  >>
  <<
     << Put lime juice and a twist of lime into highball glass. >>
     << Add rum and fill with cola. >>
  >>
>>

Now, add information about what’s between the tags by writing it directly after the tags where this makes sense:

<<recipe
  <<drink Cuba Libre >>
  <<ingredients
     << 2 ounces Rum (White) >>
     << 3/4 ounce Lime Juice >>
     << 5 ounces Cola >>
  >>
  <<steps
     << Put lime juice and a twist of lime into highball glass. >>
     << Add rum and fill with cola. >>
  >>
>>

That’s it, you’re done! See, Vooly is soo easy. :-)

With this knowledge, you can apply Vooly to just about everything. Make your own Vooly-RSS, Vooly-RFC822, Vooly-DocBook today! (Don’t forget converters to take over the world :-))

Heck, you can even embed XML or YAML if that makes sense to get your job done. There shouldn’t be any escaping problems, simply stuff your things in there. (I need to further specify what happens if you want to insert <<, a rather rare sequence of chars in ordinary text.)

Ruby libraries to do cool stuff with Vooly are soon to come.

NP: Bob Dylan—Tomorrow Is A Long Time

Read: Vooly

Topic: Rails 0.11 Previous Topic   Next Topic Topic: RubyConf2005 Preregistraion Now Open

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use