frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoiding duplicate objects in Django querysets

https://johnnymetz.com/posts/avoiding-duplicate-objects-in-django-querysets/
14•johnnymetz•4d ago

Comments

augusteo•59m ago
Nice writeup. The Exists subquery approach is definitely the cleanest.

One thing worth mentioning: if you're hitting this problem frequently, it might be worth reconsidering the query patterns themselves. We had a similar issue at work where we kept adding `.distinct()` everywhere, and eventually realized we were doing the filtering wrong upstream.

The PostgreSQL-specific `distinct(*fields)` with the ORDER BY restriction is one of those things that trips people up. The error message isn't great either. "SELECT DISTINCT ON expressions must match initial ORDER BY expressions" is technically correct but doesn't explain why or what to do about it.

Good call recommending Exists as the default approach. It's more explicit about intent too.

ducdetronquito•35m ago
Good read, TIL!

That being said, I use Django daily for 10 years but I don’t understand the ORM besides basic CRUD. Even a simple group by looks weird.

Writing plain SQL feels easier and more maintainable in the long run.

Parametric CAD in Rust

https://campedersen.com/vcad
68•ecto•1h ago•39 comments

Prism

https://openai.com/index/introducing-prism
230•meetpateltech•4h ago•132 comments

430k-year-old well-preserved wooden tools are the oldest ever found

https://www.nytimes.com/2026/01/26/science/archaeology-neanderthals-tools.html
287•bookofjoe•6h ago•156 comments

Lennart Poettering, Christian Brauner founded a new company

https://amutable.com/about
159•hornedhob•3h ago•196 comments

A few random notes from Claude coding quite a bit last few weeks

https://twitter.com/karpathy/status/2015883857489522876
145•bigwheels•1d ago•186 comments

Try text scaling support in Chrome Canary

https://www.joshtumath.uk/posts/2026-01-27-try-text-scaling-support-in-chrome-canary/
25•linolevan•2h ago•5 comments

SoundCloud Data Breach Now on HaveIBeenPwned

https://haveibeenpwned.com/Breach/SoundCloud
118•gnabgib•5h ago•50 comments

Time Station Emulator

https://github.com/kangtastic/timestation
23•FriedPickles•1h ago•4 comments

Show HN: I wrapped the Zorks with an LLM

https://infocom.tambo.co/
24•alecf•1h ago•11 comments

Xfwl4 – The Roadmap for a Xfce Wayland Compositor

https://alexxcons.github.io/blogpost_15.html
234•pantalaimon•8h ago•183 comments

AI2: Open Coding Agents

https://allenai.org/blog/open-coding-agents
82•publicmatt•4h ago•16 comments

Doing the thing is doing the thing

https://www.softwaredesign.ing/blog/doing-the-thing-is-doing-the-thing
123•prakhar897•15h ago•44 comments

Hypercubic (YC F25) Is Hiring a Founding SWE and COBOL Engineer

https://www.ycombinator.com/companies/hypercubic/jobs
1•sai18•3h ago

FBI is investigating Minnesota Signal chats tracking ICE

https://www.nbcnews.com/tech/internet/fbi-investigating-minnesota-signal-minneapolis-group-ice-pa...
340•duxup•4h ago•351 comments

Show HN: One Human + One Agent = One Browser From Scratch in 20K LOC

https://emsh.cat/one-human-one-agent-one-browser/
109•embedding-shape•9h ago•64 comments

TikTok settles just before social media addiction trial to begin

https://www.bbc.com/news/articles/c24g8v6qr1mo
61•ourmandave•1h ago•51 comments

Show HN: LemonSlice – Upgrade your voice agents to real-time video

47•lcolucci•4h ago•61 comments

Amazon closing its Fresh and Go stores

https://finance.yahoo.com/news/amazon-closing-fresh-grocery-convenience-150437789.html
104•trenning•6h ago•298 comments

Designing Forms That Don't Get in the Way

https://www.souravinsights.com/blog/on-designing-forms
11•SouravInsights•6d ago•0 comments

I made my own Git

https://tonystr.net/blog/git_immitation
300•TonyStr•11h ago•137 comments

Management as AI superpower: Thriving in a world of agentic AI

https://www.oneusefulthing.org/p/management-as-ai-superpower
58•swolpers•5h ago•68 comments

Flexible use of a multi-purpose tool by a cow

https://doi.org/10.1016/j.cub.2025.11.059
82•PlaceboGazebo•6d ago•13 comments

Arm's Cortex A725 Ft. Dell's Pro Max with GB10

https://chipsandcheese.com/p/arms-cortex-a725-ft-dells-pro-max
28•pixelpoet•3h ago•5 comments

OpenSSL: Stack buffer overflow in CMS AuthEnvelopedData parsing

https://openssl-library.org/news/vulnerabilities/#CVE-2025-15467
62•MagerValp•5h ago•37 comments

Clawdbot Renames to Moltbot

https://github.com/moltbot/moltbot/commit/6d16a658e5ebe6ce15856565a47090d5b9d5dfb6
114•philip1209•4h ago•85 comments

How many chess games are possible?

https://win-vector.com/2026/01/27/how-many-chess-games-are-possible/
15•jmount•2h ago•2 comments

LLM-as-a-Courtroom

https://falconer.com/notes/llm-as-a-courtroom/
22•jmtulloss•3h ago•1 comments

Avoiding duplicate objects in Django querysets

https://johnnymetz.com/posts/avoiding-duplicate-objects-in-django-querysets/
14•johnnymetz•4d ago•2 comments

Why are we still so afraid of using the grumpy old period?

https://www.nytimes.com/2026/01/15/magazine/ending-sentences-period.html
8•samclemens•5d ago•2 comments

A History of Haggis (2019)

https://www.historytoday.com/archive/historians-cookbook/history-haggis
8•Petiver•16h ago•1 comments