frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

DoNotNotify is now Open Source

https://donotnotify.com/opensource.html
98•awaaz•2h ago•12 comments

Show HN: LocalGPT – A local-first AI assistant in Rust with persistent memory

https://github.com/localgpt-app/localgpt
225•yi_wang•8h ago•90 comments

Haskell for all: Beyond agentic coding

https://haskellforall.com/2026/02/beyond-agentic-coding
115•RebelPotato•8h ago•31 comments

SectorC: A C Compiler in 512 bytes (2023)

https://xorvoid.com/sectorc.html
304•valyala•16h ago•59 comments

Matchlock: Linux-based sandboxing for AI agents

https://github.com/jingkaihe/matchlock
6•jingkai_he•2h ago•0 comments

LLMs as the new high level language

https://federicopereiro.com/llm-high/
119•swah•5d ago•207 comments

The Architecture of Open Source Applications (Volume 1) Berkeley DB

https://aosabook.org/en/v1/bdb.html
33•grep_it•5d ago•4 comments

Moroccan sardine prices to stabilise via new measures: officials

https://maghrebi.org/2026/01/27/moroccan-sardine-prices-to-stabilise-via-new-measures-officials/
31•mooreds•5d ago•3 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
235•mellosouls•19h ago•390 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
185•surprisetalk•16h ago•191 comments

LineageOS 23.2

https://lineageos.org/Changelog-31/
60•pentagrama•4h ago•11 comments

Modern and Antique Technologies Reveal a Dynamic Cosmos

https://www.quantamagazine.org/how-modern-and-antique-technologies-reveal-a-dynamic-cosmos-20260202/
4•sohkamyung•5d ago•0 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
195•AlexeyBrin•21h ago•36 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
203•vinhnx•19h ago•21 comments

Brookhaven Lab's RHIC concludes 25-year run with final collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
80•gnufx•15h ago•65 comments

Wood Gas Vehicles: Firewood in the Fuel Tank (2010)

https://solar.lowtechmagazine.com/2010/01/wood-gas-vehicles-firewood-in-the-fuel-tank/
55•Rygian•3d ago•21 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
366•jesperordrup•1d ago•109 comments

uLauncher

https://github.com/jrpie/launcher
26•dtj1123•4d ago•7 comments

First Proof

https://arxiv.org/abs/2602.05192
148•samasblack•18h ago•93 comments

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
104•momciloo•16h ago•24 comments

Substack confirms data breach affects users’ email addresses and phone numbers

https://techcrunch.com/2026/02/05/substack-confirms-data-breach-affecting-email-addresses-and-pho...
59•witnessme•5h ago•22 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
612•theblazehen•3d ago•219 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
113•thelok•18h ago•25 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
345•1vuio0pswjnm7•22h ago•565 comments

LLMs as Language Compilers: Lessons from Fortran for the Future of Coding

https://cyber-omelette.com/posts/the-abstraction-rises.html
6•birdculture•1h ago•1 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
922•klaussilveira•1d ago•282 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
181•speckx•4d ago•267 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
46•mbitsnbites•3d ago•7 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
312•isitcontent•1d ago•39 comments

The Scriptovision Super Micro Script video titler is almost a home computer

http://oldvcr.blogspot.com/2026/02/the-scriptovision-super-micro-script.html
11•todsacerdoti•7h ago•1 comments
Open in hackernews

Avoiding duplicate objects in Django querysets

https://johnnymetz.com/posts/avoiding-duplicate-objects-in-django-querysets/
32•johnnymetz•2w ago

Comments

augusteo•1w 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•1w 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.

storystarling•1w ago
I've mostly switched to raw SQL for these kinds of queries too. It seems like the maintenance burden is actually lower when you can see the explicit query plan, rather than trying to reverse engineer what the ORM is doing with the joins.
jiaaro•1w ago
Exists is a useful tool that you should certainly know how to use. Whether or not it's faster than distinct depends on the rest of the query. I've optimized queries where distinct is faster than exists. It's been some time, but I think it boils down to the relative sizes of the tables and how many of the exists queries actually find something (and how often they find more than one something).

Also, some databases (like clickhouse) allow for `any` joins which avoid producing duplicate rows. For example:

    select author.*
    from author
    inner any join book on (
        book.author_id = author.id 
        and book.title like 'Book%'
    )
tecoholic•1w ago
Nice write up showcasing Exists. I would say, if ORM abstraction “distinct()” is a performance issue, then it’s probably time to switch to SQL. I find it simpler to either use the ORM or the SQL than to bend ORM into SQL.
sgarland•1w ago
The ORM isn’t the performance issue here, it’s the DB. DISTINCT is a form of GROUP BY, and so it brings with it the various limitations imposed by the RDBMS. For example, look at what MySQL requires to use an index to perform a GROUP BY.

0: https://dev.mysql.com/doc/refman/8.4/en/group-by-optimizatio...

tecoholic•1w ago
Ah! I see. Thank you.