Skip to content

Comment on Ask HN: What's the most elegant piece of code you've seen?

Comments

Commodore 64's Basic random maze generator:

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

https://www.youtube.com/watch?v=m9joBLOZVEo

Somebody managed to write a whole book about this random maze generator. http://10print.org/

That book is remarkable!

It prints either \ or /, not sure how amazing that is. It also isn't a maze, considering it's unlikely any of those paths leads to an exit.

Fair point. Making a a traditional 1-solution maze in 1 line is qualitatively more impressive than making a complex pattern of passages in 1 line.

I think you have quite missed the point.

I've got to say, that is truly wonderful.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.