TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: accdoo cipher web app now fused with offline Pi cutter (100k digits)

2 点作者 imcotton超过 1 年前

1 comment

imcotton超过 1 年前
accdoo.app is a Web App &#x2F; PWA that help you to crunch some numbers:<p><pre><code> arr.map(BigInt).reduce((a, b) =&gt; (a * b) ** 2n) </code></pre> The same operation can be performed on any off-the-shelf calculator (or in mind), but this one comes in handy for large numbers without losing its precisions, up to 100,000 digits on Web, 1,000,000 in CLI, configurable from API (npm:accdoo).<p>Aside from the spirit of xkcd&#x2F;936, it is widely applicable (does not require a dictionary nor an ANSI keyboard) and can be used for things like door locks, vaults, pins, passcodes, entropy seeding, or even root password for password managers (yes, all numeric is fine), etc.<p>Now back to Pi, it is an infinite data source and constant across the universe (base-10), figured would be great to have it chopped freely and then mixed into the calculations above. The Pi is produced on-the-fly, using JavaScript native BigInt and Chudnovsky Algorithm ([wiki]), the code was taken from one of the examples in the QuickJS project ([quickjs&#x2F;pi], [pi_bigint.js]).<p>The syntax for cutting is the same as in the manual ([accdoo.app&#x2F;about]):<p><pre><code> pi#6 &#x2F;&#x2F; take 6 digits of Pi (314_159) pi#6#3 &#x2F;&#x2F; take 6 digits of Pi but drop 3 beforehand (159_265) pi#1#40000 &#x2F;&#x2F; take one digit at 40,000th </code></pre> This is the second Show HN post as its major feature bump, here&#x27;s the link to its first intro 10 days ago ([39115559]) and a previous sideways on Ask HN 8 days ago ([39138957]).<p>[wiki]: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Chudnovsky_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Chudnovsky_algorithm</a><p>[quickjs&#x2F;pi]: <a href="https:&#x2F;&#x2F;bellard.org&#x2F;quickjs&#x2F;pi.html" rel="nofollow">https:&#x2F;&#x2F;bellard.org&#x2F;quickjs&#x2F;pi.html</a><p>[pi_bigint.js]: <a href="https:&#x2F;&#x2F;github.com&#x2F;bellard&#x2F;quickjs&#x2F;blob&#x2F;master&#x2F;examples&#x2F;pi_bigint.js">https:&#x2F;&#x2F;github.com&#x2F;bellard&#x2F;quickjs&#x2F;blob&#x2F;master&#x2F;examples&#x2F;pi_b...</a><p>[accdoo.app&#x2F;about]: <a href="https:&#x2F;&#x2F;accdoo.app&#x2F;about#manual" rel="nofollow">https:&#x2F;&#x2F;accdoo.app&#x2F;about#manual</a><p>[39115559]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39115559">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39115559</a><p>[39138957]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39138957">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39138957</a>