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 a...
For further actions, you may consider blocking this person and/or reporting abuse
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
Only to make people hate me...
HTML
<marquee>You spin my head right round, right round...</marquee>
Python
Python
Shell command :
yes
Javascript (ES6):
Technically ends because
.then
run on the next tick, but it permanently blocks the JS event loop (I think).(It might eat your RAM)
C
This is not a program in the strict sense and surely it will never run forever, but still it's a lot of fun
Scala
Haskell
Isn't this program fine? It never forces evaluation of
go
so the program immediately exits.of course I assumed you would evaluate the expression (for example in the repl)
you are technical right but it's a bit like commenting to all the others and saying "it's fine as long as you don't run it" ;)
just assume a
there if you like
C++
C++ (even though the syntax highlithing is set to python)
C
Javascript
The original post was tagged with javascript and dev.to has a bias toward javascript which is why it was tagged with that.
What language would you have picked? Because most languages do not have empty statements evaluate to true, so the block would have had to be
for(;1;);
which is not as neat IMOC
C#
Rust:
Or, for a slightly more involved example:
A classical example :P
Or in ES2015
for (;;cout<<"forever");
Using C and TCO:
2 JS classics
C
This ends when enough sysadmins get annoyed. We used to call it "fork bomb" at the University systems.
Z80 assembly
compiles down to two bytes: 18 FD
his technically doesn't run forever, but takes longer than you'd expect:
Python:
haha, reminds me of:
stackstatus.net/post/147710624694/...
Elixir:
Erlang:
loop() ->
do:someVitalTask(),
loop().
Clojure
(Behold the beauty of LISP :) )
`T
2 bytes. Language: MATL
This post is so dangerous oh my god
Java8
The matrix has you:
Ruby
Swift :
repeat { print("Hello") } while(true)
while True:
print('something')
bash (probably sh too)
Windows Programming:
:1
start
goto 1
while (true) {}
Oooh! This is fun!
Python:
ImCrazy4You = True
while (ImCrazy4You):
print "I will always stalk you, forever!";
On linux bash:
cat /dev/urandom > /dev/null
The Earth was designed to run forever, until the Vogons needed to put in a hyperspace expressway. 😂
for(;;);
Infinite insult in C
while(true);
Oooh! This is fun!
Python:
ImCrazy4You = True
while (ImCrazy4You):
print "I will always be watching you, forever!";
void main(){
main();
}