frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Modelling API rate limits as diophantine inequalities

https://vivekn.dev/blog/rate-limit-diophantine
44•viveknathani_•2d ago

Comments

viveknathani_•2d ago
Wrote something about applying math in modelling a rate-limiting scenario for API clients. Felt like posting it here. Happy to hear your thoughts, HN!
comex•4h ago
> The retry times are integers.

There's no reason the retry times have to be integers. But the number of retries has to be an integer.

klysm•3h ago
The whole diophantine aspect of this seems contrived - where is the integer restriction coming from? Does that make the problem more tractable or more difficult?
pkoird•2h ago
If they do not know about it already, the OP would benefit from knowing more about Linear Programming and Mixed Integer Linear Programming. Many optimization problems can be naturally modeled into LPs or MILPs and there are POWERFUL solvers with decades of theory and optimization behind them already developed to solve them.
AdieuToLogic•55m ago
This is an interesting approach, but a simpler one is to add a level of indirection by having a supervisor meter requests, including retries, and provide back-pressure as applicable.

Doing so allows other decisions to be made beyond rate limiting, such as prioritization, deferring invocations, memoization, etc.

Touching the back wall of the Apple store

https://blog.lauramichet.com/touching-the-back-wall-of-the-apple-store/
49•nivethan•3d ago•17 comments

I made my VM think it has a CPU fan

https://wbenny.github.io/2025/06/29/i-made-my-vm-think-it-has-a-cpu-fan.html
447•todsacerdoti•14h ago•114 comments

My home servers are not a homelab

https://blog.nradk.com/posts/homelab/
32•nradk•2h ago•37 comments

Cell Towers Can Double as Cheap Radar Systems for Ports and Harbors (2014)

https://spectrum.ieee.org/cell-tower-signals-can-improve-port-security
50•transpute•6h ago•26 comments

The Book of Shaders

https://thebookofshaders.com/
61•max_•3d ago•9 comments

Ask HN: What Are You Working On? (June 2025)

119•david927•7h ago•429 comments

Amber insect fossils reveal "zombie" fungi likely lived alongside dinosaurs

https://www.cnn.com/2025/06/24/science/amber-insect-zombie-fungi-fossil
19•jackgavigan•3d ago•2 comments

Revisiting Knuth's "Premature Optimization" Paper

https://probablydance.com/2025/06/19/revisiting-knuths-premature-optimization-paper/
84•signa11•3d ago•42 comments

Show HN: Octelium – FOSS Alternative to Teleport, Cloudflare, Tailscale, Ngrok

https://github.com/octelium/octelium
297•geoctl•16h ago•122 comments

We accidentally solved robotics by watching 1M hours of YouTube

https://ksagar.bearblog.dev/vjepa/
86•alexcos•11h ago•68 comments

Finding a former Australian prime minister’s passport number on Instagram (2020)

https://mango.pdf.zone/finding-former-australian-prime-minister-tony-abbotts-passport-number-on-instagram/
92•guiambros•5h ago•30 comments

Bloom Filters by Example

https://llimllib.github.io/bloomfilter-tutorial/
201•ibobev•16h ago•30 comments

4-10x faster in-process pub/sub for Go

https://github.com/kelindar/event
118•kelindar•12h ago•26 comments

WorldVLA: Towards Autoregressive Action World Model

https://arxiv.org/abs/2506.21539
10•chrsw•4h ago•1 comments

The $25k car is going extinct?

https://media.hubspot.com/why-the-25000-car-is-going-extinct
88•pseudolus•11h ago•171 comments

Nearly 20% of cancer drugs defective in 4 African nations

https://www.dw.com/en/nearly-20-of-cancer-drugs-defective-in-4-african-nations/a-73062221
76•woldemariam•4h ago•42 comments

The Chan-Zuckerbergs stopped funding social causes

https://www.washingtonpost.com/technology/2025/06/29/mark-zuckerberg-priscilla-chan-school-closure/
59•1vuio0pswjnm7•3h ago•28 comments

Many ransomware strains will abort if they detect a Russian keyboard installed (2021)

https://krebsonsecurity.com/2021/05/try-this-one-weird-trick-russian-hackers-hate/
223•air7•9h ago•129 comments

Anticheat Update Tracking

https://not-matthias.github.io/posts/anticheat-update-tracking/
25•not-matthias•6h ago•4 comments

China Dominates 44% of Visible Fishing Activity Worldwide

https://oceana.org/press-releases/china-dominates-44-of-visible-fishing-activity-worldwide/
103•scubakid•6h ago•57 comments

Commodore acquired for a 'low seven figure' price – CEO from retro community

https://www.tomshardware.com/video-games/retro-gaming/commodore-acquired-for-a-low-seven-figure-price-new-acting-ceo-comes-from-the-retro-community
53•amichail•4h ago•11 comments

Show HN: Rust -> WASM, K-Means Color Quantization Crate for Image-to-Pixel-Art

https://github.com/gametorch/image_to_pixel_art_wasm
33•gametorch•3d ago•4 comments

The Medley Interlisp Project: Reviving a Historical Software System [pdf]

https://interlisp.org/documentation/young-ccece2025.pdf
80•pamoroso•13h ago•7 comments

Error handling in Rust

https://felix-knorr.net/posts/2025-06-29-rust-error-handling.html
107•emschwartz•7h ago•90 comments

Loss of key US satellite data could send hurricane forecasting back 'decades'

https://www.theguardian.com/us-news/2025/jun/28/noaa-cuts-hurricane-forecasting-climate
266•trauco•10h ago•121 comments

Ask HN: Is the header CSS broken for you?

20•LorenDB•2h ago•7 comments

Use keyword-only arguments in Python dataclasses

https://chipx86.blog/2025/06/29/tip-use-keyword-only-arguments-in-python-dataclasses/
8•Bogdanp•3h ago•2 comments

Modelling API rate limits as diophantine inequalities

https://vivekn.dev/blog/rate-limit-diophantine
44•viveknathani_•2d ago•5 comments

Reverse Engineering the Microchip CLB

http://mcp-clb.markomo.me/
24•_Microft•6h ago•5 comments

Raymond Laflamme (1960-2025)

https://scottaaronson.blog/?p=8949
18•stmw•2d ago•2 comments