frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

There Are Magic Hexagons of Every Order

https://gukov.dev/math/2026/08/02/new-magic-hexagons.html
48•gukoff•4h ago•8 comments

My server is a phone now

https://seg6.space/posts/phone-server/
354•seg6•12h ago•139 comments

Microsoft Word for Windows 1.1a, Native X64 Port

https://github.com/jmarshall23/msword
89•BruceEel•6h ago•40 comments

Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

https://os8088.com/
184•jggonz•11h ago•100 comments

Shopify replaced Redis with MySQL for inventory reservations–and it scaled

https://shopify.engineering/scaling-inventory-reservations
222•adletbalzhanov•12h ago•136 comments

Improving Heuristics for A* Pathfinding

https://www.redblobgames.com/pathfinding/heuristics/differential.html
257•bobbiechen•1w ago•25 comments

Fastmail offers EU data region

https://www.fastmail.com/blog/fastmail-offers-eu-data-region/
433•groomlake•19h ago•228 comments

The Grid That Doubles the Strength of the Ground

https://practical.engineering/blog/2026/8/4/the-grid-that-doubles-the-strength-of-the-ground
22•michaefe•4d ago•3 comments

Dithered QR Codes

https://www.andrewt.net/dithered-qr-codes/wtf/
228•jmusall•12h ago•17 comments

Melatonin impairs morning cognition in healthy young adults (2023)

https://academic.oup.com/sleep/article/46/Supplement_1/A34/7181621
139•bohaska•10h ago•117 comments

The original URL for this prediction will no longer be available in 11 years (2011)

http://longbets.org/601/
152•doubletwoyou•6h ago•71 comments

The Alpha 21264 CPU: NT's Greatest RISC (1998)

https://halfhill.com/byte/1998-12_alpha.html
8•Lammy•1h ago•2 comments

Protopia

https://kevinkelly.substack.com/p/protopia
17•surprisetalk•4d ago•11 comments

_for-sale DNS records

https://specification.website/spec/foundations/for-sale-dns/
401•shaunpud•22h ago•155 comments

CSS: The bomb inside your inbox

https://portswigger.net/research/css-the-bomb-inside-your-inbox
18•ashurandi•1h ago•1 comments

Stylized GGX Shading

https://alexandrelamure.github.io/graphics-posts/stylized-ggx-shading.html
32•ibobev•4d ago•0 comments

Unexpected events and prosocial behavior: the Batman effect (2025)

https://www.nature.com/articles/s44184-025-00171-5
65•davidbarker•6d ago•20 comments

How to Survive in a Louisiana Swamp

https://unherd.com/2026/08/how-to-survive-on-a-louisiana-swamp/
7•bookofjoe•3d ago•1 comments

You might want to build your WebApp in Canvas instead of HTML

https://hivekit.io/blog/why-you-might-want-to-build-your-webapp-in-canvas-instead-of-html/
7•wolframhempel•6d ago•4 comments

Making difficulty curves in games

http://www.davetech.co.uk/difficultycurves
125•hakkikonu•4d ago•50 comments

Open-source interactive map for the Aug 12 total solar eclipse

https://eclipsefan.org/?v=2&t=max&layers=eclipse%2Cbesselian%2Cumbra-live%2Cshadow-3d%2Ccloud-pro...
157•MarcoDewey•15h ago•42 comments

Should you stop cracking your knuckles?

https://www.bbc.com/future/article/20260807-should-i-stop-cracking-my-knuckles
64•tchalla•12h ago•73 comments

TheoremDB – A public workspace for machine mathematics

https://theoremdb.org/
44•frozenseven•10h ago•3 comments

Software Giant SAP Stops Most Travel and Hiring Because of AI's Soaring Cost

https://www.404media.co/software-giant-sap-stops-most-travel-and-hiring-because-of-ais-soaring-cost/
36•theanonymousone•3h ago•12 comments

Retraction: The App Store Rejection of the Week That Was a Correct Rejection

https://daringfireball.net/2026/08/retraction_app_store_rejection_of_the_week
213•minimaxir•8h ago•27 comments

Why MySpace fans want it back as relaunch hinted

https://www.bbc.com/news/articles/c4g64152v71o
18•1659447091•7h ago•16 comments

Building a local positioning system to track runners using Ultra-Wideband

https://zeus.ugent.be/blog/25-26/12urenloop-uwb/
90•robinpdev•1w ago•8 comments

Triton: DirectX 11 Driver for QEMU

https://blog.getutm.app/2026/introducing-triton-directx-11-driver-for-qemu/
185•electricant•21h ago•39 comments

Assert(): A Modern How To

https://fiberfs.io/blog/assert_a_modern_how_to
13•nyc_pizzadev•5d ago•16 comments

Incentives are for losers

https://www.experimental-history.com/p/incentives-are-for-losers
128•bkudria•9h ago•89 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...)