惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
D
Darknet – Hacking Tools, Hacker News & Cyber Security
M
MIT News - Artificial intelligence
腾讯CDC
IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
M
Microsoft Research Blog - Microsoft Research
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
L
LangChain Blog
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
Recent Announcements
Recent Announcements
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
T
The Blog of Author Tim Ferriss
罗磊的独立博客
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
D
DataBreaches.Net
爱范儿
爱范儿
Schneier on Security
Schneier on Security
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
博客园_首页
T
Threat Research - Cisco Blogs
I
InfoQ
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recorded Future
Recorded Future
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
Cyberwarzone
Cyberwarzone
B
Blog
C
Check Point Blog
P
Proofpoint News Feed
S
Securelist
A
Arctic Wolf

Hacker News

Founding GTM Engineer at RamAIn | Y Combinator Google employee charged with $1M Polymarket insider trading bet on search term Can we have the day off? U.S. Is Said to Open Criminal Inquiry of E. Jean Carroll Over Accusations Against Trump You should not update your dependencies in 2026 Machine Learning Engineer at Pelica | Y Combinator Internet Traffic in Iran Increasing F.B.I. Arrests C.I.A. Official With $40 Million in Gold Bars in His Home iPhones Running iOS 26 Are Freezing FaceTime Calls When They Detect Nudity Warm Up Your MacBook Show HN: Open-Source AI Racing Harness Improving AI labels for viewers and creators I'm Getting Into Mesh Networks... (Meshtastic, MeshCore, and Reticulum) Rust (and Slint) on a jailbroken Kindle. 2earth.github.io What Apple and Google are doing to your push notifications Germany Considers Law to Force Social Media Algorithm Boost for State-Approved News FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproduction Thranpages :: How Did I Do :: SimCity 3k in 4k Valve raises Steam Deck prices by more than $200 Objective metrics that change the most as we age Gemini, Gophers, and Fingers. Oh My! Alternative Internets Beyond HTTPS Jobs at Reflex | Y Combinator I think Anthropic and OpenAI have found product-market fit DuckDuckGo's AI-free search saw nearly 28% more visits in the week following Google's insistence that people… Stress disrupts hippocampal integration of overlapping events, memory inference Training our own AI models - PostHog Canada to order military plane fleet from Sweden in shift from US suppliers Last.fm is now independent An Update on Composer & Packagist Supply Chain Security Corporations Can Vote in Some Delaware Elections, Judge Says (1) Declassified CIA Cartography Maps from the 1980s Show HN: I made an emergency page for my family. You should too The VibeSec Reckoning Evolving Webflow for the Agentic Web Italy region: +200% tax on datacenters built in green/agricultural areas Agents Cannot Maintain Systems: The Additive–Transformative Gap in LLM Software Delivery YouTube to Automatically Label AI-Generated Videos & Enhance Labels Tech CEOs are apparently suffering from AI psychosis Incident with Pull Requests, Issues, Git Operations and API Requests GitHub - WilliamSmithEdward/xlide_vscode: Excel VBA integration for VS Code - Tree View / Full Direct VBA Read+Write / LiveShare Compatible / Direct Agentic AI Integrations How Private Equity Bought America’s Essential Services Jensen Huang Just Told Every CEO Hiding Behind AI Layoffs to Shut Up. He's Right. And He's Not the Only One. Atomically precise mechanosynthesis of carbon structures on hydrogenated Si(100) by inverted-mode STM I’m tired of talking to AI Mini Micro Go: Support for Generic Methods Unicode 18.0.0 Beyond the Prompt: Claude Code GitHub - craigmccaskill/posthorn: Self-hosted email gateway between your apps and a transactional mail provider (Postmark, Resend, Mailgun, AWS SES, or outbound-SMTP). Three ingress shapes (HTTP form, HTTP API, SMTP). One Docker container, one TOML config. The just-say-no engineer was a ZIRP phenomenon Gear Commit TSDuck – The MPEG Transport Stream Toolkit Tech Notes: Theseus: translating win32 to wasm So, Where Does Next-Token Prediction Leave Us? Stripe is friendly to “friendly fraud” Did the Pope use AI to write about the dangers of AI? Erin Brockovich made a map to track data centers around the country agent memory: an anatomy How Wikipedia Whitewashes Mao Your AI Tools Are Only as Good as Your Judgment — And That's the Point The OSS Sabotage Manual Became Corporate Best Practice Overview · Cloudflare Flagship docs Xiaomi MiMo Api Open Platform - Token Plan Global Launch Colorado and California Exempt Open Source from Age Attestation From Rust to Ruby Why is the Left No Fun? phloto for my photo flow Big Tech's Anti-Labor Playbook Has Come for Wikipedia More ETFs Than Stocks The worst job interview I ever had DeepSWE Chemistry behind the Garden Grove chemical tank The Melancholy of Slaying Monsters Uber burned through its entire 2026 AI budget in four months. Now its COO is questioning whether it's worth it | Fortune AltTab is introducing a Pro version — and staying open source · lwouis/alt-tab-macos · Discussion #5533 Stop advertising in your commits! | AksDev Xiaomi MiMo Api Open Platform - Token Plan Global Launch Stack Overflow’s forum is dead thanks to AI, but the company’s still kicking... thanks to AI Stack Overflow's forum is dead thanks to AI Founding Software Engineer at Sage Care | Y Combinator The Real Cost of Owning a Home — Eric Turner Is “colorectal cancer” rising in “young people”? What Color is Your Function? – journal.stuffwithstuff.com Uber, Lyft drivers in Massachusetts form first US ride-share union The ballad of TIGIT 'Incredible' milestone reached as Sweden becomes a smoke-free country Minicor | Scalable Desktop Automations Don't Subscribe So Casually Stockholm poised to become leading European geospatial intel player Interleaved deltas NVIDIA Vera CPU Benchmarks: Olympus Cores Delivering The Best Performance Ever Seen On ARM C64 BASIC: Game Map Overhead “Camera View” Scientists say they’ve reversed brain aging with a simple nasal spray Dropbox CEO Drew Houston to step down after 19 years at helm of cloud storage pioneer AWS Fired the One Employee Who Gave a Damn Spain blocks prediction markets Polymarket, Kalshi over lack of gambling licence Outsourcing plus LocalAI will soon become more economical vs. Frontier labs EAGLE 3.1: Advancing Speculative Decoding Through Collaboration Between the EAGLE Team, vLLM, and TorchSpec Netherlands blocks US takeover of vital digital supplier
Zero Lines Maze: What the 8-Bit Guy’s One-Liner Can Still Teach Us
2026-05-26 · via Hacker News

Say what you will about the 8-Bit Guy, but he just put out a fantastic take on the famous one-liner maze program. Even though I have typed that one-liner more times than I can remember, it still inspired me to write this post today, decades after I first learned it.

Yep, the 8-Bit Guy, controversial as he is,  sent me down a proper several day rabbit hole. There are at least four genuinely useful tricks hiding in his final program, but his video does not have a written version from what I can tell, so let me take you through them here.

How the 10 PRINT Maze (Famous Version) Works

Here is the original:

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

Run that on a C64 and you get an endless, scrolling random maze. It looks like magic. It is actually one of the most elegant little hacks in 8-bit BASIC. Many people have “riffed” on it, which was probably best done by Robin.

The whole thing is based on this guy CHR$(205.5+RND(1)).

RND(1) hands you a float between 0 and 0.999, so the result lands somewhere between 205.5 and 206.499. CHR$ ignores the fraction, so you get character 205 or character 206, at roughly 50/50 odds. Those two codes are the diagonal PETSCII graphics, the / and \ lines.

Print one or the other at random, let the screen scroll, and the diagonals join up into a maze. As 8 Bit Guy says, it looks a bit nicer on the Vic 20 font because it joins up better.

There’s no logic so it fits on one line.  It’s a bigger deal than you would think, even today it is worth eliminating IF statements. This code shows you can fold a random binary choice into a single expression with zero branches, and combined with the C64’s habit of truncating floats, and a coin-toss is done for you.

It’s famous now but it was originally straight out of the manuals shipped with the C64 and the VIC-20 back in 1980s, which is where a lot of us grey beards first met it.

You can now follow the tutorials and edit the code right in your web browser with the Online Retro IDE

– No downloads, configuration, etc necessary, and it is free!

Random Maze 8Bit Guy Version –  *Zero* Lines!

The 8-Bit Guy’s first nerd flex is making it shorter than one line. What??

Two things go into making that work:

  1. You can run a FOR ... NEXT loop straight at the BASIC prompt (direct or REPL mode I guess in today’s speak), no line number needed. It will happily execute a whole loop.
  2. STEP 0 is legal, which means the counter never advances, so the loop never ends. I always assumed it would error so never tried it, d’oh!

  Put them together and you get an infinite maze with zero program lines:

  FOR A=0 TO 1 STEP 0:PRINT CHR$(205.5+RND(1));:NEXT

I have to say STEP 0 as a deliberate infinite loop is one of those things that feels like cheating the first time you see it. It is the kind of trick worth keeping in your back pocket similar to WHILE (1) in C.

Three Speed Optimisations

As if that wasn’t enough knowledge to drop, the second half is a speed build, and this is where there are even more nuggets of wisdom:

Random from the SID, not from RND.

RND is slow no matter how you call it. Voice 3 of the SID can be set to a noise waveform, and once it is running, the top oscillator register gives you a fresh pseudo-random byte every time you read it:

  POKE 54287,255 : POKE 54290,128 : REM voice 3 = noise

  PEEK(54299) ... : REM random 0-255, fast

  Reading a hardware register beats computing a float. Lovely example of using the chip you already have instead of the maths library.

Precompute with Lookup Tables

This will be more familiar to RGC readers, and that is LUTs or Lookup Tables.

Converting a number to its binary digits on the fly is expensive. So the program spends a moment at startup building a string that maps every value to its binary representation. After that, turning 42 into its bits is just an array lookup, with no calculations necessary. Precompute once, fetch quickly forever after. This pattern shows up everywhere from sine tables to colour ramps, and it is one of the go-to habits in optimising 8-bit work.

Swap the Table, Not the Logic.

Once you have a table that emits “0” and “1”, you can replace those two characters in the table with the two diagonal glyphs, or any character you like. Same approach, different output. Decouple the data from the loop and you can repurpose the whole thing by just editing a string.

Full Listing Based on 8 Bit Guy Approach

[Edit a copy of the code and see it in action over on my online retro IDE]

The main differences here are I set the text colour and show a visible indication that the program is working because otherwise it takes so long it might seem to have frozen!

10 POKE 53280,0:POKE 53281,0:PRINT CHR$(5)
20 DIM M$(255)
30 A$=CHR$(205):B$=CHR$(206)
40 FOR I=0 TO 255:S$="":BT=128
50 FOR J=1 TO 8
60 IF (I AND BT) THEN S$=S$+B$:GOTO 80
70 S$=S$+A$
80 BT=BT/2:PRINT "{HOME}";I:NEXT J
90 M$(I)=S$:NEXT I
100 POKE 54287,255:POKE 54290,128
110 PRINT M$(PEEK(54299));:GOTO 110

Hot Paths, Again

Here is the part I love. The 8-Bit Guy reckons his fast version is bumping against the KERNAL’s screen-scroll speed, not BASIC’s, so even rewriting it in assembly probably would not help by much.

That is the whole optimisation game in a nutshell. Find the real bottleneck before you reach for the big hammer.

He profiled (“profiled”, but still) and discovered the limit was the hardware scroll, not the interpreter. Plenty of people would have pulled out the ASM based purely on assumption.

Bottom Line

So, there you have it, four solid takeaways from one line of BASIC.

If you haven’t already, go watch the video, it is a quick one and well worth ten minutes.