frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

I have a theory that software drives people insane

https://graybeard.ing/software-drives-people-insane/
333•rglover•4h ago•129 comments

Rust is tier-1 language at Microsoft

https://rustfoundation.org/media/guest-post-rust-is-tier-1-language-at-microsoft/
508•mmastrac•6h ago•278 comments

Genuine Creativity Is Your New Moat (2026)

https://www.inventbuild.studio/blog/genuine-creativity-is-your-new-moat
56•virgil_disgr4ce•1h ago•30 comments

Cognition launches new SWE-2 model, Rivaling Fable 5.1 and GPT-Astra

https://cognition.com/blog/swe-2
226•seelos•5h ago•108 comments

More questions about whether researchers can trust OpenAI with unpublished math

https://mathstodon.xyz/@andreasthom/117240535270608201
370•pred_•13h ago•464 comments

NASA Color Trick Was Meant for Mars. Now It's Unveiling Rock Art on Earth

https://gizmodo.com/this-nasa-color-trick-was-meant-for-mars-now-its-unveiling-rock-art-on-earth-...
174•gumby•5h ago•31 comments

Shopify moves back to Native from React Native

https://shopify.engineering/back-to-native
570•fnthawar2•6h ago•395 comments

Music Theory for the 21st-Century Classroom

https://musictheory.pugetsound.edu/mt21c/MusicTheory.html
68•aanet•3h ago•34 comments

Forgejo <=16.0.3 Critical RCE

https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/16.0.4.md
92•weierstass•4h ago•38 comments

Don't Let Anyone Take Away Your Big Box of Cables

https://blog.jim-nielsen.com/2026/hands-off-my-cables/
98•Brajeshwar•5h ago•88 comments

Neki

https://planetscale.com/blog/introducing-neki
154•simon_weber•4h ago•61 comments

Douglas Hofstadter: Analogy as the Core of Cognition [video]

https://www.youtube.com/watch?v=n8m7lFQ3njk
92•tosh•4d ago•50 comments

JEP 544: Ahead-of-Time Code Compilation

https://openjdk.org/jeps/544
36•Skinney•3h ago•18 comments

Hitachi launches CO2 heat pump water heaters with solar-friendly tariff controls

https://www.pv-magazine.com/2026/09/07/hitachi-launches-co2-heat-pump-water-heaters-with-solar-fr...
250•thelastgallon•1d ago•202 comments

Cognition's SWE-2 achieves 92.8 on Terminal-Bench 2.1

https://tokenstead.ai/models/swe-2
37•cdnsteve•3h ago•14 comments

DeepSeek v4.1 Flash

https://twitter.com/deepseek_ai/status/2097930608790167907
883•Liwink•14h ago•495 comments

Silicon Valley Is Transforming the Military-Industrial Complex

https://costsofwar.watson.brown.edu/paper/how-big-tech-and-silicon-valley-are-transforming-milita...
105•paimapi•4h ago•156 comments

>10x More Efficient Pretraining

https://magic.dev/blog/pretraining#
102•ronfriedhaber•2d ago•53 comments

What algorithm did Windows XP use to choose your initial user picture?

https://devblogs.microsoft.com/oldnewthing/20260909-00/?p=112683
310•soheilpro•11h ago•151 comments

Neki is sharded Postgres by PlanetScale

https://neki.dev/
99•handfuloflight•4h ago•24 comments

Schemy Lisp En DOS

https://sled.neocities.org/
65•AlexeyBrin•4d ago•11 comments

What happens when a GPU writes memory

https://blog.doubleword.ai/what-happens-when-a-gpu-writes-memory
5•ibobev•2d ago•0 comments

Python sets and dictionaries can have quadratic-time performance

https://lemire.me/blog/2026/09/03/python-sets-and-dictionaries-can-have-quadratic-time-performance/
69•ibobev•2d ago•30 comments

iPhone Duo

https://www.apple.com/iphone-duo/
1381•thecosmicfrog•1d ago•2397 comments

List of references on Sony websites to players "owning" their digital games

https://consumerrights.wiki/w/Sony_PlayStation_digital_game_ownership_lawsuit
302•haunter•8h ago•99 comments

Stockfish 19

https://stockfishchess.org/blog/2026/stockfish-19/
243•atiedebee•3d ago•141 comments

Macbeth and His Problems

https://porticoquarterly.com/essay/macbeth-and-his-problems/
70•apophatic•2d ago•26 comments

To write non-fiction, draw the trunk, then the rest of the tree

https://devz.cl/posts/how-to-write/
73•DanielVZ•2d ago•24 comments

Show HN: MultiMatte, a Promptable Image Background Removal Model

https://usefeyn.com/blog/multimatte/
25•snyy•4h ago•4 comments

Casablanca: How an unproduced play marched into movie history

https://www.thecollector.com/casablanca-unproduced-play-movie-history/
40•mdp2021•4h ago•12 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...)