4 ms·
> When programming, it is still important to write code that runs correctly on systems with either byte order I contend it's almost never important and almost
by electroly 6mo ago
> When programming, it is still important to write code that runs correctly on systems with either byte order
I contend it's almost never important and almost nobody writing user software should bother with this. Certainly, people who didn't already know they needed big-endian should not start caring now because they read an article online. There are countless rare machines that your code doesn't run on--what's so special about big endian? The world is little endian now. Big endian chips aren't coming back. You are spending your own time on an effort that will never pay off. If big endian is really needed, IBM will pay you to write the s390x port and they will provide the machine.
- Retr0id 6mo ago> There are countless rare machines that your code doesn't run on--what's so special about big endian? One difference is that when your endian-oblivious code runs on a BE system, it can be subtly wrong in a way that's hard to diagnose, which is a whole lot worse than not working at all.
- electroly 6mo agoThat sounds like a problem to deal with as part of your paid IBM s390x porting contract. I guess my point is: why deal with this before IBM is paying you? No other big endian platform matters, and s390x users are 100% large commercial customers. If IBM or one of their customers isn't paying you, there's nobody else who would need it. If IBM is paying you, you can test on a real z/VM that they provide. I see big endian as entirely their burden now; nobody else needs it. If they want it, they can pay for the work.
- Retr0id 6mo agoI value correct code for purely selfish reasons. The most likely person to try to run my code on a BE system is me.
- eesmith 6mo agoThere are a lot of odd (by modern standards) machines out there. You're also the most likely person to try to run your code on an 18 bit machine.
- fc417fc802 6mo agoIt might sound outrageous but I guard against this sort of thing. When I write utility code in C++ I generally include various static asserts about basic platform assumptions.
- junofan 6mo agoThis is much-appreciated. I’m hardly a Richard Stallman, but finding little incompatibilities after-the-fact is pretty irritating.
- eesmith 6mo agoTake a look at https://www.kermitproject.org/ckupdates.html https://www.kermitproject.org/ckupdates.html . These quotes come from the last few years: > [fixes] specific to VMS (a.k.a. OpenVMS), > For conformity with DECSYSTEM-20 Kermit ... > running on a real Sun3, compiled with a non-ANSII compiler (Sun cc 1.22) > this is fatal in HP-UX 10 with the bundled compiler > OpenWatcom 1.9 compiler > OS/2 builds > making sure that all functions are declared in both ANSI format and K&R format (so C-Kermit can built on both new and old computers) Oooooh! A clang complaint: 'Clang also complains about perfectly legal compound IF statements and/or complex IF conditions, and wants to have parens and/or brackets galore added for clarity. These statements were written by programmers who understood the rules of precedence of arithmetic and logical operators, and the code has been working correctly for decades.'
- jasomill 6mo agoBut wait, there's more! As of the fourth Beta, DECnet support has been re-enabled. To make LAT or CTERM connections you must have a licensed copy of Pathworks32 installed. SSH is now supported on 32bit ARM devices (Windows RT) for the first time REXX support has been extended to x86 systems running Windows XP or newer. This was previously an OS/2-only feature. No legacy telnet encryption (no longer useful, but may return in a future release anyway) For context: The first new Kermit release for Windows in TWENTY-TWO YEARS Yes, it's called Kermit 95 once again! K95 for short. 2025 is its 40th anniversary.
- edflsafoiewq 6mo agoStatic-assert the machine is little endian.
- Retr0id 6mo agoSomeone's LLM will comment out that line the moment it causes a build failure
- edflsafoiewq 6mo agoOh brave new world, that has such arguments in it!
- thrtythreeforty 6mo agoThen they get to keep both pieces!
- CJefferson 6mo agoHowever, unless you are a super-programmer, it's very easy to introduce subtle bugs. Software I write has hit this occasionally, someone somewhere does something like cast an int to bytes to do some bit-twiddling. Checking your whole codebase for this is incredibly hard. My modern choice is just to make clear to BE users I don't support them, and while I will accept patches I'll make no attempt to bugfix for them, because every time I try to get a BE VM running a modern linux it takes a whole afternoon.
- CJefferson 6mo agoYou are correct, honestly, I couldn't disagree more with th article. At this point I can't imagine why it's important. It's also increasingly hard to test. Particularly when you have large expensive testsuites which run incredibly slowly on this simulated machines.