frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Knuth Test using Claude Sonnet 4.6 problem 1.1.3

3•daly•2h ago
----------------------------------------------------------------------- Algorithm E (Euclid's algorithm). Given two positive integers m and n, find their greatest common divisor, that is, the largest positive integer that evenly divides both m and n.

E1 [Find remained] Divide m by n and r be the remainder. (We will know that 0 <= r < n)

E2 [Is it zero?] If r = 0, the algorithm terminates, n is the answer

E3 [Reduce] Set m = n, then n = r, then go back to step E1 -----------------------------------------------------------------------

[3] Change Algorithm E so that all trivial replacement operations such as m = n are avoided. Write this new algorithm in the style of Algorithm E and call it Algorithm F.

======================================================================== Claude Sonnet 4.6 ========================================================================

Algorithm F

Given two positive integers m and n, find their greatest common divisor.

F1 [Find remainder] Divide m by n and let r be the remainder. (We will know that 0 ≤ r < n.)

F2 [Is it zero?] If r = 0, the algorithm terminates and n is the answer.

F3 [Find remainder] Divide n by r and let m be the remainder. (We will know that 0 ≤ m < r.)

F4 [Is it zero?] If m = 0, the algorithm terminates and r is the answer.

F5 [Find remainder] Divide r by m and let n be the remainder. (We will know that 0 ≤ n < m.) Go back to F2.

Explanation

The key insight is that instead of shuffling values with temporary replacements like:

m = n, n = r

we reuse the existing variables (m, n, r) in rotation, dividing and storing each new remainder directly into the variable that is no longer needed:

Step Divides Remainder stored in F1...m by n...r F3...n by r...m F5...r by m...n

Each variable naturally becomes the "oldest" value at each stage and is safely overwritten. This eliminates all trivial assignments while preserving the logic of Euclid's algorithm. □

Show HN: NeoMud – A multiplayer dungeon game with AI agents that QA and playtest

https://github.com/terrymaster/NeoMud
1•terrymaster•39s ago•0 comments

Weight-loss jab could be made for $3 a month, study finds

https://www.theguardian.com/global-development/2026/mar/06/generic-drugs-weight-loss-semaglutide-...
1•sandebert•3m ago•0 comments

Keith Lynch's timeline of net related terms and concepts

https://keithlynch.net/timeline.html
1•TigerUniversity•4m ago•0 comments

Show HN: Dead-simple job management tool for solo contractors ($0 for now)

https://fieldflow-nine.vercel.app/auth
1•Mike_Handyman•5m ago•0 comments

'Free' Sterling in New York and Switzerland in the 1940s (2017)

https://ssrn.com/abstract=2972147
1•johntfella•6m ago•0 comments

Next Embedding Prediction Makes World Models Stronger

https://arxiv.org/abs/2603.02765
1•lucrbvi•7m ago•0 comments

RFK Jr.'s anti-vaccine policies are "unreviewable," DOJ lawyer tells judge

https://arstechnica.com/health/2026/03/rfk-jr-can-promote-getting-measles-with-impunity-doj-lawye...
2•virgildotcodes•8m ago•0 comments

Ruby on Rails homepage updated for "the agentic age"

https://rubyonrails.org/
1•developer5502•9m ago•1 comments

AI Harness Engineering

https://martinfowler.com/articles/exploring-gen-ai/harness-engineering.html
1•ColinEberhardt•9m ago•0 comments

Black-box AI and cheap drones are outpacing global rules of war

https://restofworld.org/2026/anthropic-ai-and-iran-drone-warfare/
1•Brajeshwar•11m ago•0 comments

Scientific datasets are riddled with copy-paste errors

https://www.sciencedetective.org/scientific-datasets-are-riddled-with-copy-paste-errors/
1•englund•20m ago•0 comments

Anybody know what happened to the GNU site?

https://web.archive.org/web/20260305232513/https://www.gnu.org/
2•birdculture•21m ago•1 comments

I built a dashboard to manage domains across all my registrars

https://keep.domains/
1•muhammedilyasy•22m ago•0 comments

Const – Ian Lance Taylor (2010)

https://www.airs.com/blog/archives/428
1•cristaloleg•23m ago•0 comments

Show HN: Procedural Music Workstation in the Browser

https://manager.kiekko.pro/tracker/
1•timo_h•23m ago•0 comments

European Economies Are Not Stagnating

https://jacobin.com/2026/03/us-europe-comparative-productivity-statistics
1•robtherobber•23m ago•0 comments

Ask HN: Are subagents making flagship AI models feel like managers?

2•vgoncharenko•27m ago•0 comments

How to Found a Company in Germany: 16 "Easy" Steps and Lots of Pain

https://eidel.io/posts/how-to-found-a-company-in-germany-14-easy-steps-and-lots-of-pain
2•olieidel•28m ago•0 comments

The Digital Credentials API origin trial

https://developer.chrome.com/blog/digital-credentials-api-origin-trial
1•pabs3•30m ago•0 comments

LibreSprite – open-source pixel art editor

https://libresprite.github.io/
2•nicoloren•35m ago•0 comments

If AI has a bright future, why does AI think it doesn't?

https://claude.ai/share/5373cca0-f085-40a7-9a58-3f30b4f76195
1•JCW2001•35m ago•1 comments

What Requests Taught Me About Marriage

https://kennethreitz.org/essays/2026-03-06-what_requests_taught_me_about_marriage
1•kennethreitz•36m ago•0 comments

Language Tool – Your writing assistant

https://languagetool.org/
1•smartmic•36m ago•0 comments

Show HN: OgBlocks – A zero-install animated UI component library

https://ogblocks.dev
1•karanzhacker•37m ago•0 comments

Slop Forks Leaderboard

https://slopforks.com/
1•karel-3d•38m ago•0 comments

Chardet v7.0.0 presents unacceptable legal risk to users

https://github.com/chardet/chardet/issues/331
1•vintagedave•38m ago•0 comments

Show HN: What Installing a New OS Taught Me About Disk Partitions

https://access2vivek.com/what-installing-debian-taught-me/
2•access2vivek•40m ago•0 comments

Show HN: ParseForce – I got tired of brittle email parsers so I built this

https://www.parseforce.io
1•nikola470•40m ago•0 comments

Show HN: ChaosRank – which microservice should you break next?

https://github.com/Medinz01/chaosrank
1•Medinz01•41m ago•0 comments

Show HN: PenguWarpOS – OS SIM made in py for Linux newbies

https://github.com/theidioticdev/penguwarpos/tree/testing
2•theidioticdev•43m ago•0 comments