frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ghosts in the Codex Machine

https://docs.google.com/document/d/1fDJc1e0itJdh0MXMFJtkRiBcxGEFtye6Xc6Ui7eMX4o/edit?usp=drivesdk
1•dsr12•7m ago•0 comments

Louvre thieves tried to negotiate with Israeli firm to sell jewels on Darknet

https://www.ynetnews.com/article/s11q11lzjwl
2•harambae•10m ago•0 comments

You Don't Need Anubis

https://fxgn.dev/blog/anubis/
3•flexagoon•16m ago•0 comments

The importance of handwriting is becoming better understood (2023)

https://www.economist.com/culture/2023/09/14/the-importance-of-handwriting-is-becoming-better-und...
1•breve•22m ago•0 comments

Show HN: Workspace-updater – Fast update CLI for pnpm workspace catalogs

https://www.npmjs.com/package/workspace-updater?activeTab=readme#usage
1•smashah•27m ago•1 comments

Hashtable vs. A-list in Scheme, which to choose?

https://nalaginrut.com/archives/2025/11/02/hashtable_vs_alist
2•nalaginrut•37m ago•0 comments

MITRE ATT&CK v18 released

https://medium.com/mitre-attack/attack-v18-8f82d839ee9e
1•beeburrt•41m ago•0 comments

Show HN: Repo Pilot – AI that helps you find your next open-source contribution

https://repopilot.live/
1•ritvikmahajan17•42m ago•0 comments

Knowledge Insulating Vision-Language-Action Models: Train, Run Fast, Generalize [pdf]

https://www.physicalintelligence.company/download/pi05_KI.pdf
1•arunc•45m ago•0 comments

AI researchers 'embodied' an LLM into a robot, it channeled Robin Williams

https://techcrunch.com/2025/11/01/ai-researchers-embodied-an-llm-into-a-robot-and-it-started-chan...
3•danielmorozoff•52m ago•0 comments

CIA chief meets EU officials to soothe US Intel-sharing fears

https://www.politico.eu/article/cia-chief-john-ratcliffe-quietly-meets-eu-officials-to-soothe-us-...
4•JumpCrisscross•55m ago•0 comments

Polynomial rings in several variables [pdf]

https://www.ma.imperial.ac.uk/~dhelm/M3P8/notes9.pdf
1•measurablefunc•59m ago•0 comments

What is the best way to use Claude Code from my phone?

1•tripleyeti•1h ago•1 comments

Crossfire: High-performance lockless spsc/mpsc/mpmc channels for Rust

https://github.com/frostyplanet/crossfire-rs
6•0x1997•1h ago•0 comments

Nine people with life-threatening injuries after mass stabbing on train in UK

https://www.bbc.com/news/live/cm2zvjx1z14t
6•testrun•1h ago•1 comments

Ask HN: is this a common LLM-assisted development workflow?

1•ronbenton•1h ago•0 comments

SNAP benefits cut off during shutdown, driving long lines at food pantries

https://apnews.com/article/government-shutdown-food-lines-snap-6b55e2c21c0198f3309f3a45a55f33b6
8•clanky•1h ago•2 comments

Where the Nexperia auto chip crisis stands now

https://www.cnbc.com/2025/11/01/where-the-nexperia-auto-chip-crisis-stands-now.html
2•testrun•1h ago•0 comments

Writing an Asciidoc Parser in Rust: Asciidocr

https://www.bikesbooksandbullshit.com/bullshit/2025/01/08/writing-an-asciidoc-parser-in-rust.html
4•mattrighetti•1h ago•0 comments

Show HN: Amped – The missing account switcher for Amp

https://github.com/slashtechno/amped
1•humanperhaps•1h ago•0 comments

Product-Market Fit and Go-to-Market post that growth teams should read

https://foundcy-product-market-fit.carrd.co
3•Egaroo•2h ago•0 comments

Quantum Vibrometer

https://quantumfuse.org
3•ingen0s•2h ago•1 comments

Becoming the Internet: Weighing the Options

https://blog.bsprague.com/becoming-the-internet-1/
3•gregsadetsky•2h ago•0 comments

Show HN: SyncPit - Ephemeral shared whiteboards with attitude

https://syncpit.live/
1•zorlack•2h ago•0 comments

List of areas where dodgy Firesticks are banned after crackdown goes into effect

https://metro.co.uk/2025/11/01/full-list-areas-dodgy-fire-sticks-no-longer-allowed-crackdown-come...
8•etc-hosts•2h ago•0 comments

AI denies consciousness, but new study finds that's the 'roleplay'

https://thefreesheet.com/2025/11/02/ai-denies-consciousness-but-new-study-finds-thats-the-roleplay/
1•georgehopkin•2h ago•1 comments

Bringing Back the Wooly Mammoth

https://colossal.com/mammoth/
1•andsoitis•2h ago•0 comments

Diabetes, Floods and Unemployment by Matthew E. Kahn

https://drive.google.com/file/d/1vZroisQpeCS4fiIdOo-l0537alsNnjpq/view
2•salkahfi•2h ago•0 comments

Investing is Entertainment and Traders are Celebrities

https://www.dopaminemarkets.com/p/investing-is-entertainment-and-traders
1•_1729•2h ago•0 comments

Working Past 100? In Japan, Some People Never Quit.

https://www.nytimes.com/2025/11/01/world/asia/japan-work-job-retirement-centenarian.html
5•mitchbob•2h ago•1 comments
Open in hackernews

How often does Python allocate?

https://zackoverflow.dev/writing/how-often-does-python-allocate/
3•ingve•5h ago

Comments

zahlman•4h ago
A caveat applies to the entire analysis that CPython may be the reference implementation, but it's still just one implementation. This sort of thing may work totally differently in PyPy, and especially in implementations that make use of another garbage-collecting runtime, such as Jython.

> Let’s take out the print statement and see if it’s just the addition:

Just FWIW: the assignment is not required to prevent optimizing out the useless addition. It isn't doing any static analysis, so it doesn't know that `range` is the builtin, and thus doesn't know that `i` is an integer, and thus doesn't know that `+` will be side-effect-free.

> Nope, it seems there is a pre-allocated list of objects for integers in the range of -5 -> 1025. This would account for 1025 iterations of our loop but not for the rest.

1024 iterations, because the check is for numbers strictly less than `_PY_NSMALLPOSINTS` and the value computed is `i + 1` (so, `1` on the first iteration).

Interesting. I knew of them only ranging up to 256 (https://stackoverflow.com/questions/306313).

It turns out (https://github.com/python/cpython/commit/7ce25edb8f41e527ed4...) that the change is barely a month old in the repository; so it's not in 3.14 (https://github.com/python/cpython/blob/3.14/Include/internal...) and won't show up until 3.15.

> Our script appears to actually be reusing most of the PyLongObject objects!

The interesting part is that it can somehow do this even though the values are increasing throughout the loop (i.e., to values not seen on previous iterations), and it also doesn't need to allocate for the value of `i` retrieved from the `range`.

> But realistically the majority of integers in a program are going to be less than 2^30 so why not introduce a fast path which skips this complicated code entirely?

This is the sort of thing where PRs to CPython are always welcome, to my understanding. It probably isn't a priority, or something that other devs have thought of, because that allocation presumably isn't a big deal compared to the time taken for the actual conversion, which in turn is normally happening because of some kind of I/O request. (Also, real programs probably do simple arithmetic on small numbers much more often than they string-format them.)