frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Restartable Sequences

https://justine.lol/rseq/
23•grappler•1h ago

Comments

khuey•28m ago
Maybe I'm just getting old but the "if you don't spend $20,000 on a workstation you're going to be left behind like a dinosaur" at the top of this article is a huge turn off to reading any further. And I say that as someone who owns a workstation with more cores than the author's.
toast0•11m ago
If we're being generous, they're saying you need at least a raspberry pi?

But agreeing with you, I've done big optimization stuff for multicore servers (not as many cores, but same kind of work) and my workstation was something small with not even the same os. I don't need the big machine on my desk to understand the concepts. I just need the big machine to check my work. For me, that's always been a production machine, sometimes a production machine taken out of rotation for pre-validation before running on production load.

Of course, if you want to do this kind of work and you don't have your own production load, you're going to have to borrow, rent, or buy a big machine. It doesn't need to be your workstation though. I hate working with cloud nonsense, but if your tests are short, and you do the upfront work to make your images start fast, you can probably save a lot of money by renting spot instances when testing ... I don't know if you can do spot instances of bare metal though, so you're probably stuck with vm overhead.

GlenTheMachine•27m ago
If you had no idea what a restorable sequence is the takeaway is about halfway down the OP:

“This is why Linux now provides rseq() which is a much more enlightened solution. With restartable sequences, you actually can get rid of both the mutex and atomics, while the OS continues to fully abstract scheduling. The way it works is you advise the kernel whenever your program enters a critical section of code that you don't want interrupted. It's probably going to be maybe 10 assembly instructions tops. The first assembly opcode should be a move instruction that sets the rseq_cs field. The last instruction needs to be the thing that makes the modification to your global data structure. Think of it sort of like a really tiny database transaction. What makes it go fast, is that the bidirectional communication with the kernel happens via shared memory.”

manoDev•19m ago
That’s clever — am I right to think it’s the intermediate solution between locks and full STM, implemented at the kernel level, and with zero abstraction cost?
khuey•6m ago
It's in some sense a light form of STM. The key insight behind rseq(2) is that if the data is local to a given CPU the only way to get a race is if the kernel deschedules your program from that CPU at an inopportune time. If your operation can be aborted and restarted and the kernel has a mechanism to notify you when that needs to happen you can dispense with the overhead of "real" synchronization and just use a couple mov instructions to enter and exit the critical section.
rwmj•11m ago
LWN has a good article: https://lwn.net/Articles/1033955/
Veserv•14m ago
Restartable windows, or more generically introspection windows, are a really useful technique you can apply in any situation where you understand or control the sources of preemption. The earliest uses of this technique in operating systems that I am aware of are ~25 years old.

The key insight is that the preempter can introspect the program counter of the code being preempted (which is now stable since it was preempted) and act accordingly. The simplest mechanism is to reset their program counter if in a critical section. The more generic mechanism is to jump them to a supplied address. This allows you to do things like hard abort and more.

You can further remove the need for the preempter to understand the preempted code by having the preempted code create a self-introspection code snippet and supplying that with the program counter at preemption. So the preempter just vectors them to their own code which knows how to interpret its own state at any preemption point.

Cloudflare Turnstile requiring fingerprintable WebGL

https://hacktivis.me/articles/cloudflare-turnstile-webgl-fingerprinting
137•HypnoticOcelot•1h ago•71 comments

The solution might be cancelling my AI subscription

https://thoughts.hmmz.org/2026-05-31.html
85•dmw_ng•1h ago•42 comments

Dav2d

https://jbkempf.com/blog/2026/dav2d/
266•captain_bender•4h ago•78 comments

1-Bit Bonsai Image 4B Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
30•modinfo•50m ago•7 comments

Restartable Sequences

https://justine.lol/rseq/
24•grappler•1h ago•7 comments

The Website Specification

https://specification.website/
336•k1m•8h ago•135 comments

London's Free Roof Terraces

https://diamondgeezer.blogspot.com/2026/05/londons-free-roof-terraces.html
191•zeristor•8h ago•93 comments

Domain expertise has always been the real moat

https://www.brethorsting.com/blog/2026/05/domain-expertise-has-always-been-the-real-moat/
749•aaronbrethorst•19h ago•444 comments

I Put a Datacenter GPU in My Gaming PC for £200

https://blog.tymscar.com/posts/v100localllm/
108•birdculture•2h ago•57 comments

Security Envelope Pattern collection – S.E.C.R.E.T

https://secret-archive.org/
57•ColinWright•2d ago•6 comments

Shantell Sans (2023)

https://shantellsans.com/process
345•aleda145•17h ago•40 comments

One year of Roto, a compiled scripting language for Rust

https://blog.nlnetlabs.nl/one-year-of-roto-the-compiled-scripting-language-for-rust/
89•Hasnep•2d ago•17 comments

Show HN: Atomic Editor – Obsidian-style live preview for CodeMirror 6

https://kenforthewin.github.io/atomic-editor/
15•kenforthewin•3h ago•6 comments

The AV2 Video Standard Has Released (Final v1.0 Specification)

https://av2.aomedia.org
289•ksec•18h ago•130 comments

A Gentle Introduction to Lattice-Based Cryptography [pdf]

https://cryptography101.ca/wp-content/uploads/lattice-based-cryptography.pdf
133•jayhoon•2d ago•11 comments

I found a seashell in the middle of the desert

https://github.com/Hawzen/I-found-a-seashell-in-the-middle-of-the-desert#i-found-a-seashell-in-th...
382•Hawzen•2d ago•103 comments

Avian Visitors

https://theodore.net/projects/AvianVisitors/
90•fdb•9h ago•7 comments

Daily pill can double survival time for deadliest cancer, trial shows

https://www.theguardian.com/society/2026/may/31/daily-pill-daraxonrasib-double-survival-time-panc...
5•c-oreills•12m ago•0 comments

Inkstravaganza

https://www.inkandswitch.com/newsletter/dispatch-015/
17•surprisetalk•3d ago•3 comments

Show HN: Breathe CLI – Paced resonance breathing in the macOS terminal

https://github.com/marekkowalczyk/breathe-cli
87•marekkowalczyk•19h ago•11 comments

The "Stars" of Titanic (2012)

https://blogs.loc.gov/inside_adams/2012/04/the-stars-of-titanic/
5•tosh•2d ago•0 comments

Telli (YC F24) is hiring in engineering, design, and GTM [Berlin, on-site]

https://hi.telli.com/join-us
1•sebselassie•8h ago

Frost: [Browser] Fingerprinting Remotely Using OPFS-Based SSD Timing [pdf]

https://hannesweissteiner.com/pdfs/frost.pdf
5•simjnd•1h ago•1 comments

A pictorial introduction to differential geometry (2017)

https://arxiv.org/abs/1709.08492
93•ricudis•10h ago•2 comments

You Weren't Meant to Have a Boss (2008)

https://paulgraham.com/boss.html
39•downbad_•3h ago•26 comments

Folding Beijing

https://www.uncannymagazine.com/article/folding-beijing-2/
11•root-parent•1h ago•0 comments

Associative learning turns DEET from aversive to appetitive in Aedes aegypti

https://journals.biologists.com/jeb/article/229/10/jeb251935/371741/Associative-learning-switches...
61•croes•2d ago•30 comments

Racket v9.2

https://blog.racket-lang.org/2026/05/racket-v9-2.html
211•spdegabrielle•3d ago•20 comments

Experimental pill promises new hope for pancreatic cancer

https://apnews.com/article/pancreatic-cancer-daraxonrasib-chemotherapy-kras-62537cbc43c5286edb4c0...
7•marc__1•36m ago•0 comments

Accenture to acquire Ookla

https://newsroom.accenture.com/news/2026/accenture-to-acquire-ookla-to-strengthen-network-intelli...
309•Garbage•23h ago•158 comments