| Bytes | Lang | Time | Link |
|---|---|---|---|
| 057 | Arturo | 240702T165953Z | chunes |
| 051 | R | 240702T154800Z | Dominic |
| 038 | Perl 5 + M5.10.0 061 | 240702T111700Z | Dom Hast |
| 084 | Java JDK | 240607T081919Z | int 21h |
| 109 | C++ | 240606T230911Z | Redz |
| 046 | Retina 0.8.2 | 240606T125617Z | Neil |
| 023 | Charcoal | 240606T125310Z | Neil |
| 103 | Google Sheets | 240607T061919Z | z.. |
| 014 | 05AB1E | 240607T074011Z | Kevin Cr |
| 074 | JavaScript Node.js | 240606T124717Z | l4m2 |
| 015 | Nekomata | 240606T131000Z | alephalp |
| 045 | Python 3 | 240607T000244Z | Jonathan |
| 045 | PowerShell Core | 240606T211130Z | Julian |
| 056 | Python 3 | 240606T124515Z | None1 |
Perl 5 + -M5.10.0 -061, 38 bytes
$/+=$-,$-%=26while say+(A..Z)[$-++]x$/
Explanation
-061 sets $/ to 1 which starts our repetition counter where we need it.
while we say (always returns truthy) the letter of the alphabet, at index $- (starts at 0 and post-incremented), repeated $/ times, we increment $/ by $-, then set $- to itself, modulo 26.
Java (JDK), 88 87 84 bytes
v->{for(int j=1,s=1,a;;s+=j,j=j%26+1)for(a=0;a<=s;)System.out.write(a++<s?j+64:10);}
- -1 byte after a discussion with corvus_192
- -3 bytes thanks to ceilingcat
+1 credit to this answer for the idea to use System.out.write with the ternary operator and this Javascript answer for the algorithm.
C++, 113 109 bytes
#include<iostream>
int i,p=1;int main(){while(p){std::cout<<std::string(p,char(i%26+65))<<'\n';p+=i++%26+1;}}
-4 bytes thanks to suggestions by Neil and ceilingcat.
Retina 0.8.2, 46 bytes
$
@
{2=T`@L`L`(.)\1*
}2=`(.)\1*
$&$1
}:T`@L`LA
Try it online! Explanation:
$
@
Append an @.
2=T`@L`L`(.)\1*
Bump all of the characters up by one code point, but only in the second run of identical characters.
2=`(.)\1*
$&$1
Duplicate the last character, but only if there are two runs of identical characters.
{`
}`
Repeat until all of the letters are the same, at which point there is only one run of identical characters and so no substitutions are made.
:T`@L`LA
Bump all of the characters up by one code point, wrapping Z back around to A, and output the new string.
}`
Repeat forever, since the output keeps changing.
The original challenge was possible in 6 bytes:
+:`$
*
Try it online! Explanation:
+`
Repeat forever, since the output keeps changing.
:`
After performing the command, output the new value.
$
*
Append a * to the output.
This is a case where Retina 0.8.2 is golfier than Retina 1 where the * needs to be quoted with a $. (Retina 1 also uses \ instead of Retina 0.8.2's :.)
Charcoal, 23 bytes
W¹«×⊕↨¹⁺¹﹪υ²⁶§αLυD⎚⊞υLυ
Try it online! Link is to verbose version of code. Explanation:
W¹«
Repeat forever.
×⊕↨¹⁺¹﹪υ²⁶§αLυ
Reduce all of the members of the list modulo 26, increment each, take the sum, then increment that, and use that to repeat the current letter.
D⎚
Output the string and clear the canvas. (Normally Charcoal doesn't output until it terminates, but that's not useful for infinite output challenges.)
⊞υLυ
Push the current count to the predefined empty list.
Note that ⊕ works on empty lists in the newer version of Charcoal on ATO allowing it to replace ⁺¹ for a 1-byte saving.
If the number of lines was an input parameter and padded output was allowed then it would be possible in only 17 bytes (16 on ATO):
EN×⊕↨¹⁺¹﹪…⁰ι²⁶§αι
Try it online! Link is to verbose version of code. Explanation:
N Input number
E Map over implicit range
α Predefined variable uppercase alphabet
§ Indexed by
ι Current value
× Repeated by
… Range from
⁰ Literal integer `0`
ι To current value
﹪ Vectorised reduced modulo
²⁶ Literal integer `26`
⁺¹ Vectorised incremented
↨¹ Summed
⊕ Incremented
Implicitly print
The original challenge was possible in 5 bytes:
W¹«*D
Try it online! Link is to verbose version of code. Explanation:
W¹«
Repeat forever.
*
Append a * to the canvas.
D
Output the current contents of the canvas.
Note that Dump is throttled on TIO, making it take 5 seconds to fill the 128KB output buffer; it's about 10× faster if you Attempt This Online! with the --nt option.
Google Sheets, 103 bytes
To be entered in A1:
=LET(R,LAMBDA(R,a,b,i,l,IF(i=ROWS(A:A),l,R(R,a+b,MOD(b,26)+1,i+1,{l;REPT(CHAR(b+64),a)}))),R(R,1,1,1,))
The formula prints until the last row of the sheet. It breaks after a few thousand rows because of the 32k max char limitation of the REPT function.
05AB1E, 14 bytes
1[DN>.b×,N₂%>+
Or alternatively:
AuÞ∞<₂%>.¥>×€,
Original closed challenge (5 bytes):
'*[=Ć
Explanation:
1 # Start with 1
[ # Loop indefinitely:
D # Duplicate the current value
N> # Push the 1-based loop-index
.b # Convert it to an uppercase character (1→A,2→B,...,26→Z,27→A,...)
× # Repeat that letter the duplicated value amount of times
, # Pop and print it with trailing newline
N # Push the 0-based loop index
₂% # Modulo-26
> # Increase it by 1
+ # Increase the current value by this for the next iteration
A # Push the lowercase alphabet
u # Uppercase it
Þ # Convert it to a list of characters, and cycle indefinitely
∞ # Push an infinite positive list: [1,2,3,...]
< # Decrease by 1 to make it non-negative: [0,1,2,...]
₂% # Modulo-26 each
> # Then increase each back by 1
.¥ # Prepend 0 and undelta
> # Increase each by 1
× # Repeat the letters those values amount of times
€ # Loop over each string:
, # Output it with trailing newline
'* '# Push "*"
[ # Loop indefinitely:
= # Print the current string with trailing newline (without popping)
Ć # Enclose; append its own first character
JavaScript (Node.js), 74 bytes
for(i=0,s=1;;s+=i,i%=26)console.log(String.fromCharCode(++i+64).repeat(s))
JavaScript (Node.js), 30 bytes
for(a='';;)console.log(a+='*')
Can't find a dup
Nekomata, 15 bytes
Ňr26%→Ɔ64+$∑→řH
the original challenge, 5 bytes
'*ŇPř
'*ŇPř
'* Push the character '*'
Ň Choose a natural number
P Check that it is positive
ř Repeat the character that many times
Without any command-line flags, Nekomata will print all possible results separated by newlines.
Python 3, 45 bytes
a=b=1
while[print(chr(b+64)*a)]:a+=b;b=b%26+1
A full program that prints forever.


