frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

The Art of Multiprocessor Programming 2nd Edition Book Club

https://eatonphil.com/2025-art-of-multiprocessor-programming.html
159•eatonphil•4h ago•23 comments

Telo MT1

https://www.telotrucks.com/
53•turtleyacht•1h ago•41 comments

We may not like what we become if A.I. solves loneliness

https://www.newyorker.com/magazine/2025/07/21/ai-is-about-to-solve-loneliness-thats-a-problem
237•defo10•7h ago•457 comments

Show HN: WebGPU enables local LLM in the browser – demo site with AI chat

https://andreinwald.github.io/browser-llm/
82•andreinwald•4h ago•26 comments

Hiding secret codes in light protects against fake videos

https://news.cornell.edu/stories/2025/07/hiding-secret-codes-light-protects-against-fake-videos
42•CharlesW•2h ago•35 comments

Compressing Icelandic name declension patterns into a 3.27 kB trie

https://alexharri.com/blog/icelandic-name-declension-trie
162•alexharri•7h ago•65 comments

The /o in Ruby regex stands for "oh the humanity "

https://jpcamara.com/2025/08/02/the-o-in-ruby-regex.html
63•todsacerdoti•3h ago•19 comments

Online Collection of Keygen Music

https://keygenmusic.tk
58•mifydev•3d ago•4 comments

Great Question (YC W21) Is Hiring a VP of Engineering (Remote)

https://www.ycombinator.com/companies/great-question/jobs/ONBQUqe-vp-of-engineering
1•nedwin•1h ago

6 Weeks of Claude Code

https://blog.puzzmo.com/posts/2025/07/30/six-weeks-of-claude-code/
15•mike1o1•2d ago•71 comments

ThinkPad designer David Hill on unreleased models

https://www.theregister.com/2025/08/02/thinkpad_david_hill_interview/
100•LorenDB•5h ago•33 comments

Browser extension and local backend that automatically archives YouTube videos

https://github.com/andrewarrow/starchive
20•fcpguru•2h ago•5 comments

The unreasonable likelihood of being: origin of life, terraforming, and AI

https://arxiv.org/abs/2507.18545
8•bookofjoe•1h ago•5 comments

The Rubik's Cube Perfect Scramble

https://www.solutionslookingforproblems.com/post/the-rubik-s-cube-perfect-scramble
57•notagoodidea•4h ago•17 comments

Unikernel Guide: Build and Deploy Lightweight, Secure Apps

https://tallysolutions.com/technology/introduction-to-unikernel-2/
32•Bogdanp•3h ago•7 comments

Caches: LRU vs. Random

https://danluu.com/2choices-eviction/
75•gslin•2d ago•13 comments

How to reverse engineer an analog chip: the TDA7000 FM radio receiver

https://www.righto.com/2025/08/reverse-engineering-analog-TDA7000.html
14•nynyny7•2h ago•4 comments

Show HN: Wordle-style game for Fermi questions

https://www.fermiquestions.org/
6•danielfetz•1h ago•9 comments

Microsoft is open sourcing Windows 11's UI framework

https://www.neowin.net/news/microsoft-is-taking-steps-to-open-sourcing-windows-11-user-interface-framework/
135•bundie•10h ago•147 comments

Why Exercise Is a Miracle Drug

https://www.derekthompson.org/p/the-sunday-morning-post-why-exercise
188•zdw•2h ago•152 comments

Helion begins work on Washington nuclear fusion plant

https://www.nucnet.org/news/microsoft-backed-fusion-company-begins-work-on-washington-nuclear-fusion-plant-7-4-2025
3•mpweiher•2d ago•0 comments

Cerebras Code

https://www.cerebras.ai/blog/introducing-cerebras-code
421•d3vr•20h ago•165 comments

VSCode extension for syntax highlighting multi-line YAML strings

https://github.com/harrydowning/vscode-yaml-embedded-languages
16•moondev•3h ago•1 comments

The case for having roommates even when you can afford to live alone

https://supernuclear.substack.com/p/the-case-for-having-roommates-even
35•surprisetalk•4h ago•57 comments

Iceberg, the Right Idea – The Wrong Spec – Part 2 of 2: The Spec

https://www.database-doctor.com/posts/iceberg-is-wrong-2.html
9•lsuresh•4h ago•1 comments

'Communities' of extreme life seen for first time in deep ocean

https://www.bbc.com/news/articles/c3wnqe5j99do
10•moontoast•2d ago•2 comments

Robert Wilson has died

https://www.theartnewspaper.com/2025/08/01/robert-wilson-playwright-director-artist-obituary
69•paulpauper•15h ago•16 comments

Coffeematic PC – A coffee maker computer that pumps hot coffee to the CPU

https://www.dougmacdowell.com/coffeematic-pc.html
266•dougdude3339•20h ago•81 comments

Character Bitmap Graphics on the Pet 2001

https://www.masswerk.at/nowgobang/2025/character-bitmaps-on-the-pet2001
14•masswerk•4h ago•5 comments

Financial Lessons from My Family's Experience with Long-Term Care Insurance

https://www.whitecoatinvestor.com/financial-lessons-father-long-term-care-insurance/
49•wallflower•4h ago•53 comments
Open in hackernews

Caches: LRU vs. Random

https://danluu.com/2choices-eviction/
75•gslin•2d ago

Comments

hinkley•4h ago
I have never been able to wrap my head around why 2 random works better in load balancing than leastconn. At least in caching it makes sense why it would work better than another heuristic.
beoberha•3h ago
Try giving Marc Brooker’s blog on this a read: https://brooker.co.za/blog/2012/01/17/two-random.html

It is only better than leastconn when you have stale information to base your decision on. If you have perfect, live information, best will always be optimal.

contravariant•3h ago
Technically it doesn't, it's just really hard to implement leastconn correctly.

If you had perfect information and could just pick whichever was provably lowest that'd would probably work. However keeping that information up to date also takes effort. And if your information is outdated it's easy to overload a server that you think doesn't have much to do or underload one that's long since finished with its tasks. Picking between 2 random servers introduces some randomness without allowing the spread to become huge.

hinkley•2h ago
When the cost of different requests varies widely it’s difficult to get it right. When we rolled out docker I saw a regression in p95 time. I countered this by doubling our instance size and halving the count, which made the number of processes per machine slightly more instead of way less than the number of machines. I reasoned that the local load balancing would be a bit fairer and that proved out in the results.
kgeist•3h ago
By the time you decide to route to a particular node, conditions on that node might have already changed. So, from what I understand, there can be worst-case scenarios in usage patterns where the same nodes keep getting stressed due to repeatedly stale data in the load balancer. Randomization helps ensure the load is spread out more uniformly.
yuliyp•3h ago
There are a few reasons:

1. Random is the one algorithm that can't be fooled. So even if there's something against number of connections as a load metric, not using that metric alone dampens the problems.

2. There is a lag between selection and actually incrementing the load metric for the next request, meaning that just using the load metric alone is prone to oscillation

3. A machine that's broken (immediately errors all requests) can capture almost all requests, while 2-random means its damage is limited to 2x its weight fraction

4. For requests which are a mix of CPU and IO work, reducing convoying (i.e. many requests in similar phases) is good for reducing CPU scheduling delay. You want some requests to be in CPU-heavy phases while others are in IO-heavy phases; not bunched.

hinkley•2h ago
I’m fine with the random part. What I don’t get is why 2 works just as well as four, or square root of n. It seems like 3 should do much, much better and it doesn’t.

It’s one of those things I put in the “unreasonably effective” category.

nielsole•1h ago
I wonder if someone tried a probabilistic "best of 1.5" or similar and if two is just a relatively high number.
hinkley•46m ago
If I had to guess it’s related to e. In which case maybe choosing 2 30% of the time and 3 70% of the time is a better outcome.
bob1029•4h ago
> But what if we take two random choices (2-random) and just use LRU between those two choices?

> Also, we can see that pseudo 3-random is substantially better than pseudo 2-random, which indicates that k-random is probably an improvement over 2-random for the k. Some k-random policy might be an improvement over DIP.

This sounds very similar to tournament selection schemes in evolutionary algorithms. You can control the amount of selective pressure by adjusting the tournament size.

I think the biggest advantage here is performance. A 1v1 tournament is extremely cheap to run. You don't need to maintain a total global ordering of anything.

nielsole•1h ago
It's also similar to load balancing. Least requests vs. best of two. Benefit being that you never serve the most loaded backend. I guess the feared failure mode of least requests and LRU is similar. Picking the obvious choice might be the worst choice in certain scenarios (fast failures and cache churning respectively)
pvillano•2h ago
The idea of using randomness to extend cliffs really tickles my brain.

Consider repeatedly looping through n+1 objects when only n fit in cache. In that case LRU misses/evicts on every lookup! Your cache is useless and performance falls of a cliff! 2-random turns that performance cliff into a gentle slope with a long tail(?)

I bet this effect happens when people try to be smart and loop through n items, but have too much additional data to fit in registers.

phamilton•43m ago
This feels similar to when I heard they use bubble sort in game development.

Bubble sort seems pretty terrible, until you realize that it's interruptible. The set is always a little more sorted than before. So if you have realtime requirements and best-effort sorting, you can sort things between renders and live with the possibility of two things relative close to each other appearing a little glitched for a frame.