frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Tiny C Compiler

https://bellard.org/tcc/
91•guerrilla•2h ago•36 comments

The silent death of Good Code

https://amit.prasad.me/blog/rip-good-code
22•amitprasad•1h ago•3 comments

SectorC: A C Compiler in 512 bytes

https://xorvoid.com/sectorc.html
176•valyala•7h ago•31 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
106•surprisetalk•6h ago•110 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...
41•gnufx•5h ago•43 comments

The F Word

http://muratbuffalo.blogspot.com/2026/02/friction.html
95•zdw•3d ago•44 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
127•mellosouls•9h ago•268 comments

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

https://openciv3.org/
876•klaussilveira•1d ago•268 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
165•AlexeyBrin•12h ago•29 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
124•vinhnx•10h ago•15 comments

FDA intends to take action against non-FDA-approved GLP-1 drugs

https://www.fda.gov/news-events/press-announcements/fda-intends-take-action-against-non-fda-appro...
56•randycupertino•2h ago•61 comments

First Proof

https://arxiv.org/abs/2602.05192
93•samasblack•9h ago•62 comments

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

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
81•thelok•8h ago•16 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
263•jesperordrup•17h ago•84 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-...
26•mbitsnbites•3d ago•2 comments

I write games in C (yes, C) (2016)

https://jonathanwhiting.com/writing/blog/games_in_c/
161•valyala•6h ago•143 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
546•theblazehen•3d ago•201 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
47•momciloo•6h ago•9 comments

Eigen: Building a Workspace

https://reindernijhoff.net/2025/10/eigen-building-a-workspace/
3•todsacerdoti•4d ago•1 comments

Show HN: Browser based state machine simulator and visualizer

https://svylabs.github.io/smac-viz/
8•sridhar87•4d ago•3 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
239•1vuio0pswjnm7•13h ago•377 comments

Selection rather than prediction

https://voratiq.com/blog/selection-rather-than-prediction/
22•languid-photic•4d ago•6 comments

Microsoft account bugs locked me out of Notepad – Are thin clients ruining PCs?

https://www.windowscentral.com/microsoft/windows-11/windows-locked-me-out-of-notepad-is-the-thin-...
70•josephcsible•4h ago•97 comments

Reinforcement Learning from Human Feedback

https://rlhfbook.com/
107•onurkanbkrc•11h ago•5 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
137•videotopia•4d ago•43 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
56•rbanffy•4d ago•15 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
46•marklit•5d ago•6 comments

Where did all the starships go?

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

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
299•alainrk•11h ago•472 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
682•nar001•11h ago•293 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.