Conversation
Notices
-
chjara (chjara@disqordia.space)'s status on Wednesday, 15-Jun-2022 08:59:57 UTC chjara hm
actually big-endian is probably better than little-endian
short of evil aliasing tricks there's no computational advantage or disadvantage to either, but big-endian is more natural by virtue of human number systems being big-endian- Santa Claes πΈπͺππ°π likes this.
-
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 09:00:05 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @chjara Meanwhile me: I care so less about the endianness that I tend to say x86-endian and ppc-endian. Just write arch-agnostic code. Santa Claes πΈπͺππ°π likes this. -
(Ξ¦ΟΞ¦) (meganeko@miaow.gay)'s status on Wednesday, 15-Jun-2022 09:00:15 UTC (Ξ¦ΟΞ¦) @chjara I also dislike little or mixed endian date formats. a lot.
Santa Claes πΈπͺππ°π likes this. -
(Ξ¦ΟΞ¦) (meganeko@miaow.gay)'s status on Wednesday, 15-Jun-2022 09:00:16 UTC (Ξ¦ΟΞ¦) @chjara pretty much what I've always thought ~
-
Santa Claes πΈπͺππ°π (clacke@libranet.de)'s status on Wednesday, 15-Jun-2022 10:33:30 UTC Santa Claes πΈπͺππ°π Probably everyone in this thread agress, but obligatory reference: commandcenter.blogspot.com/201β¦
"""
Whenever I see code that asks what the native byte order is, it's almost certain the code is either wrong or misguided.
[ . . . ]
What does matter is the byte order of a peripheral or encoded data stream, but--and this is the key point--the byte order of the computer doing the processing is irrelevant to the processing of the data itself.
"""
@lanodan @koakuma @chjara -
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 10:33:31 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @koakuma @chjara Wellβ¦ I tend to put stuff in network-endian by default. -
Koakuma (koakuma@uwu.social)'s status on Wednesday, 15-Jun-2022 10:33:32 UTC Koakuma @lanodan @chjara And then you need to exchange data between the two systems and the encoding happens to use the native endianness and... :02lurk:
-
Santa Claes πΈπͺππ°π (clacke@libranet.de)'s status on Wednesday, 15-Jun-2022 10:37:32 UTC Santa Claes πΈπͺππ°π @koakuma Once a value is in your memory it is a value, not bytes.
@lanodan @chjara -
Koakuma (koakuma@uwu.social)'s status on Wednesday, 15-Jun-2022 10:37:33 UTC Koakuma @clacke @lanodan @chjara And the way he does it is also misguided; the language should provide numerical types with explicit endianness tags instead of having to remember to shift-shift before parsing or whatever :02smile:
-
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 10:39:06 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @koakuma @clacke @chjara be32enc and similar kind of functions exists in the libc. Santa Claes πΈπͺππ°π likes this. -
a1ba-nyan (a1ba@expired.mentality.rip)'s status on Wednesday, 15-Jun-2022 10:43:10 UTC a1ba-nyan @clacke @chjara @lanodan @koakuma nooo
But then I can't cast the buffer to a C struct :DSanta Claes πΈπͺππ°π likes this. -
Santa Claes πΈπͺππ°π (clacke@libranet.de)'s status on Wednesday, 15-Jun-2022 11:33:19 UTC Santa Claes πΈπͺππ°π @a1ba Friends who had friends who let them write C.
@lanodan @koakuma @chjara -
a1ba-nyan (a1ba@expired.mentality.rip)'s status on Wednesday, 15-Jun-2022 11:33:21 UTC a1ba-nyan @lanodan @chjara @clacke @koakuma that's what they always say: Well, I'm not gonna write that stupid code. My own code is platform-agnostic
And yet it's not the first time we're seeing it, right? If I don't write that, and you don't, or anybody mentioned here doesn't, then who does? -
a1ba-nyan (a1ba@expired.mentality.rip)'s status on Wednesday, 15-Jun-2022 11:33:22 UTC a1ba-nyan @lanodan @chjara @clacke @koakuma but why if I'm lazy or inexperienced programmer and can do:
```
header = (dheader_t *)buf;
ver = header->version;
// ... and so on
```
(just stripped it from hlbsp loader) -
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 11:33:23 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @a1ba @chjara @clacke @koakuma Wellβ¦ you can, just decode it first. -
a1ba-nyan (a1ba@expired.mentality.rip)'s status on Wednesday, 15-Jun-2022 11:38:19 UTC a1ba-nyan @clacke @chjara @lanodan @koakuma that's some asshole friends Santa Claes πΈπͺππ°π likes this. -
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 11:39:47 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @a1ba @chjara @clacke @koakuma Guess why I don't really trust other's people code by default.
Sharing software is great, but it can easily be a greek gift.Santa Claes πΈπͺππ°π likes this. -
a1ba-nyan (a1ba@expired.mentality.rip)'s status on Wednesday, 15-Jun-2022 11:39:48 UTC a1ba-nyan @lanodan @chjara @clacke @koakuma
Remember _we_ don't do that
Somehow other people do :) -
Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 15-Jun-2022 11:39:49 UTC Haelwenn /ΡΠ»Π²ΡΠ½/ :triskell: @a1ba @chjara @clacke @koakuma Wellβ¦ it's C so you might as well be reading some garbage and get a segfault from just that.
Never trust user input :)