| Bytes | Lang | Time | Link |
|---|---|---|---|
| 025 | Rockstar | 250409T160833Z | Shaggy |
| 020 | Tcl | 170605T143401Z | sergiol |
| 008 | Perl 5 + M5.10.0 n0513 | 240626T185408Z | Dom Hast |
| 095 | Go | 240625T135946Z | bigyihsu |
| 034 | Hy | 200402T181826Z | xikuuky |
| 001 | W | 200401T093313Z | user9206 |
| 026 | Python 3 | 200329T105005Z | Dion |
| 002 | Keg | 200329T000826Z | lyxal |
| 045 | TSQL | 170702T023205Z | WORNG AL |
| 033 | LibreLogo | 170702T175837Z | Grant Mi |
| 001 | Husk | 170702T061125Z | Leo |
| 021 | Haskell | 170702T053730Z | aimorris |
| 017 | PowerShell | 170607T075557Z | Tessella |
| 020 | AutoHotkey | 170605T093918Z | phil294 |
| 006 | Cubix | 170606T204403Z | MickyT |
| 032 | SAS | 170606T192952Z | J_Lard |
| 006 | Vim | 170606T183210Z | J_Lard |
| 022 | Python 3 | 170606T154949Z | greengla |
| 027 | Perl 5 | 170606T152351Z | tale8521 |
| 006 | CJam | 170605T143001Z | Erik the |
| 016 | ><> | 170605T094409Z | Teal pel |
| 002 | Pyth | 170605T143450Z | Erik the |
| 009 | Reticular | 170606T094103Z | Mayube |
| 012 | OIL | 170606T094036Z | L3viatha |
| 008 | Aceto | 170606T093741Z | L3viatha |
| 034 | Java 8 | 170606T082915Z | Kevin Cr |
| nan | Ruby | 170605T120947Z | Peter Le |
| 024 | C | 170605T222027Z | Clé |
| nan | Chip | 170605T221152Z | Phlarx |
| 007 | shortC | 170605T163710Z | MD XF |
| 005 | sed | 170605T163701Z | Digital |
| 020 | Groovy | 170605T145228Z | Magic Oc |
| 012 | Braingolf | 170605T091038Z | Mayube |
| 046 | Go | 170605T141305Z | totallyh |
| 026 | C | 170605T134934Z | Cody Gra |
| 014 | Haskell | 170605T094113Z | nimi |
| 020 | PHP | 170605T121153Z | user6395 |
| 002 | V | 170605T115759Z | nmjcman1 |
| 003 | Ohm | 170605T094131Z | FrodCube |
| 002 | 05AB1E | 170605T092514Z | Emigna |
| 003 | Brachylog | 170605T115222Z | Leaky Nu |
| 004 | MATL | 170605T113533Z | Suever |
| 003 | QBIC | 170605T105345Z | steenber |
| 040 | C# | 170605T104401Z | TheLetha |
| 024 | JavaScript ES6 | 170605T103744Z | Tom |
| 005 | Japt | 170605T095142Z | Tom |
| 021 | Python 2 | 170605T093534Z | Jonathan |
| 008 | Bash | 170605T091725Z | ovs |
| 027 | brainfuck | 170605T091509Z | Leaky Nu |
| 006 | Actually | 170605T091438Z | user4594 |
| 025 | Python 2 | 170605T091145Z | user4594 |
| 002 | Jelly | 170605T090553Z | Leaky Nu |
Go, 95 bytes
package main
import(."os";."fmt")
func main(){s:=`
`
if len(Args)>1{s=Args[1]+s}
for{Print(s)}}
An adaptation of my "yes is 91 lines long" answer. A full program, takes input from CLI args.
W, 1 byte
It's not an infinitely-repeating built-in. That will be explained in the explanation.
I
Explanation
With implicit inputs this becomes:
aPI
I % An infinite loop with the following body:
a % Take a single input from the arguments
P % Implicitly print the inputted argument on every iteration
% (The above printing only occurs if the operand expression)
% hasn't been printed before
```
T-SQL, 45 bytes
CREATE PROC r @ TEXT=NULL AS G:PRINT @ GOTO G
Usage
EXECUTE r 'Hello word!'
LibreLogo, 33 bytes
Code:
x=input " repeat [ label x bk 9 ]
Explanation:
x = input " ; Input Stored in x as String
repeat [ ; Endless Loop
label x ; Print x in Current Position
bk 9 ; Move Back 9 pt
]
Result:
Husk, 1 byte
∞
In Husk, ∞ builds an infinite list repeating its argument forever. If a full program produces a list of strings as result, they get printed by joining them with newlines.
The wonderful thing about Husk's laziness is that computations involving infinite lists can be managed and used to produce useful output, like in this case :)
Haskell, 21 bytes
putStr.cycle.(++"\n")
PowerShell, 17 bytes
This one taking a reasonable position towards the shorter end of the non-golf-langs:
$f={for(){$args}}
The infinite recursion approach works, at least for a while, but isn't as terse:
$f={($s="$args");& $f $s}
AutoHotkey, 20 Bytes
OP did not specify how the output should happen, said only it has to happen endlessly with a newline after it. AHK was not tailored for cmd interaction. So the output happens repeatedly in a ToolTip at mouse position:

loop
tooltip,%1%`n`n
I like AHK's loop feature. loop repeats the next block forever, loop, 10 would repeat it 10 times. Sometimes I miss this feature in other languages like Python.
The escape character in AutoHotkey is ` (so there are no problems with backslashes in Windows paths). For some reason, a trailing newline is ignored so it is needed twice. (trayTip might not have this "bug" but I cannot test it because running with wine)
old answer:
loop
msgbox,%1%
I just realized that OP probably wont like this solution, the output happens with user-interaction and includes no newlines. I'll look for another way.
Cubix, 6 bytes
AN/qvo
A
N / q v
o
N/APush Newline(10) and input onto the stackvredirect into the loopo/qloop that outputs a character and pushes it to the bottom of the stack continuously
I was going to remove the EOI (-1) indicator from the stack, but it doesn't appear to affect the output any, so have left it saving bytes.
SAS, 32 bytes
%macro t(s);%put&s;%t(&s);%mend;
Vim, 6 bytes
Similar solution as the V answer.
Yqqp@q
Python 3, 22 bytes
while 1:print(input())
Surprised not to have seen a python 3 answer yet.
><>, 16 bytes
i:0(?v
:o71.>~a{
As mentioned in the comments below my first attempt may have misunderstood the question so the newer 16 byte solution has been made, I have left the original below so people may see.
><>, 13 bytes
<ov!?+1:i
oa<
Pyth, 2 bytes
#
Unfortunately I can't remove Q :(
You need to run from command-line like this, so that this is competing:
python3 pyth.py -c "#
"
The interpreter has been fixed too.
Reticular, 9 bytes
i1=v
1`p>
Explanation:
i1= Sets variable 1's value to a single line of input read from STDIN
v Change direction to down
> Change direction to right, wrap from end of line
1`p 1` fetches the value of variable 1, p prints it
OIL, 12 bytes
5
4
11
6
2
Read a value into the 0th line, print the value in the 0th line, print a newline, then jump to line 2.
Java 8, 34 bytes
s->{for(;;System.out.println(s));}
Surprised there wasn't a Java answer yet.
Try it here. (Wait 60 second for it to time-out.)
Ruby, 18 17 12 + 2 = 14 bytes
Run with the -n flag.
loop{$><<$_}
Edit: Thanks for @sethrin for the -n flag!
C, 24 bytes
f(char*s){puts(s),f(s);}
Basically a recursive function that outputs the string before calling herself again. Its my second post on codegolf so please be nice :p
Chip, 19+3 = 22 bytes
+3 for flag -z, which adds an infinite stream of 0x00 bytes to the end of the input.
cCGgbbBAa
fF^~^dDEe
The behavior, in pseudocode:
out_byte := in_byte
if !(in_byte & 0x60) {
out_byte |= 0x0A
}
Basically, if both bits 0x20 and 0x40 are unset, then either we have a newline character, or we've hit the end of the input. In either case, we just output a newline character and carry on.
shortC, 7 bytes
AWJ@[1]
Explanation:
A main function
W while loop
J print string with newline
@[1] first command line argument
sed, 5
: # label (unnamed)
p # print the pattern space
b # branch back to the label
Unnamed labels is an undocumented "feature" in sed that works with version 4.2.2, but may not work in future versions.
Groovy, 20 bytes
x={println it;x(it)}
Braingolf, 14 12 bytes
#
V[R!&@v1+]
-2 bytes thanks to totallyhuman
Explanation
#\nV[R!&@v1+] Implicit input of string as charcodes
#\n Push charcode of newline
V Create stack2
[R...v1+] While loop, runs endlessly
!&@ Print entire stack1 as chars without popping
Go, 46 bytes
import."fmt"
func f(s string){for{Println(s)}}
Recursive approach, 46 bytes
Surprisingly, a recursive approach led to the same byte count.
import."fmt"
func f(s string){Println(s);f(s)}
C, 26 bytes
f(char*s){for(;;)puts(s);}
A function, f, that takes a C-style string as a parameter, s. The body of the function loops repeatedly, passing the string to the library function puts, which outputs the string to the standard output (stdout) along with a trailing new-line.
Pretty simple stuff. The only hack here is taking advantage of default-int for the return value and then not actually returning a value. That doesn't matter in this case, though, since the function never returns (it just keeps printing forever)!
Haskell, 14 bytes
cycle.(++"\n")
Append a newline to the input and make list of infinite copies of it.
Alternative version, also 14 bytes:
unlines.repeat
PHP, 20 bytes
for(;;)echo"$argn
";
V, 2 bytes
òÙ
You can't try this online for obvious reasons.
ò 'Recursively
Ù 'Duplicate the current line downwards
Ohm, 3 bytes
∞┼,
It doesn't work with an empty input because Ohm is bad at input handling compared to other languages, but you can input "".
Explanation
∞ Infinite loop next code (until ";" or end of line)
┼ Get first input
, Println
MATL, 4 bytes
`GDT
Explanation
` % Do...while loop
G % Grab input
D % Display it on a new line
T % Literal TRUE to create an infinite loop
QBIC, 3 bytes
{?;
Explanation
{ DO
? PRINT
; a string read from the cmd line
DO is implicitly closed by EOF
C#, 40 bytes
s=>{for(;;)System.Console.WriteLine(s);}
Japt, 5 bytes
OpU;ß
Explanation
OpU; output the input with a newline
ß run the code again with the same input
Actually, 6 bytes
1W@;.@
Explanation:
1W@;.@ (implicit input)
1 push 1
W loop while top of stack is truthy:
@ move input to top of stack
;. duplicate and print
@ move 1 to top of stack to continue loop
Python 2, 25 bytes
s=input()
while 1:print s
Input is expected to be a Python literal (quotes for a string, square bracket or parentheses with comma-separated items for a list/tuple, etc.)
Python 3 would be +1 byte because print is a function, but also could do raw input without the 4-byte penalty for raw_input() in Python 2.
