frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

For first time, a cell built from scratch grows and divides

https://www.quantamagazine.org/for-the-first-time-a-cell-built-from-scratch-grows-and-divides-202...
391•defrost•3h ago•123 comments

Physical disc production ending in Jan 2028 for new games on PlayStation

https://blog.playstation.com/2026/07/01/physical-disc-production-ending-in-january-2028-for-new-g...
300•Tiberium•5h ago•372 comments

FFmpeg 9.1's new AAC encoder

https://hydrogenaudio.org/index.php/topic,129691.0.html
63•ledoge•3h ago•31 comments

How We Made IPFS Content Publishing 10x Faster

https://probelab.io/blog/optimistic-provide/
66•dennis-tra•2h ago•11 comments

Box3D, an open source 3D physics engine

https://box2d.org/posts/2026/06/announcing-box3d/
249•makepanic•5h ago•49 comments

Ask HN: Who is hiring? (July 2026)

68•whoishiring•3h ago•83 comments

Monetization Gateway

https://blog.cloudflare.com/monetization-gateway/
131•soheilpro•4h ago•62 comments

Internal Combustion Engine

https://ciechanow.ski/internal-combustion-engine/
131•StefanBatory•5h ago•18 comments

Ask HN: Who wants to be hired? (July 2026)

48•whoishiring•3h ago•112 comments

What to Learn to Be a Graphics Programmer

https://blog.demofox.org/2026/07/01/what-to-learn-to-be-a-graphics-programmer/
4•atan2•13m ago•0 comments

Launch HN: Parsewise (YC P25) – Reason Across Documents with an API

32•gergelycsegzi•4h ago•29 comments

My OSCP Pentesting Cheatsheet

https://hackerask.com/posts/pentesting-cheatsheet/
10•HackerAsk•16m ago•1 comments

Solid and Clean Code never felt solid or clean to me

https://devz.cl/posts/solid-never-felt-solid/
23•DanielVZ•2h ago•22 comments

Fixing a kubelet memory leak in Kubernetes 1.36

https://heyoncall.com/blog/fixing-kubernetes-kubelet-memory-leak
33•compumike•15h ago•7 comments

Manufact (YC S25) Is Hiring a Developer Advocate in SF

https://www.ycombinator.com/companies/manufact/jobs/4cyWd6S-developer-advocate-partnerships-devrel
1•luigipederzani•4h ago

Building Gin: Simple over Easy

https://manualmeida.dev/articles/gin-simple-over-easy/
4•manucorporat•21m ago•1 comments

Sony Deletes 551 Movies PlayStation Owners Paid For

https://reclaimthenet.org/sony-deletes-551-studiocanal-movies-playstation-owners-paid-for
252•bilsbie•3h ago•126 comments

Reduce GVisor Cold Starts with GPU Snapshotting

https://cerebrium.ai/blog/reducing-gpu-cold-starts-with-memory-snapshots-restoring-cuda-workloads...
28•jono_irwin•1h ago•7 comments

Show HN: Pglayers – PostgreSQL extensions as stackable Docker layers

https://github.com/pglayers/pglayers
11•iemejia•1h ago•2 comments

Show HN: LIBR tracing with source ledger rows and byte-exact PDF verification

https://exitprotocols.com/engineering/libr-state-machine/
3•cd_mkdir•11m ago•0 comments

Asahi Linux 7.1 Progress Report

https://asahilinux.org/2026/06/progress-report-7-1/
454•pantalaimon•7h ago•156 comments

Red Programming Language: Static linking support

https://www.red-lang.org/2026/06/static-linking-support.html
55•em-bee•1d ago•8 comments

1-Bit Pixel Art Emojis

https://hypertalking.com/2023/05/15/1-bit-pixel-art-emojis/
67•surprisetalk•6d ago•10 comments

Are readers generating fiction with AI models?

https://arxiv.org/abs/2606.22748
6•ilamont•45m ago•3 comments

Nintendo has raised its employees base salary by 10%

https://mynintendonews.com/2026/06/26/nintendo-has-raised-its-employees-base-salary-by-10/
406•_tk_•6h ago•217 comments

Newly discovered spider builds spring loaded snare to catch ants

https://phys.org/news/2026-06-newly-australian-ballista-spider-snare.html
212•chimpanzee•2d ago•47 comments

Ray Tracer in SQL

https://github.com/ClickHouse/RayTracer
33•kbumsik•3h ago•8 comments

Show HN: Morph Reflexes – Multi-head classifiers for agent traces

10•bhaktatejas922•21h ago•1 comments

Apple 'Hide My Email' vulnerability reveals peoples' real email addresses

https://easyoptouts.com/guides/apple-hide-my-email-is-leaking-email-addresses
112•sashk•7h ago•12 comments

Show HN: GolemUI – The new paradigm for JavaScript forms

https://golemui.com
22•wtfdeveloper•2h ago•39 comments
Open in hackernews

The Scalar Select Anti-Pattern

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

Comments

castratikron•1y 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•1y 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•1y 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•1y 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•1y 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•1y ago
in CPU's - pipelining!
jchw•1y 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...)