frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Optimizing a Math Expression Parser in Rust

https://rpallas.xyz/math-parser/
18•serial_dev•52m ago•2 comments

Thunderbird 140 "Eclipse"

https://blog.thunderbird.net/2025/07/welcome-to-thunderbird-140-eclipse/
76•TangerineDream•2d ago•26 comments

Show HN: Typeform was too expensive so I built my own forms

https://www.ikiform.com/
10•preetsuthar17•1h ago•2 comments

MCP-B: A Protocol for AI Browser Automation

https://mcp-b.ai/
233•bustodisgusto•11h ago•116 comments

Tree Borrows

https://plf.inf.ethz.ch/research/pldi25-tree-borrows.html
504•zdw•19h ago•131 comments

A Typology of Canadianisms

https://dchp.arts.ubc.ca/how-to-use
155•gnabgib•12h ago•153 comments

Show HN: FlopperZiro – A DIY open-source Flipper Zero clone

https://github.com/lraton/FlopperZiro
277•iraton•16h ago•60 comments

Biomni: A General-Purpose Biomedical AI Agent

https://github.com/snap-stanford/Biomni
186•GavCo•14h ago•29 comments

Show HN: MCP server for searching and downloading documents from Anna's Archive

https://github.com/iosifache/annas-mcp
153•iosifache•13h ago•45 comments

The Origin of the Research University

https://asteriskmag.com/issues/10/the-origin-of-the-research-university
74•Petiver•3d ago•1 comments

The jank programming language

https://jank-lang.org/
322•akkad33•3d ago•85 comments

A fast 3D collision detection algorithm

https://cairno.substack.com/p/improvements-to-the-separating-axis
229•OlympicMarmoto•20h ago•27 comments

Show HN: BreakerMachines – Modern Circuit Breaker for Rails with Async Support

https://github.com/seuros/breaker_machines
26•seuros•3d ago•7 comments

Solar power has begun to transform the world’s energy system

https://www.newyorker.com/news/annals-of-a-warming-planet/46-billion-years-on-the-sun-is-having-a-moment
154•dmazin•21h ago•224 comments

From Task to Table: How I Got to the Korean Burger

https://medium.com/@chrisveleris/from-task-to-table-how-i-finally-got-to-the-korean-burger-01245a14d491
5•cvicpp123•2d ago•0 comments

Show HN: Petrichor – a free, open-source, offline music player for macOS

https://github.com/kushalpandya/Petrichor
111•kushalpandya•12h ago•49 comments

Evaluating the Effectiveness of Memory Safety Sanitizers

https://www.computer.org/csdl/proceedings-article/sp/2025/223600a088/21TfesaEHTy
23•signa11•2d ago•6 comments

Bootstrapping a side project into a profitable seven-figure business

https://projectionlab.com/blog/we-reached-1m-arr-with-zero-funding
844•jonkuipers•2d ago•229 comments

Configuring Split Horizon DNS with Pi-Hole and Tailscale

https://www.bentasker.co.uk/posts/blog/general/configuring-pihole-to-serve-different-records-to-different-clients.html
101•gm678•17h ago•28 comments

Archaeologists unveil 3,500-year-old city in Peru

https://www.bbc.co.uk/news/articles/c07dmx38kyeo
154•neversaydie•3d ago•58 comments

Code and Trust: Vibrators to Pacemakers

https://punkx.org/jackdoe/code-and-trust.html
47•jackdoe•3d ago•32 comments

Cmdk – CD anywhere and open anything in your terminal

https://github.com/mieubrisse/cmdk
12•mieubrisse•2d ago•7 comments

Linda Yaccarino is leaving X

https://www.nytimes.com/2025/07/09/technology/linda-yaccarino-x-steps-down.html
452•donohoe•19h ago•775 comments

Xenharmlib: A music theory library that supports non-western harmonic systems

https://xenharmlib.readthedocs.io/en/latest/
175•retooth•1d ago•17 comments

Ruby 3.4 frozen string literals: What Rails developers need to know

https://www.prateekcodes.dev/ruby-34-frozen-string-literals-rails-upgrade-guide/
227•thomas_witt•4d ago•112 comments

The most otherworldly, mysterious forms of lightning on Earth

https://www.nationalgeographic.com/science/article/lightning-sprites-transient-luminous-events-thunderstorms
101•Anon84•3d ago•34 comments

German court rules Meta tracking technology violates European privacy laws

https://therecord.media/german-court-meta-tracking-tech
285•bundie•5h ago•118 comments

Grok 4 Launch [video]

https://twitter.com/xai/status/1943158495588815072
182•meetpateltech•6h ago•131 comments

Matt Trout has died

https://www.shadowcat.co.uk/2025/07/09/ripples-they-cause-in-the-world/
50•todsacerdoti•2h ago•12 comments

HyAB k-means for color quantization

https://30fps.net/pages/hyab-kmeans/
40•ibobev•12h ago•10 comments
Open in hackernews

Understand CPU Branch Instructions Better

https://chrisfeilbach.com/2025/07/05/understand-cpu-branch-instructions-better/
66•mfiguiere•3d ago

Comments

noone_youknow•3d ago
Nice article! Always good to see easy-to-follow explainers on these kinds of concepts!

One minor nit, for the “odd corner case that likely never exists in real code” of taken branches to the next instruction, I can think of at least one example where this is often used: far jumps to the next instruction with a different segment on x86[_64] that are used to reload CS (e.g. on a mode switch).

Aware that’s a very specific case, but it’s one that very much does exist in real code.

chrisfeilbach•4h ago
Author here. I'll work this in. Thank you.
a_void_sky•3d ago
its such a fascinating thing that most people just ignore i too wrote (using AI) an article on Branch Prediction after i found out that most of my team members only read this in college but never understood
djmips•11h ago
Weird cookie policy on that blog?
chrisfeilbach•3h ago
What's weird about it? It's the standard Wordpress cookie policy.
djmips•2h ago
I couldn't choose like most sites
chrisfeilbach•2h ago
Weird, I'll investigate tomorrow, thank you.
msk-lywenn•2h ago
I clicked "learn more" and then I got a "disagree" button. Not really the most intuitive flow but it's there...
vincent-manis•10h ago
This is why the old-fashioned university course on assembly language is still useful. Writing assembly language (preferably for a less-complex architecture, so the student doesn't get bogged down on minutiae) gives one a gut feeling for how machines work. Running the program on a simulator that optionally pays attention to pipeline and cache misses can help a person understand these issues.

It doesn't matter what architecture one studies, or even a hypothetical one. The last significant application I wrote in assembler was for System/370, some 40 years ago. Yet CPU ISAs of today are not really that different, conceptually.

saagarjha•9h ago
ISAs have not changed, sure. Microarchitectures are completely different and basically no school is going to teach you anything useful for that.
dragontamer•9h ago
> Yet CPU ISAs of today are not really that different, conceptually.

CPU true.

GPU no. It's not even the instructions that are different, but I would suggest studying up on GPU loads/stores.

GPUs have fundamentally altered how loads/stores have worked. Yes it's a SIMD load (aka gather operation) which has been around since the 80s. But the routing of that data includes highly optimized broadcast patterns and or butterfly routing or crossbars (which allows for an arbitrary shuffle within log2(n)).

Load(same memory location) across GPU Threads (or SimD lanes) compiles as a single broadcast.

Load(consecutive memory location) across consecutive SIMD lanes is also efficient.

Load(arbitrary) is doable but slower. The crossbar will be taxed.

PerryStyle•8h ago
Do you have any good resources that go into detail on GPU ISAs or GPU architecture? There's certainly a lot available for CPUs, but the resources I’ve found for GPUs mostly focus on how they differ from CPUs and how their ISAs are tailored to the GPU's specific goals.
grg0•7h ago
Unfortunately this is a topic that isn't open enough, and architectures change rather quickly so you're always chasing the rabbit. That being said:

RDNA architecture (a few gens old) slides has some breadcrumbs: https://gpuopen.com/download/RDNA_Architecture_public.pdf

AMD also publishes its ISAs, but I don't think you'll be able to extract much from a reference-style document: https://gpuopen.com/amd-gpu-architecture-programming-documen...

Books on CUDA/HIP also go into some detail of the underlying architecture. Some slides from NV:

https://gfxcourses.stanford.edu/cs149/fall21content/media/gp...

Edit: I should say that Apple also publishes decent stuff. See the link here and the stuff linked at the bottom of the page. But note that now you're in UMA/TBDR territory; discrete GPUs work considerably differently: https://developer.apple.com/videos/play/wwdc2020/10602/

If anyone has more suggestions, please share.

xelxebar•4h ago
Branch Education apparently decapped and scanned a GA102 (Nvidia 30 series) for the following video: https://www.youtube.com/watch?v=h9Z4oGN89MU. The beginning is very basic, but the content ramps up quickly.
hinkley•5h ago
Intro CompE class does a good bit for mechanical sympathy as well.
IshKebab•3h ago
I don't think we had out of order designs with speculative execution 40 years ago? That seems like a pretty huge change.
flohofwoe•3h ago
These are mostly internal implementation details, instructions still appear to resolve in order from the outside (with some subtle exceptions for memory read/writes depending on the CPU architecture). It may become important to know such details for performance profiling though.

What has drastically changed is that you cannot do trivial 'cycle counting' anymore.

tucnak•2h ago
Not to step on your toes, but it shall be said that instructions in a CPU "retire" in order.
jdougan•3h ago
Did you teach the UBC CS systems programming course in 1985?
o11c•8h ago
Decent intro, though nothing new.

A couple useful points it lacks:

* `switch` statements can be lowered in two different ways: using a jump table (an indirect branch, only possible when values are adjacent; requires a highly-predictable branch to check the range first), or using a binary search (multiple direct branches). Compilers have heuristics to determine which should be used, but I haven't played with them.

* You may be able to turn an indirect branch into a direct branch using code like the following:

  if (function_pointer == expected_function)
    expected_function();
  else
    (*function_pointer)();
* It's generally easy to turn tail recursion into a loop, but it takes effort to design your code to make that possible in the first place. The usual Fibonacci example is a good basic intro; tree-walking is a good piece of homework.

* `cmov` can be harmful (since it has to compute both sides) if branch is even moderately predictable and/or if the less-likely side has too many instructions. That said, from my tests, compilers are still too hesitant to use `cmov` even for cases where yes I really know dammit. OoO CPUs are weird to reason about but I've found that due to dependencies between other instructions, there's often some execution ports to spare for the other side of the branch.

chrisfeilbach•4h ago
Author here. You can only write so much before you start to lose the audience -- do you believe that anything you mentioned in your list is inherently lacking from my post?

Cool trick with the function pointer comparison!

xelxebar•4h ago
Good material, targeted at undergraduate or advanced high school level.

I've been slowly reading Agner Fog's resources. The microarchitecture manual is incredible, and pertinently, the section on branch prediction algorithms I find fascinating:

https://web.archive.org/web/20250611003116/https://www.agner...