23,650 karma · joined October 15, 2013
For instance if your integer arithmetic needs to happen with 32 bit precision (no matter if the code runs on a 16- or 32-bit CPU), there is no scenario where using 'int' makes sense. Instead you'd use a fixed-width 32-bit integer type and accept that math operations are compiled into two instructions on a 16-bit CPU.
And OTH if you only require 16 bits integer width, there's not much point in picking a 32 bit integer type. Since two's-complement integer encoding has been standard since at least the 70s, the CPU can do narrow operations in the native register width. Any overflow/wraparound is still correct when only looking at the lowest 16-bits of the result.
But porting 32-bit code to 64-bit was a big deal back then, and C99 with its new fixed-width integer types overlapped with the first AMD64 CPUs (and Microsoft's MSVC didn't start to support C99 until around 2015 anyway), I guess keeping int on 32-bits in the popular compilers was deemed 'safer' for porting existing code. I guess we can already be lucky that all the big compilers agreed on the same int width.
(although tbh, I'm starting to wonder if people subconsciously warp their own writing style when they stare at Claude output all day)
> Of course there is. (...continues to talk about software security)
A bit over-optimistic when looking at hardware vulneraribilties like Spectre/Meltdown.
Secure software isn't worth much when it runs on vulnerable hardware (at least Spectre/Meltdown could be worked around in software though, but at a cost.
Lol, thanks for the compliment. I've been programming computers since around 1984. But I learned to recognize snake oil when I see it (since around the mid-90s when the OOP hype was in full swing and I was a true believer for a while, the OOP hype did indeed have a lot in common with the current AI hype - e.g. about 10% useful, 90% snake oil, but it took the industry nearly two decades to recognize how harmful the OOP hype actually was even to the original idea of OOP itself... different topic though).
Also I think you're retconning/simplifying computing history a bit, it's not a linear evolution from low-level to high-level (e.g. when C was created, there were already much higher level programming languages common), and understanding the compiler output on CPU instruction level and the hardware it runs on is still very necessary for proper optimization work, even when working in a high level language.
E.g. you can't simply ignore the lowest level foundations even after adding new abstraction levels on top.
PS: what's up with all those throwaway accounts in the thread anyway?
An AmigaOS-style "scripting port" would work just as well, but AFAIK that's essentially what an MCP server is (a socket that implements a discoverable command protocol).
I would actually love if all applications and services could agree on a standard for scripting / remote-control. If the AI hype is what it takes to get there, then so be it ;)
Same on macOS/iOS btw: AFAIK NSString is internally UTF-16, but I've never seen a UTF-16 text file on macOS, it's all UTF-8 (unless the file originated on Windows of course).
UTF-32 is fixed-width for UNICODE code points, but a single visual character (e.g. a "grapheme cluster") can be built from multiple code points. This is separate from the encoding algorithm though, grapheme clusters are mostly a problem for the high level code working with already decoded text data (text rendering, comparison, sorting etc...).
I'm using this sort of spec-driven + feedback-loop workflow at work to pretty to good effect, and would say I'm quite familiar with the pros and cons.
IMHO the main downside is that you're simply not as familiar with the code base as before, unless you spend just as much time studying the LLM output as writing the code manually in the first place.
E.g. you have about the same distance to the actual implementation as a manager of a traditional programming team who from time to time skims over the source code to check for signals that things start to go sideways, and otherwise mainly feeds feature specification tickets into the team which are coming from a separate 'design department'.
I also would never call any of this work a 'labour of love' either. Not that this sort of soulless "specification-in-implementation-out" was much different before though, it's just how industrial software development works - essentially an assembly line for features.
Simple: switch to UTF-8 as the only encoding standard for sharing text data, keep UTF-32 as 'internal' runtime format for random access to codepoints, and get rid of all other legacy encodings (UCS-2, UTF-16, Extended ASCII with code pages, and all the other region specific encodings that popped up in the 70s and 80s because UTF-8 wasn't invented yet.
This general switch to UTF-8 should have happend in the mid-to-late 1990s (e.g. together with the web becoming popular), and Microsoft alone is to blame for dragging this shit along for the next three decades. If all Microsoft tools would only save text data as UTF-8 starting by the end of the last century, but still support reading all sorts of encodings for a decade or so, the transition would have been finished by 2010. Alas, that never happened.
And tbh, the file size argument for alphabets that don't fit into 7-bit ASCII doesn't really make sense anymore today where images and videos make up the vast majority of data volume.
"Single byte UTF-8" is ASCII. That's one of its most important properties.
> Even now it's common for programs to choke on the optional BOM
And they should... BOMs (and especially the hilarious UTF-8 BOM) are strictly a legacy Microsoft/Windows thing and should be abolished along with "extended" 8-bit ASCII encodings and UCS-2/UTF-16 (only UTF-32 makes sense, but should only be used at runtime to allow random access on UNICODE code points, but not for data exchange.
Technically current UTF-8 only goes up to 21 bits (that's the current UNICODE range), for the encoding itself that is an arbitrary limit though, with the 'single lead byte' method of traditional UTF-8 it could go up to 36 bits "payload".
The actual work in both cases is not to write the source code, but to figure out and describe exactly what you want. In one case (traditional programming) this specificion happens directly in non-ambigious source code, in the other case (steering an LLM) you specify via an imprecise human language.
Quite often the human language specification is actually "good enough" to get what you wanted, but the more you need to go into specific details, the more the difference to traditional coding disappears.