Write an endless loop, write some confusing gotos...
The rules are simple: Write a program that never stops. Language: Any. Try to keep it short and confusing :D
Here is an example:
for(i=0; i<10; i++){
for(j=0; i<10; j++){
System.out.println("Blubb.");
}
}
Post your funny, creative solutions below.
Top comments (78)
Ruby:
This gotta be the happiest loop, I've ever seen.
Always gotta have the classics.
Ah, BASIC with manually typed line numbers and GOTO... If only the screenshot were monochromatic green or amber it would be truly classic.
I can do that if you'd like... dev.to/dvdmuckle/hooking-up-a-vt42... :)
That'd be cool to see, but it'd never replace my memories of flickering Commodore PET screens from days of yore. Cool write up though, saving that to read later.
Endless recursivity!
This will crash once the stack is full but nice try. :)
Use a language that allows optimization of tail recursion then ¯_(ツ)_/¯
Us cool kids with our tail recursion could write in, for example, Common Lisp:
Hahaha yeah it totally did crash Chrome when I tried it. I wanted to just post
but that's a little boring.
Definitely classic but lacks the humor :)
python
never-ending song
non-stop random numbers
lots of random user information
The "never-ending song" is classic. 😂
Brainfuck, I guess.
C++
assembler
C
I really like the last one. Defining a label to a comment - nice :D
This is far the best 👍
very nice friend!!
Javascript (empty statement evaluates to true so is effectively while(true)):
for(;;);
Super-Evil Javascript DON'T RUN THIS LOL:
for(;;)alert();
Python:
while 1:0
Shell:
yes
Funny story about
yes
is that in Unix it's actually just a blank file, which AT&T has the copywrite for o.0Welcome to Verilog.
My god, this brings back memories that I've been trying to compartmentalize. :'(
Was missing a uninterruptible one