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.

Show HN: You can program without loop and recursion and×÷- is all you need

9 pointsby raoof11 months ago

3 comments

rstuart413311 months ago
Why over complicate it? FRACTRAN is a Turning complete language based on only one operation: multiplication. It&#x27;s Wikipedia entry gives a short FRACTRAN program that finds all primes. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;FRACTRAN" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;FRACTRAN</a><p>In the words of it&#x27;s inventor, John Conway:<p><pre><code> Makes workday really easy! FRACTRAN needs no complicate programming manual. It&#x27;s entire syntax can be learned in 10 seconds, and programs for quite complex and interesting functions can be written almost at once. The entire configuration of a FRACTRAN computer at any instant is a single integer - no messy &quot;tapes&quot; or other foreign concepts to be understood by the fledging programmer. </code></pre> What&#x27;s not to like? This is a good introduction for someone seriously considering doing their next project in FRACTRAN: <a href="https:&#x2F;&#x2F;raganwald.com&#x2F;2020&#x2F;05&#x2F;03&#x2F;fractran.html" rel="nofollow">https:&#x2F;&#x2F;raganwald.com&#x2F;2020&#x2F;05&#x2F;03&#x2F;fractran.html</a>
评论 #41035928 未加载
voidUpdate11 months ago
How do you go back to an earlier point in the program if you can&#x27;t loop? For example, how would you do a primality test for an arbitrary input?
评论 #40975181 未加载
brudgers11 months ago
<p><pre><code> Epigram 54. Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy.</code></pre>