TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Napkin: Back-of-the-envelope calculations in Python

24 pointsby HammadB8 months ago

3 comments

staplung8 months ago
I don't want to knock anyone's project but I fail to see the way in which this resembles back-of-the-envelope calculations (which I take to mean, roughly, estimates RE order of magnitude). This seems more like plain old arithmetic with some built-in units. Am I missing something?
divbzero8 months ago
That’s a creative use of a custom <i>2to3</i> fixer [1] to transform the calculations [2]. Too bad this will no longer work with the removal of <i>2to3</i> in Python 3.13.<p>[1]: <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;2to3.html#fixers" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;2to3.html#fixers</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;napkin&#x2F;blob&#x2F;e6a4de2&#x2F;napkin&#x2F;substitute.py">https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;napkin&#x2F;blob&#x2F;e6a4de2&#x2F;napkin&#x2F;substit...</a>
bamboozled8 months ago
What is this?