HNHacker News
TopNewBestAskShowJobs

flohofwoe

23,650 karma · joined October 15, 2013

submissionscomments
flohofwoe··on C's Flexible Integer Sizes Were Not a Design Mistake
These are C99 features which MSVC only got around 2015 (of course a decade later those are safe to use in portable code).
flohofwoe··on C's Flexible Integer Sizes Were Not a Design Mistake
The parent is completely right in the sense that for actually portable C code it was always better to use fixed-width integer types which were chosen for the problem to solve instead of target hardware capabilities.

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.

flohofwoe··on C's Flexible Integer Sizes Were Not a Design Mistake
I don't agree. UNIX was an extremely niche operating system until Linux won the data center, at that time both C and C++ were already extremely popular outside the UNIX world. C won because it was so easy to adapt to new hardware architectures (even GPU shading languages are just minimally extended flavours of C and C++).
flohofwoe··on C's Flexible Integer Sizes Were Not a Design Mistake
C99 kinda fixed that with the `(u)int_leastN_t` types (which are hardly used in practice though). And shame that it took Microsoft 16 years to even start supporting C99 though so we were basically forced to keep using our own custom integer typedefs long after the C standard had fixed the issue.
flohofwoe··on C's Flexible Integer Sizes Were Not a Design Mistake
It should indeed, and in hindsight it would have been better to move int to 64 bits (especially for C's integer promotion, which only really makes sense when the promotion happens to the register width.

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.

flohofwoe··on ASML says it sold 'absolutely nothing' in Europe in 2026
The fab itself can still be "state of the art" even when the product isn't (Germany needs chips for its industry, not for gaming PCs or AI data centers).
flohofwoe··on ASML says it sold 'absolutely nothing' in Europe in 2026
Bosch never said that though, the "AI" stuff was about the production methods used in the fab (along with a couple other buzzwords), it was never claimed that the fab produces chips "for AI". Instead these are fairly simple controllers for the automotive industry.
flohofwoe··on The backend that ran every game we made, ten years and counting
So basically "move fast and break things", hardly new or controversial in the tech bro sphere ;)
flohofwoe··on The backend that ran every game we made, ten years and counting
It's a good thing to have the "this post was AI generated" signal in the first sentence, saves a lot of time ;)

(although tbh, I'm starting to wonder if people subconsciously warp their own writing style when they stare at Claude output all day)

flohofwoe··on 'We hacked the FBI:' Hackers say they have data on all FBI employees
> ...there is such a thing as computer security...

> 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.

flohofwoe··on A graphical desktop for the ZX Spectrum
> I guess you’re rather young or not really acquainted with the history of computer science.

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?

flohofwoe··on AI coding has made CI a bottleneck, so we reworked ours to keep up
I mean, "CI" is a complete misnomer. There is usually no "integration" happening while a CI pipeline runs, it's mostly just running a couple of tests.
flohofwoe··on MCP was always a bad idea?
Correct me if I'm wrong, but an MCP server still make a lot of sense for remote-controlling a UI application (like a game engine editor) which otherwise doesn't have any 'access points' for remote-control right?

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 ;)

flohofwoe··on UTF-8000: Unlimited UTF-8
The internal string encoding of a programming language doesn't matter as long as it supports UTF-8 at the boundaries. E.g. the text encoding standard on the web is clearly UTF-8, even though JS strings may be internally stored as UTF-16 (or any other encoding).

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).

flohofwoe··on UTF-8000: Unlimited UTF-8
Yes, UTF-16 is the worst of all alternatives and should be abolished rather sooner than later.

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...).

flohofwoe··on UTF-8000: Unlimited UTF-8
IMHO a 30 percent size increase for sharing text data is really not a problem when most data sharing (by volume) happens via audio, video and image data which is infinitely larger. We obviously have both the bandwidth and storage volume to spare for those 30% increased size for text data which among all the other data would account for a tiny fraction of a percent.
flohofwoe··on A graphical desktop for the ZX Spectrum
So educate me then what I'm missing in the 'agentic loop' workflow, oh wise one ;)

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.

flohofwoe··on UTF-8000: Unlimited UTF-8
That combination is how it already works. You can build combined "characters" (grapheme clusters) from multiple code points, e.g. you could have a "base emoji" followed by a "modifier" emoji, and AFAIK that's how emojis with different skin colors work (one code point for the base emoji (e.g. 'thumbs up'), and a number of skin color modification code points which can be applied to all emojis that involve skin color.
flohofwoe··on UTF-8000: Unlimited UTF-8
> How should a reader infer the bye order for a UCS-2 or UTF-16 file without a BOM?

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.

flohofwoe··on UTF-8000: Unlimited UTF-8
> "UTF-8" support was often just single byte, so it was little more than ASCII

"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.

flohofwoe··on UTF-8000: Unlimited UTF-8
OTH UTF-8 is just one variable-length stream encoding among many others (RLE, LBE128, etc...).
flohofwoe··on UTF-8000: Unlimited UTF-8
But the nice thing about UTF-8 is that this proposal isn't really a "complication", but a minimal and natural extension of the original idea to allow more than one lead byte.
flohofwoe··on UTF-8000: Unlimited UTF-8
> ...24-bit numbers?

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".

flohofwoe··on UTF-8000: Unlimited UTF-8
It's still a joy to see how frigging elegant and extensible the UTF-8 specification is. And even without the esoteric 0xFF lead byte, the regular UTF-8 encoding with a 0xFE lead byte (11111110) would still have plenty of headroom (36 bits) compared to the current 21 bits for UNICODE.
flohofwoe··on UTF-8000: Unlimited UTF-8
Phew, and I was worried that we'd be running out of UNICODE space for new emojis ;)
flohofwoe··on A graphical desktop for the ZX Spectrum
At least when plugging a computer together I know who built the components. When building with LLMs I have no idea who actually wrote the code snippets that are thrown into the mixer ;)
flohofwoe··on A graphical desktop for the ZX Spectrum
INHO the only unsatisfactory part for this "explorative" work is that you never really get into the flow since the LLM just takes too long between interactions (sometimes minutes). That's long enough to prevent from getting into the flow, but not long enough to focus on something else in the meantime.
flohofwoe··on A graphical desktop for the ZX Spectrum
Don't know, but AFAIK this wasn't a popular programming language on home computers in the 1980s (from what I've seen, the popular non-asm languages were usually BASIC, Forth and Pascal, even C was kinda rare).
flohofwoe··on A graphical desktop for the ZX Spectrum
The difference is that you'll get a different "ZX Spectrum GUI" each time with an LLM, but the same result with a compiler.

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.

flohofwoe··on A graphical desktop for the ZX Spectrum
When your manager gives you the task of building a complex product with a more or less vague "do what I mean" specification, and once a week shows up for 2 minutes to nudge you into a different direction, would you agree when the manager calls this his own "labour of love" when you did 99% of the actual work and thousands of micro-decisions along the way that your manager didn't even know had to be made?
← PreviousPage 7 of 34Next →