oxbits / GOTO10

My interpretations in different languages of the 10 PRINT one-line Commodore 64 BASIC program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GOTO10

My interpretations in different languages of the famous one-line Commodore 64 BASIC program: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10

Currently this only contains the Processing, C, C++, and Python interpretations. I will try to include other interpretations in different languages in the future.

Some code snippets

C

int main(){while(1) {printf("%c", 47 + 45*(rand()%2));}}

C++

int main() { while(true) { std::cout << static_cast<char>(47 + 45*(rand()%2)); } }

Python

while(1):
	print (chr(47 + 45 * random.randint(0,1)), end=" ")

Some GIFs

Backward Forward Slashes

Classic, made with Processing

\/ maze in Processing

Classic, terminal

\/ maze

Morse code

With some over-the-top GIPHY filters

Glitchy Morse Code Glitchy Terminal On Steroids

About

My interpretations in different languages of the 10 PRINT one-line Commodore 64 BASIC program


Languages

Language:Processing 65.3%Language:Makefile 11.4%Language:C++ 9.5%Language:C 7.0%Language:Python 6.8%