frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Precompiled headers and why Squid won't be using them (2023)

https://squidproxy.wordpress.com/2023/10/10/precompiled-headers-and-why-squid-wont-be-using-them/
6•mooreds•4h ago

Comments

o11c•1h ago
This blog post has a few inaccuracies, so the situation isn't as bad as it seems. (It is still annoying and requires thought though).

I'm just going to ignore the part where Clang apparently sabotages itself by requiring `-include-pch`. You really shouldn't be using Clang in production because it has all sorts of hard limitations so I am not at all surprised at hitting another one; even if this particular one gets fixed, you'll still run into several others, whether you realize it or not (since usually it silently does the wrong thing). Your `./configure` should already be detecting "is this an actually-working GCC" anyway, so you can use that as the condition before you enable the PCH logic at all.

The "can only use one PCH per compilation" limitation also exists in GCC and is well-documented there since I started using it (maybe in 2010?), but as noted it is not a major limitation. Assuming you're practicing sufficient rigor for your build process, you basically have 3 options: only one PCH for the whole project, one PCH per directory-ish (assuming each directory is a semi-independent part of the project; this is probably sanest), or try to precompile all headers (this has performance implications for whenever you edit a header).

The "build vs src" purity problem has a simple solution - just use `-I` to specify an "overlay" include directory that is in the build directory, and have your PCH-making rule specify that in the first place. That's it.

aw1621107•48m ago
> You really shouldn't be using Clang in production because it has all sorts of hard limitations

Wait, do you mean you shouldn't be using Clang PCHs in production, or shouldn't be using Clang in production at all?

NickGerleman•54m ago
PCHs give a sour taste in my mouth after working on a project which very liberally added commonly imported headers to a huge one. In practice, it meant each TU was indirectly including many more headers than needed, and it was harder for humans (or IDEs) to reason about the real dependency chain. While builds were faster, they also started using much more memory.

You also can end up needing to rebuild the world, if touching a header that is part of the PCH, even if it isn’t really needed by all the targets.

Modules and header units were supposed to solve these a lot more cleanly, but is still not well supported.

mayoff•35m ago
I hate cmake but this is something cmake does well in my experience. I had to write a Godot 4 plugin and Godot has many many header files. I made a project header that #included all the Godot headers, and a single target_precompile_headers directive in CMakeLists was enough to get it working on Mac and Linux (and I think on Windows but I didn’t need to run it on Windows).

Mr Tiff

https://inventingthefuture.ghost.io/mr-tiff/
157•speckx•2h ago•11 comments

Patching 68K Software – SimpleText

https://tinkerdifferent.com/threads/patching-68k-software-simpletext.4793/
46•mmoogle•2h ago•2 comments

Apple uses 3D Gaussian splatting for Personas and 3D conversions of photos

https://www.cnet.com/tech/computing/apple-talks-to-me-about-vision-pro-personas-where-is-our-virt...
31•dmarcos•5d ago•6 comments

This Day in 1988, the Morris worm infected 10% of the Internet within 24 hours

https://www.tomshardware.com/tech-industry/cyber-security/on-this-day-in-1988-the-morris-worm-sli...
294•canucker2016•10h ago•141 comments

Pg_lake: Postgres with Iceberg and data lake access

https://github.com/Snowflake-Labs/pg_lake
271•plaur782•9h ago•78 comments

Whole Earth Index

https://wholeearth.info/
139•bookofjoe•1w ago•31 comments

Codemaps: Understand Code, Before You Vibe It

https://cognition.ai/blog/codemaps
190•janpio•7h ago•65 comments

Uncle Sam wants to scan your iris and collect your DNA, citizen or not

https://www.theregister.com/2025/11/04/dhs_wants_to_collect_biometric_data/
90•SanjayMehta•1h ago•54 comments

Show HN: A CSS-Only Terrain Generator

https://terra.layoutit.com
273•rofko•11h ago•75 comments

By the Power of Grayscale

https://zserge.com/posts/grayskull/
103•surprisetalk•4d ago•28 comments

BlackRock's Larry Fink: "Tokenization", Digital IDs, & Social Credit

https://thewinepress.substack.com/p/tokenization-blackrocks-larry-fink
29•sbuttgereit•3h ago•13 comments

I took all my projects off the cloud, saving thousands of dollars

https://rameerez.com/send-this-article-to-your-friend-who-still-thinks-the-cloud-is-a-good-idea/
114•sebnun•4h ago•131 comments

Singing bus horns in West Sumatra

https://www.auralarchipelago.com/auralarchipelago/kalason
47•Kaibeezy•1w ago•3 comments

Bluetui – A TUI for managing Bluetooth on Linux

https://github.com/pythops/bluetui
15•birdculture•2h ago•0 comments

Launch HN: Plexe (YC X25) – Build production-grade ML models from prompts

https://www.plexe.ai/
64•vaibhavdubey97•8h ago•27 comments

Frozen String Literals: Past, Present, Future?

https://byroot.github.io/ruby/performance/2025/10/28/string-literals.html
22•Bogdanp•1w ago•1 comments

Singapore to cane scammers as billions lost in financial crimes

https://www.freemalaysiatoday.com/category/highlight/2025/11/04/singapore-to-cane-scammers-as-bil...
35•raybb•5h ago•30 comments

What is a manifold?

https://www.quantamagazine.org/what-is-a-manifold-20251103/
330•isaacfrond•15h ago•117 comments

NoLongerEvil-Thermostat – Nest Generation 1 and 2 Firmware

https://github.com/codykociemba/NoLongerEvil-Thermostat
307•mukti•8h ago•105 comments

RISC-V takes first step toward international ISO/IEC standardization

https://riscv.org/blog/risc-v-jtc1-pas-submitter/
5•jrepinc•5d ago•0 comments

Analyzing the Performance of WebAssembly vs. Native Code

https://ar5iv.labs.arxiv.org/html/1901.09056
47•liminal•2h ago•29 comments

Google Removed 749M Anna's Archive URLs from Its Search Results

https://torrentfreak.com/google-removed-749-million-annas-archive-urls-from-its-search-results/
64•gslin•2h ago•25 comments

Tell HN: X is opening any tweet link in a webview whether you press it or not

557•stillatit•19h ago•475 comments

Zip Files All the Way Down (2010)

https://research.swtch.com/zip
24•aebtebeten•1w ago•3 comments

Optimizing Datalog for the GPU

https://danglingpointers.substack.com/p/optimizing-datalog-for-the-gpu
99•blakepelton•10h ago•19 comments

Bloom filters are good for search that does not scale

https://notpeerreviewed.com/blog/bloom-filters/
174•birdculture•16h ago•34 comments

Grayskull: A tiny computer vision library in C for embedded systems, etc.

https://github.com/zserge/grayskull
8•gurjeet•2h ago•1 comments

How devtools map minified JS code back to your TypeScript source code

https://www.polarsignals.com/blog/posts/2025/11/04/javascript-source-maps-internals
70•manojvivek•10h ago•13 comments

Customize Nano Text Editor

https://shafi.ddns.net/blog/customize-nano-text-editor
136•shafiemoji•1w ago•48 comments

FDA described as a "clown show" amid latest scandal; top drug regulator is out

https://arstechnica.com/health/2025/11/fda-described-as-a-clown-show-amid-latest-scandal-top-drug...
38•duxup•1h ago•3 comments