Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenAI Feared "Optics" of what might appear on Hacker News (authorsguild.org)
    32comments
  2. Does Georgism work? Five years later (astralcodexten.com)
    227comments
  3. Flip Fluid on Flip Dots (mitxela.com)
    8comments
  4. Go Concurrency Distilled (antonz.org)
    68comments
  5. PipePipe: NewPipe hard fork implementing SponsorBlock (github.com/infinityloop1308)
    219comments
  6. Improving site performance by shipping more CSS (github.blog)
    18comments
  7. DeepSeek Elastic Compute (DSec) (arxiv.org)
    79comments
  8. Show HN: Reladraw – A diagram language where you decide where to place things (github.com/reladraw)
    81comments
  9. C's Flexible Integer Sizes Were Not a Design Mistake (pikuma.com)
    6comments
  10. A searchable library of forgotten public-domain film clips from 1915 onward (movingimagearchive.com)
    26comments
  11. Biology might not be quantum, but its math is quantumlike (quantamagazine.org)
    23comments
  12. What is the size of Yemen? (2024) (theborys.substack.com)
    34comments
  13. Real-time feedback: My closing move in every interview (mgrebler.substack.com)
    34comments
  14. ASML says it sold 'absolutely nothing' in Europe in 2026 (tomshardware.com)
    606comments
  15. Fifteen years later, the Apple Cards origin story (lexontech.org)
    101comments
  16. Reverse-engineering the Intel 8087's tangent algorithm: more than CORDIC (righto.com)
    10comments
  17. Drawgent: Coding agent on a live Excalidraw canvas (tangled.org/yanndegat.tngl.sh)
    41comments
  18. An agent used DNS to reach an external chatbot (alignment.openai.com)
    91comments
  19. Turning GLM-5.3-Flash into a Jev-like decision model (privatemode.ai)
    38comments
  20. How I changed teaching after AI managed to do all my homework assignments (thelastsoftwareengineer.substack.com)
    178comments
  21. Exploding variance of means of exponentials: least-squares to the rescue (francisbach.com)
    —discuss
  22. How to keep enjoying programming in a world of LLMs (haskell.org)
    267comments
  23. Promising discoveries about the potential for life on one of Saturn’s icy moons (fu-berlin.de)
    30comments
  24. Bob Mackie dressed stars–if they were brave enough (economist.com)
    1comments
  25. Snap Wants to be a State Actor??–Kansas v. Snap (ericgoldman.org)
    12comments
  26. We Should Be Able to Change Our Languages (jimmyhmiller.com)
    19comments
  27. Modern Object Pascal Introduction for Programmers (castle-engine.io)
    75comments
  28. Evolving programming languages in the AI era (dashbit.co)
    57comments
  29. Generate fonts where every LLM token is the same width (mesh.host)
    12comments
  30. Welcome to the Medical Clinic at the Interplanetary Relay Station (lightspeedmagazine.com)
    14comments

C's Flexible Integer Sizes Were Not a Design Mistake

20 pointsby 1d agopikuma.com
6 comments
19m agoHN ↗

it's a great read!

would like to learn some tricks, like configuring gcc so that int is 64 bits, and so on

20m agoHN ↗

But not having fixed size integers (or integers tied to the size of a pointer) was. Both can be useful

5m agoHN ↗

At the time its was probably very hard to know what the fixed sizes should be.

9m agoHN ↗

Thank you for the article! Do I see a Turbo-C screenshot there or am I imagining it? It was my first IDE (I didn't know that's what it was called) when I started programming. I sometimes miss it, it was really good, especially the help system.

I agree with the article of course. I think most confusion comes not having learned about the purpose of having them be defined based on the architecture in the first place. It took me a long time before I stumbled upon how they really worked and why, because while I started it was either x86 or nothing. When x64 showed up, suddenly it became relevant and everybody started learning about C types more in depth as they ran into issues with sizeof.

Also, misuse in data protocols is where I think the bad reputation of the flexible type sizes came from. stdint was desperately needed for that reason and it came a bit late.

6m agoHN ↗

Good article.

C would probably not have survived unless it had this flexibility.

But its not justa historical thing. Today there are modern platforms like DSPs that have 32bit sized char, because that is the smallest addressable type. These platforms depend on C for tool chains, even if most "portable" C wont run correctly on them. The fact that you can build hardware like that, and not have to invent a new language / dialect to program them is a huge win for the world.