frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Flipdiscs

https://flipdisc.io
211•skogstokig•3d ago•37 comments

I bought Friendster for $30k – Here's what I'm doing with it

https://ca98am79.medium.com/i-bought-friendster-for-30k-heres-what-i-m-doing-with-it-d5e8ddb3991d
753•ca98am79•11h ago•390 comments

TurboQuant: A first-principles walkthrough

https://arkaung.github.io/interactive-turboquant/
130•kweezar•6h ago•20 comments

AI should elevate your thinking, not replace it

https://www.koshyjohn.com/blog/ai-should-elevate-your-thinking-not-replace-it/
464•koshyjohn•12h ago•334 comments

Self-updating screenshots

https://interblah.net/self-updating-screenshots
268•bjhess•1d ago•40 comments

The Prompt API

https://developer.chrome.com/docs/ai/prompt-api
97•gslin•6h ago•63 comments

Three constraints before I build anything

https://jordanlord.co.uk/blog/3-constraints/
191•nervous_north•1d ago•29 comments

Fast16: High-precision software sabotage 5 years before Stuxnet

https://www.sentinelone.com/labs/fast16-mystery-shadowbrokers-reference-reveals-high-precision-so...
237•dd23•12h ago•52 comments

When the cheap one is the cool one

https://arun.is/blog/cheap-cool/
106•ddrmaxgt37•1d ago•48 comments

A Guide to CubeSat Mission and Bus Design

https://pressbooks-dev.oer.hawaii.edu/epet302/
24•o4c•1d ago•2 comments

Box to save memory in Rust

https://dystroy.org/blog/box-to-save-memory/
123•emschwartz•3d ago•30 comments

The Mushroom That Makes People Have the Exact Same Hallucination

https://www.vice.com/en/article/meet-the-mushroom-that-make-people-have-the-exact-same-hallucinat...
20•thunderbong•1h ago•6 comments

FreeBSD Device Drivers Book

https://github.com/ebrandi/FDD-book
80•myth_drannon•9h ago•14 comments

Sawe becomes first athlete to run a sub-two-hour marathon in a competitive race

https://www.bbc.com/sport/athletics/articles/crm1m7e0zwzo
372•berkeleyjunk•11h ago•257 comments

SWE-bench Verified no longer measures frontier coding capabilities

https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/
295•kmdupree•18h ago•161 comments

Mystery Cpuid Bit

http://www.os2museum.com/wp/mystery-cpuid-bit/
10•userbinator•2d ago•1 comments

Revocation of X.509 Certificates

https://blog.apnic.net/2026/04/24/revocation-of-x-509-certificates/
35•jandeboevrie•1d ago•7 comments

The Military Rockets That Launched the Space Age (2023)

https://airandspace.si.edu/stories/editorial/military-rockets-launched-space-age
8•radeeyate•1d ago•0 comments

Quirks of Human Anatomy

https://www.sdbonline.org/sites/fly/lewheldquirk/figlegq6.htm
130•gurjeet•2d ago•70 comments

Butterflies are in decline across North America, a look at the Western Monarch

https://www.smithsonianmag.com/science-nature/butterflies-are-in-dramatic-decline-across-north-am...
203•1659447091•11h ago•59 comments

Chernobyl wildlife forty years on

https://www.bbc.com/future/article/20260424-chernobyl-wildlife-forty-years-on
101•reconnecting•12h ago•21 comments

Running Bare-Metal Rust Alongside ESP-IDF on the ESP32-S3's Second Core

https://tingouw.com/blog/embedded/esp32/run_rust_on_app_core
66•MrBuddyCasino•3d ago•11 comments

Magic: The Gathering took me from N2 to Japanese fluency

https://www.tokyodev.com/articles/how-magic-the-gathering-took-me-from-n2-to-japanese-fluency
127•pwim•3d ago•54 comments

An AI agent deleted our production database. The agent's confession is below

https://twitter.com/lifeof_jer/status/2048103471019434248
647•jeremyccrane•15h ago•799 comments

EvanFlow – A TDD driven feedback loop for Claude Code

https://github.com/evanklem/evanflow
62•evanklem2004•6h ago•25 comments

Clay PCB Tutorial

https://feministhackerspaces.cargo.site/Clay-PCB-Tutorial
221•j0r0b0•16h ago•130 comments

Show HN: Free textbook on engineering thermodynamics

https://thermodynamicsbook.com/
138•2DcAf•17h ago•35 comments

MoQ Boy

https://moq.dev/blog/moq-boy/
59•mmcclure•11h ago•7 comments

The Visible Zorker: Zork 1

https://eblong.com/infocom/visi/zork1/
127•PLenz•15h ago•26 comments

Lessons from building multiplayer browsers

https://www.alejandro.pe/writing/sail-muddy-lessons
28•alejandrohacks•17h ago•11 comments
Open in hackernews

The Scalar Select Anti-Pattern

https://matklad.github.io/2025/05/14/scalar-select-aniti-pattern.html
47•goranmoomin•11mo ago

Comments

castratikron•11mo ago
As long as processing one event does not affect any of the other events in the batch. E.g. events are file IO, and processing one event causes another event's descriptor to get closed before that event can be processed.
wahern•11mo ago
If the close routine on an event source, or the low-level (e.g. epoll) registration, deregistration, and dequeueing logic doesn't know how to keep polling and liveness state consistent between userspace and the kernel, they've got much bigger problems. This looks like Rust code so I would hope the event stream libraries are, e.g., keeping Rc'd file objects and properly managing reference integrity viz-a-viz kernel state before the application caller ever sees the first dequeued event in a cycle. This is a perennial issue with event loop libraries and buggy application code (in every language). One can't just deal with raw file descriptors, call the close syscall directly, etc, hoping to keep state consistent implicitly. There's an unavoidable tie-in needed between application's wrappers around low-level resources and the event loop in use.
taeric•11mo ago
I'm not entirely clear on what the proposal is at the end? Seems that the long term answer as to "which of these implications to pursue" is "all of them?" Simply taking in a batch of instructions doesn't immediately change much? You still have to be able to do each of the other things. And you will still expect some dependencies between batches that could possibly interact in the same ways.

In a sense, this is no different than how your processor is dealing with instructions coming in. You will have some instructions that can be run without waiting on previous ones. You will have some that can complete quickly. You will have some that are stalled on other parts of the system. (I'm sure I could keep wording an instruction to match each of the implications.)

To that end, part of your program has to deal with taking off "whats next" and finding how to prepare that to pass to the execution portion of your program. You can make that only take in batches, but you are almost certainly responsible for how you chunk them moreso than whatever process is sending the instructions to you? Even if you are handed clear batches, it is incumbent on you to batch them as they go off to the rest of the system.

lmz•11mo ago
I guess the proposal is "instead of fetching and acting on one event at a time, consider fetching all available events and look for opportunities to optimize which ones you process (e.g. by prioritization or by skipping certain events if superseded by newer ones)".
taeric•11mo ago
I mean, I got that. But you could as easily say "instead of fetching and acting on one event at a time, fetch and triage/route instructions into applicable queues."

In particular, there is no guarantee that moving to batches changes any of the problems you may have from acting on a single one at a time. To that end, you will have to look into all of the other strategies sooner or later.

Following from that, the problem is not "processMessage" or whatever. The problem is that you haven't broken "processMessage" up into the constituent "receive/triage/process/resolve" loop that you almost certainly will have to end up with.

malkia•11mo ago
in CPU's - pipelining!
jchw•11mo ago
I believe something similar is going on internally in Windows with event queues. It coalesces and prioritizes input events when multiple of them pile up before you're able to pop new events off of the queue. (For some events, e.g. pointer events, you can even go and query frames that were coalesced during input handling.) On the application/API end, it just looks like a "scalar select" loop, but actually it is doing batching behavior for input events!

(On the flip side, if you have a Wayland client that falls behind on processing its event queue, it can crash. On the whole this isn't really that bad but if you have something sending a shit load of events it can cause very bad behavior. This has made me wonder if it's possible, with UNIX domain sockets, to implement some kind of event coalescing on the server-side, to avoid flooding the client with high-precision pointer movement events while it's falling behind. Maybe start coalescing when FIONREAD gets to some high watermark? No idea...)