g | x | w | all
Bytes Lang Time Link
008'Python' is not recognised241104T213402ZGleb
006'Python' is not recognized241214T174256ZGleb
003FRACTRAN250713T233220ZLucenapo
023SAKO250321T113653ZAcrimori
003Jalapeño250204T042119ZATaco
5118250203T174543ZJoao-3
036Python3250115T234242ZLaszlo P
038Bespoke250115T195107ZJosiah W
044Malbolge Original Interpreter241214T154522ZWeird Gl
029jbasher2241217T170403Zmadeforl
014Raku Perl 6 rakudo241211T180254Zxrs
013BASIC241105T115420ZGleb
014AWK241105T140456Zxrs
003How dare you fuck the brain241004T160749ZGleb
0072let240222T151805Zmadeforl
018GFortran201212T064351Zroblogic
003Zsh230615T202030ZWallace
nan230615T074024ZDadsdy
004!@#$%^&*_+230614T180318ZWallace
007x86 .COM Executable140115T082819ZAlliedEn
015Motorola MC14500B Machine Code230227T191058Zemirps
003Trilangle230227T152540ZBbrk24
004Pip230202T231145ZDLosc
008GHCi + Data.Function140129T014914Zdaniel g
009Windows Batch file131109T022605ZPatrick
009Intcode191224T035753ZThe Fift
008Assembly MIPS221107T223435ZEasyasPi
004Phooey221107T004946ZEasyasPi
003Bash190601T180455ZBenjamin
050Pascal221105T134516ZKai Burg
002Sesos160717T023705ZDennis
021Oration160606T181213ZŻáł
004Retina161115T230507Zmbomb007
012Röda170313T183417Zfergusq
014Quetzalcoatl160302T224441ZNoOneIsH
003Fuzzy Octo Guacamole160321T024625ZRiker
006BitCycle220903T035321ZDLosc
013tinylisp220610T014934Zemanresu
004Pyth160220T104414ZAlexINF
004Knight220807T023949ZAiden Ch
001Regenerate a220609T154305Zthejonym
039A0A0210627T151625Zstefvans
015Common Lisp220511T050859Zvenven
010BitCycle220511T044321Zdes54321
048Vyxal220423T025331ZnaffetS
008Dyalog APL220422T215638Zfluentpw
002Brachylog160831T094459ZFatalize
017rusty_deque220413T142513Zbigyihsu
026Appleseed220413T043310ZDLosc
020unsure210228T044630ZGold Far
004Seed220217T033005Zautumn
033TRANSCRIPT220210T155600ZTwilight
015Python 3220204T210151ZOliver
002Headass220205T063528Zthejonym
015tinylisp220205T020638ZRazetime
008APOL211211T160403ZGinger
015KonamiCode211201T171803ZGinger
062RETURN211130T101414ZCreaZyp1
000ℒight211123T015030ZFmbalbue
011Grass210917T123621Zuser1004
026INTERCAL210917T122158Zuser1004
016Nim210905T204447ZQaziquza
005Cascade210816T095305Zemanresu
060Arduino210816T001731ZBbrk24
6875Mascarpone210627T160114ZSoup Gir
001Dis210626T083107Zuser1004
003 Pushy170119T194730Zuser6357
nan160327T062054ZDennis
002Duocentehexaquinquagesimal210414T201410ZMakonede
008PowerShell210312T204900ZDaniel T
015Zsh210312T153737Zsech1p
004Brainf*ck210304T171201ZPython_4
009[BASIC]210228T052245ZCaleb Fu
001Vyxal210227T005304Zlyxal
001Befunge93210226T191039ZMakonede
012ARM Thumb201227T001439ZEasyasPi
009Ruby140703T160429Zaddison
00105AB1E201116T224153ZMakonede
004MAWP200620T073040ZDion
013Rockstar201001T093401ZShaggy
004Microsoft Word Math AutoCorrect200624T183412ZGeneral
023C171224T232201ZSIGSTACK
055Brainetry liveoutput200624T143945ZRGS
010Vim200621T021212ZJoshM
002AlphaBeta200620T171414ZPkmnQ
1505Malbolge200619T043850Zceilingc
0017200615T201223ZPizgenal
009Ruby200519T154303ZSapphire
006International Phonetic Esoteric Language200616T222310Zbigyihsu
059Go200519T155409ZSapphire
015TSQL200303T145249ZBradC
003Rabbit~190723T111630ZAdam
019Roj200302T055945Zuser9206
004Keg190607T021920Zuser8505
003VisiCalc200118T070813Zuser8505
026Spice191227T161236ZSlord6
086Shakespeare Programming Language191227T031355ZHello Go
007MarioLANG190920T150012Zdropbear
016TSQL190920T104120ZJan Droz
003bitch190130T001633ZHelen
00533190729T062155ZTheOnlyM
037Intercept 1.1190601T180204ZBenjamin
011TeX190913T095746ZSkillmon
005Element190911T150035Zuser8505
007MarioLANG190911T130913Zsquid
008PHP171012T140658ZShaun Mo
002Pyth190728T225541Zhakr14
008Underload190728T125322ZEdgex42
018Lua190723T143844Zval - di
010BrainFlak190723T140737ZDorian
008Brian & Chuck190723T134612ZDorian
023Rust190723T130109Zruohola
001Bitwise Cyclic Tag But Way Worse190723T102554ZEdgex42
003bitch190607T023930Zuser8505
nan150407T150254ZSuperJed
004Triangular190603T152843Zsquid
013Turing Machine But Way Worse190513T050817Zu-ndefin
012TeX180328T192608Zsiracusa
005MINOL190514T171852Zbrhfl
003YABALL190513T025253ZMilkyWay
005TIBASIC190416T175934Zabsolute
003Voovoos190416T143601ZMayube
00205AB1E190415T050917ZJackson
011Perl 6190414T054433Zbb94
nanMinecraft > 1.9 2 + 5 = 7 Bytes151112T223455ZAddison
015Tamsin190323T051606ZEsolangi
016Python190214T200239ZMerin Na
039Muriel190213T035706ZJo King
001Gol><>190213T040940ZKrystosT
194JVM bytecode OpenJDK asmtools JASM190213T024447ZKitten
007Clean190213T023534ZΟurous
013Turing Machine But Way Worse190213T015104ZMilkyWay
005Lean Mean Bean Machine181130T163548ZMayube
006Aheui esotope181128T002750Zcobaltp
008Perl 6181128T004318ZJo King
010Alchemist181127T202740Zბიმო
056JavaScript + HTML181127T190424Zguest271
003MathGolf181003T141914Zmaxb
002Burlesque181115T111035Zmroman
011Perl 6140310T223956ZMatt Oat
369Taxi181003T195735ZJosiahRy
170ORK181003T193327ZJosiahRy
003√ å ı ¥ ® Ï Ø ¿170313T175850Zcaird co
000Z80Golf180810T053304ZBubbler
004Flobnar180810T050125ZEsolangi
089Shakespeare Programming Language180605T135252Z12Me21
014Prolog180605T080332ZKhepu
001Ahead180603T032655Zsnail_
004Japt180517T071254ZBubbler
035HTML + JavaScript180426T142550Zmbomb007
005TIBasic131126T234119ZTimtech
024C131112T021309ZStuntddu
001Gol><>180330T072516ZBubbler
012TIS n 1 1180329T214239ZPhlarx
032Java JDK 10180328T195425ZDevelopi
003Stax180328T171523ZWeijun Z
004Seed170210T194440Zovs
116Shakespeare Programming Language180213T093059Zchococha
014PHP180212T210856ZArtistic
007FALSE180212T202711Z12Me21
002axo180212T201721Zqqq
024Forth150410T210739Zmbomb007
005Chip8171012T135232Z12Me21
005Momema180212T071040ZEsolangi
002Wumpus180212T051901ZJo King
001Forked180212T050834ZMD XF
007Dreaderef170820T054828ZEsolangi
002Aceto171224T222231Zqqq
004Flipbit171225T014455Zcaird co
002Pyth171211T192700ZTornado5
028Whispers171210T145635Zcaird co
013Funky171107T225841ZATaco
003sh131109T114309Zklingt.n
001cQuents 0171015T234451ZStephen
009GWBasic171015T233439ZAnonymou
005sed131109T194525ZF. Hauri
009Jq 1.5171014T071313Zjq170727
156R171012T152908Zuser5957
002QBIC170109T144133Zsteenber
023VBScript171012T120230Zuser7277
018VBA171002T214225ZTaylor R
011Juby171002T204423ZCyoce
004Evil171001T132322Zuser6280
020JavaScript171001T122102Zuser7491
014Wolfram Language Mathematica170926T075455ZVitaliy
019Bitwise170926T033105ZMD XF
nan140130T202137ZBraden B
005Dyalog APL170820T184502ZGil
003Cubically170805T174153ZMD XF
011AHK170730T021337ZEngineer
041Emojicode170730T002052Zbetseg
038MOO170709T235137ZThe Fift
009Add++170606T201841Zcaird co
016Unreadable170606T085225ZMayube
002Fission 2170606T080229ZMayube
003Check170603T042409ZEsolangi
005shortC170606T041059ZMD XF
012Decimal170606T040436ZMD XF
006Braingolf170603T033208Ztotallyh
016Whitespace170527T130545ZEphphath
001Alice170411T132605ZMartin E
016Fith170216T182041Zjqkul
008Commodore 64/VIC20 assembly170216T121437ZShaun Be
006QC170211T210633Zuser6333
006SmileBASIC170124T055755Z12Me21
005Commodore Basic170124T054508ZMark
023C++170123T163340ZMatthew
019Haxe170118T000538ZETHprodu
0198th170117T202555ZChaos Ma
013GO170117T204049Zpowelles
011PHP140703T183934ZAurel
008FALSE161223T230041ZConor O&
024Kitanai161221T132317ZSygmei
036LOLCODE140202T063635ZGiraffes
001Labyrinth161213T220355ZRobert H
006Casio FX7000G161210T214449ZFlipTack
006TI83 Hex Assembly161201T210534Zhabs
008zsh161125T025530Zapricot
002Cubix160907T092744ZETHprodu
010Ruby161028T063219Zanna328p
005x86 .COM Executable161006T192057ZHellMood
019Sonic Pi160505T175133Zunivalen
009PHP131114T150501ZVlad Pre
007Golfscript140129T204917ZMcKay
049Woefully160907T072820ZDestruct
005GNU sed160831T093604Zseshouma
001Hexagony160831T094205ZMartin E
020C160529T003007Zuser8397
006Haystack160529T002215Zuser8397
026Brainfuck160528T231048ZTuxCraft
004APL160528T215334ZTuxCraft
001Desmos160527T155852Zweatherm
005Emotinomicon 18 bytes160527T105433ZBál
002Burlesque 2 Bytes160527T084445Zmroman
014Clojure160526T204556Zmark
004APL151015T214534ZAdá
003Scratch160523T130350Zweatherm
021Come Here160325T120641ZSuperJed
001Reng v.1.2160321T032917ZConor O&
030BASTARD 30 Bytes160301T171844Zs4b3r6
005Pylons160229T204104ZMorgan T
023ForceLang160229T203659ZSuperJed
013Python131110T143636Zanon
015R160215T155602ZArgenis
025Bitxtreme151112T222050Zlirtosia
025C140129T051212ZRaghuram
001Detour160125T005859ZCyoce
047𝔼𝕊𝕄𝕚𝕟160125T013909ZMama Fun
003PlatyPar151216T014525ZCyoce
003Mouse2002151214T134241Zcat
028Javascript ES6151015T230316ZMama Fun
081ArnoldC151015T224847ZMama Fun
133BotEngine151015T215642ZSuperJed
003Simplefunge140907T005022ZAearnus
004Selfmodifying Brainfuck151015T155802Zmbomb007
004GoLunar150410T211257Zmbomb007
nan><> Fish 2 characters151015T140236ZSjoerdPe
006 Turing Machine 6 Characters131109T230027ZSerge
001Windows Batch File150702T010934ZHand-E-F
002Bat150701T203801ZQwertiy
042Qt 5.4 QMake pro file150701T151059ZForemanB
003Cardinal150701T141814ZM L
003Piet150613T161144ZM L
009Haskell150411T082544ZTowerism
033Mathematica150411T023016Zalephalp
nanI haven't seen Thue used here much150410T235358ZSuperJed
002Chinese140128T181849ZTimtech
012Xojo140621T184554Zsilverpi
nan150305T152654Zcaptncra
nan140130T233159ZBenjamin
009Turing Machine Code150410T100749ZSuperJed
002><> Fish150409T124151ZThijs te
006x86 machine code150305T211838ZSirPytho
002This Programming Language150306T002153ZBobTheAw
004Marbelous140902T143546Zoveracto
001LOOP150305T150725Zblutoran
065QBasic150305T000709ZDLosc
002Pyth141120T205640Zizzyg
006CJam141120T154313ZMartin E
016Shell140907T015209ZThomas J
022PHP140703T213053Zg.carval
014CoffeeScript140903T222941Zrink.att
015Clojure140902T220659ZMichael
1117Mathematica140129T195400ZMichael
015Groovy140902T153640ZMichael
002Befunge 98140902T150320ZAndoDaan
011k4/q140711T201444ZAaron Da
nan140711T190734ZAdam Spe
nan140711T163507Zmcgrailm
018SCALA140711T132512ZGovind S
029C++140703T222459Zbacchusb
074Java140621T183301ZRamasamy
012VBA140703T172958ZJesterBL
007Bash 7 Characters140703T171128ZIan D. S
016C#140624T083109ZEvilFont
013Bash140622T042338ZJwosty
015Coffeescript140621T194635Zzsitro
004Bash140429T200604ZDigital
nanA couple of attempts for AVR140424T144214Zuser
009Bash140423T181558Zuser2419
nan140412T073239ZDarkgamm
011J140311T093634Zjpjacobs
014~~! 17 bytes140310T090618Zcjfaure
019Thue140306T063619Zn̴̖̋h̷͉̃
072JAVA131127T221625Zuser1076
054Java131111T141825ZRich Smi
018Rebol140214T210727Zdraegtun
1519awk140214T193538Zskibrian
010perl140214T192407Zskibrian
007Atari 8bit Basic —140204T191518Zuser1525
044Assembly X86140204T200741ZFez Vras
014Groovy140204T194111Zkrs
026Processing140204T150809ZThe Guy
023C140204T150444Zugoren
023JavaScript140204T142315Zrahulroy
008Brainfuck140204T113531ZFIQ
017PureBasic140203T225337ZFozzedou
019Scala REPL140203T223325ZMika
nan140203T215721Zmarkw
018Python 3 15140203T043355ZMechanic
002PDP11 Machine Code140128T211031Zgreggo
057C#140129T223409ZNick
012Windows PowerShell140129T223423ZMerin Na
072C#140129T222350ZMerin Na
007Zozotez LISP140129T221003ZSylweste
013Bash140129T213839ZEduard F
008PowerShell140127T171731Zmicrobia
004Quomplex131212T002009ZTimtech
013q/KDB140114T083202Znyi
002Windows Batch file140114T164508Zteh_sena
009Postscript131213T071751Zluser dr
002GolfBasic 84131212T002249ZTimtech
013Matlab131129T154054ZSven Hoh
007APL131128T062028ZTwiN
060C#131127T203120ZIt's
022F#131127T152806Zgoric
008PowerShell 2.0131112T021456ZIszi
007dc131112T033422Zr.e.s.
013R131109T083448Zplannapu
014JavaScript131111T050126ZzzzzBov
015TCL131110T224816Zuser7795
024C131109T165458ZRozuur
nanSummary Ruby 9131109T022245ZDoorknob
010Perl131109T170626ZMatthias
010Haskell131109T102145Zshiona
001Befunge131109T023051Zmarinus
004Brainfuck131109T022614Zcardboar
018Haskell131109T021048ZMtnViewM

'Python' is not recognised, 8 bytes

j11|j1

Try it online

'Python' is not recognized, 6 bytes

js1|js

Try it online

FRACTRAN, 3 bytes

1/1

Try it online!

Uses the -a flag.

SAKO, 23 bytes

1)LINIA
SKOCZDO1
KONIEC

Basically the same as this infinite loop solution, but additionally prints newlines.

Jalapeño, 3 bytes

‽1W

Hex-Dump of Bytecode

       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0000: a2 31 11                                        

Crashed my computer a few times to write it. Essentially while(1){write()}

Try it Online!

, 5 chars (11 UTF-8 bytes)

screenshot

➰1:☾

Prints an infinite stream of new lines, since calling (Python's print) with no arguments prints a singular new line. You could try it in the web UI, but there, it just hangs without output (it prints after halting).

Python3, 36 bytes

x=[1];[print(x.append(1))for i in x]

Bespoke, 38 bytes

PROGRAM INQUIRY
tiny:Y
proper:Y
good:N

Outputs a series of 1s forever.

Malbolge (Original Interpreter), 164 46 44 bytes

Warning: This code uses non-printable characters, replace [2] by a byte containing 0x02, [8] by a byte containing 0x08, and [15] by a byte containing 0x0f

(=&`^?>=<}X98765[2][8][18][2][2][8][2][2][2][8][2][2][2][8][2][2][2][8][18]!~}|{zy[15]

1505 bytes? Using a toolchain? Surely we can torture ourselves improve this code even more by making it non-portable. This program prints the letter T forever. The technique used here is the same one used by Lou Scheffer. We try to find a good enough pattern that we can exploit for our program, and we put the goto values we want in binary as padding (When not needed, I just used o instead). Luckily, we have a pattern of printing (<) at position 3 and a pattern of data pointer jumping (j) at position 9. In the previous version of the code, I absolutely wanted these two commands to be together, which was a mistake. Here's an explanation of the normalized version of the code minus the extra bytes:

jpj -> Put some printable value in the accumulator and jump to data section
<i -> Sometimes prints and jumps to the data pointer resetting section
oooo
ji -> Sometimes rewinds the tape and jumps to the printing section
[INSERT PADDING HERE]

Malbolge and Malbolge Unshackled, 113 90 bytes

(=BA@?>=<;:381x543,1N/.-,+*)('&%$#"!~}|{zLxwvutWr1p0.--kjihgfedcF!`_^]\[ZYXWVUTSRQPONMLKig

Try it online!

To be honest, I wasn't completely satisfied with my first attempt, since it was using a well-known bug from the original interpreter, so I tried to rewrite it so that it would work for a regular interpreter. This took more time than I expected... Well, if you disregard the fact that I'm programming in Malbolge. Here's a short explanation of the code:

j                     -> Move the data pointer forward
pooooooooopopjooop    -> Crazy operations in order to initialize
                      the right values into the data section loop
o
i                     -> Starts loop
oooooooooooooooooooo
/                     -> Used for the first crazyop at the start
                         of the program
ooooo
joio<i                -> MAIN LOOP: Alternates between data pointer
                         resetting and printing 
i<                    -> Some values for crazyop and goto
ooooooooo
ji                    -> Data pointer resetting loop
oooooooooooooooooooooo
<i                    -> Printing loop

jbasher2, 29 bytes

while 1 < 2
output 1
endwhile

Raku (Perl 6) (rakudo), 14 bytes

.say for 1 xx*

Attempt This Online!

BASIC, 20 13 bytes

1PRINT1:GOTO1

This has probably been done before

AWK, 14 bytes

{for(;;)print}

Try it online!

The default output for AWK is your input, so pass this any string and it prints it (on a new line) forever.

How dare you fuck the brain, 7 4 3 bytes

ING

Try it online

2let, 7 bytes

aa
ag 1

prints "Hello World!" infinitely

GFortran, 21 18 bytes

Endless newlines. Try it Online!

1 print*;goto1
end

Alternate solution (19B), hopefully less annoying for @Sapphire_Brick!

do;print*;enddo
end

Zsh, 3 bytes

yes

Try it online!

(,), 10 Chars or \$10\times \log_{256}(3)\approx1.98\$ Bytes

(,,(),,())

!@#$%^&*()_+, 4 bytes

^(?)

Try it online!

x86 .COM Executable, 7

in hex:

b8 21 0e cd 10 eb fc

The others need kilobytes or more of system libraries and runtime. Back to basics:

$ echo -ne '\xb8!\xe\xcd\x10\xeb\xfc' > A.COM
$ dosbox A.COM

output

You can change the 2nd byte (0x21, or !) to change the output.

Uses a BIOS interrupt for output; doesn't need DOS, but I didn't have QEMU set up.


Explanation

The machine code corresponds with the following assembly:

        mov     ax, 0x0e21
again:  int     0x10
        jmp     again

The output is all in the int call -- per this reference, int 0x10 with 0x0e in AH will print the byte in AL to the screen.

Knowing that register AX is a 16-bit word comprised of AH in the high byte and AL in the low byte, we can save an extra load (and thereby a byte in the machine code) by loading them together.

Motorola MC14500B Machine Code, 1.5 bytes

1BC

Explanation

1   # store data in register R
 B  # output R
  C # JMP to the start of the program

Trilangle, unbounded memory, 3 bytes

'1!

Push a 1 to the stack, print it, repeat.

Trilangle, 4 bytes

'1,!

Push a 1 to the stack, print it, pop it off, repeat.

Trilangle -w, 1 + 2 = 3 bytes

,

When run with the -w flag or in the online interpreter, popping from an empty stack prints a warning.

Pip, 4 bytes

W1P1

Prints the number 1 with a trailing newline over and over. Attempt This Online!

This is a simple loop; in pseudocode,

while 1:
  print 1

Almost any expression can be printed instead of 1. For example, W1Pr prints random floats between 0 and 1 forever.

A more interesting option, also 4 bytes:

P*,u

This constructs an infinite range starting at 0 (,u) and then prints each element of it (P*). The result is an infinite loop that outputs the natural numbers one at a time. Attempt This Online!

GHCi + Data.Function, 8 bytes

Old thread, but a fun one is

fix show

in Haskell, it prints

"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\…

forever since it's basically running

let x = show x in x

It knows that x is a string, so the first character is ", so this needs to be escaped with \", but know that \ needs to be escaped so \\\x, and so on and so on.

Windows Batch file, 9 characters

:a
goto a

Intcode, 9 bytes

4,0,5,0,1

Outputs "4" an infinite number of times.

Assembly (MIPS, SPIM), 8 bytes

main:j$0

Try it online!

This has both infinite stdout output and infinite stderr output, meaning that I have \$\infty * 2\$ output. Clearly that makes my answer twice as good as the others and I should win 😏.

Jumps to the zero register, which is an invalid address. Without macros:

main:
    # Jump to the address in the zero register, which is 0
    jr  $zero

This causes the default exception handler to emit the following error message repeatedly while it advances the PC past the offending instruction to "solve" the problem.

  Exception 6  [Bad instruction address]  occurred and ignored
  Exception 6  [Bad instruction address]  occurred and ignored
  Exception 6  [Bad instruction address]  occurred and ignored
...

All while the interpreter also prints this error message to stderr:

Exception occurred at PC=0x00000000
  Bad address in text read: 0x00000000
Exception occurred at PC=0x00000004
  Bad address in text read: 0x00000004
Exception occurred at PC=0x00000008
  Bad address in text read: 0x00000008
...

This continues until it eventually wraps to __start, jumps to main, then jumps back to 0x00000000.

Phooey, 4 bytes

=[?]

Try it online!

Outputs a debug dump repeatedly.

>>> DEBUG <<<
Tape: [>1<]
Stack:
>>> DEBUG <<<
Tape: [>1<]
Stack:
>>> DEBUG <<<
Tape: [>1<]
Stack:
>>> DEBUG <<<
Tape: [>1<]
Stack:
...
=      tape = tape == stack
       since tape and stack are 0, sets it to 1
[      While tape is not 0
   ?     Dump debug info
]      End

Phooey (interpreter bug, eventual crash), 2 bytes

<?

Try it online!

Based on my "Raise a SIGSEGV" entry, where an interpreter bug is used to cause an infinite printing loop.

The bug is thoroughly explained in that post.

However, as one might expect, this does eventually (and quickly) segfault. If there was no memory protection, it would run infinitely.

Bash, 3 bytes

top

Haven't seen anyone do this yet. It's tied with the yes answer.

Pascal, 50 B

Full program compatible to ISO standard 7185 “Pascal”.

program p(output);begin while 8=8 do writeLn end.
program p(output);begin while 0=0 do write(1)end.

Some dialects such as Free Pascal do not require and actually ignore the program header (the program p(output);). There you could omit those 18 bytes, so it’s 32 bytes in total.

Sesos, 2 bytes

0000000: 2c06                                              ,.

Prints an infinite amount of ones.

Try it online! Check Debug to see the generated binary code.

How it works

The binary file above has been generated by assembling the following SASM code.

set numout ; Switch to numeric output

add 1      ; Set the current cell to 1.
jmp        ; Jump to the corresponding exit marker.
    put    ; Print the integer in the current cell to STDOUT.
           ; (implicit jnz)
           ;     If the integer in the current cell is non-zero,
           ;     jump to the previous instruction.

Oration, 21 bytes

to iterate, 1
listen,

40 bytes:

to iterate, 1
listen,
capture,
that's it

The first does print() (but it's python 2, so prints infinite ()), the second does print('') (the capture begins a string and the that's it ends it).

Retina, 4 bytes

+:`0

Try it online

Doesn't match, so output 0, then it does match so output 1, now it doesn't so output 0, etc...

Röda, 12 bytes

{[0]while{}}

This is an anonymous function that prints zeros infinitely.

Quetzalcoatl, 14 chars

while 1: ::' '

This is for an older version of Quetzalcoatl.

Fuzzy Octo Guacamole, 3 bytes

(1)

Infinitely outputs 1.

Due to weird implicit output and recursive loops (it executes the code inside the loop using recursion), 1 is outputted by the implicit output.

BitCycle, 6 bytes

!~<
1^

Inspired by emanresu A's suggested golf to des54321's answer. Similarly to that answer, this outputs alternating 0s and 1s.

Try it here!

Explanation

The initial 1 bit is directed north into the dupneg (~). A negated copy (0) is sent west to the sink (!) and is output. A non-negated copy is sent east, whereupon it is immediately directed west again back into the dupneg. Now the original copy is sent north and leaves the playfield, while the negated copy is sent south, redirected north again, and the cycle continues forever (with the bit changing parity each time).

tinylisp, 13 bytes

(d f(q(a(f
(f

Try it online!

Outputs an infinite stream of errors. -1 thanks to DLosc.

The tinylisp interpreter throws a warning because a shadows the builtin a, but continues evaluation.

Pyth, 4 bytes

Pyth is a new programming lenguage, so this answer doesn't count.

.V"0

Explanation:
.V   - Forever loop
  "0 - Outputs zeros

Knight, 4 bytes

W1O1

Try It Online!

Prints 1 forever.

Regenerate -a, 1 byte

*

Attempt This Online!

Prints newlines forever :P it's finding and printing every possible match for at least 0 nothings, delimited with newlines. Surprised this isn't a syntax error.

A0A0, 43 39 bytes

A0A0
A0C3G1G1A0
A0O0A0
A0A1G-3G-3A0
G-3

Prints 0 forever. This uses a classic infinite loop which was created by the inventor of the language. Considering the only important thing about this code is that it runs infinitely, I'll use this post as an explanation of this looping construct, since it's the basis for all loops.

Loops are generally not really difficult in programming languages, even those which only have goto instructions and not proper looping constructs. A0A0 has goto instructions, so what's the problem? A0A0 is a self-modifying language which deletes the instruciton after it executes it. So if we were to use a goto to form a loop, we would simply end up at nothing and the program halts. This is not what we want.

Thankfully, the language contains instructions to modify its own code. There are two instructions that do this. A# and C# where # is a placeholder for an integer. A# appends the current line of instructions (excluding itself) to the line # positions below. C# clears the line # positions below this line. Since all integers are allowed, negative numbers can be used to go to lines above and 0 can be used to stay on the same line.

Let's take a look at the basis of the loop.

A0 A0
A0 C3 G1 G1 A0
A0 instructions here A0
A0 A1 G-3 G-3 A0
G-3

The first thing we do when entering the loop is go past four A0 instructions which append their own lines to themselves. Remember that it excludes itself, so this first A0 is not copied. This would be an issue on subsequent iterations, which is why at the very end of the loop, there is also an A0. This means that this A0 at the end is copied, which preserves the ability to copy the loop infinite amount of times.

You'll notice that the last line does not have any kind of append instruction. This is necessary, because we must at some point go back up and we can't go up if we have an A#. But if we never place a G-3 there again, we eventually will end up there and, again get stuck since there's no instruction there. This is what line 4 is for. It contains the following:

A1 G-3 G-3

It places two G-3 in line lower - at line 5. This preserves the ability for us to keep jumping back up forever. However, this line contains an A0 at the end. And during exeuciton, it may contain many more instructions we don't want. If we execute anything that is not G-3, we go to line 6 and left the loop. This is where line 2 comes into play. It contains a C3 instruction, which clears the line three lines lower. This is line 5. Because the instructions are aligned properly, this means that the line is cleared the moment we would hit an instruction that is not G-3. And since at the same point there will be another A1 G-3 G-3 on line 4, this now empty line will get two G-3 instructions again, just in time.

You may observe that, since there are also G-3 instructions on line 4, we may sometimes jump up to line 1 instead of line 2. And this is where line 1 comes into play. It only contains A0 A0. This will repeat itself infinitely on that line and acts as an infinite no-op. After executing a single instruction, the program counter automatically moves to the next line and we're back on line 2 again.

And all of this code gives us freedom on line 3. We can put whatever instructions we want in there, as long as these instructions don't modify the loop. We can even have multiple lines in the middle, as long as you change the G-3 to the appropriate amount.

Edit: Optimized by 4 bytes. It turns out that there is no minimum requirement of 3 instructions for the loop, allowing us to drop 2 instructions, totalling 4 bytes.

Common Lisp, 15 bytes

(loop(princ'x))

Try it online!

BitCycle, 10 bytes

 !
 ~<
1A^

Outputs an infinite bit stream of alternating 1s and 0s, or, with the -u or -U flags, an infinite sequence of 1s.

Try it online! or with an online visualizer

Vyxal, 4 bytes (UTF-8)

🍪

Try it Online!

Outputs cookie forever.

Dyalog APL: 8 characters

Now you can choose what to infinitely print out! Yeeeay!!!

{⍞←⍵⋄∇⍵}

Brachylog, 2 bytes

ẉ⊥

Try it online!

Not only does it print infinitely, this prints something much more interesting than most answers here: all integers.

Explanation

        Assign an integer value to the input ; since it is not constrained, it can take any
          value in (-∞, +∞), meaning there is an infinite number of choice points
        The way = is implemented makes it so that the order of choices it will try is:
          0, 1, -1, 2, -2, 3, -3, …
         
 ẉ      Write that integer to STDOUT, followed by a linebreak
  ⊥     False (i.e. go back and try the next integer choice point)

rusty_deque, 17 bytes

1~{dup~ow~}~loop~

Forever print 1s to the screen.

Appleseed, 26 bytes

(def start!(q(_(print!(0to

Try it online!

Explanation

(def start!                 ; Define the start! event handler as
           (q               ; A function
             (_             ; That takes any number of arguments
               (print!      ; And outputs
                      (0to  ; The infinite list of all nonnegative integers

unsure, 20 bytes

um but uh okay wait

Don't try it online, it freezes the browser. Listen to the code. Even it wants you to wait. Think this through. Don't be like me. Don't lose that unsaved tab.

Seed, 4 bytes

1 87

Try it online!

TRANSCRIPT, 33 bytes

You can see a f here.
>TIE F TO F

Try it online!

Generate endless warnings due to unclosed loop. At first it doesn't seem possible to loop infinitely in TRANSCRIPT because it only have for loops, but this works.

Python 3, 18 15 bytes

Thanks to DLosc for -3 bytes!

while 1:print()

Headass, 2 bytes

PE

Try it here! copy and paste this: srun("PE")

Prints an infinite stream of 0s and newlines.

P   Print the value of the current register (initialized at 0) + a newline
 E  Go to code block determined by value at current register,
    Block 0 = return to start.

Headascii, 2 bytes

!E

Try it here! copy and paste this: erun("!E")

Similar to the last one, but instead of printing 0s and newlines, it just prints newlines.

!   Print the value of the string register (initially empty) + a newline
 E  Go to code block determined by value at current register,
    Block 0 = return to start.

tinylisp, 15 bytes

(d f(q(A(f g
(f

Try it online!

An infinite stream of errors. Just as DLosc intended, hopefully.

APOL, 8 bytes

w(T p(0))

I'm not sure if this could reasonably be made smaller.

KonamiCode, 15 bytes

v(^)L(^)<<<B(^)

Explanation:

v(^) [Writes 1 to memory address 1.]
L(^) [A loop marker]
<<<  [Output the current memory address as a number]
B(^) [A reverse-jump instruction, ending the loop.]

Note: We can't use 0 for the first instruction becuase the comparison buffer is set to 0 by default. This means that the reverse-jump's condition will be fulfilled and the loop will immediately exit. However, we could also replace this instruction with S(^) and have the program run the same way.

RETURN, 62 bytes

(())(()()()()()()()()()()()()()()()()())((()()()()()()()()()))

Try it online!

Explanation:

(()) Add 1
(()()()()()()()()()()()()()()()()()) While nonzero repeat what's in the next group of brackets
(
  (()()()()()()()()()) Put character
)

ℒight, 0 bytes

Prints "#" infinitely.

Grass, 11 bytes

Taken from original document (Japanese):

wWWwwwwWWww

Try it online!

How it works

In pseudo code:

function f(x){
   Out("w");
   return x(x);
}
f(f)

INTERCAL, 26 bytes

DOCOMEFROM#1(1)DOREADOUT#0

Try it online!

This works for both C-INTERCAL and CLC-INTERCAL.

Nim, 16 bytes

while 1>0:echo 0

Cascade, 5 bytes

}h
|"

Try it online!

-2 bytes thanks to Jo King.

Arduino, 61 60 bytes

Managed to shave off one byte by changing what counts as "output".

void setup(){pinMode(13,1);digitalWrite(13,1);}void loop(){}

Explanation:

void setup() {
  pinMode(13, OUTPUT); // OUTPUT is defined as 1
  // Arduino boards have a built-in LED connected to pin 13, hence the choice of pin
  digitalWrite(13, HIGH); // HIGH is defined as 1
}

void loop() {}

This leaves the built-in LED on, which in a sense is output.


Original answer:

void setup(){Serial.begin(300);}void loop(){Serial.print(0);}

Fills the Serial monitor with 0s.

Mascarpone, 6.875 bytes

['@.:!]v*:!

Try It Online!

Explanation:

[     ]     // push a string that will define an operation
 '@.        // push the symbol '@ and output it (popping it in the process)
    :!      // duplicate the top of the stack and execute it
       v*   // push a function/operation that does the above
         :! // duplicate the operation, and execute it.

The operation duplicates and executes itself tail-recursively, generating the infinite output.

5 bits are sufficient for the characters used by this program, thus the total size is 55 bits, or 6.875 bytes

Dis, 1 byte.

{

Outputs infinite amount of NULL characters; may be slow, depending on the implementation.

Pushy, 3 bytes

3[_

Explanation:

3 \ pushes 3 to the stack

[ \ starts an infinite loop

_ \ prints out the contents of the stack

Jelly

2 bytes

Ȯß

Try it online!

How it works

Ȯß  Main link. Implicit argument: 0

Ȯ   Output/print the implicit argument.
 ß  Recursively call the main link.
    Thanks to tail call optimization, this results in an actual infinite loop.

Duocentehexaquinquagesimal, 2 bytes

Try it online!

PowerShell, 8 bytes

for(){1}

Try it online!

Not the most clever, but it gets the job done.

Zsh, 15 bytes

while;do 0;done

prints command not found: 0 infinitely

Try it online!

Brainf*ck (4 bytes)

+[.]

Infinitely produces 0x01 character.

[BASIC] 10 9 bytes

1?:goto 1

Try it online!

Infinite carriage return/line feeds. (I saved a byte when I realized I could just output new lines without a 0 or other character!)

It's the first program every BASIC programmer learnt back in the day! Good old "GOTO" and the hatred it earned from "real" programmers...

Of course, a more "structured" version would use an infinite WHILE loop, but that's 6 bytes more:

while(1):?:wend

Try it online!

(note:TIO truncates the output eventually, but in a standard BASIC interpreter, the code will run forever.)

Vyxal, 1 byte

Don't try it online

Polyglots with 05AB1E.

Vyxal, 2 bytes

{፣

A bit more of a creative way to do the job.

Befunge-93, 1 byte

'

Try it online!

'  # full program
'  # invalid command, NOP but raises warning

ARM Thumb, Linux syscalls only, 12 bytes

Raw machine code:

2704 2001 4669 2201 df00 e7f9

Assembly:

        .text
        .globl _start
        .thumb
        .thumb_func
_start:
        movs    r7, #4    @ write syscall
        movs    r0, #1    @ STDOUT_FILENO
        mov     r1, sp    @ sp is a valid pointer. May not be legible, but...
        movs    r2, #1    @ one byte is fine
        svc     #0        @ syscall: write(STDOUT_FILENO, sp, 1)
        b       _start    @ loop forever

ARM Thumb, with libc, 6 bytes

Raw machine code (f7ff fffe is an unlinked libc call):

f7ff fffe e7fc

Assembly:

        .text
        .globl main
        .thumb
        .thumb_func
@ Note that putchar returns the char it put, so we do this:
@ for (;;) putchar(argc);
main:
        bl      putchar @ putchar(argc)
        b       main    @ Loop forever

Fun fact: These programs do the exact same thing, printing argc % 256 in binary infinitely, since sp[0] at _start is also argc.

Ruby, 9 bytes

loop{p 1}

p 1 is equivalent to puts 1.inspect

Try it online!

05AB1E, 1 byte

Try it online!

∞  # [1, 2, ..., ∞]
   # implicit output

MAWP, 4 bytes

[!:]

Explanation:

[     start of loop
!     duplicate top of stack (1)
:     print top of stack
]     end of loop

Prints 1 infinitely

Rockstar, 13 bytes

while 1 say 1

Try it here (Code will need to be pasted in)

Microsoft Word Math AutoCorrect, 4 bytes

  1. Add a new entry in the Math AutoCorrect table (not the regular one): $ -> $$. This makes a new production rule for us. (3 bytes)
  2. Insert an Equation (Alt + =), and type a single $. The AutoCorrect will replace it with a $$, but that's not you inputting any extra characters, so it doesn't add to the byte count. This initializes our memory tape. (1 byte)
  3. Press the "Professional" button under Equation Tools. This is where the program officially starts running.
  4. Watch the little right-moving Turing Machine freeze up Word.

Explanation

The Professional button makes the Autocorrect sweep from left to right, running the production rules. On initial state $$, it sees a $ in the first position and replaces it with $$.

  1. Then check the next position to the right.
  2. Replace $ with $$, otherwise halt.
  3. Repeat.

Note: the GUI doesn't show the $'s being generated as the GUI doesn't update until the operation halts, which it won't here. If you open up your Task Manager, you can see the memory usage going up to see that this is indeed what's happening. Sure, I could have made it produce more $s but the production rate would still just be O(1) per loop anyway, and I'd be spending precious bytes programming it. Oh, and I'm counting the $s as output.

C, 29 28 26 23 bytes

main(){main(puts(""));}

-2 @steadybox

-3 @rtpatx

gcc won't like it, but it compiles.

Outputs null bytes continuously. You can swap out the 0 for anything 0-9.

You can use 7 if you really hate your speakers.

Brainetry --live-output, 55 bytes

Uses the --live-output flag, otherwise output to the console would be deferred to the end of the program, which never happens because we have an infinite loop going on.

a b c d
a b c d e f g h
a b c d e f g
a b c d e f g h i

This is a golfed version of this program:

Lets produce infinite output.
This is really simple, all it takes is:
A cell with a non zero value
and the --live-output flag also needs to be on.

If you want to try this, clone the linked github repo and run python brainetry.py btry/infinite_output.btry --live-output.

Vim, 10 bytes

<esc> is the byte typed when you press the escape key

qqiq<esc>@qq@q

This will output q infinitely into your vim buffer.

Here's how it works:

qq          # create macro q
  iq        # enter insert mode and type q
  <esc>     # escape to normal mode
  @q        # make the macro call itself
q           # end macro
@q          # call macro q

AlphaBeta, 2 bytes

MN

Try it online!

Outputs infinite null bytes.

Explanation

   # All registers are initialized to 0
M  # Output the number in register 3
 N # If register 3 is 0, goto the position at the position register.

Malbolge, 1505 bytes

b'a;$9"~}HG{iyxwuu?O=pL:]mHj5!3DCezRQ=+^:('&Y$#m!1So.QOO=v('98$65a!}^{@hyf<WV9sr%4#I20FEJVBfw)btOr@#!7~|4{y1xv.us+rp(om%lj"ig}fd"cx``uz]rwvYnslkTonPfOjiKgJeG]\EC_X]@[Z<R;VU7S6QP2N1LK-I,GF(D'BA#?>7~;:9y16w43s10)p-,l*#(i&%e#d!~``{tyxZpuXsrTTongOkdMhg`Hd]ba`_^W@[ZYXW9UNSRQPOHMLKJ-++FE''<A$?>=<;:387xw43s10/(-&m*)('&}${d!~}|^zyxwvutmVqpiRQlkjiKafedc\E`_^@\[ZYX;V9NMRQ42NGLK.IH*F?DCBA$#>7~;{{8xx5uu2rr/oo,ll)ii&f|e"!aw`{z\r[vXnmVTpongPkNihgJ_dcFa`B^]\UZ=RWV8TSLQ4ON0LE.IHA)E>'BA:?!7~5|38y6/v321q).-&m*)i'&%|{d!~}_{zs\wvutsUqTonPlOjiKgJedFbE`_A]@[Z<X;VU7S6QP22GL/JIB+FEDC%;@?>7~;:987w5v32r0)p-,+k)('~g$#"b~w|uz]xwvutsrqTinQlOjLhgfeH]bE`CB]\>ZSXWVUTSRQPON1LE.I,+*((&&$$""~~||zzxxv4u210/(-n+l)(i&g$ddy~}`u^]\ZvutVlUjSQQOOMMKgfeG]F[DBB@@>><X;99NS6QP3NG0KJ-H+F(('<%@#"~~||z876v.u,sqqoommkki'&%e{dyb``^^\\ZvuWslUjoRmlNNibgJeHcFDDY^A\[Z=XQV987553311/KJI+A*?(&BA@"8!6}{9zxx/43s1*q(ommkki'h%$ecc~}v_^][wZutWrUpohQlkNiLgIIHcbaZ_B]@[><<QVUT6L5JO2MLK.IHGF?(C&%:#!=<|:3z1xvvttr0/.n&m$ki'&f${dyb``^zyxZpYnWUUSSQmPkjLLgfedc\aD_BA?[>YXW:UTSRQJO2ML/J-H**?DC&;$?"!}}{{y765u-t+rppnn%*kii~%f#"!xa|_zyxZpYnWUqpoQgPeNLLJJHHFFDDBB@\?ZY;;PU8S6QPO1G0EJ-HGF)>C&%@#>=~;|92y65v3t1qqp-&ml)j'&gee"!x}|{z]xwYutWlqTonmPkjchgfIHFF[`_^@V?T=;;997SRQ3I2G0.JI+G@)>'%%##!!}}{987w/v-2sqq(onI*6FXDDU0S!Q>O{]sKwp$#s!Uj|nPle+vbK'_7$\n!Y|@{?=,XW:('6_^#3NlkKJIBxe?b'a;^#8[<Z|zVy0SetPb=`o'm8Hk(E3CCe@Rb`<*:sKJ%54"2DS/AQlOj)hK`HdGbn`2^Az.T<;WV87rRo#m[MLjJVyASdu&<$q"8J}}{z2xwwe3cOa/on,JH#iigCUe"yba+*)][wI$4Wr2CRRz?kN*ht9&^cF!mCB{izyx;vt8'65Q42[Z0.hI+xeRQ

Try it online!

This was built with Prof. Masahiko Sakai's LAL toolchain from the following source code.

PROGRAM_START_TO ENTRY@Argh

ROUTINE Argh {
REV_JMP:REV JMP

ENTRY:

OUTPUT
DUP

JMP REV_JMP
}

Online LAL assembler

7, 1 byte

I

Try it online!

Outputs IôŸ (the bytes 49 f4 9f) repeated forever.

Explanation

In binary, I is 01001001, which is broken into 3-bit chunks to get 010 010 01. This (including the implicit trailing bit 1) is converted to octal to get the instructions 223. These instructions are executed and push 223 on the frame to get ||223.

The last section of the frame (223) is copied to the command list, and executed. 2 duplicates the last section, and the second 2 duplicates the duplicate, leaving ||223|223|223 on the frame. 3 outputs the last section of the frame, 223 (which is automatically converted to 7223 because it contains anonymous commands) and then removes the last two sections. This leaves the frame as ||223.

This process (executing 223) is repeated forever, each time adding 7223 to the output.

The very first 7 specifies the output format as "the same way the source was", meaning that each future command in the output adds three bits. This means that output consists of the bits 010 010 011 111 (from 2237) repeated forever. This is 49f in hexadecimal, so repeating it leads to the bytes 49 f4 9f 49 f4 9f ... .

Ruby, 11 9 characters

loop{p:p}

Old answer:

p 0 while 1

International Phonetic Esoteric Language, 6 bytes

10ɑeoɒ

Will print 0 with newlines forever.

Explanation:

10ɑeoɒ
10     (push the bounds for the loop: from 0 to 1)
  ɑ    (pop the bounds and start the loop)
   e   (push the current index)
    o  (print)
     ɒ (check if index < start. 0 < 1, so loop)

Go, 59 characters

package main
import "fmt"
func main(){for{fmt.Print(0)}}

T-SQL, 15 bytes

a:PRINT 0GOTO a

6 years and 10 pages of answers, and no SQL versions yet.

Notes:

Rabbit~, 3

]:[

Prints the number 93 (Int representation of ']') infinitely.

Inverted brackets loops while input is equal, doesn't terminate since input is always ']'

Roj, 19 bytes

while(1)do out""end

This produces output because of the [out]: buffer.

Keg, 4 characters

{A,}

This outputs "A" to the console infinitely.

Non-completing forms

This simply auto-completes the } at the end.

{A,
{🄂

This uses a later-added feature of auto-pushing & printing.

VisiCalc, 3 bytes

You need an extra newline to enter the instruction.

/-/

The trailing newline is significant.

Explanation

/   Start a command:
 -  Replicate forever
  / The target for replication is the / character
Extra newline to enter the instruction

You end up with a cell with an infinite number of /'s.
However, the current cell can only show a finite amount
of /'s because cells are trunctuated based on their lengths.
```

Spice, 26 bytes

Spice module that recursively calls itself. Quite quickly hits a stack overflow.

Given the code is saved to a module named 'x':

;return@OUT a;LOD .\x a a;

Un-golfed explanation

;a;return@    - define variables: "a" and the required "return"
OUT a;   - output a, implicitly "[0]"
LOD .\x a a;  - call this module, passing a, storing result in a

Shakespeare Programming Language, 86 bytes

8.Ajax,.Puck,.Act I:.Scene I:.[Exeunt][Enter Ajax and Puck]Ajax:Speak thy.Let usAct I.

Try it online!

Prints infinite literal NULs. Since all characters initialize to 0, we can just print the value of one of them and loop back to Act I. I use Jo King's trick of beginning Scene I with Exeunt to save bytes over using a second scene. Pretty simple stuff.

MarioLANG, 7 bytes

>:<
===

Mario will walk back and forth, printing as he does.

Try it online!

TSQL, 16 17 bytes

l:PRINT'1'GOTO l

WHILE 1=1PRINT'1'

bitch, 3 bytes

>/<

Try it online!


Explanation

>      Begin loop
 /     Print accumulator value (intialised to 0)
  <    Loop back to beginning of loop

33, 5 bytes

1a[o]

Explanation:

1a    (Set the accumulator to 1, to allow the loop to continue to run)
  [o] (Print the accumulator, 1, forever)

Intercept 1.1, 37 bytes

Almost exact copy of my answer to a different question.

malware bm bitminer
software install 1

Prints newlines to the terminal. You'll probably have to leave this one overnight, as there is a delay of 5-15 minutes between each newline.

Will print infinitely as long as:
Your internet connection does not drop.
Nobody runs an antivirus program on your system.

Input is marked with a >>. The command prompt is the empty >>.

Assuming a system with only TZ_INFECT installed...


>> malware bm bitminer
creating bm (bitminer)
... wait a minute ...

finished creating bm (bitminer)
>> software install 1
Success
bm installed

...wait...
(newlines)








>>

Note that I'm using a custom client that prefixes [BROADCAST] to all broadcast events.

How???

TZ_INFECT is Intercept's malware generator. We can generate a bitminer by running malware <name> bitminer. This will create a new piece of software with the given name of type bitminer

We then install the bitminer: software install <index>, where index is the 0-based index of the software as given by software list. This is why I made sure the only piece of software on the system was the malware generator. This places our new bitminer at index 1.

There is a bug in the implementation of bitminer that results in an empty broadcast event to be sent to the client whenever bits are generated. Since bits are generated at random intervals, the broadcasts are sent at random intervals. Forever.

Note: the newlines are harder to detect using the official game client, but you can see them by running a command and watching the newlines slowly push the resulting output off the screen.

Intercept

TeX, 11 bytes

The following results in an infinite amount of Undefined control sequence. errors (if run in batch mode no human interaction needed):

\def~{\[~}~

TeX, 14 bytes

The following creates a PDF with infinite lines each containing a dot (theoretically that is, since the process never terminates, the file isn't finalized so not really created). I've stopped the process after more than 1000000 pages were output. At some point memory wouldn't suffice anymore for this.

\def~{.\par~}~

Element, 5 bytes

!{A`]

This outputs A to the console forever.

TIO

MarioLANG, 7 bytes

>:<
===

Try it online!

Infinitely prints zeroes; not much else to say about it.

PHP, 16 bytes 8 bytes

My first attempt and this Code Golf :)

while(a)

I'm sure I could make it better without that echo? hmm...

Pyth, 3 2 bytes

#d

Try it online!

Prints the string " " (single space) until a print instruction produces an error (which, I mean, I guess could happen).

Underload, 8 bytes

(:S:^):^

Endlessly outputs :S:^

Try it Online!

Lua, 18 bytes

::a::print()goto a

Try it online!

Shortest I was able to came up with (beats any loop). Prints newlines forever.

Brain-Flak, 10 bytes

(()){(())}

Try it online!

I don't know if this counts as a valid answer because Brain-Flak prints the contents of the active stack and this code just fills the stack.

(())    push 1 on stack
{       while top of stack != 0
  (())  push 1 on stack
}

Brian & Chuck, 8 bytes

!{?
!{.?

Try it online!

Brian simply restarts Chuck and Chuck sets Brian's instruction pointer to the left end, prints it and restarts Brian.

Produces endless "!!!!!!..."

Rust, 23 bytes

fn main(){loop{dbg!()}}

Try it online!

Outputs infinitely:

[src\main.rs:1]
[src\main.rs:1]
[src\main.rs:1]
[src\main.rs:1]
[src\main.rs:1]
[src\main.rs:1]

Bitwise Cyclic Tag But Way Worse, 9 1 byte

2

Turns out that this is a valid answer, I over-complicated that way too much. Outputs endless null characters

Try it Online!

bitch, 3 characters

Yet another answer(am I supposed to be doing that?)

>/<

This program outputs infinite 0's to the console.

The Hexadecimal Stacking Pseudo-Assembly Language (24):

000000
400000
120000
010000

Continuously prints 0s.

Triangular, 4 bytes

,%0/

Prints 0 repeatedly.

Try it online!


Ungolfed:

  ,
 % 0
/

Turing Machine But Way Worse, 27 13 bytes

0 0 0 1 0 1 0

Try it online!

Outputs infinite NUL characters.

TeX, 14 12 bytes

\def~{x

~}~

Less infinite than the other solutions, though, as TeX writes its output to a file.

MINOL, 5 bytes

GOTO0

Any expression in MINOL that isn't entered as part of a program (that is, isn't assigned a line number by the user) is considered line 0. While seemingly not a part of the official spec (which, as far as I can tell, is a series of letters sent to and subsequently reformatted and published by 'Dr. Dobb's Journal of Computer Calisthenics and Orthodontia' in 1976), lines executed this way always seem to spit out a newline. This obviously wouldn't be the case in a full program, which would take 11 bytes (inc. the trailing CR):

1 PR:GOTO1

YABALL, 3 bytes

!.?

Try it online!

Explanation

!                  Go off of "reverse mode" (a mode where the IP goes left instead of right) if in reverse mode, otherwise no-op
.                  Print current cell, which is NUL
?                  Go in "reverse mode"

Basically an infinite loop printing NULs.

The commands are executed like so: !.?.!.?.!.? ...

TI-BASIC, 5 bytes

Disp 1:prgmA

This solution requires that the program's name is prgmA.

Displays 1 on a new line forever, or at least until the calculator runs out of free RAM.


Here's an alternative 7 byte solution that is guaranteed to never terminate:

While 1:Disp 1:End

It has the same output as the above solution.


Notes:

Voovoos, 3 bytes

x.<

Pretty much just endlessly bounces between the . and <
. pops the top of the stack and prints it, but if you pop an empty stack in voovoos you get 0, so it just endlessly prints 0.

05AB1E, 2 bytes

Version 1 (3 bytes)

[A,

prints out the alphabet

Version 1 (2 bytes)

[,

Outputs infinite newlines

Try it online!

Perl 6, 11 bytes

loop {.say}

Try it online!

Minecraft > 1.9 2 + 5 = 7 Bytes

Note that this version of this "language" was created after the question.

Surprisingly good for MineCraft. o-o

This is using this definition of MineCraft scoring.

the system

The command say 1 put inside of a permanently active repeating command block. It will permanently output [@] 1 to the chat.

Tamsin, 15 bytes

main={print 1}.

Try it online!

Python: (16 characters)

while 1:print(0)

Muriel, 39 bytes

A:"\";.A;@\"A:\\\"\"+|A+A";@"A:\""+|A+A

Try it online!

This is near identical to the Muriel quine, except I've changed the print command in the last instruction to an eval command, and the addition of .A; in order to print something (in this case, the shortest thing was a part of the source code ("+|A+A";@"A:\""+|A+A) itself).

Gol><>, 1 byte

n

There we go, I feel like this cheats a little bit, but it works! Now to golf this more... ;)

Try it online!

JVM bytecode (OpenJDK asmtools JASM), 194 bytes

enum i {public static Method main:"([Ljava/lang/String;)V" stack 2 locals 1 {l:getstatic java/lang/System.out:"Ljava/io/PrintStream;";ldc 0;invokevirtual java/io/PrintStream.print:(I)V;goto l;}}

Ungolfed

enum i {
    public static Method main:"([Ljava/lang/String;)V" stack 2 locals 1 {
    l:
        getstatic java/lang/System.out:"Ljava/io/PrintStream;";
        ldc 0;
        invokevirtual java/io/PrintStream.print:(I)V;
        goto l;
    }
}

First we get a reference to System.out, then we just invoke void print(int) with zero. Repeat until the heat death of the universe, since this method never returns.

Using enum instead of class saves 1 byte, along with using ldc 0 instead of iconst_0 to save 2 more bytes.

Bonus points for not decompiling correctly in the Fernflower decompiler, no?

Clean, 7 bytes

f=[0:f]

Try it online!

Gives [0,0,0,0,...

Turing Machine But Way Worse, 13 bytes

0 0 1 1 0 1 0

Try it online!

prints chr(128),chr(128+64),chr(128+64+32),...,chr(128+64+...+2+1) infinitely.

No explanation since the code is self-explanatory.

Lean Mean Bean Machine, 5 bytes

O
$
~

Try it online!

Endlessly output 0

O spawns a marble, which drops and runs the operation there each tick. New marbles have a value of 0.
$ prints the marble's value.
~ teleports the marble to the top of the current column.

Aheui (esotope), 6 bytes

박망

Try it online!


or simillar codes with same length like following;

반망
받망
...
박맣
...

will produce infinite output.

Perl 6, 8 bytes

Thanks to nwellnhof for this solution.

.say xx*

Try it online!

Prints (Any) infinitely.

Perl 6, 10 bytes

1...!*.say

Try it online!

Defines a list that increments until the result of printing the current number is false (which never happens).

Alchemist, 10 bytes

_->_+Out_a

Try it online!

Explanation

Initially the universe contains the _-atom, there is only one reaction consuming _ and creating a new _ with the side-effect of printing a. This will go on until the real universe terminates.

JavaScript + HTML, 56 bytes

(g=_=>requestAnimationFrame(_=>document.writeln(g())))()

MathGolf, 4 3 bytes

Äo↔

Try it online!

Explanation

Ä     start block of length 1
 o    print TOS without popping
  ↔   do while false without popping

Burlesque - 2 bytes

bc

bc box cycle

Rather boring. bc encloses the top of the stack in a block and then infinitely repeats this block and thus when the value is printed when the program stops it'll obviously never stop producing output.

Perl 6, 13 11 characters

Using some nice Perl6 syntax for infinite lazy lists:

.say for ^∞

The code will print all integers from 0 upto infinity or until RAM runs out to store single big integers, whichever comes first.

Taxi, 377 369 bytes

-8 bytes by getting rid of the quotes.

Go to Post Office:w 1 l 1 r 1 l.
[B]
! is waiting at Writer's Depot.
! is waiting at Writer's Depot.
! is waiting at Writer's Depot.
Go to Zoom Zoom:s 1 l 1 l 4 l 2 r.
Go to Writer's Depot:w.
Pickup a passenger going to Post Office.
Pickup a passenger going to Post Office.
Pickup a passenger going to Post Office.
Go to Post Office:n 3 r 2 r 3 r 1 l.
Switch to plan B.

The repetition of the passengers is needed for the driver to get enough fare to get enough gas to continue forever.

Try it online!

ORK, 170 bytes

There is such a thing as a o
A o can i

When a o is to i:
I have a scribe called W
W is to write "!"
I am to loop

When this program starts:
I have a o called O
O is to i

Try it online!

Objects R Kool. Maybe, but they're inconvenient (why can't I just loop the main function?).

√ å ı ¥ ® Ï Ø ¿ , 3 bytes

(o)

Will output:

===== OUTPUT =====

0 0 0 0 0 etc.

==================

followed by execution information.

TIO Compiler. Enter the code as the first input and None as the second.

Z80Golf, 0 bytes

Try it online!

Surprisingly, this is an empty machine code program that produces infinite output.

How it works

Z80Golf machine initializes all the memory and registers to zero, and then loads the code to address 0. But there's nothing to load, so the whole memory becomes a no-op program.

When the PC hits the address $8000 ($ indicates hex in Z80 assembly), putchar is simulated. It consists of printing the register a to stdout and a ret instruction. Initially the stack pointer sp is zero, and ret does pc <- [sp]; sp <- sp + 2. The whole memory is zeroed, so the ret always returns to the start of the program regardless of sp.

The conclusion is that an empty Z80Golf program is a program that infinitely prints null bytes.

Flobnar, 4 bytes

0,_@

Try it online!

Outputs 0x00 bytes indefinitely.

This works because _ is said to get the conditional from the cell on the other side of it, and then use its value to choose between the east and west cells. It is expected to be evaluated from a vertical direction, but it doesn't have to be.

@ indicates the starting point for the program and evaluates to the return value of the cell to its west (_). _ evaluates what's on the other side (0,) to print 0. , always has a return value of 0, however, and this causes the horizontal if to choose the branch to its east. This is @, which evaluates the cell to its west, continuing the cycle.

Flobnar doesn't have decimal output by default, but the linked implementation has a -d flag which enables . for decimal output. This allows a slightly prettier version that outputs printable characters instead.

0._@

Try it online!

Shakespeare Programming Language, 89 bytes

,.Ajax,.Puck,.Act I:.Scene I:.[Enter Ajax and Puck]Scene V:.Ajax:Speak thy!Let usScene V!

Try it online!

I haven't used this language before, this is mostly based on tips from "Tips for golfing in The Shakespeare Programming Language", so I think it can be made shorter.

Prolog (14 bytes)

a:-write(0),a.

Simple tail recursive predicate in swi-prolog. Called like so a.

Ahead, 1 byte

O

Prints 0 forever. O pops the stack and prints that value as a number written out (as opposed to a Unicode character). Like Befunge, the empty stack pops 0, so this will print 0.

Since this is a 1x1 board, the head has nowhere to go and will stay on this cell forever, outputting forever.

Japt, 4 bytes

i@Oo

Try it online!

How it works

Ui@Oo

Ui     Call every 10 milliseconds...
  @Oo    the function that prints `undefined`.

Without input, U is initialized to zero, and 0 .i is the wrapper for setInterval JS function. According to its spec, the interval is low-capped at 10, so the target function is called every 10ms (approximately).

Oo prints its arguments to output, and with no arguments, it prints undefined.


The following is only correct with unbounded call stack (and therefore not a valid submission). When run on an actual browser, it overflows the stack in an instant.

3 bytes

ßOo

Try it online!

ß recursively calls the program. The whole source is translated to rp(O.o()) which first calls O.o() and then calls the program again.

HTML + JavaScript, 35 bytes

This alerts repeatedly. For some reason, it alerts 8. It also produces a 404 error in the console each iteration.

<img onerror=alert(this.src=x) src=

JSFiddle


This is 32 bytes, but is far less interesting:

<img onerror=for(;;)alert() src=

TI-Basic, 5

Pause

It does produce infinite output; in the top right hand corner, the pixels are alternating ;)

Game Maker Language, 11

while(1){a}

The a produces errors infinitely ;)

C, 26 25 24 (no recursion)

main(){for(;;puts(""));}

Prints endless '\n' characters. This is a byte longer than the shortest C answer, but doesn't rely on tail call optimization to avoid overflowing the stack.

Gol><>, 1 byte

D

Try it online!

D is a command designed for debugging, which prints the entire stack (from bottom to top) between brackets. D on empty stack generates []\n to stdout, and the IP loops through the row endlessly.

Alternative solution, 1 byte

Credits to Jo King

N

Try it online!

Unlike ><>, Gol><> has infinite zeroes at the bottom of the stack, which allows to print the top without pushing anything. Any of Nno will do; N prints 0\n, n prints 0, and o prints null bytes.

Alternatively, there are many 2-byte solutions:

TIS -n 1 1, 12 bytes

@0
MOV 0 ANY

Try it online!

Just shoves a bunch of 0\n to the output. On TIO, reached the 128KiB cutoff quite quickly. Without the -n flag, prints null bytes instead.

If you are familiar with TIS-100, you will be used to a 3x4 array of computational nodes, however, this solutions only uses one such node, nominally giving the zeroes downward as output.

The only instruction that send data out of a computational node is MOV, and that requires a source and a destination. the smallest possible source is a single digit number, and the smallest possible destination is UP. However, to produce actual output, the data needs to travel downwards, restricting the choice to either DOWN or ANY.

Java (JDK 10), 32 bytes

a->{for(;;)System.out.print(1);}

Try it online!

Stax, 3 bytes

W1P

Run and debug it

Outputs 1 forever. Since Stax terminates when trying to peek or pop an empty stack, I am not sure how to do it in 2 bytes or less.

Seed, 4 bytes

99 5

Try it online! Outputs 11 infinitely

Generates the following Befunge-98 Program:

[glzgx"Lz^v*M7TW!4:wi/l-[, s44~s;|Sa3zb|u<B/-&<Y a@=nN>Nc%}"gq!kCW $1{2hyzABRj*glr#z(@Zx@xT=>1'.b
/

Try it online!


The relevant part is just this:

[>1'.b
/

b pushes 11 to the stack and . prints it. 1 and 49 are also pushed to the stack, but never actually printed.

Animation of the code running:

enter image description here

Shakespeare Programming Language, 116 bytes

.
Puck, a pig.
Page,.
Act I:.
Scene I:.
[Enter Puck and Page]
Page:
Open thy heart! Let us return to act I.
[Exeunt]

Will output -1 forever.

PHP, 14 bytes

for(;;)echo 0;

try it online

FALSE, 7 bytes

[^.^]3#

This works in some FALSE interpreters (http://www.quirkster.com/iano/js/false-js.html (Paste the code, click "show", then click "step" a bunch of times (not "run" because it's an infinite loop!))). Outputs an infinite amount of -1s.

Explanation:

Some versions of FALSE are weakly typed, so a normal number can be used as a function pointer.

[^.^] pushes a function to the stack. (specifically, the character in the code that is starts at.) In this case, it pushes the number 0.

3 Pushes the number 3, which when called as a function will start execution at the ] of the previous function (meaning that it skips all the code)

# Is a "while" loop. It pops two functions, then calls the first function (that is, the one which was PUSHED first). It then pops a value from the stack, and if this value is true, it runs the second function and repeats. If the value is false, it continues.

Our function [^.^] will first use ^ to push the next character of STDIN (if input is empty, it pushes -1), then . prints the numerical value (-1), and ^ pushes the next value of input again. This is the value which will be "returned" and used in the loop. Because it is non-zero, the second "function" is called (which is just a number pointing to a location in the code), and the interpreter immediately sees a ], causing it to return from the function.

axo, 2 bytes

{_

Try it online!

Implicit 0 on top of the stack
{  prints it
_  returns to origin, or 0,0

Forth, 24 bytes

Defines then calls a word that loops forever, pushing and printing <0> each iteration.

: f begin .s 0 until ; f

Try it online


With a do-loop (25 bytes):

: f 0 0 do 0 .s +loop ; f

Prints <1> 0 forever.

Chip-8, 5 bytes

Sound output counts, right?

0x6F 0xFF 'set register 15 to 255
0xFF 0x18 'set sound timer to the value of register 15
0x12      'jump to first instruction (second byte is 00 so it can be omitted)

If drawing graphics counts, 3 bytes:

0xD0 0x0F 0x12

Momema, 5 bytes

j0!j1

Try it online! Outputs to STDERR. Requires the -d interpreter flag.

The Momema interpreter has a -d (debug) flag that enables a ! instruction, which outputs some debugging information to STDERR.

Explanation

j  0  #  label j0: jump past label j0 (no-op)
!     #            debug
j  1  #  label j1: jump past label j0 (back to start)

Wumpus, 2 bytes

OO

Try it online!

Outputs infinite 0s

Funnily enough, even though a single O causes an infinite loop, a new command is only executed once it leaves the current cell, meaning the pointer gets trapped inside the O triangle, bouncing off the walls. Adding another cell (which could be almost any cell that doesn't end the program such as @ or %) allows the pointer to escape and execute the Output instruction again.

Forked, 1 byte

%

Prints the top of stack (0 if empty). The IP wraps upon hitting the edge of the playing field, looping infinitely.

Dreaderef, 9 8 7 bytes

5?1 1-1

Try it online!

Explanation:

In a more readable form (which can still be fed into the preprocessor), this program is:

numo 0
deref 1 -1

The numo (numeric output) statement does just about what you'd expect: it outputs 0. I could have used chro, but that makes it output unprintables and doesn't affect the byte count.

To understand the second line, you have to know a little bit about Dreaderef:

What deref 1 -1 does is:

Dreaderef doesn't have a "load constant" instruction, so the best way to load a constant into a cell is to use some sort of arithmetic instruction or copy it from some other cell with deref, which is what I do here.

Aceto, 2 bytes

pO
p  prints the top stack element (implicit 0)
O  returns to the origin of the program

Try it online!

alternate version:

nO
n prints a newline, O returns to origin

Flipbit, 4 bytes

^[.]

Try it online!

Yay for Bra*nfuck derivatives!

Pyth - 2 bytes

#0

Exlanation:

#0
#  Loop forever
 0 Print 0

Whispers, 28 bytes

> 1
>> Output 1
>> While 1 2

Try it online!

Funky, 13 bytes

for()print(1)

Try it online!

sh, 3 bytes

yes

outputs y continuously

cQuents 0, 1 byte

$

Try it online!

Outputs 1,2,3,4,5,6... up to Python's int cap (aka as long as you have memory).

Alternately, any number would work, printing that number separated by commas infinitely:

7

Try it online!

This may work at some point with an empty program once I finish this language - theoretically it should print 0,0,0,0,0,0... for an empty program but I haven't implemented empty nodes.

GW-Basic, 9 bytes (tokenised)

TRON:RUN

This will output [0] until the cows come home. Actually only 3 bytes are actual tokens; here's the full content of the file:

255      unprotected
xxx xxx  offset, recalculated on LOAD
0 0      line number 0
162      TRON
':'      :
138      RUN
0        line terminator

You can often delete trailing zeroes, but this one was required because when GW-Basic starts up, another value is at the memory location where that zero will get loaded, so without it you'd get a syntax error.

sed 7 5 chars (version 4.2)

sed -e ':;p;b' <<<'Hello world!'

Unfortunely, this won't work anymore, from version 4.4 of GNU sed:

sed -e ':a;p;ba' <<<'Hello world!'

Jq 1.5, 9 bytes

repeat(1)

Try it online! (truncated at 128K)

R, 15 chars (or 6)

repeat print(1)

or, you could cheat slightly with just

repeat

which will invisibly return NULL for each time through the loop. Thus it will return NULL infinite times, you just can't tell.

QBIC, 3 2 bytes

{?

Explanation:

{   Start a DO-loop 
 ?  PRINT nothing, followed by \n
    The DO-loop is implicitly closed by QBIC.

VBScript, 23 characters

Do:Wscript.Echo"C":Loop

Needs to be run with cscript.exe for command-line output. If run with wscript.exe (default action), it opens infinite dialog boxes.


Also, here's a shorter (17 character) version which opens boxes regardless of whether it's running using cscript.exe or wscript.exe.

Do:MsgBox"C":Loop

However I'm not sure if that counts too, as it doesn't print anything and just opens dialog boxes indefinetely.

VBA, 18 Bytes

Anonymous VBE immediate window that outputs an infinite quantity of newline characters vbCrLf to the VBE immediate window

Do:DoEvents:?:Loop

J-uby, 11 Bytes

-:p|:+&1!~0

Explanation

!~ is iterate until constant: x = f(x) until x == f(x)

-:p is the global print function, and :+&1 increments a number

So -:p|:+&1 prints a number and returns the next integer

We start at 0

Evil, 4 bytes

Continuously prints the Start of Heading character:

amwb

If NUL is allowed you could do mwb.

An alternative, that goes through the ASCII characters, would be:

mawb

Quick explanation of commands:

JavaScript, 20 bytes

for(;;)console.log()

Sends infinite undefined output.

Wolfram Language ( Mathematica ) 14 bytes 12 characters

Do[Echo@1,∞]

Bitwise, 19 bytes

OUT 0 &1
JMP &-2 &1

Prints a load of null bytes. Try it online!

OUT 0 &1 prints the 0th register when a literal 1 is truthy. JMP &-2 &1 jumps back two (one) lines when a literal 1 is truthy.

I've got two:

C - 27 26 24 bytes

main(){for(;;)puts("");}

This one infinitely prints \n, due to the behavior of puts(3)

Brainfuck - 13 4 bytes

+[.]

This one infinitely prints the invisible Start Of Heading control character.


(Thanks to scottinet, Sylwester and Erik the Golfer for suggestions that helped shorten the answer)

Dyalog APL, 5 bytes

⍞←⍣⊢0

⍞← character output

(f⍣g)Y power operator repeatedly applies left operand to the argument until (f Y) g Y returns true. In this case f is the assignment to output and g is which returns the right argument, which is always 0 as the assignment doesn't modify it.

Note that the right operand could also be any of ⊣≠≢

I hesitate to add a link to try it online :)

Cubically, 3 bytes

%0)

This should look like this:

(%0)
(    open loop that can always be jumped to
 %0   print 0th face sum as integer (0)
   ) jump back to loop regardless of faces

However, ) will just jump back to the start of the file if no jump point is provided.

AHK, 11 bytes

Loop
Send,a

Pretty boring but couldn't find an AHK answer in here and thought it worthy of submission.

Emojicode, 41 bytes

🏁🍇🔁👍🍇😀🔤.🔤🍉🍉

MOO, 39 38 bytes

while(!suspend(player:tell()))endwhile

Huge abuse of side effects; player:tell() by default does not return a value, which means it implicitly returns zero, and the resulting suspend(0) is necessary to avoid running out of ticks.

Add++, 9 bytes

+1
W,+1,O

Prints 1 Followed by a newline for ever.

Try it online!

Unreadable, 16 bytes

'"""""'"""'"'"""

Try it online!

Fission 2, 2 bytes

R"

Try it online!

Same concept as the Befunge answer. An atom is spawned at the R, and moves right. It reaches the " and enters string mode, wraps to the beginning of the line and prints an R, then exits string mode and wraps again.

Outside of string mode, R simply changes the atom's direction to right, which is the direction it's already moving in.

Check, 3 bytes (non-competing)

#<#

Outputs infinite newlines.

Check is my new esolang. It uses a combination of 2D and 1D semantics.

Explanation

This uses a bit of a hack in the language - namely, that < means "print a newline" in 1D mode, and "move left" in 2D mode.

The IP first runs into a #, which turns it into 2D mode. However, it runs into <, which immediately points it back. It runs into the first # again and switches back to 1D mode. The IP then hits <, which outputs a newline, and then hits the second #, which switches it back to 2D mode again. The IP wraps around to the first #, where it switches back to 1D mode. It hits < again, printing another newline, and the process repeats.

shortC, 5 bytes

AWP'1

Prints 1 forever. Explanation:

A     main function
 W    forever
  P   print char
   '1 char '1'

Try it online!

Decimal, 12 bytes

11D91D30191D

Try it online!

Explanation:

11D   ; push whatever's in RAM to the stack as an INT
91D   ; declare jump 1
301   ; print
91D   ; goto jump 1

Another version that does not invoke undefined behavior:

82D   ; builtin - push random INT to stack
91D   ; declare jump 1
301   ; print
91D   ; goto jump 1

Braingolf, 6 bytes

[1+!_]

Try it online!

Whitespace, 16 bytes


  
   
	
 	
 


Try it online!

Saves 3 bytes on the previous Whitespace answer by abusing empty labels and declaring the value 0 as a 0-bit number (the spec unfortunately requires a sign bit). Posting as a new answer as the previous answer combines multiple unrelated entries.

Explanation

(s - space, t - tab, n - newline)

nssn # Declare label ''
sssn # Push +0 onto the stack
tnst # Pop and output the stack value as a number - outputs the character '0'
nsnn # Jump to label ''

Alice, 1 byte

o

Prints null bytes indefinitely.

Fith, 16 bytes

{ 1 . q } :: q q

{ 1 . q } pushes to the stack an anonymous function which prints 1 then calls a function named q. :: q binds this function to the word q, then the final q calls the new infinitely-recursing function.

Non-recursive version (19 bytes):

{ 1 } { 1 . } while

This pushes a condition function, which will always push 1, and a body function, which prints 1. The while word continues to run the body as long as the condition leaves a truthy value on top of the stack.

Commodore 64/VIC-20 assembly, 8 bytes (assembled)

033C LDA #$40
033E JSR $FFD2
0341 JMP $033E

When executed with SYS 828, this will continuously output the @ character to the screen using the Kernal routine to print. If you don't care what you're outputting, then you can remove 033C LDA #$40 and save two whole bytes (the last thing in the accumulator will be outputted).

QC 6 bytes

Not competing because language is newer than the question

A00$00

A00 prints nothing(because memory is empty) and a new line
$00 jump to start(no recursion, sets instruction pointer to 00)

SmileBASIC, 6 bytes

?EXEC.

? is print, EXEC runs a program, and . is the same as 0.0.

If newlines don't count as output, here's a 7 byte answer:

?.EXEC.

?. = PRINT 0.0, EXEC. = EXEC 0.0

Commodore Basic, 5 bytes

1?:R╭

PETSCII substitution: = SHIFT+U

Prints a newline, then runs itself. Forever.

C++, 23 bytes

main(){for(;;)puts(";");}

I was too lazy, but hey, It outputs a javascript script, which does absolutely nothing!

Haxe, 19 bytes

while(1>0)trace(1);

There are several things about Haxe that make this challenge more difficult than in similar languages:

  1. Its lack of a for(;;) loop
  2. Its unwillingness to consider anything other than true or false truthy or falsy
  3. Its unwillingness to print an empty line (with trace();)

If not for these things, this program might have been 15 bytes:

for(;;)trace();

Test it online here, though you may not want to, as it freezes your browser.

8th, 24 19 bytes

: f 0 . recurse ; f

The word f pushes a 0 on the stack and print it in a recursive way

GO, 13 bytes

for{print(0)}

Try it online!

PHP - 17 16 13 11 bytes

<?for(;;)echo O;

Oh well, I guess PHP can't ever always win... Thank you, m.buettner

Edit:

<?for(;;)0/0;

As it turns out, division by zero triggers a warning in php. So, even though the output it produces goes to STDERR, it's still infinite!

Edit 2:

for(;;)0/0;

(Run with php -r)

FALSE, 8 bytes

Interpreter.

There are many programs that work, each 8 bytes. The one I find the most interesting is:

[1$][.]#

This is a while loop (#). [1$] is the condition, and it pushes two 1s. The last is popped for the condition (true), and then [.] is executed, which prints the number.

Here are some other programs (including the above):

[1$][.]#
[1][1.]#
[1$.][]#
[^^.][]#
[^.^][]#
[^][^.]#

A more interesting 9-byte (arbitrary 1-char repeated):

['c$,][]#

I feel that the following 7-byte programs should work on some FALSE interpreters, but I haven't found any such yet:

[1"][]#
[.1][]#

Kitanai, 24 bytes

#print"0"&2&1#print"1"&~

The "#" defines a flag, the first "print" displays 0, then the "&2" jumps to the second "#", it then prints "1", goes to the origin ("&~") which is just after "&2", then it jumps to the first "#" thanks to the "&1". And it does all that infinitely :)

LOLCODE (36)

HAI IZ 1<2? VISIBLE "0" KTHX KTHXBYE 

Thought I'd give LOLCODE a shot, has a surprisingly large amount of functionality.

Labyrinth, 1 byte

!

Labyrinth's stack has implicit zeroes at the bottom and the ! character outputs the integer representation of top of the stack. Since the program never finds anywhere else to go besides this single character, it keeps repeating that instruction.

Casio FX-7000G, 6 bytes

Lbl 0◢
Goto 0

This uses the calculator's own encoding, where each token is stored as a byte.

Lbl 0 sets the label of the first line to 0. The triangle means "print last value", which is in this case 0. The next line is your standard Goto statement, jumping back to the top so the value can be printed again.

Due to the calculator's limitations, the user must press EXE after each printed value before the next can be displayed.

TI-83 Hex Assembly, 6 bytes

PROGRAM:I
:AsmPrgm
:EF0A45
:C3959D

Run with Asm(prgmI). Prints garbage over and over again. The only way to stop the printing is to physically remove the batteries from the calculator and re-insert them, at which point the calculator's RAM will be cleared. I count each hex digit pair as one byte.

zsh (8 chars)

</dev/z*

Analogous to cat /dev/zero.

Note: This does depend on there not being any other files in /dev starting with z, other than /dev/zero.

Cubix, 2 bytes

.O

Test it online!

Cubix is a stack-based 2D language, created by me in March 2016. Cubix differs from ordinary 2D languages in that it's not strictly 2D: the code is wrapped around a cube. This program wraps to this cube net:

   .
>O . . .
   .

where the IP (instruction pointer) starts at the arrow. O outputs the item on top of the stack as a number; if the stack is empty, it outputs 0. . is a no-op.

When the IP reaches the right side of the cube net, it simply wraps back around to the left and runs O again. Thus, this code outputs 0 forever.

Ruby, 10 bytes

loop{puts}

This program prints out an infinite stream of newlines.

x86 .COM Executable, 5 bytes

endless ASCII char set output

in hex:

40 CD 29 FF E6

in asm:

inc ax
int 0x29
jmp si

Explanation:

inc ax increments the register AX by one. int 0x29 is the "fast put char" routine of MSDOS, which simply outputs the value in AL (the low part of AX) and advances the cursor by one. jmp si is just a weird way to jump back to the top, since the register SI is 0x100 on almost every DOS-like operating system, which is also where a .com program starts ;) It's also possible to do a short jump instead, which also uses 2 bytes.

Sources:

MSDOS Start Values

Sizecoding WIKI

Sonic Pi, 19 Bytes

loop do puts "" end

Sonic Pi is a sound language, but it's also fully a programming language.

PHP, 9 chars

for(;;)a;

Assumes error_reporting includes notices, and you can run it like this:

php -r "for(;;)a;"

The output is the following (repeated until the script is stopped):

PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP Notice:  Use of undefined constant a - assumed 'a' in Command line code on line 1

Note: 11 characters if code is written in a file: <?for(;;)a;

Golfscript - 7

{1a}:a~

I'm still learing golfscript, but unless I'm mistaken, this puts 1 on the stack, then starts over?

But apparently, the stack only prints when the program terminates, so perhaps this is better:

{1.p}do

(thanks Dennis)

Woefully, 49 bytes (newer than challenge)

||| |
|| |
| |
|| |
||| |
|||| |
||||| |
|||||| |

Explanation

v     v represents char pointer, instruction pointer finds first space after the char
|||A|                                                      pointed at by char pointer
||A|  A- Push zero
|A|
||B|
|||B| B- Pop and print (number)
||||B|
|||||B|
||||||B|
    [end] End- go back to character char pointer is pointing at. Char pointer has not moved
so it will just execute the same again

GNU sed, 5 bytes

:;l;b

Any sed script requires input to start executing. With echo|sed ':;l;b', a line with a single $ character on it is printed continuously.

Hexagony, 1 byte

This answer is non-competing, as Hexagony is newer than this challenge.

!

Try it online!

Prints an infinite amount of 0s by printing the value of the initial memory edge (which happens to be 0) over and over. The ! is executed in a loop because the source code is toroidal.

C, 20 bytes (competing according to the challenge's creator)

Suppose the following code is contained in e.c:

int i;
#include"e.c"

In a machine with infinite system resources, GCC will create an infinitely big temporary file trying to resolve a recursive #inclusion.

Haystack, 6 bytes (non-competing, the language came 2 years after the challenge)

>"a"o<

This will print a [infinity] times.

If the above code gives a syntax error because of the lack of | (that character is the needle. The ultimate goal of all Haystack programs is to find the needle in the haystack), one can simply append it to the end:

>"a"o<|

Brainfuck, 26 bytes

++++[>++++<-]>[>++<-]>+[.]

Do 4*4*2+1 (33, !) and the final loop is a infinite loop that only print the current memory cell (!).

APL, 4 bytes

1
→1

This code must be put in a function, since the →(goto) operator has only sense in a function.

Desmos, 1 byte

x

Graphs y=x forever.

Emotinomicon 18 bytes, 5 chars

😀⏪😀😨⏩

Explanation:

😀 - push 0 to the stack
⏪ - open loop
😀 - push 0 to the stack
😨 - pop top of the stack, and output it as a number
⏩ - end loop

As long as there's something on the stack, it's going to loop indefinitely

Burlesque - 2 Bytes

bc

basically just creates an infinite list and outputting infinite lists will obviously produce infinite output.

Don't try this in the online shell because some browsers freeze when trying to render the result because it's huge :) (at some point either the browser stops rendering or the webserver closes the stream).

Clojure, 14 bytes

(pr(cycle[1]))

APL, 6 4 bytes

→⍞←1

A traditional style APL function, so even works on all legacy APLs.

Scratch, 3 bytes

Script
(scoring used)
Adds a blank item to list = repeatedly and indefinitely.

Come Here, 21 bytes

COME FROM1 1TELL1NEXT

In the reference implementation, this prints infinitely many smiley characters. Don't ask me why.

Reng v.1.2, 1 byte

Try it here!

n

Pops N and prints N. N is always zero, popping off the empty stack.

BASTARD 30 Bytes

{(., <> {fi out {t 0}(.)})(.)}

This makes use of a few things that are still in question with the spec, but I'm the authour, so what the hell.

Note: BASTARD is still under development, and I haven't finished the spec, or even a rough REPL, so it probably should be disqualified for everything.

Explanation:

  1. Everything has to sit in a {} block.
  2. We define a function called . that takes no arguments.
  3. The function prints an undefined variable from the stack, which equates to 'nil'.
  4. The function also calls itself, thus an infinite loop.
  5. We call the infinite function.

Note: Anonymous functions may or may not be introduced in the future. The current syntax proposed would reduce the above to 24 bytes:

{(<> {fi out {t 0}(@)})}

The only new concept here is @, which is a self-reference to the anonymous function.

Pylons, 5

wp,1}

While 1, print the (empty) stack.

ForceLang, 23 bytes

label l
io.write goto l

Looks weird, but it works. The key here is that goto does not interrupt the evaluation of the current line, and returns nil.

Python, 17 13

while 1:print

Thanks to Ben and r.e.s.

R, 15 bytes

Infinitely prints 1

while(T)cat(1)

Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, I don't think the zero-padding is really code.

C, 25 bytes

main(){while(puts("1"));}

Detour, 1 bytes

,

Try it online!

, outputs its contents, and passes it on to the next cell (,). In the event of not being given input, a 0 will be passed in.

𝔼𝕊𝕄𝕚𝕟, 4 chars / 7 bytes

↻ô1;

Try it here (Firefox only).

Translates to while(output(1)); in JS.

PlatyPar, 3 Bytes

1WA

Explanation:

1    ## push 1 to the stack
 W   ## while(stack[-1])
  A  ## alert(stack[-1])

Works the same as my truth machine, except manually inputting the 1 instead of asking for it.

Try it online!

Mouse-2002, 3 bytes

(0!)

prints 0 forever.


Alternatively, for a more interesting and (theoretically) infinite error with no loop, the Ackermann Function in 99 bytes in this language:

"M>"?a:"N>"?b:#Y,a.b.;$Y1%n:2%m:m.0=k:n.0=j:j.k.>[n.1+!|j.k.<[#Y,m.1-,1;!|#Y,m.1-,#Y,n.,n.1-;;!]]]@

Expanded:

"M>" ? a:
"N>" ? b:

1 a:
1 b:

#Y, a. b.;!

$Y 1% n: 2% m: ~ ack
  m. 0 = k: ~ store whether m == 0 in k
  n. 0 = j:
  j. k. > [ ~ if y>x
    n.1+ ~ print it
  | j. k. < [ ~ if x>y
    #Y, m. 1-, 1;
  | #Y, m. 1-, #Y, m.,n. 1-;;!
    ]
   ]
  ]
@
$

Errors recursively, forever, as long as the input was a positive nonzero integer. (result of a bug in the interpreter: the code is correct!)

Javascript ES6, 28 bytes

setInterval`console.log()`

I didn't want to code an infinite for loop like everyone else...

Try it here using anything BUT Firefox.

ArnoldC, 81 bytes

IT'S SHOWTIME
STICK AROUND 1
TALK TO THE HAND 0
CHILL
YOU HAVE BEEN TERMINATED

Prints 0 forever.

Explanation

IT'S SHOWTIME            # start program
STICK AROUND 1           # infinite while loop (since 1!=0)
TALK TO THE HAND 0       # print 0
CHILL                    # end loop
YOU HAVE BEEN TERMINATED # end program

BotEngine, 1x3=3

Noncompeting as BotEngine is much too recent a language. Anyway, here we go:

>CT

It starts with a right-moving bot on the >. When it reaches the C, it creates a left-moving bot (which starts on the C.) On the next step, the left-moving bot reaches the > and is turned around to move right and the right-moving bot reaches the T, destroying itself and printing TRUE. The step after that, the other bot gets to the C starting the process over again.

>CF also works but prints FALSE instead of TRUE. Using P in this case would print empty lines instead.

Simplefunge, 3 chars

Does it count if, you know, it is your own language?

>o<

Prints 0 over and over again, as the tape is initialized as a tape of infinite zeros.

Self-modifying Brainfuck, 4 bytes

Prints ] forever. Note that the traditional BF programs work as well.

<[.]

The pointer starts one to the right of the source code on the tape, so moving left once puts the pointer at ].

GoLunar, 4 bytes

This is the equivalent of 5543 zeros in a row in Unary, which is equivalent to +[.] in BrainF***.

5543

><> Fish - 2 characters, I'm counting the shortest one.

Thijs beat me to it, but oh well. Here are a couple more ><> answers.

1n
-Infinite 1's, 2 bytes

   >"drlow ,olleH"l  
                  ?  
                  !  
   ^              <  
                  o  

-Infinite "Hello, world", 84 bytes.

Edit: Whoops. It's character count, not bytecount. I also fixed the first answer. Edit 2: Thanks mbomb007 for shaving off 1 character.

Turing Machine - 6 Characters :

#s->1Rs

where # is blank symbol (on the tape by default), s describes the only existing (start) state, 1 is printing a digit, R means shifting to the right, s at the end is staying in the same state.

Windows Batch File, 1 character

Create a file called a.bat containing:

a

When you execute this batch file, it executes itself. The Windows Command Prompt by default echos every command to the console, so the output resembles:

C:\>a

C:\>a

C:\>a

C:\>a

Bat, 2 chars

%0

The output is (starting from a blank line, I've added nbsp to make it visible bellow)

 
d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

d:\Temp\Supertemp>"D:\Temp\Supertemp\inf.bat"

Qt 5.4 QMake pro file, 42 chars

defineReplace(A){log(A)return($$A())}$$A()

Is an infinite loop, but sadly gets caught out by qmake interpreter before it can get very far.

AAAA[...]Ran into infinite recursion (depth > 100).

Not sure if that counts under disqualification.

Cardinal, 3 characters

.%$

Explanation:

.    print active value
 %   start pointers here
  $  jump to x,y = active, inactive value


.%$

Pointers spread out in all cardinal directions from every %
All pointers carry two values, initialized to 0. The upper value is
called the active value, and it can be accessed directly. The lower
value is called inactive value. Inactive values can only be accessed
by flipping both values, switching the active to inactive, and the
inactive to active, or by using instructions like $ that grab the
inactive value directly to e.g. execute a jump.
The < and > below the values are the positional and directional
markers of the pointers. In programs, they instruct pointers to change
the movement direction.

0 0     At this step, the first active value (from the left pointer)
0 0     gets printed in the console, the right pointer is going to
<%>     jump to x,y=0,0

0      The jumped (former left) pointer prints out the next 0
0
>%$

 0
 0     ... travels on ...
.>$

  0
  0
.%>    ... reaches the jump instruction again, going to jump to 0,0 again

0
0
>%$    ... print out the next 0... and so on, to infinity.

http://esolangs.org/wiki/Cardinal

Piet, 3 codels

==> Piet_infinite_output_codel_size_1 <== here it is ;)

Just to make it visible, the same at codel size 10:

Piet_infinite_output_codel_size_10

This program bounces forward and backward, executing:

forward direction:

1
PSH (push on stack)
OUN (output number)

backward direction:

MUL (multiply)
POP (pop from stack)

The backward instructions are ignored because the stack is empty.

So, the program prints an infinite amount of 1’s in the console.

Edit: I just noticed that captncraig came up with the same answer before me. Sorry for that. Please upvote captncraig’s answer instead.

Haskell, 9 characters

show[1..]

Prints an infinite list of integers starting from 1, exploiting the lazy evaluation of Haskell.

Mathematica, 34 33 bytes

$IterationLimit=∞;#0@Print@1&[]

If there were no limitation on the maximum length of evaluation chain in Mathematica, #0@Print@1&[] is only 13 bytes, 4 bytes shorter than For[,0<1,Print@1].

I haven't seen Thue used here much, so here we go:

Thue (22 19 bytes)

a::=ab
b::=~1
::=
a

Chinese, 2 bytes

Prints ÿ continuously.

Xojo, 18 12 chars

Again, please don't actually run this (same reason as the JavaScript answer):

do
Beep
loop

Never said the output couldn't be audio...

piet - 3 codels

http://www.pietfiddle.net/img/auQXtFXATg.png?cs=15

Outputs an infinite number of 1's

Piet (135 codels/pixels)

Prints an infinite sequence of $ signs (arbitrary, could've been anything. Loaded in the upper right corner of course).

The awesome program

Run with npiet -v11 the.gif

Turing Machine Code (9)

(This is the dialect of turing machine code used by many online turing machine simulators)

0 * 1 r *

It will endlessly ouput ones while moving rightward along the tape.

><> (Fish), 2

A creative way to use the infinite codebox of fish:

"o

Because the instruction pointer returns back to the beginning of the line after reaching the end, this code can essentially be read as

"o"o

which means 'read the string "o" and then output it'.

You can test the code here

x86 machine code, 6 bytes

b40e cd10 ebfc

Assembly version of the code:

mov ah, 0Eh;    bios teletype output
code_golf:
int 10h;        print character(ascii 0)
jmp code_golf;  loop

This code constantly prints ASCII 0 (NULL).

This was run using DOSBOX

This Programming Language, 2

In the spirit of the Befunge answer,

i'

Outputs 105 indefinitely.

Marbelous 4

24MB

Marbelous does surprisingy well here. This will post an infinite amount of dollar signs $, though it will hit the stack limit rather quickly.

How it works.

24 is a language literal, which will fall off the board and be printed to STDOUT as its corresponding ascii character. MB is the name implicitly given to the main board, since the main board has no input, it will fire every tick. And since cells are evaluated from left to right, the literal will always be printed before the next recursive call.

So this is rougly equivalent to this pseudocode:

MB() {
    print('$');
    while(true) MB();
}

A solution without infinite recursion 11

24@0
@0/\..

This one works by looping the literal between two portals @0, whenever the 24 hits the lower @0 it is transported to the cell underneath the upper @0. It the lands on the /\, which is a clone operator, it puts one copy of the marble (literal) on it's left (back on the portal) and another one to its right. This coopy then falls off the board (since .. is an empty cell) and gets printed to STDOUT. In pseudocode, this would translate to:

MB() {
    while(true) print '$'
}

A shorter solution without infinite recursion 9

24
\\/\..

This one constantly tosses the marble around between a cloner and a deflector, putting one copy on the rightmost cell, to be dropped off the board. In pseudocode that would look something like:

MB() {
    List charlist = ['$'];
    while(true) {
        charlist.add(charlist[0];
        charlist.add(charlist[0];
        charlist.pop();
        print(charlist.pop());
        // Wait, what?
    }
}

note

The .. cells are necessary on the two last boards since the marbles would land off the board (and be discarded) otherwise. For some extra fun, you replace the 24 marble by FF and the empty .. cell by a ??, which turns any marble into a marble between 0 and it's current value before dropping it down. Guess what that would look like on STDOUT.

LOOP, 1

.

Outputs 000000000...

QBasic, 6 (5?) characters

?1:RUN

? is short for PRINT, and RUN without arguments runs the current file from the top. This is the shortest (and most interesting) way to get an infinite loop in QBasic.

If, as in the accepted answer, infinite newlines count, then I present this 5-character version:

?:RUN

Pyth, 2

#G

(or # followed by any normal variable, actually).

# is while True. Variables are printed implicitly, and since G is 'abcdefghijklmnopqrstuvwxyz', that gets printed infinitely.

CJam, 6 bytes

1{1p}h

or

{1p1}g

which prints an infinite number of 1\n without risk of stack overflow (as there's no recursion).

I think CJam might be younger than the question, but this answer isn't a winner, so I don't see any harm.

Shell, 16 Chars

cat /dev/urandom

PHP: 22 chars

<?PHP while(true){print(0);} ?>

My first golf, hope I did it right :)
It will hang your browser if you do it on a PHP page, but from the command line it does the expected: prints something until you get bored and stop it.

CoffeeScript, 14

Pretty unoriginal and similar to JavaScript:

alert 6while 1

Clojure - 18 15 chars

(while 1(pr 1))

Mathematica, 11 bytes (invisible) or 17 bytes (visible)

Clearly not going to win here, but it works

For[,0<1,1]

If you actually want to see the characters streaming down the screen, use

For[,0<1,Print@1]

(20 bytes). I had thought I might do well with

Range@∞

or even

1~Table~{∞}

But to my surprise, the Kernel checks for infinite bounds and disallows them.

Groovy - 15 chars

for(;;)print 1

Befunge 98 - 2

,"

Outputs ",,,,,,,,,,," for eternity.

k4/q (11)

{x}{x""}/-1

The second function, {x""}, sends the empty string to x. If x is an integer, it's interpreted as a file descriptor. If x is 1 or 2, this means to print to stdout or stderr. If x is -1 or -2, this means to additionally print a newline. The result of sending a string to a file descriptor is that file descriptor.

The first function {x} is an idempotent function. (k has an actual idempotent function, ::, but in this context, it would have to be written (::), so this is shorter.)

The construct g f/x, where g and f are functions, is a variation on functional "fold": f x is called, then g f x is tested as a boolean; if it is false, execution stops; if not, f is called on the result of the prior call. (The return value is the result of the last call to f.) Every integer but 0 is truthy, so the -1 returned by {x""} -1 allows the execution to continue.

As a bonus, and at no extra character cost, if you swap the / for a \, you'll waste infinite amounts of RAM too: g f\x does the same thing, but it saves all the intermediate results as it runs--its return value is the full list of intermediate returns of f.

Just for fun, here's another alternate version. It's the same length, but only valid in k (not q):

`{x}{x@$x}/1`

This one prints "1"s forever, through more or less the same method, but a couple details are slightly different.

BASIC

10 PRINT "HELLO WORLD"
20 GOTO 10

AppleScript:

repeat until 1 < 0
    say "hi"
end repeat

SCALA 18

while(1>0)print(1)

C++ 29

main(){while(1)std::cout<<1;}

Java, 74 characters

Since Java 7 and later versions seeks for main function at first instead of static block; I think this would be the best option to print infinite loops with small code. For your reference: static block won't execute in Java 7.

class I{public static void main(String[]a){for(;;)System.out.println(1);}}

VBA: 12

Audio is output, right?

do:beep:loop

Put that in your 'favorite' coworker's favorite macro-enabled MS office file for some 'fun'!

Private Sub Workbook_Open()
    Do:Beep:Loop
End Sub

Bonus points if they're using headphones.

Bash - 7 Characters

echo
$0

Prints endless newlines, at least until your computer crashes.

C# (16)

Directly executable in LinqPad:

for(;;)0.Dump();

Bash - 13

cat /dev/zero

OK, not the shortest, but I'm surprised this isn't here already.

Coffeescript 15

 alert 0 while 1

Bash, 4 bytes

$0&$

Outputs ./forever2.sh: line 1: $: command not found continuously.

Because $0 is backgrounded, each parent dies after the invalid command $, and so stack/memory is not eaten up, and this should continue indefinitely.

Strangely the output gets slower and slower over time. top reports that system CPU usage is close to 100%, but there are memory- or CPU-hog processes. Presumably some resource allocation in the kernel gets less and less efficient.

A couple of attempts for AVR, starting with one of the older MEGA/TINY models:

inc r1
out DIRC, r0
out DIRC, r1
rjmp .-2

And for XMEGA:

inc r0
sts PORTC_DIR, r0
rjmp .-2

Both of these rely on registers being cleared at reset. The output is toggling the direction of PORTC pin 0 (input/output). You need to connect a pull-up resistor to this pin to create a square wave.

Bash, 9 characters

echo 1;$0

Because the $0 variable always holds the filename.

Brainfuck - 6/4

Brainfuck does this easily:

-[.>-]

If we assume that the interpreter didn't zero the cells on startup but instead gave us already-initialised cells, the count goes down by two:

[.>]

J 11

echo@-^:_]1

Outputs 0's because inversion (-) does not converge when repeated ad infinitum (^:_).

~-~! - 17 bytes, with cheating 14 bytes

'=|@*:'&*|:'&|.|:

~-~! has a very limited set of characters, and does not support explicit numbers, so yeah. Outputs infinite .s.

If I sway the rules a bit and have the user input the character to be output infinitely, I can have 15 bytes:

'=|@*:'&*|:'&^:

Depending on the implementation, the last : for both of these can be left out, lowering the byte counts to 16 and 14.

Thue, 19

b::=~1
a::=ba
::=
a

The code prints an infinite stream of 1's.

The code is quite simple and easy to understand.

JAVA - 72 chars:

counting everything:

class T{public static void main(String[]a){for(;;)System.out.print(0);}}

Obviously, Java was not built for code golfing.

Java, 54 characters

Best attempt in Java:

class A{static{for(int i=0;i<1;)System.out.print(1);}}

Rebol, 18 chars

forever[print now]

Can shave off 1 perhaps even 2 more characters by choosing something different to now (for eg. pi).

However I like that it prints the time forever :)

awk, 15/19 chars

Canonical version, 19 characters:

BEGIN{for(;;)print}

Version requiring user input (one newline will do), 14 chars (scores as 15 because of the required input):

{for(;;)print}

perl, 10 chars

Here's another 10 char perl solution with some different tradeoffs. Specifically, it doesn't require the -n flag or user input to start. However, it does keep eating memory ad infinitum.

warn;do$0

save to a file, execute that file and you get eg:

Warning: something's wrong at /tmp/foo.pl line 1.
Warning: something's wrong at /tmp/foo.pl line 1.
Warning: something's wrong at /tmp/foo.pl line 1.

Atari 8-bit Basic — 7 characters

1L.:G.1

This is what you can type. Internally, it expands to:

1 LIST : GOTO 1

In Atari 8-bit Basic you can use LIST in a program.

I seem to remember this shorter sequence:

1L.:R.

Which expands to:

1 LIST : RUN

This would work, but I'm not sure if R. corresponds to RUN.

Assembly X86 - 44

Ok Im not a geek with assembly x86 but I wanted just to add this as a possible solution. COnsidering the number of dependencies needed by assembly code this code should be the shortest, a simple infinite loop that prints "x":

loop:
  movl $120, %rdi
  call putchar
  jmp loop

Groovy, 14

for(;;)print 1

from the command line: groovy -e "for(;;)print 1"

Processing, 26

for(int i=0;i<1;)print(1);

Prints 1 continuously.

C, 23 chars

Slightly shorter than the best C/C++ answer so far. Prints empty lines infinitely (but if compiled without optimizations, overflows the stack).

main(){main(puts(""));}

JavaScript, 23 characters

while(1)console.log(1);

Brainfuck, 8 bytes

+[[+.]+]

Assumes wrapping.

I'm aware that a solution was already posted by @cardboard_box - allthough his doesn't print any printable characters.

PureBasic - 17 chars

r:
Debug 0
Goto r

A slight variation on the classic BASIC infinite loop :-)

Scala REPL (19 characters)

while(true)print(1)

Clojure

(repeat 1)

Returns a lazy seq of 1's '(1 1 1 1 1 1 1 1 1 1 ...)

Python 3: 15, 17, or 18 characters

mdeitrick's answer is longer in Python 3, which replaces the print statement with a function call (15 chars):

while 1:print()

This remains the shortest I've found in Python 3. However, there are some more-interesting ways of printing in an infinite loop that are only a few characters longer.

PDP-11 Machine Code: 2 bytes (or 6 if you actually want output)

mov -(pc),-(sp)    ; octal opcode = 014746

On many PDP-11's, this instruction will actually do what it says - back the PC up, push its own opcode onto the stack, and repeat until all 64K ram is used up and then just keep filling circularly (or until something like a segfault happens). Not really infinite output, but it's in the spirit.

In 6 bytes you could do this, sending characters directly to the console

mov #SerialPortTxRegAddr,r0  ; oct= 012700 177562 hex = 0x15C0  0xFF72
movb -(pc),(r0)              ; oct= 114710        hex = 0x99C8 

Which would send a series of 0xC8 characters (these would be probably be seen as 'H' by any terminal which would be attached to the PDP-11)

Yes, I'm actually that old :-)

C#, 57

Another C# entry, with a twist:

class M{static int Main(){for(;;)System.Console.Beep();}}

This interpretation of "output" may be stretching, but still valid I think (and saves 4 characters! :)

Windows PowerShell (12)

for(;;){'-'}

C# (72)

using System; class P {static void Main(){for(;;) Console.Write('-');}}

Output enter image description here

Zozotez LISP: 7

When started with the minimal interactive session dictated in the documentation:

(:'r p)

How it works is that it redefined read so the REPL prints what print returns rather than keyboard input. The never ending output is continious lines of: Zozotez-moi~>NILNIL

When started with the full interactive session it gets longer, but does the same (10 bytes):

(:'read p)

Without a bootstrap Zozotez does just (eval(read)) thus we need to implement a loop in one expression (16 bytes):

((:'z(\()(p)(z))))

The : is set to it binds z to the lambda expression (\()(p)(z)), when called without arguments calls print (p) with default argument NIL, then calls z (recurses).

: returns the value (the function) so wrapping it all in parenthesis makes the initial call.

Common Lisp: 15

(loop(print())) ; prints infinite lines of NIL

Racket: 21

(let z()(print'N)(z))

Works similar. The names let makes and calls the proecdure l that takes no arguments. The body prints N, then recurses. print without arguments displays data quoted so it prints 'N'N'N....

Scheme: 23

(let z()(display'N)(z))

Same as Racket version only that display is used which don't quote output. NNNN...

Bash - 13 bytes

cat /dev/zero

to see run cat -v /dev/zero

Documentation here: /dev/zero and here Purpose of /dev/zero?

PowerShell (8)

Save "a.ps1" file with following script code:

1
.\a.ps1

from command line run the script.

My initial solution was different, but I found that it has already been answered by Iszi.

I managed to write another solution with same byte length.

Quomplex, 6 4

[*1]

Infinitely outputs 1.

q/KDB, 13 chars

while[1;0N!1]

Outputs

1 

forever.

For more information on q/KDB :

Another Solution:

{0N!1}/[0<;1]

Windows Batch file, 2 chars

%0

Calls itself infinitely.

Postscript 9

{1 =}loop

Output 1 in an infinite loop.

Golf-Basic 84, 2 characters

p`

Causes upper-right line of 5 pixels to alternate continuously.

Matlab, 13

while 1
1
end

This prints

ans =

 1

infinitely many times.

APL, 7

{∇⎕←⍵}1

Defines a function which output its argument and call itself with the same argument, then call it once with argument 1

C#, 60

class A{static void Main(){for(;;System.Console.Write(1));}}

F# - 22

while 1=1 do printf"x"

PowerShell 2.0: 17 11 8

My initial solution:

while(1 -eq 1){1}

Thanks to r.e.s.:

while(1){1}

I think Danko Durbić has the winner, here. I'm not even sure why this should work, but it does and I can't think of anything shorter so far.

for(){1}

dc, 7

[pdx]dx

prints 'pdx\n' infinitely many times.

R, 13 characters

repeat cat(1)

JavaScript: 14

WARNING: you really don't want to run this in your browser

for(;;)alert()

TCL (15)

while 1 puts\ x

(kind'a silly that we must write at least 30 characters per reply :)

C, 25 24

main(){main(puts("1"));}

Summary: Ruby - 9, Golfscript - 6, ><> - 2, Whitespace - 19, Perl - 2

One language I know, and two I've never, ever, used before :D
EDIT: Perl one didn't work when I installed Perl to try it :(

Ruby, 9

loop{p 1}

Simply prints 1 on separate lines continually.

Also, a bunch of alternatives:

loop{p''} # prints [ "" ]  on separate lines continually
loop{p p} # prints [ nil ] on separate lines continually

10-char solution:

p 1while 1

I was actually surprised that I could remove the space between the first 1 and the while, but apparently it works

Golfscript, 6

{1p}do

My first Golfscript program! :P

><> (Fish), 2

1n

Whitespace, 19

lssslssstltlsslslsl

Where s represents a space, t represents a tab, and l a linefeed.

Perl, 10 chars

TIMTOWTDI:

$ perl -nE 'say;redo' <input>   # 10 chars (1+8+1)
$ perl -E 'say while+1'         # 11 chars
$ perl -E 'o:say;goto o'        # 12 chars
$ perl -E 'for(;;){say}'        # 12 chars
$ cat inf.pl
warn;exec$^X,$0                 # 15 chars

If you have infinite RAM (maybe in the cloud ;-)

$ perl -E 'sub o{say;&o}o'      # 14 chars
$ perl -E '&{*1=sub{say;&1}}'   # 17 chars, just kidding *gg*

Haskell, 10

print[1..]

I think this is the shortest code to

  1. Print something out.
  2. Create an infinite Show:able datastructure.

For those interested, it prints:

[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,...

Befunge (1)

.

Outputs 0 forever. It works because in Befunge lines wrap around, and you get 0 if you pop from the empty stack.

Brainfuck, 4

+[.]

Alternatively,

-[.]

Haskell, 18 chars

a=1:a;main=print a

N.B.: No new line at end!