Háber János | 8 Dec 11:39 2006
Picon

W3C

Hi!

I'm new in YAML, but I think it's a great data exchange and 
configuration format. Possible to the W3C support that format?
I think it's more compact and readable than XML, so it's require less 
bandwidth, support some native types (sequence, map, boolean, date) and 
maybe the parser is faster.
It's better than JSon and XML for RPC/SOAP language (JSON not support 
binary tag, SOAP parsing is very slow),
and better than RSS/ATOM (More readable, binary support for images, 
compact, can handle references, 
http://www.intertwingly.net/wiki/pie/EchoExampleYaml)

Cow

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Gorm Haug Eriksen | 8 Dec 13:04 2006
Picon

Re: W3C

On Fri, 08 Dec 2006 11:39:59 +0100, Háber János <boci@...> wrote:

> I'm new in YAML, but I think it's a great data exchange and
> configuration format. Possible to the W3C support that format?
> I think it's more compact and readable than XML, so it's require less
> bandwidth, support some native types (sequence, map, boolean, date) and
> maybe the parser is faster.
> It's better than JSon and XML for RPC/SOAP language (JSON not support
> binary tag, SOAP parsing is very slow),
> and better than RSS/ATOM (More readable, binary support for images,
> compact, can handle references,
> http://www.intertwingly.net/wiki/pie/EchoExampleYaml)

Hi Háber,

There is nothing that prevents editors of W3C specification from using the  
YAML format today. E.g. the "Serializing SPARQL Query Results in JSON" [1]  
specification reference the JSON format.

Here in Opera we initially used YAML as the manifest format for our  
widgets/webapps. Although we had some good internal advocacy for the  
format, we ended up with XML since more developers are familiar with it  
[2].

Cheers,

- Gorm Haug Eriksen

[1] - <http://www.w3.org/2001/sw/DataAccess/json-sparql/>
[2] - <http://www.w3.org/TR/widgets/>
(Continue reading)

Háber János | 8 Dec 16:52 2006
Picon

Re: W3C

Hi!

Ok, XML is famiar, but why?
- It's a standard.
- It's have parser (and writer) for Any language (correct Yaml 1.1 
parser only found for ruby and python, the other parsers not support 
tags, or multidocument etc...)

And my oppinions in Q&A format :)
Q: Why use yaml of XML
A: Yaml more readable, support native formats, support references and 
smaller than XML

Q: Why use yaml for configuration instead XML or ini file
A: Ini file only support one level depth configuration with section, and 
not support native formats like boolean, XML is too robust, with slow 
parsing, and not too readable

Q: Why use Yaml instead of JSON
A: JSON is "almost" a slice of YAML. (Yaml parsers can parse most JSON 
documents). JSON is well for ajax but not too well for RPC data exchange 
formats because not support date, binary and others

Q: Why not use YAML in RPC and feed application and why use JSON
A: YAML is a poor supported in many language (except Ruby and Python), 
JSON is smaller than XML and it's parsing is faster and well supported 
(but not support binary and date types, so it's needed to handle in your 
application, example encodebinary data in base64 and decode in the 
client side, or send the time in timestamp or in string)

(Continue reading)

TRANS | 10 Dec 18:33 2006
Picon

control order emitting a hash?

this is a syck related question. is there a way to control the order
of keys when emitting a hash?

thanks,
t.

--

-- 
( o-
 //    trans.
/ /    transfire@...

People with courage and character always seem sinister to the rest.
--Hermann Hesse

       http://weblands.blogspot.com
       http://7ranscode.blogspot.com
       http://stampact.blogspot.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Clark C. Evans | 18 Dec 16:57 2006

Re: how close is YPath to the big-time?

Phlip,

The YPath in the syck distribution is something that got cooked up in a
few hours time, it really didn't have much review or work.  I'd love to
see further development work on YAML in the area of schemas and a more
formal YPath, but alas, I just don't have the bandwith at this time.

Cheers,

Clark

On Mon, Dec 18, 2006 at 04:38:50AM -0800, Phlip wrote:
| Yamleanos:
| 
| All I can find about YPath is some overlapping blog discussions about its 
| systax, and a brief implementation in YAML::Syck for Ruby.
| 
| These two questions are just to soften up the target. I will respond with 
| code samples as soon as they raise more questions.
| 
|  - Given a Syck::Map or similar object, how to
|     answer the question "what is my YPath"?
|     What is my location in the Tree of Life?
| 
| (By comparison, there's an amazingly complex but robust XPath &| XSLT 
| notation to beat just that information out of an XML ...)
| 
|  - What's the YPath notation, if any, to distinguish
|    two documents within one representation?
| 
(Continue reading)

Philip C. Plumlee | 18 Dec 06:42 2006
Picon

how close is YPath to the big-time?

Yamleanos:

All I can find about YPath is some overlapping blog discussions about its 
systax, and a brief implementation in YAML::Syck for Ruby.

These two questions are just to soften up the target. I will respond with 
code samples as soon as they raise more questions.

 - Given a Syck::Map or similar object, how to
    answer the question "what is my YPath"?
    What is my location in the Tree of Life?

(By comparison, there's an amazingly complex but robust XPath &| XSLT 
notation to beat just that information out of an XML ...)

 - What's the YPath notation, if any, to distinguish
   two documents within one representation?

Note these questions are coaxiomatic. If I knew the answer to one I could 
use it to answer the other! Yet if YPath is still in an "experimental" 
phase, I should learn soon not to lean on it more than I already do.

--

-- 
  Phlip
  http://www.greencheese.us/ZeekLand <-- NOT a blog!!! 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
(Continue reading)

Phlip | 18 Dec 13:38 2006
Picon

how close is YPath to the big-time?

Yamleanos:

All I can find about YPath is some overlapping blog discussions about its 
systax, and a brief implementation in YAML::Syck for Ruby.

These two questions are just to soften up the target. I will respond with 
code samples as soon as they raise more questions.

 - Given a Syck::Map or similar object, how to
    answer the question "what is my YPath"?
    What is my location in the Tree of Life?

(By comparison, there's an amazingly complex but robust XPath &| XSLT 
notation to beat just that information out of an XML ...)

 - What's the YPath notation, if any, to distinguish
   two documents within one representation?

Note these questions are coaxiomatic. If I knew the answer to one I could 
use it to answer the other! Yet if YPath is still in an "experimental" 
phase, I should learn soon not to lean on it more than I already do.

--

-- 
  Phlip
  http://www.greencheese.us/ZeekLand <-- NOT a blog!!! 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
(Continue reading)

Phlip | 19 Dec 03:48 2006
Picon

Re: how close is YPath to the big-time?

[Please fix the reply-to on this mailing list.]

Clark C. Evans wrote:

> The YPath in the syck distribution is something that got cooked up in a
> few hours time, it really didn't have much review or work.  I'd love to
> see further development work on YAML in the area of schemas and a more
> formal YPath, but alas, I just don't have the bandwith at this time.

No prob. As your official first customer, my system currently works, so if I 
get first dibs on its features, then leave the "specification" exactly as it 
is.

The system...

 - parse a document
  - iterate its objects
   - build a ypath based on the keys of maps,
      and the indices of sequences
    - stash all these in HTML as lists and tables

At test time, I pull all the IDs of my HTML items, and confirm that each 
YPath corresponds to the correct node in my sample data. I compare the 
values to see if they match. Hence, my system to generate YPath matches your 
system to use it.

I read the source to select, but not enough to detect what data inside Syck 
it's using. No worries.

After I publish the system I'm building, you will have a useful framework 
(Continue reading)

Phlip | 28 Dec 16:11 2006
Picon

nested omaps

YAMLists:

I'm playing with YAML where document-order is important.

test_yaml.rb doesn't cover Omaps.

This code parses correctly:

    sauce = "--- !map
- a:
  - !map
    sku         : BL394D
    quantity    : 4
    description : Basketball
- b: two"
    o = YAML::parse(sauce)
    p o.emit

If I change the first !map to !omap, the code still parses correctly.
But I need to depend on document order for the second-level nodes.

Changing the second !map to !omap then produces this syntax error:

YAML::Error: Invalid !omap: {"quantity"=>4,
"description"=>"Basketball", "sku"=>"BL394D"}
    /usr/lib/ruby/1.8/yaml/types.rb:98:in `yaml_initialize'
    /usr/lib/ruby/1.8/yaml/basenode.rb:211:in `transfer'
    /usr/lib/ruby/1.8/yaml/basenode.rb:211:in `node_import'
    /usr/lib/ruby/1.8/yaml/basenode.rb:211:in `transform'
    /usr/lib/ruby/1.8/yaml/basenode.rb:211:in `emit'
(Continue reading)

Clark C. Evans | 28 Dec 19:37 2006

Re: nested omaps

On Thu, Dec 28, 2006 at 07:11:09AM -0800, Phlip wrote:
|     sauce = "--- !map
| - a:
|   - !map
|     sku         : BL394D
|     quantity    : 4
|     description : Basketball
| - b: two"
|     o = YAML::parse(sauce)
|     p o.emit

I'm a bit puzzled why this works "out of the box" like that, since
a !map should require a mapping for its container.  The following
for example is an error, since it is passed a sequence,

  --- !map
  - one
  - two
  ...

I guess, when passed a sequence of key/value pairs, the !map constructor
is building an unordered dictionary for you... 

| If I change the first !map to !omap, the code still parses correctly.
| But I need to depend on document order for the second-level nodes.

Yes, this isn't a problem for the *first* level, since an ordered
mapping requires a sequence of pairs.  This is the usual form...

  --- !omap
(Continue reading)


Gmane