123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|536|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> Endianness -- do you care?

Sun, 15 Sep 2013, 02:18
HoboBen
Now that iMacs no longer use PowerPC, does anyone still care about Endianness?

Yes Network Byte Order is still big-endian -- in which case there are some portable functions like htonl to take care of this. But other than that?

I used to make the effort to take it into account but in any non-trivial application you usually end up using a library that only works on little-endian architectures anyway.

And I figure, without a big-endian system to test it on, this is all just extra dead code that might have bugs in it anyway.

Thoughts?

-=-=-
blog | work | code | more code
Sun, 15 Sep 2013, 02:36
Jayenkai
I think we're at a point where, in the majority of cases, this is something that can largely be ignored, but as with all things nowadays... "There's always one..."
If you can cater for all possibilities, then I say you probably should, just to be on the safe side. There's nothing worse than having "corrupt" data which is in fact perfectly fine, it's just been stored by a system using a different storage technique.
A quick tiny test, and a flag being set at the start of your data is all you really need, so it really is a trivial matter when you get down to it...
Whether you actually need it is anyone's guess!

Perhaps if you could build a quick test program that we could all run, to see if any of our systems actually do it? Would be interesting to see a nice bit of experimentation

-=-=-
''Load, Next List!''
Sun, 15 Sep 2013, 17:22
dna
What processors do the Macs use?
Sun, 15 Sep 2013, 17:40
HoboBen
These days it's Intel, but until 2006 they used PowerPC

-=-=-
blog | work | code | more code
Sun, 15 Sep 2013, 18:43
dna
So that means they should be able to emulate some of the windows software that is available out there.

If their egos allow them.

-=-=-
DNA
Mon, 16 Sep 2013, 03:31
Krakatomato
In almost all cases it's little-endian now so is rarely worth the effort adding support for big-endian.

Unfortunately for me, I have to work with both - PC's to big servers. And also writing game code for PS3 (big-endian) and Vita (mixed endian but the libraries are little-endian!).

Fun and games!
Mon, 16 Sep 2013, 03:42
HoboBen
Oh! Mixed Endian! That must be awful!!!

Apparently the next generation of consoles are dropping big endian and going to x86 as well which would probably help.

-=-=-
blog | work | code | more code
Mon, 16 Sep 2013, 10:05
Krakatomato
PS4/XBone are AMD Jaguar based, so mixed endian support, although I've no idea to what extent either is used.



Mon, 16 Sep 2013, 10:10
Jayenkai
LOL, Jaguar.. Maybe Mark can finally get around to adding Jaguar support to Blitz, after all!!

For the most part, if you're using the same file system, on the same computer/device, you should be fairly safe no matter what. Just be sure to save a flag, and things oughta stay pretty much as is.
Things become more complex as you add other systems into the mix, at which point the data format is the least of your worries. (Thinking hack-cheating and other stuff.)

-=-=-
''Load, Next List!''