3 ms·
One of the fun things about EBCDIC is that 370 assembler has opcode-level support for converting an EBCDIC-encoded numeric string into an integer (and maybe the
by dhosek 5y ago
One of the fun things about EBCDIC is that 370 assembler has opcode-level support for converting an EBCDIC-encoded numeric string into an integer (and maybe the other way around too, it's been a while). This is one of two things I remember about my now-ancient 370 assembler knowledge. The other is that there is no built-in support for maintaining a call stack. It is up to each subroutine to handle this and there were some weird declarations around this to indicate whether a subroutine was reentrant, the definition of which escapes me now.
And people shouldn't criticize EBCDIC too much, after all Windows still dumps a lot of crap in legacy 8-bit coding that can cause applications to break (there was a recent post on HN about someone being unable to run the IntelliJ debugger because of an accent in their username). At least EBCDIC is clear about its limitations.¹
⸻⸻⸻
1. I'd be remiss if I didn't point out one other EBCDIC weirdness: It has two vertical bars, | and ¦ which always caused complications in translations between EBCDIC and ASCII. IIRC, ¦ was the more common symbol in EBCDIC coding but some converters wanted to translate | to | instead (or maybe it was the other way around—the last time I did IBM big metal was 30 years ago).
- toyg 5y ago> there was a recent post on HN about someone being unable to run the IntelliJ debugger because of an accent That's not Windows, that's JVM weirdness. Using the right calls, this sort of thing has been fine in Windows for some time.
- dhosek 5y agoIt's JVM weirdness on Windows. This isn't a problem on Linux or MacOS where file paths won't be in some arbitrary encoding. This ends up biting a lot of other cross-platform software as well and is why Rust has OSString, but for code in, say, C/C++ it ends up being a major pain point (the TeX development team often end up dealing with this sort of issue).
- breakingcups 5y agoFile paths on Windows aren't in some arbitrary encoding either?
- howinteresting 5y agoIt's actually on Linux where file paths can be just about any byte sequence. They're restricted to be UTF-8 on APFS/HFS+ (with some complicated case folding rules) and UCS-2 on NTFS.
- colejohnson66 5y agoUCS-2? I thought it was UTF-16?
- int_19h 5y agoYou can have unmatched surrogates in the name, for example.
- howinteresting 5y agoIt's UCS-2, unfortunately, which means that unpaired surrogates are allowed.