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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

142 点作者 ghosthamlet大约 6 年前

26 条评论

skrebbel大约 6 年前
It bothers me way more than it should that this line of code has become known as &quot;10print&quot;. Like, 95% of BASIC oneliners out there start with &quot;10 PRINT&quot;. It&#x27;s like calling a McDonald&#x27;s Super Size Big Tasty Meal With Diet Coke And A Side Salad a &quot;Mac&quot;.<p>It should&#x27;ve been called 205.5+RND or something. Grmbl.
评论 #19492777 未加载
评论 #19507227 未加载
th0ma5大约 6 年前
Video here <a href="https:&#x2F;&#x2F;youtu.be&#x2F;m9joBLOZVEo" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;m9joBLOZVEo</a>
评论 #19490655 未加载
评论 #19489499 未加载
评论 #19489388 未加载
snek大约 6 年前
<a href="https:&#x2F;&#x2F;snek.dev&#x2F;10print" rel="nofollow">https:&#x2F;&#x2F;snek.dev&#x2F;10print</a> :)
评论 #19489690 未加载
caf大约 6 年前
You can recreate the magic in bash:<p><pre><code> while true; do printf &quot;\u$((2571 + ($RANDOM &amp; 1)))&quot;; done</code></pre>
评论 #19507287 未加载
评论 #19491273 未加载
评论 #19489569 未加载
评论 #19489905 未加载
dang大约 6 年前
2017: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15680668" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15680668</a><p>2012: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4856207" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4856207</a>
bufferoverflow大约 6 年前
Javascript version:<p><pre><code> for (let i=0;i&lt;10000; i++) document.write(String.fromCharCode(9585 + Math.random()*2) + (i%100 == 99 ? &#x27;&lt;br&gt;&#x27;:&#x27;&#x27;)) const b = document.body.style; b[&#x27;font-family&#x27;] = &#x27;Courier New&#x27;; b[&#x27;font-size&#x27;] = b[&#x27;line-height&#x27;] = &#x27;16px&#x27;; </code></pre> <a href="https:&#x2F;&#x2F;jsfiddle.net&#x2F;qxjdtru6&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jsfiddle.net&#x2F;qxjdtru6&#x2F;</a><p>And a fun curvy variation:<p><a href="https:&#x2F;&#x2F;jsfiddle.net&#x2F;qxjdtru6&#x2F;1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jsfiddle.net&#x2F;qxjdtru6&#x2F;1&#x2F;</a>
amasad大约 6 年前
Wrote it in JS at <a href="http:&#x2F;&#x2F;10print.art" rel="nofollow">http:&#x2F;&#x2F;10print.art</a><p>Source: <a href="http:&#x2F;&#x2F;10print.art&#x2F;__repl" rel="nofollow">http:&#x2F;&#x2F;10print.art&#x2F;__repl</a>
rzzzt大约 6 年前
This Maze Does Not Exist: an AI-powered labyrinth generator
评论 #19490336 未加载
ssdsa大约 6 年前
In 2013, I recreated the output as a shader in ShaderToy: <a href="https:&#x2F;&#x2F;www.shadertoy.com&#x2F;view&#x2F;ld23DW" rel="nofollow">https:&#x2F;&#x2F;www.shadertoy.com&#x2F;view&#x2F;ld23DW</a>
AndrewKemendo大约 6 年前
For powershell:<p>for(){Write-Host(Random(&quot;\&quot;,&quot;&#x2F;&quot;))-N}
jquinby大约 6 年前
Nice. This brings back some great memories. I used to do a similar one-liner that alternated between white and black blocks, which created crossword-puzzle-like patterns. I&#x27;d sit across the room and squint at the display, hoping to see some sort of emergent pattern.
jypepin大约 6 年前
I also built something in JS inspired by 10print with some customisation <a href="https:&#x2F;&#x2F;jauny.github.io&#x2F;10print&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jauny.github.io&#x2F;10print&#x2F;</a> :)
zestyping大约 6 年前
Alas! I was hoping the pattern would change every time I refreshed the page.
rkagerer大约 6 年前
Love it! Brings up so much nostalgia from the days of programming on my old TRS-80. But is it really a maze? Once you start, you don&#x27;t seem to get much choice of path...
评论 #19491466 未加载
评论 #19490154 未加载
rbanffy大约 6 年前
A nice companion to <a href="https:&#x2F;&#x2F;nostarch.com&#x2F;hemingway" rel="nofollow">https:&#x2F;&#x2F;nostarch.com&#x2F;hemingway</a>
svendahlstrand大约 6 年前
That&#x27;s a great read! The book inspired me to port that BASIC one-liner to Game Boy flavored assembly. Still having a Game Boy lying around? Now you have portable mazes:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;svendahlstrand&#x2F;10-print-game-boy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;svendahlstrand&#x2F;10-print-game-boy</a>
mycall大约 6 年前
This was my favorite thing to do on TSR-80s at Radio Shack, then walk away, although I would do all characters instead.
pantulis大约 6 年前
In the same book, an old one-liner called &quot;BURROW&quot; from Pet Gazette:<p>1A$=&quot;[up][down][left][right]&quot;:PRINTMID$(A$,RND(.5)<i>4+1,1)&quot;</i>[left]&quot;;:FORI=1TO30:NEXT:PRINT&quot;[rvson][space][left]&quot;;:GOTO1
HocusLocus大约 6 年前
Frogger, TRS-80 Model 1<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=wh7gRoYgUpc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=wh7gRoYgUpc</a>
golergka大约 6 年前
A bit disappointed that this page doesn&#x27;t generate the maze with each visit
kazinator大约 6 年前
This is poorly documented; I don&#x27;t see a REM statement.
SeanLuke大约 6 年前
Why the 205.5? Why wouldn&#x27;t this work as 205 + RND(1)?
评论 #19491231 未加载
评论 #19491341 未加载
fnord77大约 6 年前
this book reads like an article on a modern art piece.
jesuslop大约 6 年前
Lacks randomize()
评论 #19490261 未加载
rahimiali大约 6 年前
tl;dr: the output looks like this: <a href="https:&#x2F;&#x2F;ibb.co&#x2F;Ypp9DZ3" rel="nofollow">https:&#x2F;&#x2F;ibb.co&#x2F;Ypp9DZ3</a>
评论 #19489086 未加载
neatcoder大约 6 年前
Is there anyone here who still writes code in BASIC? If so which interpreter&#x2F;compiler do you use?
评论 #19490380 未加载