frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Efficiently Generating a Number in a Range (2018)

https://www.pcg-random.org/posts/bounded-rands.html
13•csense•1d ago

Comments

cbarrick•1h ago
https://archive.ph/oeZQw
eru•1h ago
Python (or more precisely CPython) uses something like a bitmask and rejection. Alas, there's a bug in the code, so that when you generate a range whose size is a power of two, instead of getting the best case (no rejections), you get half of your values rejected.

For clarity, this worst case for this approach should happen for ranges with size 2*x+1, ie one more than a power of two.

The bug is known but not being fixed right now to keep random number output consistent.

Modern Node.js Patterns

https://kashw1n.com/blog/nodejs-2025/
488•eustoria•10h ago•213 comments

So you want to parse a PDF?

https://eliot-jones.com/2025/8/pdf-parsing-xref
148•UglyToad•7h ago•82 comments

Writing a good design document

https://grantslatton.com/how-to-design-document
264•kiyanwang•9h ago•60 comments

Persona vectors: Monitoring and controlling character traits in language models

https://www.anthropic.com/research/persona-vectors
322•itchyjunk•13h ago•105 comments

A parser for TypeScript types, written in TypeScript types

https://github.com/easrng/tsints
23•todsacerdoti•3h ago•4 comments

Typed languages are better suited for vibecoding

https://solmaz.io/typed-languages-are-better-suited-for-vibecoding
120•hosolmaz•5h ago•99 comments

If you're remote, ramble

https://stephango.com/ramblings
758•lawgimenez•19h ago•394 comments

Why doctors hate their computers (2018)

https://www.newyorker.com/magazine/2018/11/12/why-doctors-hate-their-computers
35•mitchbob•5h ago•26 comments

How Python grew from a language to a community

https://thenewstack.io/how-python-grew-from-a-language-to-a-community/
32•lumpa•13h ago•1 comments

Life, Work, Death and the Peasant: Family Formation

https://acoup.blog/2025/08/01/collections-life-work-death-and-the-peasant-part-iiia-family-formation/
104•Khaine•1d ago•0 comments

New quantum state of matter found at interface of exotic materials

https://phys.org/news/2025-07-quantum-state-interface-exotic-materials.html
3•janandonly•2d ago•0 comments

A dedicated skin-to-brain circuit for cool sensation in mice

https://www.sciencedaily.com/releases/2025/07/250730030354.htm
6•freedomben•2d ago•0 comments

Human speech may have a universal transmission rate (2019)

https://www.science.org/content/article/human-speech-may-have-universal-transmission-rate-39-bits-second
31•Bluestein•7h ago•26 comments

Names are not type safety (2020)

https://lexi-lambda.github.io/blog/2020/11/01/names-are-not-type-safety/
40•azhenley•6h ago•36 comments

Everything to know about UniFi OS Server

https://deluisio.com/networking/unifi/2025/08/03/everything-you-need-to-know-about-unifi-os-server-before-you-waste-time-testing-it/
53•codydeluisio•8h ago•4 comments

Poorest US workers hit hardest by slowing wage growth

https://www.ft.com/content/cfb77a53-fef8-4382-b102-c217e0aa4b25
87•hhs•4h ago•95 comments

Efficiently Generating a Number in a Range (2018)

https://www.pcg-random.org/posts/bounded-rands.html
13•csense•1d ago•2 comments

Learnable Programming (2012)

https://worrydream.com/LearnableProgramming/
25•kunzhi•6h ago•7 comments

2,500-year-old Siberian 'ice mummy' had intricate tattoos, imaging reveals

https://www.bbc.com/news/articles/c4gzx0zm68vo
203•dxs•3d ago•53 comments

How to grow almost anything

https://howtogrowalmostanything.notion.site/htgaa25
83•car•6h ago•16 comments

This Old SGI: notes and memoirs on the Silicon Graphics 4D series (1996)

https://archive.irixnet.org/thisoldsgi/
77•exvi•14h ago•7 comments

Twenty Eighth International Obfuscated C Code Contest

https://www.ioccc.org/2024/index.html
325•mdl_principle•1d ago•95 comments

Show HN: Schematra – Sinatra-inspired minimal web framework for Chicken Scheme

https://github.com/rolandoam/schematra
30•funkaster•2d ago•1 comments

Tokens are getting more expensive

https://ethanding.substack.com/p/ai-subscriptions-get-short-squeezed
269•admp•18h ago•184 comments

A study of lights at night suggests dictators lie about economic growth (2022)

https://www.economist.com/graphic-detail/2022/09/29/a-study-of-lights-at-night-suggests-dictators-lie-about-economic-growth
111•mooreds•7h ago•52 comments

Welcome to url.town, population 465

https://url.town/
131•plaguna•1d ago•30 comments

Shrinking freshwater availability increasing land contribution to sea level rise

https://news.asu.edu/20250725-environment-and-sustainability-new-global-study-shows-freshwater-disappearing-alarming
130•ornel•10h ago•47 comments

Converge (YC S23) well-capitalized New York startup seeks product developers

https://www.runconverge.com/careers
1•thomashlvt•12h ago

How to make almost anything (2019)

https://fab.cba.mit.edu/classes/863.19/CBA/people/dsculley/index.html
173•teleforce•18h ago•24 comments

Cube: Packing a 5x5x5 cube with Y-pentominoes

https://kociemba.org/themen/125puzzle/index.html
7•andsoitis•2d ago•3 comments