frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

UK's first small nuclear power station to be built in north Wales

https://www.bbc.com/news/articles/c051y3d7myzo
29•ksec•1h ago•17 comments

AirPods libreated from Apple's ecosystem

https://github.com/kavishdevar/librepods
788•moonleay•11h ago•208 comments

Maybe You're Not Actually Trying

https://usefulfictions.substack.com/p/maybe-youre-not-actually-trying
22•eatitraw•1h ago•3 comments

Our investigation into the suspicious pressure on Archive.today

https://adguard-dns.io/en/blog/archive-today-adguard-dns-block-demand.html
1601•immibis•1d ago•393 comments

IDEmacs: A Visual Studio Code clone for Emacs

https://codeberg.org/IDEmacs/IDEmacs
212•nogajun•10h ago•67 comments

Hyundai Paywalls Brake Pads replacement on Ioniq 5 N

https://www.thedrive.com/news/replacing-brake-pads-on-a-hyundai-ioniq-5-n-requires-a-professional...
97•zdw•8h ago•38 comments

Run Nix Based Environments in Kubernetes

https://flox.dev/kubernetes/
27•kelseyhightower•5d ago•2 comments

Why I Don't Need a Steam Machine

https://brainbaking.com/post/2025/11/why-i-dont-need-a-steam-machine/
45•ingve•1h ago•59 comments

Things that aren't doing the thing

https://strangestloop.io/essays/things-that-arent-doing-the-thing
310•downboots•17h ago•154 comments

In Praise of Useless Robots

https://thereader.mitpress.mit.edu/in-praise-of-useless-robots/
9•pseudolus•3d ago•0 comments

Writing a DOS Clone in 2019

https://medium.com/@andrewimm/writing-a-dos-clone-in-2019-70eac97ec3e1
26•shakna•1w ago•7 comments

libwifi: an 802.11 frame parsing and generation library written in C

https://libwifi.so/
117•vitalnodo•13h ago•9 comments

Bypassing the Branch Predictor

https://nicula.xyz/2025/03/10/bypassing-the-branch-predictor.html
20•signa11•4h ago•7 comments

Facebook Text Log Between Mark Zuckerberg and Kevin Systrom(Instagram Cofounder)

https://www.dropbox.com/scl/fo/0e4qbvj7w8cwxdlpo010c/AHCMfNHmj03nPnJ-VKDYRvA?dl=0&e=1&noscript=1&...
9•Fiveplus•3h ago•0 comments

Boa: A standard-conforming embeddable JavaScript engine written in Rust

https://github.com/boa-dev/boa
234•maxloh•1w ago•64 comments

The inconceivable types of Rust: How to make self-borrows safe (2024)

https://blog.polybdenum.com/2024/06/07/the-inconceivable-types-of-rust-how-to-make-self-borrows-s...
89•birdculture•12h ago•13 comments

When did people favor composition over inheritance?

https://www.sicpers.info/2025/11/when-did-people-favor-composition-over-inheritance/
178•ingve•1w ago•136 comments

AsciiMath

https://asciimath.org/
105•smartmic•14h ago•31 comments

Transgenerational Epigenetic Inheritance: the story of learned avoidance

https://elifesciences.org/articles/109427
149•nabla9•17h ago•85 comments

Show HN: Unflip – a puzzle game about XOR patterns of squares

https://unflipgame.com/
135•bogdanoff_2•4d ago•32 comments

When UPS charged me a $684 tariff on $355 of vintage computer parts

http://oldvcr.blogspot.com/2025/11/when-ups-charged-me-684-tariff-on-355.html
241•goldenskye•11h ago•205 comments

TCP, the workhorse of the internet

https://cefboud.com/posts/tcp-deep-dive-internals/
320•signa11•1d ago•149 comments

Blocking LLM crawlers without JavaScript

https://www.owl.is/blogg/blocking-crawlers-without-javascript/
142•todsacerdoti•12h ago•70 comments

An exposed .git folder let us dox a phishing campaign

19•spirovskib•2h ago•7 comments

Linux on the Fujitsu Lifebook U729

https://borretti.me/article/linux-on-the-fujitsu-lifebook-u729
188•ibobev•20h ago•133 comments

Archimedes – A Python toolkit for hardware engineering

https://pinetreelabs.github.io/archimedes/blog/2025/introduction.html
89•i_don_t_know•16h ago•12 comments

Report: Tim Cook could step down as Apple CEO 'as soon as next year'

https://9to5mac.com/2025/11/14/tim-cook-step-down-as-apple-ceo-as-soon-as-next-year-report/
164•achow•14h ago•335 comments

JVM exceptions are weird: a decompiler perspective

https://purplesyringa.moe/blog/jvm-exceptions-are-weird-a-decompiler-perspective/
78•birdculture•1w ago•4 comments

Ubiquiti Flex Mini 2.5G Review Ubiquiti Does a Cheap 5-Port 2.5GbE Switch

https://www.servethehome.com/ubiquiti-flex-mini-2-5g-review-ubiquiti-does-a-cheap-5-port-2-5gbe-s...
35•ksec•4h ago•10 comments

EyesOff: How I built a screen contact detection model

https://ym2132.github.io/building_EyesOff_part2_model_training
28•Two_hands•1d ago•12 comments
Open in hackernews

Bypassing the Branch Predictor

https://nicula.xyz/2025/03/10/bypassing-the-branch-predictor.html
20•signa11•4h ago

Comments

tux3•1h ago
My first instinct for a poorly predicted branch would be to use a conditional move.

This isn't always a win, because you prevent the CPU from speculating down the wrong path, but you also prevent it from speculating the correct path.

If you really don't care about the failure path and really don't mind unmaintainable low-level hacks, I can think of a few ways to get creative.

First there's the whole array of anti uarch-speculation-exploit tricks in the Kernel that you can use as inspiration to control what the CPU is allowed to speculate. These little bits of assembly were reviewed by engineers from Intel and AMD, so these tricks can't stop working without also breaking the kernel with it.

Another idea is to take inspiration from anti-reverse engineering tricks. Make the failure path an actual exception. I don't mean software stack unwinding, I mean divide by your boolean and then call your send function unconditionally. If the boolean is true, it costs nothing because the result of the division is unused and we just speculate past it. If the boolean is false, the CPU will raise a divide by 0 exception, and this invisible branch will never be predicted by the CPU. Then your exception handler recovers and calls the cold path.

IshKebab•1h ago
Interesting problem! Not a very satisfying solution but I can't think of anything better. Even if there were hints that were respected, you'd still have the problem of the code not being in icache, unless you actually execute it occasionally.
nneonneo•1h ago
What a fun problem to think about.

My first instinct, knowing less about this domain than maybe I should, would be to abuse the return address predictor. I believe CPUs will generally predict the target of a “ret” instruction using an internal stack of return addresses; some ARM flavours even make this explicit (https://developer.arm.com/documentation/den0042/0100/Unified...).

The way to abuse this would be to put send() on the normal return path and call abandon() by rewriting the return address. In code:

  void resolve(Transaction *t) {
    predict(t);
    send(t);
  }

  void predict(Transaction *t) {
    if (!should_send(t)) *(void **)__builtin_return_address(0) = &abandon;
  }
This isn’t exactly correct because it ignores control flow integrity (which you’d have to bypass), doesn’t work like this on every architecture, and abandon() would need to be written partly in assembly to deal with the fact that the stack is in a weird state post-return, but hopefully it conveys the idea anyway.

The if in predict() is implementable as a branchless conditional move. The return address predictor should guess that predict() will return to send(), but in most cases you’ll smash the return address to point at abandon() instead.

jcul•1h ago
Why not just make all the abandon transactions into fake discarded transactions, discard them at the send later. E.g. by poisoning the frame checksum or setting something invalid on them, so they get discarded.

Seems you'd be doing this anyway with the dummy transactions.

Then you have no branch, though may want to add dummy transactions anyway to keep the code in cache.

kklisura•52m ago
> I asked Claude if there is such a way to basically hard-code branch prediction rules into the machine code, and the answer was that there’s no way to do this on x86, but there is a way on ARM: the BEQP (predict branch taken) and BEQNP (predict branch not taken) instructions.

> Those ARM instructions are just hallucinated, and the reality is actually the other way around: ARM doesn’t have a way of hard-coding ‘predictions’, but x86 does.

This made me chuckle. Thanks.

nandomrumber•47m ago
If a human wrote that here (on HN) someone would note the error and the poster would reply:

Yes, sorry, you’re correct. I’ve usually had 97 more double ristrettos by this time in the morning.

Some schools of though suggest this has already happened.

ViolentTurkey•50m ago
Make sure your global branch history is the same when "mistraining" and predicting with your BTB. You may end up in the wrong BTB entry and still mess up your prediction :).