On May 27, 2011, at 8:53 AM, Anders F Björklund wrote:

> Jeff Johnson wrote:
> 
>> The claim "mapping is not ordered"  actually isn't true.
>> 
>> Header tags _ARE_ ordered, just the collation isn't
>> what no brainer conversions into native data types
>> are implementing.
> 
> I was referring to the actual YAML output...
> 
> Currently it is outputting:

And the collation is integer numeric based on tag numbers.

> ac0c428101b6ea299e5d42b7c242c91c059b02c4:
>  Name:        rpm
>  Arch:        i586
>  Version:     5.3.9
>  Epoch:       1
>  Release:     0.20110330.6
>  ...
> 
> If this was to be an ordered mapping, it needs:
> ac0c428101b6ea299e5d42b7c242c91c059b02c4: !!omap
>  - Name:        rpm
>  - Arch:        i586
>  - Version:     5.3.9
>  - Epoch:       1
>  - Release:     0.20110330.6
>  ...
> 
> So the YAML parser was failing at input ?
> 

There's a s superficial and a deep answer here.

SOmehow it needs to be indicated that header speawage
is _NOT_ random, but rather carefully sorted in many
ways.

The "LSB packaging standard" totally blew it with respect to
tag ordering.

And the spewage -- if not carefully controlled -- will be useless
for RPM itself, whose task is to import/export through speawage
into a "header" blob.

>> But it hardly matters with spewage, fewer tokens to ask
>> about KISS simplicity trumps everything else in FL/OSS.
> 
> For the YAML and JSON formats, it's easier unordered.

Easier for whom? Lusers who don't undertsand what
"canoniocally represented plaintext" actually means?

Or why sorted data can be accessed in logN not linear time?

> And I think the XML would need a DTD, to do ordering ?
> 

No idea what XML "needs". I do know from rpmrepo that
its _IMPOSSIBLE_ to be bit for bit compatible because
tag data is being run through a python dict which
_DESTROYS_ the ordering of the original data.

> i.e. XML does ordering now, but I think a parser is
> "free" to reorder the elements without invalidating ?
> 

Please note that I'm disagreeing with your patch whatsoever.

But somehow and somewhere it needs to be hinted to all
the "spewage suckers" that there are most definitely
performance and interoperability wins by establishing
a sorted and canonical ordering on the spewage items.

Yes I know how to use qsort(3) wherever needed. I'm enetrested
in proper spewage specification on which it becomes feasible
to define digests/signatures and simplify interoperability
and implementations. And most definitely I'm not holding my breath
waiting for FedEx to ship me a pony ...

73 de Jeff
> --anders
> 
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to