Live data from Hacker News

New better alterative to XML, JSON and YAML

xenondata.org

141–148 of 148 posts

Re: New better alterative to XML, JSON and YAML

#141

Earlier quoted context omitted.

You misunderstand. Given that data MAY be a graph structure, the markup MUST support that. A tree with pointers to the parent nodes has a graph structure, a common enough occurrence.

Data MAY also include Egyptian hieroglyphs not encoded in Unicode. Does it mean that the markup MUST support them as well? I bet not. No format can natively support every possible data structure; serialization formats only have to support enough of them to which remaining structures can be isomorphically mapped. > a common enough occurrence Do you have a concrete figure about "common enough"? Otherwise we are only ta…

The point is one can apply the xᴇɴᴏɴ library to arbitrary data and generate representative markup. For “Egyptian hieroglyphs not encoded in Unicode” 𓀠 one can write plug-ins.

Re: New better alterative to XML, JSON and YAML

#142

Earlier quoted context omitted.

> why did you use comma instead of other characters for grouping? Because English is the global lingua franca > I like to hear why then Unlike Unicode xᴇɴᴏɴ must be defined in one grammar. Having special names, like $type, and hoping no language uses them is fragile.

> Because English is the global lingua franca But English is not the largest language in terms of the number of speakers. I speak Korean for example and three-digit grouping is unnatural in Korean, which uses myriads instead. I guess Xenon is designed to be not comfortable for the vast majority of people including me then? > Having special names, like $type, and hoping no language uses them is fragile. I was not prop…

> I guess Xenon is designed to be not comfortable for the vast majority of people including me then?

You seem fairly comfortable with the rest of English. Korean numbers do not seem to scale well.

> allow `$` or not requires a single example

Java allows $ in identifiers.

Re: New better alterative to XML, JSON and YAML

#143

Earlier quoted context omitted.

Bit easier to read not but the code text is still smaller and doesn't fill the phone screen; https://u.numerlor.me/Qzsq fwiw

Appears to be a bug in your browser. See the embedded css, the block are the same font size just Courier New or a monospace font.

I emboldened the blocks a little. Looks good on Chrome on iPhone but not Edge nor Safari. :o|

Thanks.

Re: New better alterative to XML, JSON and YAML

#144

Earlier quoted context omitted.

> It is a tidier solution. Based on special syntax. You're about to introduce node attributes. > They are common in data. I use tables everyday. May I have "first-class graph support" but for tabular data that is very common as well? I expected three or four times you eventually explain what makes the graph support and how it differs from declaring ids and refs in other formats you think are worse than yours. No answ…

> You're about to introduce node attributes. Yes, but limited to #id and :type. > tabular data that is very common as well? Xᴇɴᴏɴ has first class arrays also so tabular data could be stored as such. > explain what makes the graph support and how it differs from declaring ids and refs in other formats you think are worse than yours. No answer. It is built in! > So why would it care the formatting at all? FOR INTEROPER…

> * Native support for arrays. I mentioned a few above. `>` and `>` -- guess what these two mean if you see this first time? You would never guess. It's an empty array and an empty element, you've just failed.

> means it is the end, $$ meaning something else — an empty array!

The xᴍʟ alternative is a bodge:

    public class PurchaseOrder
    {
        public Item[] ItemsOrders;
    }

    public class Item
    {
        public string ItemID;
        public decimal ItemPrice;
    }
serializes to:

    
        
            
                aaa111
                34.22
            
            
                bbb222
                2.89
             
        
    
Where the array is marked up as two sub elements both called :

Xᴇɴᴏɴ has first class support for arrays:

  
      
          
          
      
          
          
      >
  
The elements may be scalars so

  
      
      >
  
has an array with one item of the empty string. So a separate syntax for empty arrays is required!

  
      >
  

Re: New better alterative to XML, JSON and YAML

#146
post #14

> Readable multiple line indented text. Then > Fascinating. Of interest. Worth reading. Does that look readable to anyone?!

I believe it is readable, what else could that mean but a Book object with the given name, the author details and an array of three one-line reviews.

  
      
      
          
          
      
      
          Fascinating.
      
          Of interest.
      
          Worth reading.
      >
  

Re: New better alterative to XML, JSON and YAML

#147

Earlier quoted context omitted.

> Because English is the global lingua franca But English is not the largest language in terms of the number of speakers. I speak Korean for example and three-digit grouping is unnatural in Korean, which uses myriads instead. I guess Xenon is designed to be not comfortable for the vast majority of people including me then? > Having special names, like $type, and hoping no language uses them is fragile. I was not prop…

> I guess Xenon is designed to be not comfortable for the vast majority of people including me then? You seem fairly comfortable with the rest of English. Korean numbers do not seem to scale well. > allow `$` or not requires a single example Java allows $ in identifiers.

I have silenced all criticism.

The new Xenon Design Rationale shows how Xenon is the best data description language.

https://xenondata.org/xenon-design-rationale.html

Comment at https://news.ycombinator.com/item?id=42178359

Re: New better alterative to XML, JSON and YAML

#148

Earlier quoted context omitted.

Grudgingly ha ha. As per https://xenondata.org Xᴇɴᴏɴ is more terse than even ᴊꜱᴏɴ and has the advantages listed in first paragraph.

I shall elaborate on the first paragraph of the web page: • Terse. Xᴇɴᴏɴ is as terse as ᴊꜱᴏɴ using 3 characters per scalar value rather than ”key”:value, (4) or ”key”:”value”, (6). Xᴇɴᴏɴ is significantly more terse than xᴍʟ value (5+len(key)) around 10. • Readable multiple line indented text. ᴊꜱᴏɴ does not support multiple line text, forcing one to escape newlines as ‘\n‘. xᴍʟ looks messy with multiline line text as…

I have silenced all criticism.

The new Xenon Design Rationale shows how Xenon is the best data description language.

https://xenondata.org/xenon-design-rationale.html

Comment at https://news.ycombinator.com/item?id=42178359

Post reply on HN