Re: Is % a valid string? Different behaviour of Syck and libyaml!

Ingy dot Net <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <CAHJtQJ53JvzOwPYhSKSZgj8pQLALZ97fxkxazkj+aagXNUnSZg@mail.gmail.com>
Oren is correct of course, but this brings up 3 issues related to YAML2 to
me.

The first is that this is a common problem in the YAML ecosystem. The
various implementations have various incompatibilities. Implementations
using libyaml are probably the most consistent, but even there there is
room for error. libyaml is only parser/emitter, and is only 1.1 with some
liberties taken by Kirill when the spec did not make sense. Most
loader/dumpers are at least true to themselves. ie they can load what they
dump. You should compare how psych and syck are dumping as well as
loading...

The second is that we really need a common and growing test suite that can
be run against all the implementations to see where they stand. A
comparison chart would be a nice fallout. Like this one for Perl 6
http://perl6.org/compilers/features

Lastly, I think that YAML 2.0 should be a lot more forgiving. For instance,
just because '%' is a directive indicator doesn't mean it needs quoted
except in top level keys (beginning in column 1).

I plan to write some more 2.0 proposals this weekend that have been brewing
lately.

Ingy

On Thu, Nov 24, 2011 at 8:16 AM, Oren Ben-Kiki <[email protected]> wrote:

> % is an "indicator" character so it can't be the first in an unquoted
> (plain) scalar. Therefore syck is wrong in accepting it.
>
> Have fun,
>
>     Oren Ben-Kiki
>
>
> On Thu, Nov 24, 2011 at 4:29 PM, j.wuttke <j.wuttke-97/[email protected]> wrote:
>
>> Is this valid YAML:?
>>
>> ---
>> testtext: %
>> ...
>>
>> It is parsed without difficulty by Ruby1.8 (Syck based)
>> whereas it fails under Ruby1.9.1 (psych -> libyaml).
>>
>> By the way, the web site yaml.org says psych is "in Ruby
>> core for 1.9.2". I suggest to correct this into "since 1.9.1".
>> (Or "since 1.9" ? I ignore whether it was present in 1.9.0)
>>
>> - Joachim
>>
>>
>>
>>
>> ------------------------------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------------------------
>> Forschungszentrum Juelich GmbH
>> 52425 Juelich
>> Sitz der Gesellschaft: Juelich
>> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
>> Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
>> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
>> Prof. Dr. Sebastian M. Schmidt
>>
>> ------------------------------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> Yaml-core mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/yaml-core
>>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Yaml-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/yaml-core
>
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.