From: Brian Palmer Date: 2006-07-11T00:06:05+09:00 Subject: Re: Marshal's handling of floats Hey Robert, I have gone with another solution but just as an aside -- we're talking about the Marshal class, not YAML. I definitely wouldn't suggest storing anything in YAML as binary data :) -- Brian On Jul 10, 2006, at 1:50 AM, Robert Klemme wrote: > Brian Palmer wrote: >> Hi Ara, >> >> The 'g' and 'G' flags for Array#pack/String#unpack are in network >> byte order, so they're in a platform-independent format, as far as I >> know. I actually tested this by Packing a couple thousand floats on >> my Mac, sending them in UDP packets and unpacking them on my AMD64 >> desktop, they all came across correctly. > > Yeah, but I still see serious drawbacks of your proposal: > > - it will break existing code (YAML data) > > - it's not human readable which is one of the key advantages (YAML > files seem to be frequently written by hand as a nice user > interface to config data) > > - it's not portable and it might not be compliant with YAML spec > > In sum all these are serious showstoppers for a general change of > YAML behavior. > > Another solution - if you want to make use of this: AFAIK you can > customize YAMLfication of classes. If that was true, you can > pretty easily perform the conversion during to conversion to and > from YAML. That would be the way to go IMHO. > > Kind regards > > robert > >