On Mon, 09 Jan 2006 15:02:20 +0100, Thomas J. Boschloo wrote:
>> The thing is, I'm not convinced of the point of RFC 1014, it could be
>> summarized as saying "write the raw standard numbers, making sure that the
>> hardware copes with byte endianness, and you swap the data to big-endian
>> if necessary".
>
> I would swap the octets at all times. It is just that on a G4 processor
> the function you use does absolutely nothing. But on a Pentium II it
> becomes active due to a compiler option.
I suppose. But that's only useful works when your target endian format is
big-endian, which is getting a lot less popular, and so will only be
useful for our own unique data files.
Anyway, the serialization code we're using does all the endian stuff
automatically. The most efficient way to do it is probably to always use
native endianism, though, and note at the start of the file which
endianism it was saved using - because people are going to be
importing/exporting stuff on their own computers far more often than
they're going to be sharing them with people using other endianisms. The
X11 protocol does that, for example.
> You want your saved norns to be exportable to all platforms.. Not just
> Intel
And you do need two different processors (in the endian way)
> to test if your code works..
I'm on powerpc, which is big-endian. Everyone else involved is on
little-endian, pretty much. All the Creatures data files are little-endian
ones because they coded it on x86 and gave no thought to portability. So I
know how annoying endian issues are, trust me. It shall be tested.
