frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The surprising countries pulling off fast clean energy transitions

https://www.cnn.com/2025/11/07/climate/solar-wind-renewables-transition-global-pakistan-hungary-c...
1•toomuchtodo•6m ago•1 comments

Earth needs more energy. Atlanta's Super Soaker creator may have a solution

https://www.ajc.com/business/2025/11/earth-needs-more-energy-atlantas-super-soaker-creator-may-ha...
1•TMWNN•6m ago•0 comments

I made a prompt framework that makes LLMs stop hedging and speak straight

1•DrRockzos•13m ago•0 comments

The Web Runs on Tolerance

https://shkspr.mobi/blog/2025/12/the-web-runs-on-tolerance/
2•benwerd•14m ago•0 comments

Show HN: Peephole

https://peephole.greg.technology/
2•gregsadetsky•19m ago•1 comments

AI Interview Coder Assistant

https://interviewcoder.top
1•ainterviewcoder•19m ago•1 comments

ChatGPT claims to have solved Navier-Stokes problem

https://github.com/vporton/navier-stokes
1•porton•20m ago•0 comments

Noninvasive imaging could replace finger pricks for measuring blood glucose

https://news.mit.edu/2025/noninvasive-imaging-could-replace-finger-pricks-diabetes-1203
6•ivewonyoung•25m ago•0 comments

I'm a Professor. A.I. Has Changed My Classroom, but Not for the Worse

https://www.nytimes.com/2025/11/25/magazine/ai-higher-education-students-teachers.html
1•bookofjoe•26m ago•1 comments

Open Source Doesn't Fail Because of Code

https://blog.ulisesgascon.com/open-source-doesnt-fail-because-of-code
1•gpi•27m ago•0 comments

India reviews always-on A-GPS tracking plan for phones

https://news.kagi.com:443/tech/2025120618/india-reviews-always-on-a-gps-tracking-plan-for-phones?...
2•hereme888•32m ago•0 comments

Use AI without skill atrophy

https://www.augmentedswe.com/p/use-ai-without-skill-atrophy
1•wordsaboutcode•37m ago•1 comments

New Augmented Reality Tech Can Turn Any Surface into Keyboard

https://news.utdallas.edu/science-technology/augmented-reality-tech-keyboard-2025/
2•ashishgupta2209•37m ago•0 comments

Why We're Treating Dogs Like People and People Like Dogs

https://thewalrus.ca/why-were-treating-dogs-like-people-and-people-like-dogs/
2•pseudolus•43m ago•0 comments

Socialist Ends by Market Means: A History

https://lucasvance.github.io/2100/history/
7•sirponm•44m ago•0 comments

Show HN: ICT Info-Consciousness-Time First experiment to detect consciousness

https://www.academia.edu/s/8924eff666
1•DmitriiBaturoIC•50m ago•0 comments

UK government promises 50k new apprenticeships in youth employment push

https://www.bbc.com/news/articles/cvgkpzpy1zno
1•1659447091•51m ago•0 comments

I hacked together a modeler for the 2026 AMT tax cliff (TCJA Sunset)

1•optionspilot•55m ago•0 comments

Building the go-to pet care app for dog parents

https://apps.apple.com/us/app/zibbly-dog-care-tracking/id6748543992
1•zibblyteam•55m ago•1 comments

#2422 – Jensen Huang

https://open.spotify.com/episode/0yT4ec9M6GobLC5ByN8pX3
1•nradov•56m ago•0 comments

Trump raises potential concerns over $72B Netflix-Warner Bros deal

https://www.bbc.com/news/articles/cn815egjqjpo
3•1659447091•58m ago•4 comments

Ask HN: What's the biggest hack you've found while vibe coding?

1•frankhsu•59m ago•1 comments

The Architecture of Truth-Seeking

https://eyeofthesquid.com/the-architecture-of-truth-seeking-934b79733ed5
1•TinyBig•1h ago•0 comments

Megapode

https://en.wikipedia.org/wiki/Megapode
2•thunderbong•1h ago•1 comments

Alternative solvent makes lead-free perovskite solar cells 10x more stable

https://pubs.acs.org/doi/10.1021/acsenergylett.5c02675
4•gsf_emergency_6•1h ago•0 comments

Room-Size Particle Accelerators Go Commercial

https://spectrum.ieee.org/plasma-wakefield-acceleration
1•geox•1h ago•0 comments

Damn Small Linux

https://www.damnsmalllinux.org/
3•grubbs•1h ago•1 comments

India weighs greater phone-location surveillance

https://www.reuters.com/sustainability/boards-policy-regulation/india-weighs-greater-phone-locati...
2•gdeglin•1h ago•1 comments

Real Policies to stop people using AI for cyberattacks, bioweapons, & more

https://app.excalidraw.com/l/7ULi4Jv3VIo/ATs5lrdppys
1•PhilosophyForAI•1h ago•2 comments

Increasing code performance with LTO [video]

https://www.youtube.com/watch?v=fPGodf5hNoo
2•edward28•1h ago•0 comments
Open in hackernews

Locks in PostgreSQL: 3. Other locks (2020)

https://habr.com/en/companies/postgrespro/articles/504498/
60•fanf2•11h ago

Comments

semiquaver•11h ago
Don’t skip the discussion on advisory locks. In my experience nearly every nontrivial application that spans multiple machines has concurrency bugs that advisory locks are perfectly suited to fix.
leftnode•10h ago
Yes! Just implemented these the other day for a long running process that I didn't want to lock a specific row for.
GeertJohan•10h ago
They are great, although I wouldnt use the articles advice on using hashtext to get a number for the lock. This may cause collisions, especially when used with a large number of locks.

In a project Im working on we have a single go package that holds a list of all advisory lock numbers as constants.

dpedu•8h ago
These are great. Some time ago I was tasked with writing installation tooling for a startup's data analysis product, which was built as a distributed system. The system used a SQL database to store metadata, so every host needed the SQL database's connection details. Using an advisory lock to decide which host initializes the database schema made everything so much simpler - just install on all your hosts at once, in parallel, and don't worry about it.

This was MySQL but its advisory locks are pretty similar to Postgres.

It's also nice that the lock is released when the database connection terminates. Really easy to use. If you need exactly one of something running constantly, you can launch however many processes and let all but one spin trying to acquire the lock. When one dies and closes its SQL connection, thus releasing the lock, another will obtain the lock and begin work more or less instantly.

They're infinitely useful!

sa46•8h ago
Advisory locks aren’t all sunshine and rainbows. They can only be unlocked by the Postgres connection that acquired the lock. That means you need to track the connection, typically by dedicating a connection to the job that needs locking.

Here’s a good issue describing the tradeoffs between a lock table and advisory locks.

https://github.com/bensheldon/good_job/discussions/831

FreakLegion•2h ago
Do people use advisory locks as the actual locking mechanism? I've always used them to synchronize access to a flag on the target resource, so the advisory lock is only held long enough to query or update that resource as locked. The alternative seems, yes, incredibly brittle.