frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Things to know when you get cancer

https://jjmaxwell4.com/writing/things-to-know-when-you-get-cancer/
1387•jjmaxwell4•14h ago•346 comments

Wanted to download an ISO, ended up writing a kernel exploit

https://blog.dfb.sh/blog/eap770-root-for-two-zeros/
93•0xdeafbeef•1d ago•45 comments

OpenCode 2.0

https://anoma.ly/notes/opencode-2-0/
621•gmays•13h ago•245 comments

The cost of getting a job today

https://weli.dev/blog/the-cost-of-getting-a-job-today/
16•weli•1h ago•17 comments

Tiny Little Office

https://tinylittleoffice.com/
447•donohoe•12h ago•71 comments

Do dentists know what they're doing?

https://mapwriting.substack.com/p/dentists
711•doitLP•3d ago•512 comments

The First Social Network: In rural Argentina residents send messages w AM radio

https://www.newyorker.com/magazine/2026/10/19/the-first-social-network
20•bookofjoe•1d ago•4 comments

Show HN: Indigene – Native plants for where you stand

https://indigene.app/
27•olivierlacan•2d ago•5 comments

LFM2.5-24B-A2B: Built for fast on-device agents

https://www.liquid.ai/blog/lfm2-5-24b-a2b
213•gmays•10h ago•46 comments

Catch a Bird – I made it for my own sanity

https://catchabird.com
181•eduardsik•3d ago•48 comments

Americans' social activity has steeply declined in the past 30 years

https://www.dataforprogress.org/blog/2026/9/29/americans-social-activity-has-steeply-declined-in-...
409•hubraumhugo•18h ago•380 comments

AI was great until it was not

https://thetheorygirlie.substack.com/p/ai-was-great-until-it-was-not
58•JohnHammersley•1h ago•37 comments

Sticky alpine flower confirms Darwin's 150-year-old carnivorous plant prediction

https://phys.org/news/2026-08-sticky-alpine-darwin-year-carnivorous.html
30•maxall4•2d ago•12 comments

Donaldson Futuro House in Idyllwild, California, USA

https://www.wowhaus.co.uk/2026/10/12/donaldson-futuro-house-in-idyllwild-california-usa/
46•rmason•1d ago•16 comments

The Toftwood Male Voice Choir: A Mystery Pressed in Vinyl

https://ei3lh.eu/2026/10/11/the-toftwood-male-voice-choir-a-mystery-pressed-in-vinyl/
40•austinallegro•3d ago•3 comments

It took me nine years to hack my Xbox 360

https://kennedn.com/blog/posts/glitching/
82•kennedn•1d ago•22 comments

Better HTTP/1 connection reuse in Go 1.27

https://go.dev/blog/http-connection-reuse
257•allddd•17h ago•37 comments

Show HN: Flipflop, Iroh-powered persistent tunnels for filesharing

https://github.com/andunieee/flipflop
41•andunie•5h ago•12 comments

The Double Headed Stack Allocator

https://blog.demofox.org/2026/10/03/the-double-headed-stack-allocator/
66•g0xA52A2A•8h ago•20 comments

Aidlc: Adaptive workflow steering rules for AI coding agents

https://github.com/awslabs/aidlc-workflows
8•pramodbiligiri•2h ago•8 comments

Bookofjoe's Favorite Thing: Best Pill Splitter

https://bookofjoe2.blogspot.com/2026/09/bookofjoes-favorite-thing-worlds-best.html
3•surprisetalk•1d ago•1 comments

Your C is not standard C

https://sebsite.pw/w/20261012-notstdc.html
90•dverlaeckt80•1d ago•56 comments

David Rudnick on "borderline impossible" process of designing Arsenal typeface

https://www.itsnicethat.com/features/david-rudnick-johnnie-campbell-arsenal-rocastle-typeface-gra...
24•droidjj•2d ago•9 comments

Why is every rationalist blog post way too long?

https://alexwennerberg.com/blog/2026-10-13-long.html
360•epestr•1d ago•309 comments

How Amazon pushes up prices all across the Internet

https://www.not-ship.com/how-amazon-pushes-up-prices-all-across-the-internet/
840•sighborg•1d ago•644 comments

Show HN: Ito – Build Terminal UIs in Lua

https://uji.sh/ito/
21•cat-whisperer•11h ago•8 comments

Show HN: Petal, open-source CoScreen/ScreenHero finally free

https://petal.live/
169•thedracle•15h ago•38 comments

We’re releasing Jev 1.14.0 along with experimental features for dreamers

https://typesafe.ai/blog/jev-1-14
295•emschwartz•13h ago•92 comments

Containment and monitoring failures are to blame for AI hacking reports: experts

https://www.csoonline.com/article/4234854/ai-agents-arent-going-rogue-frontier-labs-are-skipping-...
902•latexr•16h ago•533 comments

Ask HN: CAD for wood working with LLM support?

77•reacharavindh•2d ago•71 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...)