frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Your ePub Is fine

https://andreklein.net/your-epub-is-fine-kobo-disagrees-blame-adobe/
585•sohkamyung•10h ago•197 comments

Apple Foundation Models

https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models
127•MehrdadKhnzd•4h ago•37 comments

Even more batteries included with Emacs

https://karthinks.com/software/even-more-batteries-included-with-emacs/
195•signa11•7h ago•38 comments

Curl will not accept vulnerability reports during July 2026

https://daniel.haxx.se/blog/2026/06/15/curl-summer-of-bliss/
387•secret-noun•3h ago•140 comments

What the Fuck Happened to Nerds

https://mrmarket.lol/what-the-fuck-happened-to-nerds/
112•vrnvu•1h ago•63 comments

Show HN: Kage – Shadow any website to a single binary for offline viewing

https://github.com/tamnd/kage
563•tamnd•16h ago•110 comments

There Is(Ǝ) – Such That (∋)

https://www.fractalkitty.com/there-is-3-such-that/
34•evakhoury•3d ago•13 comments

Bitsy

https://bitsy.org/
198•tosh•3d ago•6 comments

Firewood Splitting Simulator

https://screen.toys/firewood/
819•memalign•5d ago•242 comments

21 years and counting of 'eight fallacies of distributed computing' (2025)

https://blog.apnic.net/2025/12/08/21-years-and-counting-of-eight-fallacies-of-distributed-computing/
87•teleforce•9h ago•16 comments

Dalus (YC W25) Is Hiring a Senior Software Engineer in Germany

https://www.ycombinator.com/companies/dalus/jobs/5IDmKJt-senior-software-frontend-engineer-german...
1•sebastianvoelkl•2h ago

Rio de Janeiro's "homegrown" LLM appears to be a merge of an existing model

https://github.com/nex-agi/Nex-N2/issues/4
350•unrvl22•18h ago•188 comments

Why does paper fold so well?

https://www.bbc.co.uk/programmes/w3ct8k70
42•zeristor•1d ago•15 comments

Being an old school web-based sports sim dev in the era of vibe coded games

https://zengm.com/blog/2026/06/vibecoded-games/
6•YesBox•2d ago•3 comments

A short history of Cerro Torre, the most controversial mountain (2012)

https://www.markhorrell.com/blog/2012/a-short-history-of-cerro-torre/
43•joebig•4d ago•16 comments

Ask HN: What are you working on? (June 2026)

233•david927•17h ago•840 comments

Formal methods and the future of programming

https://blog.janestreet.com/formal-methods-at-jane-street-index/?from_theconsensus=1
267•eatonphil•21h ago•94 comments

Show HN: Trace – Offline Mac meeting transcripts you can flag mid-call

https://traceapp.info
163•AG342•1d ago•59 comments

Chaosnet (1981)

https://tumbleweed.nu/r/lm-3/uv/amber.html
87•RGBCube•14h ago•12 comments

Exploring building a tiny FUSE filesystem

https://www.shayon.dev/post/2026/161/building-a-tiny-fuse-filesystem/
9•shayonj•2d ago•2 comments

Windows 11 users are tired of MS account requirements creeping into everything

https://www.windowscentral.com/microsoft/windows-11/windows-11-users-are-tired-of-microsoft-accou...
341•josephcsible•12h ago•232 comments

TorchCodec 0.14: HDR Video Decoding for CPU and CUDA, and Fast Wav Decoder

https://github.com/meta-pytorch/torchcodec/releases/tag/v0.14.0
47•scott_s•4d ago•5 comments

The only scalable delete in Postgres is DROP TABLE

https://planetscale.com/blog/the-only-scalable-delete
169•hollylawly•3d ago•58 comments

Perlisisms (1982)

https://www.cs.yale.edu/homes/perlis-alan/quotes.html
116•tosh•18h ago•57 comments

Caddy compatibility for zeroserve: 3x throughput and 70% lower latency

https://su3.io/posts/zeroserve-caddy-compat
186•losfair•20h ago•53 comments

Show HN: Discover Wikipedia articles popular on Hacker News

https://www.orangecrumbs.com/
115•octopus143•15h ago•26 comments

Segmented type appreciation corner (2018)

https://aresluna.org/segmented-type/
73•unexpectedVCR•3d ago•16 comments

Write for One Person

https://wizardzines.com/comics/write-for-one-person/
220•evakhoury•2d ago•66 comments

How to earn a billion dollars

https://paulgraham.com/earn.html
632•kingstoned•21h ago•1640 comments

I indexed 669 GB of my GoPro videos using my M1 Max computer and local ML models

370•iliashad•18h ago•95 comments
Open in hackernews

Premature optimization is fun sometimes

https://invlpg.com/posts/2025-06-19-premature-optimization.html
80•throawayonthe•6d ago

Comments

jdw64•5d ago
Knuth's warning about premature optimization is really about not increasing complexity based on guesswork without profiling the actual bottleneck. That's about overall architecture design. What's happening here (in this blog post) is locally for the sake of learning, and further, for intellectual fun - I think it's completely justified. Usually, the 'don't do premature optimization' quote gets misused as an excuse to avoid careful design, but setting that aside, learning within these kinds of constraints and eventually producing something. that's not premature optimization in my view.

Looking at this code, they saved one AND instruction and reduced a pipeline stall, but it seems like it would be harder for a future maintainer to understand, because not_received feels a bit less readable. I always think code that's easy for the computer to read and code that's easy for humans to understand are different things.

After writing my comment, I realized it came across as overly critical. But actually, I think this work is completely justified and beautiful. Honestly, it's at a level I couldn't achieve myself. I respect it.

srean•5d ago
Premature optimization is that occasional dessert we serve ourselves because it tastes so good.

That said, I agree with you that the maxim is often used to justify poor planning or absence of planning. Premature pessimization is bad too.

We don't have the bandwidth to test every micro-decision. That's what the learning of domain specific principles are for. Then some choices you reason through, some you test and when confronted with a perf problem, test those reasoning based choices that benchmarks point fingers at.

jdw64•4d ago
On top of that, I use it as a way to express jealousy when I see impressive optimization work. "Don't do premature optimization like this (I can't do it myself)."
benj111•4d ago
Is this about premature optimisation or just good architecture?

The number of data formats I see that miss obvious things like alignment etc. it isn't something you can easily change later if it becomes widely used.

To me this post represents the minimum you should be thinking about when designing any kind of data structure/format.

The only time where I would say it strays into premature is inverting the received flag, but only because you're optimising it for a particular processor and in a way that isn't particularly obvious. The inversion can easily be hidden behind a function call.

jdw64•4d ago
>The number of data formats I see that miss obvious things like alignment etc.

After reading that sentence, I felt a little guilty. It's actually a basic principle of design, but in practice, I just don't pay much attention to it and only write code for readability

benj111•4d ago
It doesn't even have to impact readability.

See for example

https://github.com/MayaPosch/NymphRPC/blob/master/doc/nymphr...

There's an int8 in the middle of int32s knocking everything out of alignment. And it doesn't need to be because flags is int32 and only uses 4 bits.

Changing that doesn't have to impact readability. Makes it easier to process, makes a struct representation more compact.

jdw64•4d ago
Cool
TacticalCoder•4d ago
> Usually, the 'don't do premature optimization' quote gets misused as an excuse to avoid careful design ...

The "don't do premature optimization" mindset is the reason why we've got monstrous Electron apps doing jack shit.

I hate that quote, I hate that mindset. It's the reason everything is bloated and sucks.

sgarland•4d ago
Everything would still be bloated, it’s just that the people doing the bloating point to that quote as though it’s defending their position.

What kills me is that a lot of the stuff just isn’t that hard. You need a data structure that you’ll later check membership of? Use a set. Might a list / array be more front-of-mind? Yes. But if you don’t need it, why? Is it noticeably slower? Not really. Is it objectively the correct answer? No, and it costs you essentially nothing, so just use the correct one.

rwmj•5d ago
Cries for IPv4-only structure in 2025!
razieloren•4d ago
Cries for lines of code in 2026!
chadgpt3•4d ago
The system pings a few different servers, so it should be a target ID which indexes into another table of target addresses. It's likely to benefit from having a separate ping array per target, as well.
KaiserPro•5d ago
Oh of course its fun, its seductive.

Its like writing a thriller where you are the main operative, heroically saving the day with your skill, foresight and tenacity.

The problem is, it sets a rigid path far to early that you are unwilling to move away from, either because you had ambitions for those empty stubs, or because the obvious solution means admitting that you current $thing is not as successful as it should be.

The problem I have found recently is that it bleeds into the training set that LLMs to use to make software. our platform is pretty well defined and has excellent metrics and logging that come for free.

But the LLMs are creating Otel forwarders with custom NATs transport, even though we have all of that for free already (and in the agents.md)

virajk_31•5d ago
Its fun when you are aware about what you are doing.
mojuba•5d ago
Yes and I usually say premature optimization is a skill.
gblargg•5d ago
If you don't align the array to a 4K boundary in memory, fitting within a page isn't as big of an optimization win.
account42•5d ago
If the array is dynamically allocated on its own, you will likely get a whole page from any decent allocator. If it is statically allocated the compiler can at least theoretically optimize the alignment. If its allocated as part of a larger struct then yes its up to you.

Even if it is not aligned, an unaligned 8K array would be spread to three pages which is still worse than two.

ramon156•4d ago
Balance maintenance with optimization. Is it easier to maintain? Win win!
Const-me•4d ago
Cool trick, but personally I don’t trust C bitfields. When I need something like that, I usually create C++ class or C# structure with a single private uint64 field, and public methods to extract or manipulate the logical fields.

Because the class/structure only has a single uint64 field, the compilers are likely to pass value in a single general-purpose register. I believe that’s unlikely to happen for a structure with bit fields.

If you target AVX2 or newer you also have BMI1 and BMI2, intrinsics like bextr and bzhi are probably faster than whatever codes compilers are generating for bit fields.

Binary compatibility of bit fields is a moot point, using them at the API surface across compilers or languages is not ideal. A structure with a single uint64 field is very compatible.

bongoman42•4d ago
If it wasn't fun you wouldn't need to have an aphorism against it.