frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

LLM Inevitabilism

https://tomrenner.com/posts/llm-inevitabilism/
893•SwoopsFromAbove•9h ago•815 comments

A Little-Known Microsoft Program Could Expose the Defense Department to Hackers

https://www.propublica.org/article/microsoft-digital-escorts-pentagon-defense-department-china-hackers
43•danso•1h ago•17 comments

Show HN: I built this to talk Danish to my girlfriend – works with any language

https://menerdu.vercel.app/
47•lil_csom•2d ago•25 comments

Apple's MLX adding CUDA support

https://github.com/ml-explore/mlx/pull/1983
440•nsagent•16h ago•160 comments

Kiro: A new agentic IDE

https://kiro.dev/blog/introducing-kiro/
908•QuinnyPig•23h ago•385 comments

LIGO detects most massive black hole merger to date

https://www.caltech.edu/about/news/ligo-detects-most-massive-black-hole-merger-to-date
301•Eduard•18h ago•160 comments

VHS, VCDs, and Laserdiscs in Southeast Asia

https://rubenerd.com/vcds-and-laserdiscs-in-southeast-asia/
40•mikece•3d ago•24 comments

Cognition (Devin AI) to Acquire Windsurf

https://cognition.ai/blog/windsurf
444•alazsengul•20h ago•365 comments

Crimson (YC X25) is hiring founding engineers in London

https://www.ycombinator.com/companies/crimson/jobs/kCikzj1-founding-engineer-full-stack
1•markfeldner•2h ago

Literalism plaguing today’s movies

https://www.newyorker.com/culture/critics-notebook/the-new-literalism-plaguing-todays-biggest-movies
93•frogulis•10h ago•114 comments

SQLite async connection pool for high-performance

https://github.com/slaily/aiosqlitepool
153•slaily•4d ago•60 comments

Micro Adventure – Space Attack (online emulator)

https://auri-microadventure.azurewebsites.net/
5•AlexeyBrin•2d ago•0 comments

Random selection is necessary to create stable meritocratic institutions

https://assemblingamerica.substack.com/p/there-is-no-meritocracy-without-lottocracy
261•namlem•22h ago•215 comments

When Sigterm Does Nothing: A Postgres Mystery

https://clickhouse.com/blog/sigterm-postgres-mystery
65•saisrirampur•9h ago•17 comments

Show HN: Bedrock – An 8-bit computing system for running programs anywhere

https://benbridle.com/projects/bedrock.html
170•benbridle•4d ago•39 comments

Context Rot: How increasing input tokens impacts LLM performance

https://research.trychroma.com/context-rot
197•kellyhongsn•18h ago•41 comments

Happy 20th Birthday, Django

https://www.djangoproject.com/weblog/2025/jul/13/happy-20th-birthday-django/
500•davepeck•1d ago•150 comments

The Moving Assembly Line Turns 100 (2013)

https://www.assemblymag.com/articles/91581-the-moving-assembly-line-turns-100
4•highfrequency•51m ago•2 comments

C++ Coroutines Advanced: Converting std:future to asio:awaitable

https://www.ddhigh.com/en/2025/07/15/cpp-coroutine-future-to-awaitable/
57•xialeistudio•12h ago•28 comments

The JPEG XL Image Coding History, Features, Coding Tools, Design Rationale

https://arxiv.org/abs/2506.05987
45•ksec•2d ago•19 comments

VMware Workstation: Bringing Virtualization to the x86 Architecture (2012) [pdf]

https://www.cse.iitb.ac.in/~mythili/virtcc/papers/vmware.pdf
23•todsacerdoti•1d ago•6 comments

I Solved the Century-Old Mystery of a Miraculous Shipwreck Survivor

https://thewalrus.ca/empress-of-ireland-survivor-mystery/
81•Thevet•2d ago•40 comments

AWS Lambda Silent Crash – A Platform Failure, Not an Application Bug [pdf]

https://lyons-den.com/whitepapers/aws-lambda-silent-crash.pdf
84•nonfamous•12h ago•69 comments

NeuralOS: An operating system powered by neural networks

https://neural-os.com/
165•yuntian•18h ago•46 comments

Win, lose, or draw: trends in English football match results

https://blog.engora.com/2025/06/english-football-data.html
9•Vermin2000•3d ago•10 comments

Transition to using 16 KB page sizes for Android apps and games

https://android-developers.googleblog.com/2025/07/transition-to-16-kb-page-sizes-android-apps-games-android-studio.html
64•ingve•4d ago•50 comments

Replicube: 3D shader puzzle game, online demo

https://replicube.xyz/staging/
148•inktype•3d ago•22 comments

DEWLine Museum – The Distant Early Warning Radar Line

https://dewlinemuseum.com/
63•reaperducer•15h ago•16 comments

Strategies for Fast Lexers

https://xnacly.me/posts/2025/fast-lexer-strategies/
169•xnacly•23h ago•67 comments

Building Modular Rails Applications: A Deep Dive into Rails Engines

https://www.panasiti.me/blog/modular-rails-applications-rails-engines-active-storage-dashboard/
168•giovapanasiti•22h ago•38 comments
Open in hackernews

When Sigterm Does Nothing: A Postgres Mystery

https://clickhouse.com/blog/sigterm-postgres-mystery
65•saisrirampur•9h ago

Comments

gsliepen•6h ago

  pg_usleep(1000L);
Virtually any time you put a fixed sleep in your program, it's going to be wrong. It is either too long or too short, and even if it is perfect, there is no guarantee your program will actually sleep for exactly the requested amount of time. A condition variable or something similar would be the right thing to use here.

Of course, if this code path really is only taken very infrequently, you can get away with it. But assumptions are not always right, it's better to make the code robust in all cases.

delusional•5h ago
> there is no guarantee your program will actually sleep for exactly the requested amount of time

This is technically true, but in the same way that under a preemptive operating system there's no guarantee that you'll ever be scheduled. The sleep is a minimum time you will sleep for, beyond that you already have no guarantee about when the next instruction executes.

dwattttt•4h ago
Spurious wakeups enters the chat.
quietbritishjim•3h ago
Any reasonable sleep API will handle spurious wake ups under the hood and not return control.
Joker_vD•3h ago
It will also ignore those pesky signals and restart the sleep :)

On a more serious note, any reasonable sleep API should either report all wake ups, no matter the reason, or none except for the timeout expiration itself. Any additional "reasonable" filtering is a loaded footgun because different API users have different ideas of what is "reasonable" for them.

anarazel•2h ago
The usleep here isn't one that was intended to be taken frequently (and it's taken in a loop, so a too short sleep is ok). As it was introduced, it was intended to address a very short race that would have been very expensive to avoid altogether. Most of the waiting is intended to be done by waiting for a "transaction lock".

Unfortunately somebody decided that transaction locks don't need to be maintained when running as a hot standby. Which turns that code into a loop around the usleep...

(I do agree that sleep loops suck and almost always are a bad idea)

OptionOfT•40m ago
If I were reviewing that code I would've asked if they tried yielding. Same effect, but doesn't delay when there is no one to yield to.
Joker_vD•6h ago
The tl;dr is that Postgres, as any long-running "server" process (especially as a DBMS server!) does not run with SIG_DFL as the handler for SIGTERM; it instead sets up the signal handler that merely records the fact that the signal has happened, in hopes that whatever loops are going on will eventually pick it up. As usual, some loops don't but it's very hard to notice.
bbarnett•3h ago
Indeed. I've seen DBMSes take close to 10 minutes to gracefully exit, even when idle.

Timeout in sysvinit and service files, for a graceful exit, is typically 900 seconds.

Most modern DBMS daemons will recover if SIGKILL, most of the time, especially if you're using transactions. But startup will then be lagged, as it churns through and resolves on startup.

(unless you've modified the code to short cut things, hello booking.com "we're smarter than you" in 2015 at least, if not today)

sjsdaiuasgdia•1h ago
Yeah, as I've said on many incident calls...we can pay for transaction recovery at shutdown or we can pay for it at startup, but it's got to happen somewhere.

The "SIGKILL or keep waiting?" decision comes down to whether you believe the DBMS is actually making progress towards shutdown. Proving that the shutdown is progressing can be difficult, depending on the situation.

namibj•2h ago
Feels like they should come with watchdog timers that alert when a loop fails to check in on this status often enough? Then the only thing that still needs manual checking to cover these more-exotic states is that the code path for loop watchdog-and-signal-checkin will indeed lead to early exit from the loop it's placed in (and all surrounding loops).

Sure, it's more like fuzzing then, but running in production on systems that are willing to send in big reports for logged watchdog alerts would give nearly free monitoring of very diverse and realistic workloads to hopefully cover at least relevant-in-practice codepaths with many samples before a signal ever happens to those more-rare but still relevant code paths...

eunos•3h ago
With quirk like these, honestly I'm not even confident how can PostgreSQL or any software in general can be used in mission critical system.
contravariant•3h ago
Might be a bit late now to start telling people that maybe using software for everything wasn't a good idea.
vladms•3h ago
Have you ever read the contraindication list of a medicine? It is the same kind of trade-off. Someone can choose to use something in a "mission critical system" (whatever that is) because the alternatives are worse, not because the chosen solution is perfect (that does not mean I would advise using PostgreSQL - just accepting that it can happen).

On the other hand "quirks like these" are the reason you should not update too often mission critical systems.

cedws•2h ago
When you look hard enough it’s a miracle anything works at all.
OkPin•2h ago
Fascinating root cause: a missing CHECK_FOR_INTERRUPTS() left pg_create_logical_replication_slot basically unkillable on hot standbys. Simple fix, but huge impact.

Makes me wonder how many other Postgres processes might ignore SIGTERM under edge conditions. Do folks here test signal handling during failovers or replica maintenance? Seems like something worth adding to chaos tests.

bhaak•1h ago
> While the Postgres community has an older and sometimes daunting contribution process of submitting patches to a mailing list, [...]

The Linux kernel works the same way.

What are other big open source projects using if they are not using mailing lists?

I could imagine some using GitHub but IME it's way less efficient than mailing list. (If I were a regular contributor to a big project using GitHub, me being me, I would probably look for or write myself a GitHub to e-mail gateway).