| Bytes | Lang | Time | Link |
|---|---|---|---|
| 002 | Regenerate as '' | 210628T182525Z | DLosc |
| 017 | Brainfuck | 250811T234652Z | Junebug |
| 087 | Grass | 250902T090544Z | jimmy230 |
| 027 | Tcl | 250814T231500Z | sergiol |
| 006 | Minus | 250811T011013Z | 鳴神裁四点一号 |
| 3224 | AArch64 machine code Linux | 250607T073952Z | 鳴神裁四点一号 |
| 025 | SAKO | 250321T115730Z | Acrimori |
| 125 | Turing Machine But Way Worse | 241010T060116Z | 鳴神裁四点一号 |
| 073 | Poetic | 200930T093448Z | JosiahRy |
| 015 | Kona | 250120T134455Z | Abstract |
| 052 | Bespoke | 250120T034829Z | Josiah W |
| nan | Piet + asciipiet | 220330T081238Z | Bubbler |
| 100 | ACCUMULATOR | 241120T130309Z | Rhaixer |
| 021 | AWK | 241028T142021Z | xrs |
| 020 | Octave | 200229T003911Z | Luis Men |
| 016 | Red | 241010T070041Z | Galen Iv |
| 040 | AHHH | 220315T023905Z | DLosc |
| 013 | ELVM IR | 240509T132525Z | None1 |
| 029 | ByT | 240215T211945Z | 2014MELO |
| 028 | Rust | 240213T063739Z | Joonas |
| 008 | uxn/vavara | 240212T200532Z | The Zip |
| 006 | YASEPL | 240212T194521Z | madeforl |
| 032 | JavaScript Node.js | 210727T211456Z | user9403 |
| 009 | Uiua | 231104T132942Z | chunes |
| 017 | brainfuck | 230816T053043Z | fwoosh |
| 106 | Grass | 230607T232154Z | bluswimm |
| 004 | ><> Fish | 230602T011101Z | chunes |
| 007 | Commodore C64/VIC20/C16/+4/C128 using Kernal | 230601T214503Z | Shaun Be |
| 016 | Windows Batch | 230601T201146Z | Wallace |
| 049 | Fortran | 210607T110850Z | JSorngar |
| 035 | Swift | 230301T020048Z | user1171 |
| 051 | Pascal | 230321T160038Z | Kai Burg |
| 004 | Trilangle | 230214T163239Z | Bbrk24 |
| 017 | Arturo | 230301T022850Z | chunes |
| 2510 | Racket | 230301T015810Z | gantz gi |
| 038 | JavaScript | 230228T232405Z | Infigon |
| 002 | Bytebased Instruction Jumping | 230215T062804Z | Peter |
| 007 | Pip | 230212T203545Z | The Thon |
| nan | 230212T163225Z | The Thon | |
| 007 | Rattle | 210630T025739Z | d01 |
| 013 | GolfScript | 230210T133515Z | emirps |
| 1693 | Malbolge | 200619T021641Z | ceilingc |
| 031 | yup | 220908T074328Z | Kevin Cr |
| 255 | Nibbles | 220907T173823Z | Dominic |
| 017 | Cognate | 220907T165409Z | chunes |
| 018 | Prolog SWI | 220907T150521Z | Razetime |
| nan | Fig | 220722T214130Z | Seggan |
| 512 | AMD64 Bare Metal | 220727T011022Z | Eric Xue |
| 014 | Ruby | 220411T063830Z | oeuf |
| 007 | Flobnar | 220712T091136Z | Bubbler |
| 040 | A0A0 | 210606T150954Z | stefvans |
| 019 | rusty_deque | 220413T145313Z | bigyihsu |
| 020 | Emmental | 220412T030551Z | Ohentis |
| 017 | Rust | 220410T165803Z | Sapherey |
| 014 | makina | 220410T162155Z | Ginger |
| 014 | Bitcycle | 210813T222818Z | emanresu |
| 015 | Piet | 220316T181324Z | Spectral |
| 004 | Befunge93 | 220316T152429Z | BowlingP |
| 010 | Underload | 220316T132139Z | Joao-3 |
| 044 | Desmos with actions | 220315T145516Z | Not A Ch |
| 022 | Come Here | 220315T124700Z | SuperJed |
| 008 | Seed | 220217T034942Z | autumn |
| 017 | Lexurgy | 220126T173017Z | bigyihsu |
| 023 | Python 3 | 220126T063939Z | DialFros |
| 034 | Python 3 | 220110T154109Z | Alan Bag |
| 032 | JavaScript | 211123T113946Z | CreaZyp1 |
| 021 | Haifuckqueue | 211123T094658Z | emanresu |
| 025 | KonamiCode | 211112T153450Z | Ginger |
| 003 | ErrLess | 211027T171335Z | Ruan |
| 048 | CLCINTERCAL | 211005T124852Z | user1004 |
| 061 | INTERCAL CINTERCAL | 211005T124404Z | user1004 |
| 033 | Perl 5 ppencode | 210807T060410Z | user1004 |
| 009 | Vim | 210915T155136Z | Aaroneou |
| 004 | Vyxal | 210908T100257Z | SjoerdPe |
| 035 | Swift | 210815T234954Z | Bbrk24 |
| 063 | Arduino | 210815T233802Z | Bbrk24 |
| 080 | Among Us | 210815T001744Z | engineer |
| 010 | Minim | 210814T002546Z | Christia |
| 010 | Japt | 200630T075558Z | Mukundan |
| 008 | Written in Ark | 210806T204941Z | carne |
| 004 | WedgeScript | 210805T200356Z | Luke_ |
| 006 | Deorst | 210803T210041Z | Aaroneou |
| 009 | FALSE | 210728T184037Z | Joseph W |
| 013 | Bash + core utilities | 200229T003447Z | Noodle9 |
| 007 | Daoyu | 210629T151201Z | Jay Ryan |
| 010 | Underload | 210629T135152Z | Jay Ryan |
| 025 | Nim | 210628T201941Z | Qaziquza |
| 011 | Mascarpone | 210628T164736Z | Soup Gir |
| 014 | <>^v | 210615T175551Z | wasif |
| 279 | Taxi | 210607T202707Z | anderium |
| 051 | MMIXAL | 210609T014829Z | NoLonger |
| 007 | Knight | 210608T014052Z | EasyasPi |
| 003 | Alice | 210607T082356Z | SjoerdPe |
| 007 | CBL | 210607T021700Z | smarnav |
| 012 | Ruby | 210606T152306Z | gsus |
| 023 | 2D Deadfish | 210606T083036Z | wasif |
| 047 | Kotlin | 200303T075515Z | Mango Li |
| 035 | Starry | 210511T120825Z | Jay Ryan |
| 098 | Barrel | 210414T211429Z | LorenDB |
| 005 | Japt | 200803T204831Z | Shaggy |
| 005 | !@#$%^&*_+ | 210513T154936Z | wasif |
| 017 | Batch | 210511T143432Z | T3RR0R |
| 005 | BRASCA | 210511T111347Z | SjoerdPe |
| 007 | Splinter | 210511T085957Z | emanresu |
| 008 | Duocentehexaquinquagesimal | 210414T184142Z | Makonede |
| 032 | Kotlin | 210414T211707Z | Makotosa |
| 033 | C# 9 | 210401T132755Z | baltermi |
| 031 | VBScript | 210401T112914Z | wasif |
| 019 | Factor | 210328T021223Z | chunes |
| 004 | convey | 210328T012527Z | emanresu |
| 4014 | Deadfish~ | 210328T012247Z | emanresu |
| 010 | Add++ | 201117T012739Z | PkmnQ |
| 008 | MAWP 0.1 | 200622T102003Z | Dion |
| 062 | C# | 201116T162430Z | user9921 |
| 052 | NDBall | 201116T053551Z | QTpye |
| 007 | APL Dyalog Extended | 200901T120923Z | Razetime |
| 018 | Forth gforth | 201106T110148Z | Unrelate |
| 003 | Husk | 201015T034245Z | LegionMa |
| 011 | StupidStackLanguage | 200630T132752Z | Lebster |
| 005 | Labyrinth | 200925T003824Z | Bubbler |
| 004 | 05AB1E | 200924T180513Z | Makonede |
| 004 | Pyth | 200913T232749Z | Scott |
| 038 | C++ gcc | 200912T224942Z | marcos a |
| 010 | TeX to file | 200912T193912Z | Skillmon |
| 014 | x86 machine code | 200905T100732Z | Febriyan |
| 005 | Neim | 200901T125010Z | LiefdeWe |
| 098 | Pyramid Scheme | 200725T224952Z | MarcinKo |
| 016 | Perl 6 | 200804T041347Z | sugarfi |
| 029 | Oak | 200802T185615Z | Connor D |
| 028 | Wolfram Language Mathematica | 200801T202353Z | att |
| 013 | 7 | 200619T201040Z | Pizgenal |
| 034 | JavaScript | 200727T113619Z | Razetime |
| 007 | CJam | 200726T040606Z | Ethan Ch |
| 020 | Scala | 200725T232627Z | user |
| 208 | Unreadable | 200629T091315Z | Robin Ry |
| 018 | FEU | 200626T055746Z | PkmnQ |
| 134 | Shakespeare Programming Language | 200625T150210Z | Robin Ry |
| 059 | Brainetry liveoutput | 200624T144941Z | RGS |
| 009 | International Phonetic Esoteric Language | 200621T161731Z | bigyihsu |
| 007 | GORBITSAROM | 200620T033653Z | Noone At |
| 003 | Hexagony | 200301T234714Z | user8199 |
| 003 | Stax | 200619T225238Z | recursiv |
| 004 | Brachylog | 200619T065044Z | Unrelate |
| 005 | Ahead | 200316T064011Z | snail_ |
| 004 | *><> | 200313T073836Z | lyxal |
| 005 | !@#$%^&*_+ | 200313T073414Z | lyxal |
| 032 | ColdFusion | 200304T012417Z | Alex |
| 032 | JavaScript Node.js | 200302T103227Z | Joost K |
| 004 | Stax | 200310T174536Z | joe |
| 018 | C# Visual C# Interactive Compiler | 200302T121900Z | Jirka Pi |
| 004 | Cubix | 200307T125614Z | Mango Li |
| 024 | Erlang escript | 200307T121851Z | user9206 |
| nan | 200306T084648Z | wytrzesz | |
| 023 | PowerShell 25 | 200304T222639Z | Alex |
| 005 | Rabbit~ | 200303T132501Z | Adam |
| 005 | ZX Spectrum machine code | 200305T134355Z | Neil |
| 025 | PowerShell 27 | 200303T112450Z | T-Me |
| 036 | batch file | 200302T024846Z | midspace |
| 015 | 4 | 200305T011750Z | Mango Li |
| 022 | Lua | 200303T005518Z | object O |
| 022 | Python 3 | 200302T222116Z | inspirea |
| 030 | Hexadecimal Stacking PseudoAssembly Language | 200304T082602Z | Dorian |
| 016 | Clojure | 200304T082534Z | maxthour |
| 045 | MarioLANG | 200304T081908Z | Dorian |
| 026 | Piet | 200303T140312Z | Benschii |
| 015 | Perl 5 | 200301T195531Z | Xcali |
| 017 | Rail | 200304T005938Z | Mango Li |
| 012 | perl l101 E | 200303T225823Z | Tuna sal |
| 015 | R | 200229T013650Z | Bilel |
| 016 | Red | 200303T191949Z | BadTine |
| 019 | Python 2 | 200303T175626Z | JBernard |
| 008 | Mumps/Caché | 200302T153235Z | Forsh |
| 008 | Brian & Chuck | 200303T112955Z | Dorian |
| 040 | Python 2 | 200303T105307Z | ElPedro |
| 027 | Lua | 200302T123026Z | Lycea |
| 010 | Vim | 200229T004003Z | Noodle9 |
| 017 | Rust | 200302T194802Z | Yuri-M-D |
| 010 | Vim | 200302T191736Z | David Lj |
| 014 | Bash | 200302T165433Z | Olivier |
| 017 | Julia 1.0 | 200302T155839Z | wilkben |
| nan | BASIC | 200229T011048Z | 640KB |
| 1614 | PHP | 200229T013543Z | 640KB |
| 015 | Common Lisp | 200301T222217Z | coredump |
| 020 | C gcc | 200229T001435Z | S.S. Ann |
| 018 | Clojure | 200302T103605Z | Kirill L |
| 034 | Java JDK | 200229T011630Z | lyxal |
| 003 | Befunge98 FBBI | 200302T094746Z | ovs |
| 042 | Batch | 200302T094454Z | wasif |
| 006 | MathGolf | 200302T092724Z | Kevin Cr |
| 023 | Whitespace | 200302T091057Z | Kevin Cr |
| 012 | Ruby | 200302T064024Z | G B |
| 003 | VisiCalc | 200302T060614Z | user9206 |
| 022 | F# .NET Core | 200302T045422Z | LSM07 |
| 003 | W j | 200302T005958Z | user9206 |
| 007 | 33 | 200302T004011Z | TheOnlyM |
| nan | Bash | 200301T201957Z | Mitchell |
| 014 | sed 4.2.2 z | 200229T005217Z | S.S. Ann |
| 049 | C++ gcc | 200229T001555Z | S.S. Ann |
| 004 | Jelly | 200301T195122Z | RGS |
| 009 | Turing Machine Code | 200301T185930Z | ouflak |
| 003 | Burlesque | 200301T175212Z | DeathInc |
| 076 | x8616 | 200229T010248Z | 640KB |
| 012 | Ruby | 200301T172339Z | Kirill L |
| 020 | Haskell | 200301T165720Z | 79037662 |
| 016 | brainfuck | 200229T002749Z | S.S. Ann |
| 009 | dc | 200229T014138Z | Digital |
| 008 | x8616 machine code DOS 1+ | 200229T013428Z | S.S. Ann |
| 004 | 05AB1E | 200229T013107Z | Grimmy |
| 007 | Apple II 6502 Assembly code | 200229T011325Z | peter fe |
| 003 | Keg | 200229T010429Z | lyxal |
| 028 | AWK | 200229T004418Z | S.S. Ann |
| 004 | ><> | 200229T002302Z | Luis Men |
| 022 | Python 3 | 200229T001324Z | Tornado5 |
| 004 | Pyth | 200229T001942Z | Tornado5 |
| 038 | Go | 200229T001848Z | S.S. Ann |
Regenerate -as '', 2 bytes
A+
With the -a flag, Regenerate outputs all strings that match the given regex. With the -s flag setting the separator to '', it outputs them with no separator. The output with a newline separator would look like...
A
AA
AAA
... but with an empty separator, it's just an unending stream of A.
Brainfuck, 28 17 bytes
>+[+[<]>>+<+]>[.]
Thanks to ceilingcat for removing 9 bytes
Grass, 87 bytes
wWWWwwwwWWWWwWWWwvwwWWwWWWwvwWWwWWWwWWWWwvWwwwwwWWWWwWWWwwWwwWWwWWWwvwWWWWWWWWWWWwwWWww
wWWWwwwwWWWWwWWWwv f -> f('y')
wwWWwWWWwv Church numeral 2
wWWwWWWwWWWWwv Church numeral 8
Wwwwww +8
WWWWw 'y'+8
WWWww +64
Www 'y'+8+64
WWw 'y'+8+64+64
WWWw 'y'+8+64+64+64
vwWWWWWWWWWWWwwWWww Print and loop
Minus, 6 bytes
A programming language with just the operator -=.
o191c2
No TIO link
Worked with Main Interpreted Version
How it works
o -= 191 putchar (256-191)
c -= 2 program counter
AArch64 machine code (Linux), 32 24 bytes
-8 by @ceilingcat
Uses syscall. Full program. Depends on little endian.
main: file format elf64-littleaarch64
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000018 0000000000400078 0000000000400078 00000078 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
Contents of section .text:
400078 81000010 200080d2 220080d2 080880d2 .... ...".......
400088 410000d4 ffffff17 A.......
Disassembly of section .text:
0000000000400078 <_start>:
400078: 10000081 adr x1, 400088 <bar>
40007c: d2800020 mov x0, #0x1 // #1
400080: d2800022 mov x2, #0x1 // #1
400084: d2800808 mov x8, #0x40 // #64
0000000000400088 <bar>:
400088: d4000041 svc #0x2
40008c: 17ffffff b 400088 <bar>
Source
.globl _start
_start:
adr x1,bar
mov x0,1
mov x2,1
mov x8,64
bar:
svc 2 // Creates (char*)"A\0\0\xd4"
b bar
SAKO, 25 bytes
1)TEKST
A
SKOCZDO1
KONIEC
Basically port of my answer here, but with A instead of newlines.
Turing Machine But Way Worse, 125 bytes
0 0 0 0 i 0 0
0 i 1 0 u 0 0
0 u 0 0 y 0 0
0 y 0 0 t 0 0
0 t 0 0 r 0 0
0 r 0 0 e 0 0
0 e 0 0 w 0 0
0 w 1 1 e 1 0
1 w 1 1 e 1 0
How it works
A program to write 0b0100_0001 from least bit.
0 0 0 0 i 0 0 Write bit 0 and move left and goto state i
0 i 1 0 u 0 0 Write bit 1 and move left and goto state u
0 u 0 0 y 0 0 And so on
0 y 0 0 t 0 0
0 t 0 0 r 0 0
0 r 0 0 e 0 0
0 e 0 0 w 0 0
0 w 1 1 e 1 0 Write bit 1 and output a character on that 8-bit zone and move right and goto state e
1 w 1 1 e 1 0 Same for when seeing bit 1
Poetic, 73 bytes
why cant i cease,i say
i scream"A"out loud in agony
i cry,as i shouted on
Piet + ascii-piet, 12 bytes (2×6=12 codels)
ttttlIauqasj
In grid form:
ttttli
auqasj
Represents the following Piet program:
How it works
pointer command stack
t<4> -> l Push 4 [4]
l -> i Dup [4, 4]
i -> j Dup [4, 4, 4]
j -> s * [4, 16]
s -> a * [64]
a -> q Push 1 [64, 1]
q -> u + [65]
u -> a OutC [] Print 'A'
a -> t % [] Stack underflow; ignored
ACCUMULATOR, 100 bytes
As of today I updated the language to include a very rudimentary form of loops: the E command. Since I haven't figured out how to juice JS to produce infinite output, running this on the online interpreter will hang for 5 seconds, then produce a limited form of the theoretical output.
Full explanation on Sunday See below. Some (needed) output is present in the first few characters of the output, but otherwise it's just a lot of A's (finite due to JS being JS).
AAAAAAACAAAAAURAAAAAACMUUUUUUAAURAAAAAAACUAAAAAAAAUMMMURAAAAAACMUUAAURAAAAAAACUUURAAAAAACAAAURAACMME
EXPLANATION: The first part AAAAAAACAAAAAURAAAAAACMUUUUUUAAURAAAAAAACUAAAAAAAAUMMMURAAAAAACMUUAAURAAAAAAACUUURAAAAAACAAAU prints RAAAAAACMURAACMMME, which prints A, resets the accumulator, and asks the interpreter to interpret the first 18 characters of the output (which is itself, producing an infinite loop). The second part, RAACMME, kickstarts the loop.
Octave, 21 20 bytes
1 byte off thanks to @Yelp!
while printf('A')end
Explanation
printf('A') prints 'A' to STDOUT and returns the number of printed characters, that is, 1. This number is used as condition for the while...end loop, which thus becomes an infinite loop.
AHHH, 40 bytes
AHHHHhhHHHhHHHhHHHhHHHHhHhhHHHHHHhhhhhhh
The right language for the job.
Explanation
AHHH Start program
HhhH Increment cell to 1
HHhH Double cell to 2
HHhH Double cell to 4
HHhH Double cell to 8
HHHh Square cell to 64
HhhH Increment cell to 65
HHHH Loop while cell is nonzero:
Hhhh Output cell as ASCII character
hhhh End loop
ByT, 29 bytes
main = 1 main 0 1 0 0 0 0 0 1
In this language the output is only printed after the program halts, so to print infinitely many As the program must halt with an infinite string in the stack. This program halts by trying to execute a 0 command that doesn't have enough arguments:
bar baz 0
where
foo = 1 main
bar = foo 0
baz = 0 0
In this situation baz is deleted and the final output is the string represented by bar, which is defined as: (using Haskell notation)
bar_str = "0" ++ foo_str
where
foo_str = main_str ++ "1"
main_str = "10000010" ++ main_str ++ "1"
bar_str ends up being the bits 010000010100000101000001..., the same as AAA..., and this is printed to stdout.
This program turns out to be optimal. A main stack is required for compilation, so main = can't be golfed. An infinite string is also necessary and the only way of doing this is through recursion in the main stack, this string must also repeat some rotation of the bits 01000001, so they must be in the definition of main and therefore main 0 1 0 0 0 0 0 1 can't be golfed either. The only possible optimization would be removing the left most 1, but none of the eight possible 27 bit solutions work:
main = main 1 0 0 0 0 0 1 0 // prints nothing
main = main 0 1 0 0 0 0 0 1 // prints nothing
main = main 1 0 1 0 0 0 0 0 // prints nothing
main = main 0 1 0 1 0 0 0 0 // loops
main = main 0 0 1 0 1 0 0 0 // prints nothing
main = main 0 0 0 1 0 1 0 0 // prints nothing
main = main 0 0 0 0 1 0 1 0 // loops
main = main 0 0 0 0 0 1 0 1 // prints nothing
Rust, 34 28 bytes
fn main(){loop{print!("A")}}
Thank you for emanresu A for suggesting using loop and correcting my code!
uxn/vavara, 8 bytes
Compiled machine code:
00000000: 8041 8018 1740 fff8 .A...@..
Source (in uxntal):
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|0100 @on-reset ( -> )
( push a, the .Console/write port, output to device, then jump back to on-reset )
LIT "A .Console/write DEO !on-reset
I think for this language the binary size should count since uxntal is basically just assembly for the uxn system
Uiua, 9 bytes
⍥(&pf@A)∞
⍥(&pf@A)∞
⍥( )∞ # repeat (...) forever
@A # the letter A
&pf # print w/o newline
brainfuck, 17 bytes
>+[+[<]>>+<+]>[.]
Explaination
>+[+[<]>>+<+]> make the number 65
[.] print it until it equals 0 (i.e. never)
Grass, 106 bytes
wwWWwWWWwvwWWwwwwWwwwwwwWWWWwwWWWWWwWwwwWWWWWWWwwWWWWWWWWwWWWWWWWWWwWwwwwWWWWWWWWWWWwwWwwvwWWwWWWWWwWWWwww
Grass is pretty difficult to follow, so I'll try to break things down as best as I can.
The first function, wwWWwWWWwv, takes in two parameters, a function and a character. It essentially just performs the given function on the character twice.
The second function creates the character A. Getting there is a little complicated, since the only character we initially have to work with is w. This means we have to call the primitive succession function 202 times. To accomplish this, we use the first function to recursively call succession several times. I've put what's currently at the top of the stack after each instruction.
w
WWwwww (Succession Function x2)
Wwwwwww (Last character +2)
WWWWww (Succession Function x4)
WWWWWw (Succession Function x8)
Wwww (Last character +8)
WWWWWWWww (Succession Function x16)
WWWWWWWWw (Succession Function x32)
WWWWWWWWWw (Succession Function x64)
Wwwww (Last character +64)
WWWWWWWWWWWww (Succession Function x128)
Www (Last character +128)
v
The third and final function, wWWwWWWWWwWWWwww, is our main function, which calls the second function, prints its resulting A, and recursively calls itself.
Commodore C64/VIC-20/C16/+4/C128 (using Kernal) 7 bytes
This is the assembled code at memory location 828 (some free RAM usually used as the Datasette buffer):
.033c a9 41 20 d2 ff d0 f9
Or in 6502 assembly:
* = 828
lda #$41
jsr $ffd2
bne $033c
We can use a relative branch here (bne $033c) instead of a jump instruction, which saves one byte. The branch is conditional, but the condition is never set (it compares against the zero flag, and as the accumulator is set to a non-zero value, this condition is never met).
The lda #$41 loads the accumulator with the value 65, which is the letter A in PETSCII, and jsr $ffd2 calls to the CHROUT Kernal routine. This will translate the value on the accumulator register to a character code, and output to the default output device, which will be the screen in this instance. So the character A is outputted until the machine is reset.
Windows Batch, 16 bytes
:a
echo a
goto a
Pascal, 51 bytes
This is a complete program according to ISO Standard 7185 "Standard Pascal". You may interpret it as a script, the standard does not prescribe or set restrictions to that.
PROGRAM A(OUTPUT);BEGIN WHILE 8=8 DO WRITE('A')END.
Trilangle, 4 bytes
This version has constant memory usage.
"A,o
Try it on the online interpreter!
Push an A, print it and pop it. For lack of an explicit exit instruction @, this loops infinitely by default.
Trilangle, 3 bytes
This version's memory usage grows without bound.
"Ao
Racket, 25 bytes (10 brackets)
(let a()((print 'a)(a)))
JavaScript, 38 bytes
setInterval(()=>document.write("A"),4)
setInterval(document.write,4,"A")) errors, but I guess that's screaming in a different way.
Byte-based Instruction Jumping, 2 bytes
↓A
↓ is a simply a placeholder for a non-printable ASCII character, so it takes a single byte of space. It evaluates to the following instructions:
mvr ... ... wrt cns ... ... mvl
It moves the instruction pointer to the byte on the right side of the current one (mvr), which is A, then writes it (wrt) to the console (cns) and moves back left (mvl). Now, the instruction pointer points to the first byte again, and executes the same instruction over and over forever.
Thunno, \$ 5 \log_{256}(96) \approx \$ 4.12 bytes
['AZL
Explanation
[ # while True:
ZL # print with no newline:
'A # "A"
Rattle, 7 bytes
65|[,]0
Explanation
65| hard-coded input (Rattle's equivalent to a variable declaration)
[...]0 infinite loop
, prints the ASCII character of the value on top of the stack (A = ASCII 65)
Malbolge, 2163 2069 1881 1787 1693 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*)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wfv3Prr`;o,%IH(4~}|d/@Q>v{;(\wZ$W4V1}/R-PxjvuKf_$G#nZ}B|z>-xwQc88qR^nO1GL|JVyGeEca&$$?8[6|GjWxg/AR2POq(o,JH6j4&C$0@@-a`^:y[q6H54rq0BR--N*chJ&_%cF!CY}Ai.-wwWV(s6%4o\lZkKDz,fdRQ
-94 bytes thanks to @user100411.
This was built with Prof. Masahiko Sakai's LAL toolchain from the following source code.
PROGRAM_START_TO ENTRY@Argh
ROUTINE Argh {
ENTRY:
ROT A
A: 0000021020t
REV JMP
REV_JMP:REV JMP
OUTPUT
DUP
JMP REV_JMP
}
yup, 33 31 bytes
0eee:0~--:0~--0:ee-0ee--0e-{:@}
Pushing the 65 can perhaps be shortened.
Explanation:
yup has a limited amount of operators, so almost everything in the program is to push 65:
0 # Push a 0
e # exp(0) = 1
e # exp(1) = 2.718...
:: # Duplicate this 2.718... twice
]] # Rotate them both to the bottom of the stack
e # exp(2.718...) = 15.154...
: # Duplicate this 15.154...
0 # Push another 0
~ # Reverse the top two values
- # Subtract them: 0-15.154... = -15.154...
- # Subtract again: 15.154...--15.154... = 30.308...
:0~-- # Do the same: 30.308...--30.308... = 60.617...
0 # Push 0 again
[ # Rotate a 2.718... back to the top of the stack
- # Subtract: 0-2.718... = -2.718...
[ # Rotate the other 2.718... to the top
- # Subtract again: -2.718-2.718 = -5.436...
- # Subtract it: 60.617...--5.436 = 66.053...
0e- # Push and subtract 1: 66.053...-1 = 65.053...
{ } # Loop while the top of the stack is NOT 0:
: # Duplicate the 65.053...
@ # Print it as character with this codepoint, where yup implicitly rounds
# decimals to their nearest integers when it needs an integer
Fig, \$4\log_{256}(96)\approx\$ 3.292 bytes
(;/A
See the README to see how to run this
(;/A # Takes no input, obviously. Tbh I have no idea what to write on the first comment line
( # Repeat forever:
; # Print
/A # "A"
AMD64 Bare Metal, 512 bytes
mov ah, 0x0e
mov al, 'A'
loop:
int 0x10
jmp loop
times 510-($-$$) db 0
db 0x55
db 0xaa
Flobnar, 7 bytes
g,_@
1A
It is most space-efficient to grab A from code than to try to evaluate from single-digit numbers.
@ Evaluate to west
_ If the other side (west) is 0, evaluate to east:
, Print as char and return 0:
g Grab code at (1,1) which is 'A' (so A is printed)
1
_ The return value is 0, so evaluate to east,
which is start of the program again (which also acts as <)
so it is an infinite loop printing 'A' repeatedly
A0A0, 44 40 bytes
A0A0
A0C3G1G1A0
A0P65A0
A0A1G-3G-3A0
G-3
Forms a standard infinite loop, with the three actual instructions to be executed in the middle.
P65 ; prints 'A'
Edit: Optimize by 4 bytes. The loop does not need three instructions to function, so we can drop two instructions, totalling four bytes.
rusty_deque, 19 bytes
'A'~{dup~ow~}~loop~
Pretty much a duplicate of my "Shortest code to produce infinite output" answer.
Emmental, 20 bytes
;#58#46#35#63#!#65#?
How?
;#58#46#35#63#!#65#?
; push ';' onto the stack
#58#46#35#63 push ":.#?" onto the stack
# push NULL onto the stack
! pop NULL, ":.#?", and ';', and make NULL mean ":.#?"
#65 push 'A' onto the stack
# push NULL onto the stack
? execute NULL
:.#?
: duplicate 'A'
. pop and print 'A'
# push NULL onto stack
? execute NULL
makina, 14 bytes
>Pv
^>OtA;
^<<
Bitcycle, 25 16 14 bytes
~1000~!
>0010^
Output as a stream of bits. -9 thanks to DLosc. -2 thanks to JoKing.
Piet, 15 Codels:
Operations in each loop:
push 8
dup
*
push 1
+
out(char) ;outputs 65 as 'A'
After each cycle, the index will flow through the white codel on the bottom left and repeat another cycle, running indefinitely.
Desmos with actions, 44 bytes
Code in ticker:
s_{tdout}\to join(s_{tdout},65)
Code in list (the actual area where you can enter equations):
s_{tdout}=[]
It outputs the ascii code for A
Come Here, 22 bytes
COME FROM1 1TELL65NEXT
Python 3, 34 bytes
def f(n=9):print(end="A"*n);f(-~n)
Trying to print as many As as possible with recursion.
JavaScript, 32 bytes
for(;;)process.stdout.write("A")
for(;;) is one byte shorter than while(1)
Haifuckqueue, 21 bytes
#{A}o
$1|1.1o
ooooo
Don't try it online!
It turns out the server set up by the language's author has no timeout, so it's currently printing millions of A to STDOUT with no sign of stopping. Instead, download and run the intepreter and you should get something like this:
Explanation
The o are NOPS (effectively, they're actually xor), so the actual code is simply
#{A}
$1|1.1
# - pop the stack
{A} - push an A
$1 - pop and print the ToS
|1 - Push 1
.1 - Jump to line 1 (First line)
KonamiCode, 25 bytes
v(^^^^^^>^^^^^)L(>)<<B(>)
Fortunately 65 != 0, so we can cheat a bit and use it as our "counter".
ErrLess, 3 bytes
'A?
Explanation
'A { Push 'A' to the stack }
? { Output the top element of the stack as a character }
The Instruction pointer loops when it reaches the end of the program.
CLC-INTERCAL, 48 bytes.
DO;1<-#1DO;1SUB#1<-#20DOCOMEFROM#9(9)DOREADOUT;1
(Don't) Copy and paste to try it online! It is very recommend to replace COME with NEXT, as output suppression may be weak.
INTERCAL (C-INTERCAL), 61 bytes
DO,1<-#9DO,1SUB#1<-#126DOCOMEFROM#9PLEASEREADOUT,1(9)DO,1<-#9
Perl 5 (ppencode), 35 33 bytes
print uc chr ord qw s abs while x
Previous
print uc chr ord qw s abs while exp
Alternatively:
print uc chr ord qw s abs while cos
Vim, 9 bytes
qqA<C-r>q<C-o>q<C-r>q
Uses the same Recursive Register Expansion trick as my Lolololololololololololol answer, inserting the unnamed register, which contains 'A' + the unnamed register. To see the output, you'll have to try it in Vim, and you may need to use Ctrl+C to stop the expansion if the terminal freezes.
Vyxal, 4 bytes
The try it link has the 5 flag to prevent it from freezing up forever.
{\A₴
Explanation
{ - While loop
\A - Push "A"
₴ - Print without newline
Swift, 35 bytes
while 1>0{print("A",terminator:"")}
Try It Online cuts it off after 128kiB of output, but this will run forever. Swift for loops are Python-like, not C-like, so those aren't any help here.
This is my first code golf for something other than Arduino.
Arduino, 63 bytes
void setup(){Serial.begin(300);}void loop(){Serial.write('A');}
Not sure how much explaining I need to do here. Arduino has an infinite loop built-in, so just write one 'A' to the Serial output inside of it. Equally valid would be Serial.print('A'); and Serial.print("A");, and I think Serial.write("A"); should work as well. It's all just a matter of preference.
Among Us, 83 80 bytes
-3 bytes thanks to ovs
VENTED RED SUS LIME SUS SUS SUS SUS SUS SUS RED SUS BLUE SUS WHO GREEN SUS WHERE
Explanation:
VENTED A2 += 10 (A2 = 10)
RED SUS A1 += 1 (A1 = 1)
LIME SUS SUS SUS SUS SUS SUS A1 *= 2 6x (A1 = 64)
RED SUS A1 += 1 (A1 = 65 = 'A')
BLUE SUS PUSH A1
WHO while (A2 != stack_top) {
GREEN SUS print(stack_top)
WHERE }
Documentation of the language doesn't match the interpreter, this goes off of what runs on the interpreter. (creator, please fix).
Minim, 10 Bytes
$<65.C=-1.
With whitespace and comments:
$< 65. ; Print 65 as unicode 'A'
C = -1. ; Set program counter to -1 (advances to 0 afterwards)
Japt, 10 bytes
{Oo'A}g1/0
Explanation
{Oo'A}a
{ // Function
Oo'A // Output 'A'
} // End Function
g1/0 // Call infinite times
// (Japt's O.o() method returns undefined)
Japt, 7 bytes
As pointed out by @Shaggy due to how a is implemented this will print A only 1e8 times
{Oo'A}a
Explanation
{Oo'A}a
{ // Function
Oo'A // Output 'A'
} // End Function
a // Call repeatedly until it returns a truthy value
// (Japt's O.o() method returns undefined)
Written in Ark, 8 bytes
{~ !A }~
WedgeScript, 4 bytes
'A|o
Explanation:
'A Pushes the character literal A to the stack\
| Loop the rest of the code infinitely\
o Output
Yes, Wedgescript is a custom language made by me, here is the repo with interpreter install instructions: https://github.com/WedgeScript/WedgeScript
FALSE, 9 bytes
[1]['A,]#
Pseudo-Code
While 1:
Print "A"
Note: On TIO the interpreter throws an error. However, the code isn't erroneous. To show this, I ran it on another interpreter, which can be found at the link below:
Bash + core utilities, 16 14 13 bytes
Saved 2 3 bytes thanks to Mitchell Spector!!!
yes|tr \\ny A
Also for 13 bytes (written by Mitchell Spector):
Bash, 13 bytes
printf A;./$0
Yet another 13 byter, this one written by pxeger:
Bash, 13 bytes
yes|tr -c A A
Daoyu, 13 instructions, 7 bytes
There's two! Each instruction is a hex, so two instructions fit in a byte.
$$$(([]!)/(/[]!)):><
OPLEV 0:
$$$ Allocate 8 bits of memory to the bit tape
(([]!)/(/[]!)) Set the bit tape to 01000001
:>< Print the bit tape, and loop to the beginning
OPLEV 1:
... NOP
((().)/(/().)) Moves around the bit tape with no effect
:>< Print the bit tape, and loop to the beginning
This one is simpler, but it's 20 instructions and an extra byte. The first time the program loops, the operation level is 0, and it runs the first program, which allocates memory, sets the bit tape to 'A', and prints. Every other time it loops it just prints the bit tape.
%!)))):((((><
%! Acts as NOP, encodes 'A'
)))) Moves data reader to '%!'/'A'
:((((>< Prints, resets position, and loops to beginning
This one reads its own source code, and is a few bytes smaller. The operation level does change, but it doesn't really affect any of the program. When attempting to MERGE ()) while selecting the entire but tape, which is the original state of the program, the data reader moves to the parent bit tape, which is the program's source code. The program navigates to the %!, prints it as 'A', and loops.
Underload, 10 bytes
((A)S:^):^
(A)S:^ is pushed onto the stack, and after the first duplication and evaluation, it repeatedly evaluates itself, printing 'A' infinitely.
(I didn't find any other Underload answers, but if I missed one I'll delete this)
Nim, 26, 25 bytes (Credits to @hyper-neutrino)
while 1>0:stdout.write'A'
Not great, but not too shabby.
Mascarpone, 11 bytes
['A.:!]v*:!
[ :!]v*:! // infinite loop
'A. // with the side effect of outputting 'A' each iteration
I feel a bit scummy for reposting the same code to multiple questions, but I guess it has to be done.
<>^v, 14 bytes
"A">~v
^ <
Taxi, 279 bytes
Go to Post Office:w 1 l 1 r 1 l.[A]A is waiting at Writer's Depot.A is waiting at Writer's Depot.Go to Writer's Depot:w 1 r 1 l 2 l.Pickup a passenger going to Post Office.Pickup a passenger going to Post Office.Go to Zoom Zoom:n.Go to Post Office:w 3 l 2 r 1 l.Switch to plan A.
This is an interesting challenge because it requires both refueling infinitely for gas and getting enough passengers to pay for the gas. If passengers paid enough to pay for the gas used to transport them, the following would be enough:
Go to the Post Office: west 1st left, 1st right, 1st left.
[loop]
"A" is waiting at the Writer's Depot.
Go to Go More: west 1st right, 1st left, 1st left, 2nd right.
Go to the Writer's Depot: west 1st right.
Pickup a passenger going to the Post Office.
Go to the Post Office: north 1st right, 2nd right, 1st left.
Switch to plan "loop".
However, because passengers do not pay enough this results in only 54 * A, crashing the program once we are out of fuel.
We can also go to Zoom Zoom to buy fuel, it's way cheaper to buy here allowing us to get 79 * A.
Luckily, picking up two passengers at a time solves this problem of not earning enough per iteration.
The code can be golfed further by removing quotes for strings that don't contain whitespace and minimising the directions.
Ungolfed it looks like this:
Go to the Post Office: west 1st left, 1st right, 1st left.
[loop]
"A" is waiting at the Writer's Depot.
"A" is waiting at the Writer's Depot.
Go to the Writer's Depot: west 1st right, 1st left, 2nd left.
Pickup a passenger going to the Post Office.
Pickup another passenger going to the Post Office.
Go to Zoom Zoom: north.
Go to the Post Office: west 3rd left, 2nd right, 1st left.
Switch to plan "loop".
Two 321 byte answers
Before I realised I could go to Zoom Zoom with two passengers I found the following solutions of 321 bytes which have some interesting tricks not used in the shorter solution…
Go to Post Office:w 1 l 1 r 1 l.[A]"A"is waiting at Writer's Depot."A"is waiting at Writer's Depot."A"is waiting at Writer's Depot.Go to Writer's Depot:w 1 r 1 l 2 l.[B]Switch to plan C i.Pickup a passenger going to Post Office.Switch to plan B.[C]Go to Go More:s 1 l.Go to Post Office:e 1 l 1 r 1 r 1 l.Switch to plan A.
or
Go to Post Office:w 1 l 1 r 1 l.[A]"AAA"is waiting at Writer's Depot.Go to Writer's Depot:w 1 r 1 l 2 l.Pickup a passenger going to Chop Suey.Go to Zoom Zoom:n.Go to Chop Suey:w 1 l 3 r.[B]Switch to plan C i.Pickup a passenger going to Post Office.Switch to plan B.[C]Go to Post Office:s 1 r 1 l 2 r 1 l.Switch to plan A.
Using Go More to get Fuel, even picking up the maximum of three passengers does not give enough money to loop infinitely, so I had to think about it smarter.
If we pick up passengers sooner and take them on a longer route through the city they will pay more for the ride.
Going to Writer's Depot before getting fuel results in 70 * A.
If we pick up three passengers using this route, we can loop infinitely.
Picking up three passengers going to the same destination can be done more byte-efficient than using the same code thrice.
Using Switch to plan "name" if noone is waiting we can pick up a single pasenger until all three are picked up.
The quotes around the plan name are optional and it any word after it get's interpreted as if noone is waiting.
Using this we get our first 321 byte solution, the code below is the ungolfed version:
Go to Post Office: west 1st left, 1st right, 1st left.
[loop]
[Setup 3 * "A"]
"A" is waiting at Writer's Depot.
"A" is waiting at Writer's Depot.
"A" is waiting at Writer's Depot.
Go to Writer's Depot: west 1st right, 1st left, 2nd left.
[Pickup 3 * "A"]
[before pickup]
Switch to plan "after pickup" if noone is waiting.
Pickup a passenger going to Post Office.
Switch to plan "before pickup".
[after pickup]
[Get Gas]
Go to Go More: south 1st left.
[Print 3 * "A"]
Go to Post Office: east 1st left, 1st right, 1st right, 1st left.
Switch to plan "loop".
But there's more!
Setting up three different passengers to pick up costs quite a few of bytes.
If we instead split up the string "AAA" we can eliminate two lines setting up passengers, at the cost of going past Chop Suey.
With this we don't need to go out of our way to visit the Go More gas station anymore, Fueler Up is on our route and Zoom Zoom is very easily accessible too.
Looking into Fueler Up, it's the most expensive, in fact, it's so expensive that you don't get enough money even taking three passengers!
We can only print 561 * A, 187 loops of three passengers, but not infinite as we are trying.
Luckily, Zoom Zoom the cheapest gas station does not require much extra routing at all and taking this route does allows us to enter another infinite loop.
Go to Post Office: west 1st left, 1st right, 1st left.
[loop]
[Setup 3 * "A"]
"AAA" is waiting at Writer's Depot.
Go to Writer's Depot: west 1st right, 1st left, 2nd left.
Pickup a passenger going to Chop Suey.
[Get gas]
Go to Zoom Zoom: north.
Go to Chop Suey: west 1st left, 3th right.
[Pickup 3 * "A"]
[before pickup]
Switch to plan "after pickup" if noone is waiting.
Pickup a passenger going to Post Office.
Switch to plan "before pickup".
[after pickup]
[Print 3 * "A"]
Go to Post Office: south 1st right, 1st left, 2nd right, 1st left.
Switch to plan "loop".
It's sad that this does not safe any bytes, but it's the second time I got two answers with the same number of bytes which I think is cool! (See this DDoouubbllee ssppeeaakk challenge.)
I also realised when I was about to publish that all strings without whitespace can be written without quotes. That golved my actual solution a bit more and does not leave the 321 byte solutions the same length anymore. Even so I still publish this explanation too, because the repeat to pickup three passengers is useful and using Chop Suey was fun :)
MMIXAL, 51 bytes
LOC 0
Main SET $255,12
TRAP 1793
JMP 0
BYTE 65
Surprisingly, this is one byte shorter than the minimal assembled version.
Explanation:
LOC 0 // start at 0; I believe this is required
// if it's not, we can drop 7 bytes
// (and possibly 8 from assembled version).
Main SET $255,12 // execution starts here
TRAP 1793 // fputs(stdout, $255)
JMP 0 // jump back to address 0
BYTE 65 // 'a' at address 12; any unset byte is 0.
Knight, 7 bytes
W1O"A\"
# infinite loop
WHILE 1
# Output "A". The backslash disables
# the implicit newline.
OUTPUT("A\")
Alice, 4 3 bytes
It's a pretty simple Cardinal mode answer.
-1 bytes thanks to Martin Ender
'AO
Explanation
'A - Push "A"
O - Output as character
- The IP wraps around to the left, and repeats.
CBL, 7 bytes
°¸A;«.»
CBL is a language that I am developing. This answer may not be up-to-date with the latest syntax. I have not coded an interpreter yet.
A breakdown:
°¸A;«.»
° <; Add following value(s) to current array value
¸A; <; A as it's value(in the CBL codepage)
« » <; Loop(since there is no parameter, it loops infinitely)
. <; Print current array value
COBOL, 80 bytes
Just for fun.
IDENTIFICATION DIVISION.PROGRAM-ID.A.PROCEDURE DIVISION.A.DISPLAY 'A'.PERFORM A.
Ruby, 12 bytes
loop{$><<?A}
Explanation
loop {...} //infinite loop
$> //synonym for STDOUT
<<?A // << appends an element and ?A is shorthand for 'A'
Kotlin, 50 47 bytes
fun main(a:Array<String>){while(0<1)print("A")}
1.) Thanks to @Adam for pointing out the args naming
Starry, 41 35 bytes
-6 bytes, thanks to @ovs
Pushing values in Starry is pretty annoying, so the first 33 27 bytes are devoted to pushing the value of 'A' into the stack.
+ + * +*` + . +'
13+ push 13-5
1+ duplicate
2* multiply (top of stack is 64)
6+ push 6-5
0* add (top of stack is 65)
0` label 0
1+ duplicate
1. pop and print as char ('A')
1+ duplicate
0' pop 'A', goto label 0
(The number at the beginning of each line signifies the number of spaces)
Barrel, 9 bytes (or 8 with newer instruction)
^A¤p←1
Explanation:
^A // Sets the accumulator to the ASCII codepoint of 'A'.
¤ ←1 // Creates a jump target and jumps back to it.
p // Prints the accumulator as a character value.
Since the ← command will implicitly push the current location onto the location pointer stack, this program will use lots of system memory. In fact, on my system it used about one megabyte of RAM per second. To overcome this, I've since implemented the ↰ operator, which jumps without pushing (and therefore removes the possibility of RAM overflow). It makes the command look like this: ^A¤p↰1
This could be 8 bytes now that I have implemented the infinite loop that I'd thought about implementing: ^65#∞p In this case, the #∞p would define a loop which would print the character value infinitely. However, since the infinity command may have been inspired by this (I actually forget) and the command is newer than the answer anyway, I'll refrain from changing my answer.
Japt, 5 bytes
Assumes infinite memory.
ßOoau
ßOoau
ß :Recursive call with (irrelevant) argument
Oo : Output (returns undefined)
au : "a" uppercased
!@#$%^&*()_+, 5 bytes
A(!@)
A # Push A to the stack
( # Start while loop
! # Duplicate top of stack
@ # Print top of stack
) # End while loop
Because top of stack is always truthy, it never ends.
Batch 17 bytes
@Set/P=A<nul
@%0
Explanation:
@Set/P=A<nul: Output A without newline@%0: Loop by restarting the script
C# 9, 33
for(;;)System.Console.Write('A');
VBScript, 31 bytes
Do
WScript.StdOut.Write("A")
Loop
Factor, 19 bytes
[ "A"write t ] loop
loop looks at the top of the stack and performs another iteration if it finds t. This is 1 byte shorter than using forever.
convey, 4 bytes
'A'}
An interesting (often annoying, but sometimes interesting) feature of convey is that string or number literals will output forever. So this outputs A constantly...
Deadfish~, 4014 bytes:
{iiiiii}iiiii{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
Sets the accumulator to 65, then prints as character 102000 times = far beyond the lifespan of the universe.
There's no way to do anything infinitely in Deadfish~, so 102000 times should be enough.
Add++, 10 bytes
x:"A"
Wx,o
First, we set x to A. A non-empty string is evaluated as true, so the While loop runs. o outputs the active variable, which is x, without a newline.
MAWP 0.1, 8 bytes
[94M5W;]
Explanation:
[ start of loop
94M5W push 65 to stack ((9+4)*5)
; print as ascii
] end of loop
C#, 62 bytes
class P{static void Main(){for(;;)System.Console.Write('A');}}
NDBall, 52 bytes, 7 instructions in 2 dimensions
(0)>0
(1)+
(2)Y[65,>1,>0]
(3)p
(4)<0
(2,1)<0
(0,1)<1
In essence, this just loops the ball on an add 1 loop until it reaches 65, then it bounces back and forth over p repeatedly printing "A"
APL (Dyalog Extended), 11 9 7 bytes
⍞←⍣≠'A'
-2 bytes from Bubbler.
-2 bytes from Adàm using forbidden hacky APL magic.
Older answer:
{⍞←'A'⋄∇⍵}0
Explanation
{⍞←'A'⋄∇⍵}0
⋄ separator (arguments will be evaluated left to right)
⍞←'A' Print 'A' without newline
∇⍵ Call function again with the same right argument
{ }0 Call first time with 0(any number works)
Forth (gforth), 21 18 bytes
: f ." A"recurse ;
Although Forth typically tokenizes entirely by splitting on whitespace, as symbols and the like are allowed anywhere within a word, the word ." causes a string to be parsed up until a closing quote without also trying to parse that closing quote as part of a word.
I'm so unaccustomed to golfing in relatively ordinary languages that I forgot I could submit a named function!
Overflows the return stack quite quickly, and : f ." A"r> recurse ; doesn't take much longer to overflow the data stack, so without the assumption of infinite memory:
Forth (gforth), 25 22 20 bytes
[begin] ." A"[again]
-2 thanks to Bubbler
StupidStackLanguage, 11 bytes
avqviiimtfu
Explanation
a - push 0 to stack
v - add 5
q - duplicate
viii - add 8 (making 13)
m - multiply top 2 items (13x5 = 65)
t - start bf style loop
f - print character
u - end bf style loop
Labyrinth, 5 bytes
65
".
Simple square loop. Push the number 65, pop and print as charcode, and loop through a no-op.
Labyrinth, 5 bytes
<>.56
I think I found a way to loop through single line of program! (Except that the commands are necessarily backwards, and each of <> pops one value from the stack and uses it as an offset, so the loop should begin with <_>_ instead if the stack is non-empty at the boundary.)
<>.56 At start, IP runs "<" which cyclically shifts the row along with the IP
>.56< Now IP is at the end of the strip, which forces it to run backwards
6 Run commands in this order, printing an 'A'
5
.
> Cyclically shift the row to the right
<>.56 Continue running to the left, now stepping on "<" again
which causes IP to wrap through the edge and run in a loop
Labyrinth, 6 bytes
19
`
.
Uses -191 % 256 == 65. Runs back and forth along the linear path .`19, starting at 1 facing right.
Labyrinth, 5 bytes
~9
.1
Another -191.
05AB1E, 4 bytes
'A[?
'A # push "A"
[ # repeat forever...
? # output top of stack to STDOUT without newline
# (implicit) exit infinite loop
TeX (to file), 10 bytes
\def~{A~}~
TeX (to STDOUT), 19 bytes
\def~{\write0{A}~}~
x86 machine code - 14 bytes
So, yeah I'm using write() system call to print A characters without \n
6 scream:
7 00000000 6A41 push 0x41
8 00000002 31DB xor ebx, ebx
9 00000004 89E1 mov ecx, esp
10 00000006 B201 mov dl, 0x1
11 00000008 B004 mov al, 0x4
12 0000000A CD80 int 0x80
13 0000000C EBF2 jmp scream
This is output using strace :
write(0, "A", 1A) = 1
write(0, "A", 1A) = 1
write(0, "A", 1A) = 1
write(0, "A", 1A) = 1
<repeat> ..
Neim, 5 bytes
ͻ # Infinite loop
( # Decompress base 255
A # A
) #
B # Compress number to base 255
Pyramid Scheme, 111 98 bytes
^
/ \
/do \
^-----^
/1\ / \
--- /out\
^-----
/ \
/chr\
^-----
/ \
/65 \
-----
Edit:
98 bytes thanks to @Jo King and height-0 pyramids. Also, chr 65 is truthy.
^
/ \
/do \
^-----^
-^ / \
-^ /out\
-^-----
/ \
/chr\
^-----
-^
-^
/ \
/65 \
-----
Oak, 29 Bytes
fn main(){while(1){prc!(65)}}
This may have to be changed to fn main(){while(1){prc!('A')}} once num and char are no longer interchangable, but for now it works.
Wolfram Language (Mathematica), 28 bytes
$Output~WriteString~A~Do~∞
Most ways to output in Mathematica will include a trailing newline.
7, 7 6 5 bytes (19 15 13 characters)
1170363757403
Explanation
The main program pushes 77033|5|463 on the frame, and the last section, 463, runs. 4 swaps it with the previous section, a single 5, and 6 pacifies the 5 back into 5. 3 outputs the 5, specifying output format 5 ("US-TTY"), and deletes the 463 section which is now before it.
77033 is left on the frame, and it runs in a loop forever. 7703 creates an empty section and a section with 63, which is outputted by 3. 63 contains an anonymous command, so it can't be output directly. Instead, it is pacified and 7 is added before it, and the resulting string 703 is outputted. In output format 5, 7 is ignored and 03 corresponds to the character A, which is printed to STDOUT. The 77033 section hasn't been deleted (because we added an empty section to get deleted by 3 instead), so it runs again.
CJam, 7 bytes
'A{_o}h
CJam loops are surprisingly expensive as there are no markers, and since there's no infinite loop function, we need to make sure there's always a spare truthy A on the stack for our do-while loop.
Explanation:
'A Push 'A' to the stack
{ }h Loop while top of stack is true
_ Duplicate the A
o Pop and output the A w/ no newline
Scala, 20 bytes
while(print('A')!=0)
Unreadable, 208 bytes
'"""""'"""'"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"""
Explanation (A has codepoint 65):
'"""""'""" while(1≠0)
'" print unicode character number
'"" (×64) 1+1+1+… (64 times)
'""" 1
FEU, 18 bytes
a/A
loop
print
end
Explanation
a/A
Append A to the empty input.
loop
print
end
Starts an infinite loop where you print the input.
Shakespeare Programming Language, 134 bytes
,.Ajax,.Puck,.Act I:.Scene I:.[Exeunt][Enter Ajax and Puck]
Ajax:You is the sum ofthe cube ofa big big cat a cat.Speak thy.Let usAct I.
(Newline added for readability.)
The ASCII code for A is 65, which is represented following this trick as \$65 = (2\cdot 2\cdot 1)^3 +1\$. Puck will say A indefinitely.
Brainetry --live-output, 59 bytes
This uses the --live-output flag otherwise output would be deferred until the end of the program, which would never happen because the program doesn't end.
a b c d e f
a b c d e f g h
a b c d e f g
a b c d e f g h i
Golfed version of the following code:
This program will ask you for
some input but I really only care about
the first character of input. I'm gonna
take such a character and output it MANY times.
To try this, clone this GH repo and run python brainetry.py btry/scream.btry and give it A as input.
International Phonetic Esoteric Language, 9 bytes
Derived from my answer to "Shortest code to produce infinite output".
"A"10ɑbuɒ
Explanation:
This works because the ɒ instruction don't do anything with the loop index except to check if index < limit. If it is, it loops back to its associated ɑ. Otherwise it exits the loop (index manipulation is handled with e adn ø).
"A"10ɑbuɒ
"A" (Push "A")
10 (Loop bounds: 0 to 1)
ɑ (Start loop)
b (Copy top)
u (Print with no trailing)
ɒ (End loop)
GORBITSA-ROM, 7 bytes
S\101TS\000B\000
in more readable form:
S65 T S0 B0
Explanation
S65 load 'A' into register
T output it
S0 B0 jump to the beginning
Hexagony, 3 bytes
A.;
A .
; . .
. .
A sets the value of the current memory edge to A (ASCII 65).
. is a no-op that places the next command on a new row.
; prints the value of the current memory edge to stdout.
The no-op is required because the instruction pointer never returns to the top row after executing A.
It only loops over the second and third rows.
ColdFusion, 32 bytes
<cfloop condition="1">A</cfloop>
Cubix, 4 bytes
.'Ao
or
.o'A
. = starting point
'A = literal A
o = prints output
Since Cubix wraps around in a cube surface, it's an infinite loop.
Erlang (escript), 24 bytes
An operand-less function self-recursing, printing the string.
a()->io:fwrite("A"),a().
Explanation
a()-> % Define a niladic function.
io:fwrite("A") % Print "A" to the console.
,a(). % After that, call itself again.
Kenbark-1 (first personal computer) 6/7 bytes
002:
024 X
004 PC
234 200 Print A from X
343 004 jump back to begin of the program
Register X is on Address 002 (oct) Then we set program Counter (address 003) to 004 for starting code. Move value from X (024='A') to output register what is set of lights on device front (Address 200 oct). And unconditional jump back to address 004.
User will see steady light, but in reality computer still output A
I'm not sure how to count bytes since that 002: is needed to tell computer what part of memory we need to fill.
Try it by yourself: http://www.neocomputer.org/kenbak/kenbak1-JS.html
Rabbit~, 5
A]:.[
Explanation:
A - store A to memory (not strictly used as A is already in memory, when loading the program. But the A is overwritten by a new A)
] - Start loop, read A as input
:. - Print A character
[ - Check current input, which is still A, carry on looping
Inverted brackets loops until input is not equal, doesn't terminate since input is always 'A'
ZX Spectrum machine code, 5 bytes
3E 41 LOOP: LD A, 'A'
D7 RST 16
18 FB JR LOOP
RST 16 is the Spectrum's character output interrupt. It will prompt you to "scroll?" on the 705th and every subsequent screenful of characters; if you press N, STOP or BREAK it will abort with error D BREAK - CONT repeats.
I've hand-assembled this so the opcodes might be incorrect.
PowerShell 27 25 bytes
for(1){Write-Host -n "A"}
-n parameter for Write-Host works as -NoNewline.
- -2 byte thanks to Veskah!
batch file 36 bytes
for /L %%n in (,,)do @ECHO|set/p="A"
batch console 35 bytes
This can be run directly in the windows cmd console.
for /L %n in (,,)do @ECHO|set/p="A"
- -3 bytes and more thanks to @SomethingDark!
4, 15 bytes
3.6006580050094
3. start of code
6 assigns to cell 00 the value 65
8 starts the loop, keeps running while cell 00 is not zero.
5 prints ASCII character of the cell 00
9 closes the loop
4 end of code
Lua, 22 bytes
::a::io.write"A"goto a
Hexadecimal Stacking Pseudo-Assembly Language, 30 bytes
000000200041400000130000010000
000000 label Start:
200041 input 0x41 (dec. 65, ASCII 'A')
400000 push that on stack 0
130000 print character from stack 0
010000 jump to Start:
Clojure, 16 bytes
Another Clojure version saving 2 bytes over previous solution, posted as a separate answer because I don't have comment rights yet.
(while 1(pr 'A))
MarioLANG, 45 bytes
+>+
+"+
+++
+++
++(
++-
+)[
+!<)+>.<
=#======
Mario falls down the first column, colecting 8 pluses. He then steps on the elevator and repeats the second and third column 8 times, colecting a total of 64 pluses in his second cell. After that, he adds another plus to that and starts running left and right, screaming "AAAA"
Piet, 30 26 Codels
It's a .png 13x2 codels, a few are technically not used (4 white unused, 1 white as transition and 1 black to change direction). But since I don't know how to compress it further, I still count them.
Original file (codel size 1):

With codel size 10:

For some reason, the codel size 10 looks disproportional. Maybe it's an issue with the IDE
Pseudo code (incl. stack):
push 2 | Stack: 2
push 4 | Stack: 2, 4
push 2 | Stack: 2, 4, 2
push 4 | Stack: 2, 4, 2, 4
* | Stack: 2, 4, 8
* | Stack: 2, 32
* | Stack: 64
push 1 | Stack: 64, 1
+ | Stack: 65
dup | Stack: 65, 65
out(char) | Stack: 65 | Output: A
dup and out(char) are repeated indefinitely.
This is my first submission here and my first "real" program in Piet. I'm sure it still has some room for improvement, but I just wanted to share (what I think of as) a lovely language :D
Edit: Compressed down from 15x2 to 13x2.
Rail, 17 bytes
$'main'
@-[A]o[]@
- horizontal rail (a rail is required as entry from starting point $)
@ bumper to reverse travel direction
o prints characters between the brackets [ ]
perl -l101 -E, 12 bytes
{print;redo}
R, 15 bytes
repeat cat('A')
Optimized thanks to @S.S. Anne
Perl 5 (cperl), 17 bytes
for(;;){print"A"}
Optimized 1 byte thanks to @S.S. Anne
Squirrel, 17 bytes
for(;;)print("A")
Optimized 1 byte thanks to @S.S. Anne
Red - 16 bytes
forever[prin 'A]
Python 2, 19 bytes
This might be cheating as it can only work on a terminal, since each space added in between "A" is removed with a backspace char.
while 1:print'\bA',
Brian & Chuck, 8 bytes
A{?
B{.?
Brian:
A constant "A"
{? restart Chuck's code
Chuck:
B (just a filler, this will be ignored)
{ go to start of Brian's code
. print char
? toggle to Brian
Python 2, 40 bytes
import sys
while 1:sys.stdout.write('A')
Python 2 prints with either a newline or a space separator but we can import the sys module then write to stdout to get round this.
Vim, 14 7 10 bytes
qqiA^[@qq@q
Added 3 bytes to fx a bug kindly pointed out by David.
If you fire up vim (with no command line options) and type in these key strokes (^[ is the esc key) then the screen will fill up with A's.
Explanation:
qqiA^[@qq@q
qq Start recording macro-q
i Enter insert mode
A Insert A
^[ Exit insert mode
@q Call macro-q from within macro-q
q Stop recording macro-q
@q Call macro-q
Note: You'll probably have to kill that session of vim to stop it!
You can try to stopping the macro with ctrl-c, if that works you can exit with :q!<Enter>.
Vim, 10 bytes
@Noodle9's answer of qqiA^[@q is a good start but is incorrect:
The call of macro-q is using any previous setting of macro-q. This only worked because, in testing, they had previously recorded macro-q to output A, so they were unwittingly relying on saved state.
You can see this by trying to change the A to a different letter, and the first time you test it you will still get 'A's. Or you can first clear macro-q with "qqq"
Here is a correct answer along the same lines:
qqiA^[@qq@q
qq Record macro-q (the first time)
i Insert
A Letter 'A'
^[ Exit insert mode
@q Call macro-q
qq Stop recording
@q Call macro-q
Although this does require that nothing is in macro-q at the start, which I think is a fair assumption for code golf, that you are starting with a clean slate / fresh install, as opposed to random initialization state. If not, or if you want to test this and have macros set already, you would need to do:
qqqqqiA^[@qq@q
Where the initial 'qqq' will clear the macro-q.
Of course, all of this is much easier to read if you don't use 'q' for the macro. :)
BASIC, 21 18 17 13 bytes
1?"A";
GOTO 1
Everyone's first program!
Credits:
- -3 bytes thx to @ceilingcat
- -1 byte thx to @S.S. Anne
- -3 bytes more thx again to @ceilingcat!
C (gcc), 20 bytes
A(){A(putchar(65));}
-4 bytes thanks to ceilingcat!
How could I have forgotten recursion...
Java (JDK), 85 77 34 bytes
v->{for(;;)System.out.print("A");}
Massive thanks to @Kevin for the lambda solution. I really need to learn how to do that.
Old Answer
class M{public static void main(String[]args){for(;;)System.out.print("A");}}
It's a full program and can probably be golfed if I knew how lambdas work in java. Oh well.
Batch, 42 bytes
@for /l %%a in (0,0,0) do @set /p="A" <nul
MathGolf, 6 bytes
1É'Aq↑
Or
æ'A_q▲
Explanation:
1 # Push a 1
↑ # While true without popping,
É # using the following 3 commands:
'A '# Push an "A"
q # Pop and print it without trailing newline
▲ # Do while true with pop,
æ # using the following 4 commands:
'A '# Push an "A"
_ # Duplicate this "A"
q # Pop and print it without trailing newline
Whitespace, 23 bytes
[N
S S N
_Create_Label_LOOP][S S S T S S S S S T N
_Push_65_A][T N
S S _Print_as_character_to_STDOUT][N
S N
N
_Jump_to_Label_LOOP]
Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Explanation in pseudo-code:
Start LOOP:
Character c = 'A'
Print c as character to STDOUT
Go to next iteration of LOOP
VisiCalc, 3 bytes
You need an extra newline to enter the instruction. It's a modification of this solution.
/-A
The trailing newline is significant.
Explanation
/ Start a command:
- Replicate forever
A The target for replication is the / character
Extra newline to enter the instruction
You end up with a cell with an infinite number of A's.
However, the current cell can only show a finite amount
of A's because cells are trunctuated based on their lengths.
```
W j, 3 bytes
'AI
Explanation.
I % Forever:
'A % Calculate the string "A"
% Implicit output
Flag:j % Without a newline
```
33, 7 bytes
"A"j[p]
"A" Put "A" in the source string
j Copy the value into the accumulator, so the loop never terminates
[p] Print infinitely
Bash, 11 bytes (10 + 1)
printf A;s
This script must be saved in file named s, and that file must be in a directory in your PATH.
I've added 1 byte to the score to account for the required filename, as per https://codegolf.meta.stackexchange.com/a/1072/59825 .
Of course, this recursively forking script is going to run out of resources very quickly, especially if you try running it on TIO :-) .
sed 4.2.2 -z, 14 bytes
s/\n/A/g;:
p
b
Sed 4.2.2 was the last version to support an empty label name.
sed -z, 16 bytes
s/\n/A/g;:r p
br
After that, golfing is slightly more expensive.
C++ (gcc), 49 bytes
#import<iostream>
int A(){for(;;)std::cout<<'A';}
Uses C++ I/O.
C++ (gcc), 41 bytes
#import<ios>
int A(){for(;;)printf("A");}
Uses C I/O.
Jelly, 4 bytes
A niladic link:
”AȮß
Try it online!, or check how it works below. If the "A" could be program input, we could get away with only two bytes: Ȯß
”A The character literal "A"
Ȯ Print it and return it,
ß and recursively call this same link.
Turing Machine Code, 9 bytes
0 * A r 0
One of the very few times that Turing Machine Code can compete overall.
Burlesque, 3 bytes
@'A
@ is an odd operator.
- For integers, it converts to double (
@1 => 1.0) - For two letters, it pushes both to the stack individually (
@az => 'a, 'z) - For characters it prints the character infinitely as a string (
@'a => "aaaaaaaaaa....") - For anything else, it does nothing and just remains on the stack (
@1.0 => @, 1.0).
@ # A symbol which does odd things. For a char, it repeats infinitely.
'A # Literal A
x86-16, IBM PC DOS, 7 6 bytes
00000000: b041 cd29 ebfc .A.)..
Unassembled listing:
B0 41 MOV AL, 'A' ; put 'A' into AL
PRINT:
CD 29 INT 29H ; DOS fast console output char in AL
EB FC JMP PRINT ; loop infinitely
As a bonus, if you run this on your IBM 5151 monitor for a few hours this will actually produce infinite output on that screen until the end of time.
dc, 9
[65Pdx]dx
Explanation
[ ] # Push a macro to the stack
65 # Push the number 65 to the stack
P # Pop and print ASCII char 65 (i.e. "A") with no newline
d # Duplicate the macro
x # Pop and execute the macro at the top-of-stack (tail recursion)
d # Duplicate the macro
x # Pop and execute the macro at the top-of-stack
x86-16 machine code (DOS 1+), 8 bytes
Disassembled listing (objdump -D -bbinary -mi8086 scream.com):
0: b4 02 mov $0x2,%ah
2: b2 41 mov $0x41,%dl
4: cd 21 int $0x21
6: eb f8 jmp 0x0
Output (DOSBox 0.74, and a lot faster than it looks):
Here's my ldscript and command-line options for anyone interested:
OUTPUT_ARCH(i8086)
SECTIONS {
. = 0;
}
ENTRY(_start)
OUTPUT_FORMAT(binary)
commands:
as --32 scream.s -o scream.o
ld scream.o -Tldscript.lds -o scream.com
dosbox ./scream.com
and unmolested scream.s file:
_start:
mov $0x02, %ah
mov $0x41, %dl
int $0x21
jmp _start
Apple II 6502 Assembly code, 7 bytes
L1: A9 C1 LDA #'A'
20 ED FD JSR COUT
50 F9 BVC L1
><>, 4 bytes
'A'o
How it works
The instruction pointer begins at left, and its initial direction is to the right.
' starts string parsing mode. Everything until the next ' will be interpreted as individual characters, that will get pushed onto the stack. So A pushes that character, and then the second ' ends string parsing mode.
o pops the character from the stack and outputs it to STDOUT.
The instruction pointer has now reached the end of the code, so it wraps around to the initial position and keeps moving to the right, causing an infinite loop.








