News for hackers. Stuff that matters.

GeneThomas

Re:New better alterative to XML, JSON and YAML on Monday November 18, 2024 @11:07PM (#42180030)
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 on Monday November 18, 2024 @11:03PM (#42180013)
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

They are for less than and greater than in mathematics!? They are good in markup for a number of reasons including that they stand out.
Re:New better alterative to XML, JSON and YAML on Monday November 11, 2024 @02:19AM (#42105105)
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.

  <Book>
      <Name=A Plan>
      <Author>
          <Name=Eric Harrison>
          <Mobile=+64 24 240 990>
      <$>
      <<Reviews>
          Fascinating.
      <&>
          Of interest.
      <&>
          Worth reading.
      <$>>
  <$>
Re:New better alterative to XML, JSON and YAML on Sunday November 10, 2024 @10:22PM (#42104364)
> * Native support for arrays. I mentioned a few above. `<<Faults$$>>` 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 relates to starting an array, $>> 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:

    <PurchaseOrder>
        <ItemsOrders>
            <Item>
                <ItemID>aaa111</ItemID>
                <ItemPrice>34.22</ItemPrice>
            </Item>
            <Item>
                <ItemID>bbb222</ItemID>
                <ItemPrice>2.89</ItemPrice>
            </Item> 
        </ItemsOrders>
    </PurchaseOrder>
Where the array is marked up as two sub elements both called <Item>:

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

  <PurchaseOrder>
      <<ItemsOrders>
          <ItemID=aaa111>
          <ItemPrice=34.22>
      <&>
          <ItemID=bbb222>
          <ItemPrice=2.89>
      <$>>
  <$>
The elements may be scalars so

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

  <PurchaseOrder>
      <<ItemsOrders$$>>
  <$>
Re:New better alterative to XML, JSON and YAML on Friday November 08, 2024 @05:45AM (#42085840)
I emboldened the <code> 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 on Thursday November 07, 2024 @08:55PM (#42083347)
> 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 on Thursday November 07, 2024 @08:53PM (#42083335)
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 on Thursday November 07, 2024 @08:44PM (#42083279)
There is the concept of “well formed xᴇɴᴏɴ” as outputted by the ᴅᴏᴍ and serializer which is deterministic as will suffice for canonicalization.
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:39PM (#42083255)
Specific points would be a contribution to the discussion.
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:37PM (#42083249)
The charset is not published, when it does eventuate byte order marks safeguard the interpretation of documents.
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:35PM (#42083241)
See https://news.ycombinator.com/item?id=42038004#42082571

Xᴇɴᴏɴ provides semantics around common data types.

Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:31PM (#42083210)
> angle brackets are generally considered bad for the data serialization.

Not a point.

Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:30PM (#42083203)
Thanks
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:29PM (#42083200)
That is the only place that I have stated xᴇɴᴏɴ’s applicability to configuration and data.
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @08:26PM (#42083174)
Appears to be a bug in your browser. See the embedded css, the <code> block are the same font size just Courier New or a monospace font.
Re:New better alterative to XML, JSON and YAML on Thursday November 07, 2024 @06:59PM (#42082571)
> 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 INTEROPERABILITY! That is different implementations of xᴇɴᴏɴ agree on what a ɢᴜɪᴅ or date looks like! Fʏɪ, with a good implementation of xᴇɴᴏɴ you just point the library at your data, sometimes augmented with some attributes, and you get cleanly formatted markup.

>>One should be able to guess an ᴀᴘɪ.

> For the second, API for what?

Say you are using an ᴀᴘɪ for information about a person and their is information about their height, in xᴇɴᴏɴ one knows there shall be a scalar called “Height”, in xᴍʟ it may be an attribute or a sub element.

>> Yes. Human have to read markup.

> Format should not care too much.

We are using text formats because they are READable to humans.

> Separate digits with underscores or spaces.

That is not standard anywhere.

> [...] color highlighting

Only the application knows if a scalar is a number or a string.

There are no obvious design flaws. Take xᴍʟ, add an array type and xᴇɴᴏɴ results.

We must be talking a cross purposes re formatting. [phew...] An application has an object called Person, and a field called Height with a type of double. C♯: Person fred = new Person { Height = 1.67 }; string xenon = XenonStart.Serialize("person", fred), results in the string "<person><Height=1.67><$>". A xᴇɴᴏɴ implementation in another language, say JavaScript can take that xᴇɴᴏɴ string and decode it into an object with a field called Height with a value that can be decoded .AsNumber into 1.67; because there is a standard for encoding a ɪᴇᴇᴇ 64 bit number/.net double/JavaScript number.

Xᴇɴᴏɴ has more benefits.

Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:24PM (#42072651)
Have you?

And they are quite different!

Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:21PM (#42072621)
Made them lighter so more legible.
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:05PM (#42072508)
No; I don’t believe so.
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:03PM (#42072493)
Make a point.
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:03PM (#42072488)
Odd
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @09:01PM (#42072478)
I conject that with programming languages that do not crash schemas used for validation are relatively unimportant. xᴍʟ schemas suffer from the fact that one can not specify that an element may only appear once.
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @08:58PM (#42072461)
Make a point
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @08:57PM (#42072455)
Xᴇɴᴏɴ excels at both.
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @08:56PM (#42072450)
irrelevant
Re:New better alterative to XML, JSON and YAML on Wednesday November 06, 2024 @08:54PM (#42072437)
You mean ʜᴛᴍʟ is not used a such.

Older »