| Bytes | Lang | Time | Link |
|---|---|---|---|
| 014 | Minus | 250908T072033Z | 鳴神裁四点一号 |
| 024 | punchcode | 240927T170217Z | madeforl |
| 041 | Rust | 240813T001456Z | user9403 |
| 010 | ?Q? | 240807T151257Z | Gilbert |
| 014 | Befalse quirkster | 240520T051650Z | Bubbler |
| 024 | Raku Perl 6 rakudo | 240804T205604Z | bb94 |
| 042 | Acc!! | 240509T090248Z | emanresu |
| 021 | Befalse | 240518T051359Z | Adelie |
| 010 | Pip | 240517T153055Z | DLosc |
| 019 | 🕳️ | 240517T131838Z | None1 |
| 012 | ><> Fish | 230602T201929Z | chunes |
| 034 | ELVM IR | 240509T132745Z | None1 |
| 042 | Acc!! | 240415T112036Z | Mukundan |
| 012 | Uiua | 231129T143105Z | RomanPro |
| 011 | YASEPL | 240212T184821Z | madeforl |
| 025 | Perl 5 | 240212T174921Z | Xcali |
| 017 | Hussy.Net | 240211T224441Z | Taco |
| 058 | > | 231129T213409Z | Bee H. |
| 007 | Vyxal 3 | 231129T140001Z | pacman25 |
| 009 | /// | 231120T192102Z | Philippo |
| 041 | JavaScript Node.js | 231120T080643Z | l4m2 |
| 028 | Desmos Graphing Calculator | 231120T140730Z | Infigon |
| 031 | Commodore BASIC V2 Commodore C64 33 BASIC Bytes | 230521T191146Z | Shaun Be |
| 048 | JavaScript Node.js | 210727T212028Z | user9403 |
| 020 | Basic | 230804T080222Z | steenber |
| 389 | Taxi | 230804T034413Z | joyofori |
| 008 | Bytebased instruction jumping | 230603T111212Z | Peter |
| 042 | SAS | 230521T200741Z | Bartosz |
| 014 | makina | 230520T201735Z | Butter F |
| 045 | Python | 230520T162649Z | The Empt |
| 010 | Flip | 230520T140805Z | user1180 |
| 008 | MathGolf | 230329T192212Z | emirps |
| 033 | Thue | 220317T231920Z | DLosc |
| 013 | Trilangle | 230326T230442Z | Bbrk24 |
| 023 | Zsh + jot | 230326T212047Z | roblogic |
| 510 | Nibbles | 230326T211058Z | Dominic |
| 019 | Lean Mean Bean Machine | 230326T192556Z | joyofori |
| 008 | ><> | 230326T152245Z | The Thon |
| 057 | Fortran GFortran cpp | 230326T175802Z | roblogic |
| 013 | Binaryencoded Golifcal | 230326T162655Z | SuperJed |
| 014 | Knight | 220807T021538Z | Aiden Ch |
| nan | 230326T143713Z | The Thon | |
| 015 | Underload | 220315T115655Z | Joao-3 |
| 010 | Alice | 220807T072909Z | Julian |
| 041 | Rust | 220625T020445Z | code |
| 049 | A0A0 | 210807T154429Z | stefvans |
| 048 | Piet | 220331T015014Z | Aiden Ch |
| 024 | Clojure | 220331T040509Z | Bbrk24 |
| 025 | PHP | 220331T021343Z | user1117 |
| 041 | Rust | 220326T204020Z | Sylveste |
| 011 | Befunge98 PyFunge | 220317T184856Z | BowlingP |
| 082 | Arduino | 220317T223535Z | Bbrk24 |
| 200 | Pyramid Scheme | 220317T074531Z | emanresu |
| 023 | Etch | 220307T202141Z | Ginger |
| 008 | Pyth | 220307T155742Z | sinvec |
| 014 | APL Dyalog Unicode | 220126T055816Z | Jayant C |
| 033 | Lexurgy | 220126T053912Z | bigyihsu |
| 022 | Pari/GP | 220126T035719Z | alephalp |
| 029 | Turing Machine | 220126T021444Z | Fmbalbue |
| 008 | Vyxal | 211227T160526Z | Alan Bag |
| 049 | JavaScript Node.js | 211223T005939Z | Alan Bag |
| 010 | convey | 211222T185446Z | whqwert |
| nan | Neither beats Johan du Toit's answer | 210811T034425Z | M Virts |
| 009 | Gaia | 210929T145746Z | ovs |
| 022 | BrainCrash | 210929T140930Z | user1004 |
| 011 | Pxem | 210801T021416Z | user1004 |
| 011 | Vim +startinsert | 210512T132033Z | Aaroneou |
| 047 | Java JDK | 210819T132712Z | 0xff |
| 042 | C# | 210805T213802Z | Taco |
| 009 | Z80Golf | 210819T115334Z | FZs |
| 025 | Haskell | 210819T020530Z | NoLonger |
| 039 | Minim | 210817T031720Z | Christia |
| 030 | BitCycle | 210814T013221Z | emanresu |
| 014 | Cascade | 210816T102728Z | emanresu |
| 028 | COMET II "CASLシミュレータ (CASL II 対応)" by Daytime | 210723T070523Z | user1004 |
| 025 | Forte Forter | 210807T163407Z | DLosc |
| 029 | Factor | 210807T221604Z | chunes |
| 030 | Batch 30 Bytes | 210805T224045Z | Taco |
| 031 | Bash pure bash | 210805T202018Z | svin83 |
| 009 | WedgeScript | 210805T200707Z | Luke_ |
| 027 | C gcc | 210804T131618Z | jdt |
| 087 | Perl 5 ppencodecpmpatible | 210801T024134Z | user1004 |
| 013 | FALSE | 210726T185309Z | Joseph W |
| 028 | Flipbit | 210724T042242Z | Aaroneou |
| 030 | GForth | 210726T065544Z | user1052 |
| 024 | Flipbit | 210724T172048Z | ovs |
| 031 | Lua | 210723T081552Z | J. А. de |
| 010 | ><> and Gol><> | 210723T042103Z | Bubbler |
| 005 | Hexagony | 210721T082544Z | Bubbler |
| 006 | Hexagony | 210512T170112Z | a stone |
| 047 | C# 9 | 201027T233159Z | John Bau |
| 031 | Kotlinscript | 210516T022439Z | Yamin Si |
| 006 | Canvas | 210516T030826Z | hakr14 |
| 012 | ><> | 210516T004007Z | Soup Gir |
| 033 | AWK | 210516T003215Z | Pedro Ma |
| 008 | Barrel | 210515T135947Z | LorenDB |
| nan | Turbo Assembler | 210512T170613Z | sech1p |
| 014 | Fueue | 210511T155643Z | user1011 |
| 011 | BRASCA | 210511T075544Z | SjoerdPe |
| 031 | MATLAB/Octave | 200924T213015Z | elementi |
| 040 | Batch | 200912T162731Z | Neil |
| 011 | Splinter | 210511T085733Z | emanresu |
| 009 | Vyxal 5 | 210511T085231Z | wasif |
| 024 | PHP | 200928T055941Z | NoOorZ24 |
| 147 | Poetic | 201028T152344Z | JosiahRy |
| 023 | SABDT | 201027T104121Z | QTpye |
| 027 | Golang | 201019T224151Z | jared_ma |
| 016 | Raku | 201020T175841Z | user0721 |
| 032 | Scala | 201020T113210Z | Tomer Sh |
| 006 | Stax | 200924T105959Z | Razetime |
| 025 | R | 200927T194025Z | Robert H |
| 010 | MAWP | 200928T084205Z | Dion |
| 007 | Labyrinth | 200924T235250Z | Bubbler |
| 012 | braingasm | 200927T223353Z | daniero |
| 014 | dc | 200927T220839Z | daniero |
| 007 | !@#$%^&*_+ | 200927T213651Z | Conor O& |
| 026 | StupidStackLanguage | 200912T143226Z | Lebster |
| 018 | Flobnar | 200926T051637Z | Esolangi |
| 005 | Keg | 200926T045305Z | lyxal |
| 023 | x8616 machine code MSDOS | 200926T031454Z | Febriyan |
| 1310 | x8616 machine code | 200912T142930Z | 640KB |
| 1431 | Marbelous | 200924T114803Z | jonatjan |
| 031 | Wolfram Language Mathematica | 200925T043018Z | att |
| 023 | Bash + coreutils | 200925T002531Z | DLosc |
| 532 | Powershell v5 32 Byte | 200924T112508Z | Add-TheN |
| 006 | 05AB1E | 200924T093740Z | Sam |
| 013 | Haskell | 200924T084157Z | flawr |
| 011 | Japt | 200912T134104Z | Mukundan |
| 007 | Husk | 200912T131918Z | ovs |
| 040 | brainfuck | 200912T142033Z | RezNesX |
| 026 | Labyrinth | 200912T145503Z | Jonathan |
| 007 | Jelly | 200912T131004Z | Jonathan |
| 044 | Python 3 | 200912T141312Z | aidan062 |
| 032 | Python 3 | 200912T134220Z | xnor |
| 008 | Befunge98 PyFunge | 200912T134007Z | ovs |
| 034 | Python 3 | 200912T132841Z | Jonathan |
| 008 | Pyth | 200912T132447Z | Mukundan |
Minus, 14 bytes
o180o145o148c3
No TIO link
How it works
o -= 180 # putchar(256-180), equivalent to putchar('L')
o -= 145 # similarly 'o'
o -= 148 # similarly 'l'
c -= 3 # program counter
punchcode, 26 24 bytes
L o l
uncompiled punchtape code:
-START |
-------O|
----OO--|
------O-|
-----O--|
-----O--|
--------|
---OOO-O|
---O-OOO|
-O--OO--|
---OO---|
--O-----|
---OOOO-|
---O-OOO|
-OO-OOOO|
---OO---|
--O-----|
---OOOOO|
---O-OOO|
-OO-OO--|
---OO---|
--O-----|
------O-|
-----O--|
----OO-O|
?Q?, 10 bytes
this is the code:
#[L]$[ol]*
explained
#[l]add initial l. will be skipped after first iteration[ol]set string to ol$*print and go back to start
Befalse (quirkster), 14 bytes
"loL".^^.4{1{;
Try it! (Usage: copy-paste into the code box, click Show above it, and use Step to run it step-by-step. Warning: Run will lock your browser.)
In order to avoid using two lines, this program commits a "return address forgery":
On : (Call) instruction, some data are pushed onto the return stack (like the one in Forth) so that ; (Ret) can return to the call position. In quirkster's interpreter, the position in the code box (rectangularized and flattened) and the IP direction (movement in 1D; right is 1 and down is code width) are pushed in the order. ; advances one step after returning before running the next instruction, so (4, 1) continues running at the first ..
"loL" Push l, o, L in order
. Print L
^^. Copy l and o; print o
4{1{; "Return" to the first .
. Print l
Repeat indefinitely
15 bytes
"L" !/.!
"lo"./
This exploits a bug in the interpreter, where the IP can "jump over" a newline to continue running at the start of the next line. This is because the code is stored as a newline-joined 1D string during execution. So you can get away with two mirrors to form a loop.
"L" Push L
!/ Jump over a mirror to enter the loop
. Print L
! "Jump over" the newline
"lo" Push l and o
. Print o
Infinite loop, printing l and o in order afterwards
18 bytes
"loL"\
/^.\!/
\^./
The best I can come up with that avoids everything interpreter-specific.
Acc!!, 42 bytes
Count i while 1 {
Write 108-32*0^i+i*3%6
}
Try it online! -2 thanks to DLosc.
0^i is 1 when i is 0 and 0 otherwise, so when i is 0 the expression evaluates to 108-32+0=76="L". Otherwise, it alternates between o (111) and l(108) thanks to the i*3%6 term.
Befalse, 23 21 bytes
-2 bytes from emanresu a
"L"!/."o"\
\"l"./
Explanation
"L" Push the ASCII code of L to the stack. We never come back to this portion of the code.
!/."o"\ Send the IP into the first of a 2-line loop by skipping over the slash, which would redirect the IP off the playfield and thus halt execution; this part of the loop prints the L from before and then pushes the ASCII code of o to the stack, and then redirects to the next line:
\"l"./ Repeat with the l; the IP is moving left at this point. Redirect to the line above:
/."o"\ Repeat with the o again; the IP moves right at this point. Redirect to line below. Repeat ad infinitum.
Try it online! Note that you will have to paste the code in.
Pip, 10 bytes
O'LW1O"ol"
Explanation
O'LW1O"ol"
O'L ; Output "L" without newline
W1 ; While 1 (infinite loop):
O"ol" ; Output "ol" without newline
🕳️, 19 bytes
❓*"L"*{❓*"ol"*}
The only interpreter prints a line feed after every ol, but the line feed after the output is not part of specification.
YASEPL, 11 bytes
#"L"#"ol"?2
Hussy.Net, 17 bytes
A("L");R(A,"ol");
Ais an append function that simply writes the specified input to the output stream.Ris a repeater function that repeats the specified action with the specified input until an optionally specified escape condition is met.
><x>, 58 bytes
Makes use of the fact that the accumulator is bound to the range [0, 255].
iiissdddddoddsiiiiiiii>iiiov
^oddd<
Explanation
Initializer
iii Increase the accumulator to 3
s Square it to get 9
s Square it again to get 81
ddddd Reduce the accumulator by 5 to get 76
o Print the ASCII value of the accumulator, "L"
dd Decrement the accumulator by 2
s Square it to get 74^2 & 255, which is 100
iiiiiiii Increase the accumulator by 8
The loop
> Force the IP to the right
iii Increment by 3
o Print the ASCII value of the accumulator, "o"
v Force the IP downward
< Force the IP to the left
ddd Decrement by 3
o Print the ASCII value of the accumulator, "l"
^ Force the IP upward
/// 9 bytes
L/./ol./.
Of course, you'll have to wait for the end of time to see the output, but wasn't this part of the challenge? (-;
Desmos Graphing Calculator, 28 bytes
t->t+1
t=0
(0,0)
([0...t],0)
The first line is a ticker, which automatically increases the number.
Try it on Desmos!
Decreasing the byte count can be done by using a custom interactive slider (but I didn't include it because it feels like cheating): Try here!
Commodore BASIC V2 (Commodore C64) 33 BASIC Bytes, 31 characters with BASIC keyword abbreviations
0?"{SHIFT+L}{CTRL+H}{CTRL+N}";:FORI=0TO1STEP0:?"OL";:NEXT
Quick explanation:
- Printing the control characters H stops from switching between CBM Graphics mode and Business case mode (with the latter being upper and lower case characters)
- Printing the control character N will switch to business case mode
- Setting up a
FOR/NEXTloop with a step of0is a continuous loop - Then printing the OL will be in lower case mode
Please see the screen shot for this in action.
JavaScript (Node.js), 60 50 49 48 bytes
-10 bytes thanks to user
-1 byte by replacing while(1) with for(;;)
-1 byte thanks to ovs
for((p=x=>process.stdout.write(...x))`L`;;)p`ol`
Taxi, 389 bytes
L is waiting at Writer's Depot.Go to Writer's Depot:w 1 l 2 r 1 l 2 l.Pickup a passenger going to Post Office.Go to Post Office:n 1 r 2 r 1 l.[L]o is waiting at Writer's Depot.l is waiting at Writer's Depot.Go to Writer's Depot:s 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 L.
First Taxi answer. Try learning Taxi, I promise that you won't regret it. This was one of the most fun challenges I've done so far.
Explained:
First of all, we go to Writer's Depot, where a string L is waiting. Then, we go back to Post Office to ship them off to STDOUT. Then, we go back to Writer's Depot to pick up string ol. With string ol, we go to Zoom Zoom to buy some fuel. We go to Post Office to print them, and then loop. Here's the problem though: we don't have enough money. We are earning less than the fuel cost. Solution? Pick up o and l as two separate passengers! That way, the both pay the fare of 0.07/mile so we can afford the 1.45/gallon fuel.
Each gallon carries them 18 miles. Based on the map, I estimate that the trip is 10 miles back and forth, and we carry them 7 miles. 10/18 = 0.55555 gallons. 0.55555 gallons costs around 0.8 dollars at Zoom Zoom. 7*0.07 is only 0.49 dollars, while 7*(0.07+0.07) for two passengers is 0.98, which leave 0.18 to spare. Profit.
Just for fun:
Say we're traveling at an average of 30 mph. Then, the trip is 20 minutes long back and forth. We can make three trips in an hour. 0.18*3 = 0.54. Townsburg Taxi Company, Inc had better be paying us! To maximize profit, we can carry three passengers at once: maybe o l and ol. This yields 2.01/hour. To maximize the maximized profit, we can carry them on longer routes. If we run all 360 miles on a full tank before dropping them off at the Post office, we can get fired and around 3.8 an hour if we plan carefully.
Byte-based instruction jumping, 8 bytes
↑L↑o↑l,L
How it works: When executed, the instructions stored in ↑ moves the instruction pointer to the right, prints the value stored there (L) and moves to the right again, making it point to the second ↑. the second ↑ does the same again, except o is printed instead of L, and the third ↑ prints l and makes the instruction pointer point to ,.
, also makes the instruction pointer move to the right (to the second L), but then it jumps back to the last byte with the same value as the current one (the first L), and moves right once more (to the second ↑). Now it ends up in an infinite loop where it moves forward, prints o, moves forward, prints l, moves forward, jumps to the first L, moves forward, prints o et cetera.
SAS, 42 bytes
SAS gives "the ultimate" answer in 42 bytes ;-)
The code:
data;put'L'@;do while(1);put'ol'@;end;run;
Human readable:
data;
put 'L' @;
do while(1);
put 'ol' @;
end;
run;
Flip, 10 bytes
Perfect challenge for showcasing Flip's execution model.
lang is not on ATO yet, so I'm using a makeshift one.
' L|qq'ol'
Explanation
'
L Push ord code of 'L' onto stack
| q'ol'
q Print that as a character
' l Push ord code 'l' onto stack
IP goes over right bound, so mirror it
'
o Push ord code 'o' onto stack
q Print 'o' as character
| Mirror the IP
q Print 'l' as character
Since there's no terminating condition, this continues forever
MathGolf, 8 bytes
ûLoÉ_q!↑
I'm fairly new to this language, so this can probably be golfed.
Explanation
ûLo # push the length two string "Lo"
É ↑ # while true, execute these three instructions:
_ # duplicate
q # print without newline
! # lowercase
Thue, 35 33 bytes
-2 thanks to SuperJedi224
L::=~L
()::=(ol)
ol::=~ol
::=
(L)
Here is a Thue interpreter that works for this challenge. Paste the code into the box, click Update, and then click Step repeatedly (note that clicking the Run button will lock up your web browser).
Try It Online has a Thue interpreter, but it adds a newline after each print and therefore doesn't match the output format of this challenge.
Explanation
The program consists of an initial string (L) and three rules for transforming it. The rules are applied non-deterministically: any time a rule can be applied to the current string, it may be applied. To achieve predictable behavior, we need to design the string and the rules such that only one of them can be applied at any given point.
Thus, when the string is in its initial state (L), the only rule that applies is the first one:
L::=~L
This means "delete L from the string and output L."
Now the string looks like (), and the second rule applies:
()::=(ol)
This means "replace () in the string with (ol)."
The string is now (ol), at which point the third rule applies:
ol::=~ol
This means "delete ol from the string and output ol." Now the string is () again, rule 2 applies again, and we continue ad infinitum.
Trilangle, 13 bytes
"Loo,l",..o"v
Try it on the online interpreter!
The L serves both as a literal character and to redirect the IP.
Unfolds to this:
"
L o
o , l
" , . .
o " v . .
Instructions are, in order:
"L: Push 'L' to the stacko: Print character"o: Push 'o' to the stacko: Print character,,: Pop twice (to keep memory bounded)"l: Push 'l' to the stack.: No-opvL: Redirect the IP, closing the loop.|would work as well asvhere.
Zsh + jot, 23 bytes
<<<L`jot -s '' -b ol 0`
Try it online!. This times out on TIO (and crashes my Terminal app) because jot is busy printing millions of copies of 'ol' to memory before <<< gets a chance to print it. According to the spec, that's an acceptable result (and it allows me to beat the bash solution!). However here's a finite example that doesn't time out:
<<<L`jot -s '' -b ol 999`
><>, 8 bytes
"loL"o<o
Port of ovs's Befunge-98 answer.
Explanation
- The IP starts in the top-left going right.
"loL"pushes the characters"l","o"and"L"to the stackooutputs the current character ("L")<makes the IP go leftooutputs the current character ("o")"Lol"pushes the characters"L","o"and"l"to the stackooutputs the current character ("l")- (at which point we're back to
<)
Old 12-byter:
"L"v
o"o>o"l
- The IP starts in the top-left going right.
"L"pushes the character"L"to the stackvmakes the IP go down>makes the IP go rightooutputs the current character"lo"pushes the characters"l"and"o"- (wraps around to the start of the line)
ooutputs the current character- (at which point we're back to
>)
Fortran (GFortran) --cpp, 57 bytes
#define p(s)call fput(s)
p('L')
1 p('o');p('l');goto1;end
I #define a macro p() to save typing call fput('x') for every letter. And good old goto is mostly harmless.
Binary-encoded Golifcal, 13 bytes
Hexdump of binary encoding:
00 70 01 00 4c 18 1b 00 6c 18 00 6f 1d
This binary version can be convered back to a runnable program image using the Encoder included in the github repository for the language, or run directly by adding the -x flag.
Original program image:

Magnified 70x with RGB colors labeled:

Thunno, \$ 8 \log_{256}(96) \approx \$ 6.58 bytes
'L[ZL"ol
Explanation
'L # Push the character "L"
[ # Forever:
ZL # Print top of stack with no trailing newline
"ol # Push "ol" for the next iteration
Underload, 18 15 bytes
(L)S((ol)S:^):^
Prints out L, then ololololololololol...
GolFunc, 13 bytes
No interpreter yet, but you can look at the specs.
..P'L.Y.P"ol"
Explanation:
.P'L # print L (returns identity, so no worries)
. # apply the result to...
.Y # the Y combinator applied to...
.P"ol" # the function which prints "ol"
Alice, 10 bytes
"olL"wo~.K
Explanation
"olL"wo~.K
"olL" Puts `olL` in the stack, `L` on the top
w K Never ending loop
o Print the first element of the stack
~ Swap the stack
. Duplicate the first element of the stack
A0A0, 51 49 bytes
P76
A0A0
A0C3G1G1A0
A0P111P108A0
A0A1G-3G-3A0
G-3
P76 prints a 'L' (ascii code 76), after which the code enters an infinite loop. In this loop, the following code is executed.
P111 P108
P111 ; prints 'o' (ascii code 111)
P108 ; prints 'l' (ascii code 108)
This prints "ol" infinitely, producing the rest of the infinite output.
Edit: It turns out that the loop does not have a required minimum of three instructions, which allows us to drop a no-op, saving two bytes.
Piet, 48 codels
Thanks @Bubbler for helping me golf my code from 66 to 48 codels by suggesting a 2 row layout instead of the 3 row layout that I initially used.
Answered as part of the current Piet LYAL event. Tell me if there are any golfs, I just started using Piet :P
Original code
You can test the code on npiet online by downloading either image (npiet will auto-detect the size of each codel) and uploading the image file onto there.
You can also test the same code using its Ascii Piet encoding.
Ascii Piet, 48 bytes
tttliamtqimqqijsqrfeeeuLtt ii qqqqi fabsU
Explanation
PUSH 5 [5]
DUP [5,5]
PUSH 3 [3,5,5]
MULTIPLY [15,5]
MULTIPLY [75]
DUP [75,75]
PUSH 1 [1,75,75]
ADD [76,75]
OUT(CHAR) [75] (prints L)
PUSH 6 [6,75]
DUP [6,6,75]
MULTIPLY [36,75]
ADD [111]
DUP [111,111]
OUT(CHAR) [111] (prints o)
(Start of two-row infinite loop)
DUP [111,111]
PUSH 3 [3,111,111]
SUBTRACT [108,111]
OUT(CHAR) [111] (prints l)
DUP [111,111]
OUT(CHAR) [111] (prints o)
DIVIDE [111] (stack only has one number, instruction ignored)
GREATER [111] (stack only has one number, instruction ignored)
Even though the last two instructions don't seem to do anything, they actually act to convert the code back to the right color without affecting the functionality of the code. Because Piet instructions are entirely based on changes between the colors' hue and lightness, we need the color before the Dark Magenta color block in the infinite loop (e.g.: the color right under it) to be Dark Yellow, or else the Dark Magenta would correctly act as DUP the first time around (when entering the loop from the right), but be a different instruction in subsequent iterations of the loop, messing up the entire code.
Clojure, 24 bytes
This is my first answer in Clojure; I only started learning it recently.
(pr 'L)(while 1(pr 'ol))
To be honest I'm not quite sure myself why (pr 'ol) works, but it does.
PHP (25 chars)
echo'L';for(;;print'ol');
Rust, 41 bytes
I know I'm a little late to the party, but I'd though I'd make a Rust contribution. Here's the code:
fn main(){print!("L");loop{print!("ol")}}
Try it online! Note that it will panic on TIO after the output exceeds 128 KiB. But it doesn't panic in my terminal!
Befunge-98 (PyFunge), 15 12 11 bytes
'Lv
'l>,'o,
Try it online!
-3 bytes thanks to @emanresuA
-1 byte thanks to @WheatWizard
Befunge-93 compatible version (1 byte more):
L"v
, <,"ol"
Arduino, 82 bytes
void setup(){Serial.begin(300);Serial.print("L");}void loop(){Serial.print("ol");}
Arduino nicely splits our program into a "run once" section and a "run forever" section already.
Pyramid Scheme, 200 bytes
^ ^
/ \ / \
/out\ /do \
-----^-----^
/ \ ^-
/chr\ / \
^-----/out\
/ \ ^-----^
/76 \ / \ ^-
-----/chr\ / \
^-----/chr\
/ \ ^-----
/111\ / \
-----/108\
-----
This seems to be the shortest way that I can find. This language isn't easy to golf in.
Etch, 23 bytes
do
:outnnl"lo";
forever
Lexurgy, 33 bytes
a propagate:
*=>ol/_ $
*=>L/$ _ o
Explanation:
a propagate: # while the input changed last iteration...
*=>ol/_ $ # append "lo" to the end of the input
*=>L/$ _ o # prepend "L" exactly once
Neither beats Johan du Toit's answer, but I enjoy that they are full programs, plus I like the way the longjmp answer works.
C (gcc), 39 bytes
As straight forward as it gets, uses for initializer to print L, then it's ols from there on out.
main(){for(printf("L");printf("ol"););}
C (gcc), 50 bytes
Definitely more fun, use an int array as jmp_buf, then add the return of setjmp to the string pointer so that the first iteration adds 0, then pass 1 to longjmp so the rest add 1 and skip the L.
Thanks to jdt for -4 bytes!
j[9];main(){printf("Lol"+setjmp(j));longjmp(j,1);}
Gaia, 9 bytes
:p⌋
Lo”↑∞
The first line is a helper function which prints a copy of its input and returns its input converted to lowercase.
Lo” pushes the string "Lo" to the stack, and ↑∞ calls the above function infinitely. Leading quotation marks can be omitted at the start of a line.
The same could be done in a single line with Lo”⟨:p⌋⟩∞.
Pxem, filename only: 11 bytes.
Uses reference implementation feature: doesn't break the loop of .w and .a when stack is empty.
L.o.wol.p.a
OR
L.z.p12ol.a
Vim +startinsert, 14 11 bytes
ol<C-v><C-r>"<C-o>ddL<C-r>"
In TIO, when the recursive register expansion (RRE) times out, nothing is outputted since it didn't finish expanding. In Vim, you may not see anything right away since the console might freeze during the RRE, but if you Ctrl+C, you can stop the expansion and see that it does work.
Explanation:
# '+startinsert' flag - start vim in insert mode; TIO equivalent is 'i' in the header
ol<C-v><C-r>" # Insert 'ol<C-r>"'
<C-o> # Run normal mode command, then return to insert mode:
dd # Delete 'ol<C-r>"' into unnamed register
L # Insert 'L'
<C-r>" # Insert unnamed register, which recursively expands to 'ol' + unnamed register
Java (JDK), 51 48 47 bytes
a->{for(var s="L";;s="ol")System.out.print(s);}
thanks to user and Jo King helping me save 4 and 1 byte(s) respectively!
C# (50, 45, 42 bytes)
for(var a="L";;)Console.Write(a+(a="ol"));
It works by setting a variable to L, printing that variable, then setting its value to ol; infinitely repeating steps 2 and 3.
Note: Thanks to @ceilingcat and @Browncat Programs for pointing out a shorter alternatives in the comments.
Z80Golf, 9 bytes
00000000: 3E 4C FF 3B 3B F6 20 EE
00000008: 03
Explanation
ld a, $4C ; Load the ASCII code of "L" into a
rst $38 ; Jump past the end of the program (print "L") and push the next address (loop) to the stack
loop:
dec sp ; \
dec sp ; _} Push the last value (the address of loop) back to the stack by moving the stack pointer by 2 downwards
or $20 ; Switch from uppercase to lowercase (idempotent). $4C ("L") -> $6C ("l"), $6C ("l") -> $6C ("l")
xor $03 ; Toggle A between $6C ("l") and $6F ("o")
; ... the program runs (executes NOPs) until PC = $8000 where it prints A, then returns to the address on the stack (which is always loop)
Haskell, 25 bytes
main=putStr$'L':cycle"ol"
To return an infinite string, only 13 bytes required:
'L':cycle"ol"
Minim, 41 39 Bytes
New solution prepends 3 to the string, saving 2 bytes:
[]=3&"loL".$<[[0]--].[0]=[0]?[0]:2.C=0.
With whitespace and comments:
[] = 3 & "loL". ; Inserts the value 3, and the string "Lol" backwards, into \
memory from index 0
$< [[0]--]. ; Prints the value at the index stored at index 0 as unicode, \
and decrements index 0
[0] = [0] ? [0] : 2. ; Sets index 0 back to 2 if it equals 0
C = 0. ; Sets the program counter to 0, which advances to 1 afterwards
Old solution used ASCII escape character 0x3 (ETX) in the string:
[]="\x03loL".$<[[0]--].[0]=[0]?[0]:2.C=0.
COMET II ("CASLシミュレータ (CASL II 対応)" by Daytime), 28 bytes.
The leftmost column shows an address, and one word is two bytes.
0000: 7001 0000 7002 0000
0004: 1210 0012 1220 0014
0008: F000 0002 7120 7110
000C: 1210 006C 1110 0012
0010: 6400 0000 004C 006F
0014: 0002
The simulator seems to output an LF automatically every time OUT is executed, and it requires you to set a break point to see how it works by step by step.
Original CASL II assembly program (63 bytes)
A START
OUT Z,=2
LAD GR1,108
ST GR1,Z
JUMP A
Z DC 'Lo'
END
Usage example
Run just for a few steps, as I have no ideas how to scroll back the console.

Forte (Forter), 25 bytes
5PRINT"ol";:LET5=1
1PUT76
Explanation
An undefined behavior exploit courtesy of Jo King:
1 PUT 76
Print an L character.
5 PRINT "ol"; : LET 5 = 1
Print ol without a final newline, and set 5 to 1.
Apparently, this overwrites the former line 1 with the former line 5, and thus (lacking an END statement) the PRINT "ol"; line is executed repeatedly forever. But I don't really understand how this works--especially since it only works if you write line 5 before line 1, not vice versa...
Here's a 44-byte version that doesn't use any undefined behavior:
1PUT76
5PRINT"ol";:LET6=6+0
6LET0=2:LET5=5+2
Explanation
1 PUT 76
Print an L character.
5 PRINT "ol"; : LET 6 = 6 + 0
Print ol without a final newline, and set 6 to 6.
6 LET 0 = 2 : LET 5 = 5 + 2
Set 0 to 2, and set 5 to 7.
57 PRINT "ol"; : LET 6 = 6 +02
Print ol again, and set 6 to 8.
68 LET02 = 2 : LET57 =57 + 2
Set 2 to 2, and set 7 to 9.
579 PRINT "ol"; : LET68 =68 +02
Print ol again, and set 8 to 10.
And so on forever.
Batch (30 Bytes)
@ECHO OFF
ECHO L
:a
ECHO ol
GOTO :a
If you're willing to ignore @ECHO OFF, then it's 25 bytes instead.
WedgeScript, 9 bytes
'Lo|"ol"o
Explanation:
'L Pushes the character literal L to the stack
o Output
| Loop the rest of the code infinitely
"ol" Push the string "ol" to the stack
o Output
Yes, Wedgescript is a custom language made by me, here is the repo with interpreter install instructions: github.com/WedgeScript/WedgeScript
Perl 5 (ppencode-cpmpatible), 87 bytes
print q pop xor print chr ord q else while length or print uc chr ord q else and s qq q
How it works
# NOTE: q x STR x eq ' STR '
# chr ord STR to obtain first character
print q pop xor
print chr ord q else
while
# default variable is initially empty string
length or
# print first L
print uc chr ord q else and
# make sure not to come here
s qq q
FALSE, 13 bytes
'L,[1]["ol"]#
Explanation
'L, // outputs "L" character
[1] // pushes lambda which evaluates to 1 onto the stack
["ol"] // pushes lambda which prints "ol" onto the stack
# // Executes lambda on top of stack while the lambda below it
// does not evaluate to zero
Note: This is my first post on this site, so let me know in the comments if I did something wrong.
Flipbit, 35 30 28 bytes
Thanks to Bubbler for -5 by shortening the loop
Thanks to ovs for -2 by being big smort
^>>>^>^>>.<<<<<^>>>[>^>^.<<]
Prints L, gets the tape set up for l, then makes use of the fact that o and l differ by only their two least significant bits to create a short loop to print both characters repeatedly.
GForth 30 bytes
: A ." L" 0 1 do ." ol" loop ;
Flipbit, 24 bytes
<<^>>>^>^>>.^<^<^<^<<,^]
or, using a bit less odd behavior:
^[>>>^>^>>.^<^<^<^<<,^<]
><> and Gol><>, 10 bytes
"volL
:>o$
How it works
"volL Push charcodes of v, o, l, L in that order (L is at the top)
"v End string mode
> and move to the second row
o Pop and print one char (initially L)
: o$ Infinite loop: Swap, dup, pop and print one char
Hexagony, 5 bytes
L;o>l
Hexagony golfing language confirmed
For some reason I was looking at my own answer that prints "six" in 6 bytes and randomly thought "what if I remove @?", and exactly got this answer. 4 bytes is impossible because Lol; is already 4 bytes and it is impossible to alternate two chars and print both in a single loop without redirection.
Since there is no "halt" command in this program, the program flow looks like this: (It is recommended to read the docs on how > redirects the PC)
A B
C > D
E F
[.....................................] <= looping region
A B C > C B A D > A D B F > F C E A > D E F C > C ...
L ; o o ; L l L l ; . . o . L l . . o o
^ ^ ^ ^ ^ ^
After the initial L;, o; and l; appear in the big loop in that order, therefore printing Lololol....
Hexagony, 11 6 bytes
-5 thanks to @Bubbler
L;o;l;
L ; Executed once: Set memory to 'L' (76) and print
o ; l Executed repeatedly: Set memory to 'o' (111), print, set memory to 'l' (108)
; . Executed repeatedly: Print
After the first row is executed once, the second and third rows are repeatedly executed, infinitely printing ol.
C# 9, 55 47 bytes
for(var x="L";;x="ol")System.Console.Write(x);
Thanks, @ceilingcat!
Previously on Code Golf
var x="L";while(true){System.Console.Write(x);x="ol";}
Microsoft's online compiler that doesn't like this infinite loop idea...
Kotlin(script), 23 32 31 bytes
print("L")while(0<1)print("ol")
In Kotlin you need a top level declaration(main function) in order to compile code but Kotlin compiler also allows compiling Kotlin scripts using kotlinc -script lol.kts so yes you can compile one liners without top level direction using a file. this cannot be verified using TIO the only online compiler that I found for Kotlin scripting or Kotlin REPL is this site.
In order to test this use command line in right side of the given site and and run the code in these steps:
First create a file:
echo "print(\"L\")while(0<1)print(\"ol\")" > lol.kts"
Then run it like this:
kotlinc -script lol.kts
Canvas, 6 bytes
LWol+]
Constructs an infinite length string.
Explanation:LWol+] | Full program (characters replaced for clean spacing)
-------+------------------------------------------------------
L | Push the string "L"
W ] | While ToS is truthy (without popping),
ol | Push the string "ol"
+ | Add the two strings (i.e. append "ol" to the string)
| Print ToS (implicit) (will not ever actually occur)
Non-empty strings are always truthy in Canvas.
><>, 12 bytes
"L"v
l"o<o"o
Explanation
"L"v // pushes the character 'L' onto the stack and moves to the second line
l"o<o"o // after outputting the L character, enters an infinite loop of pushing "lo" and outputting both
AWK, two answers of 33 bytes
BEGIN{for(;;)printf s=s?"ol":"L"}
and
BEGIN{for(printf"L";;)printf"ol"}
Try it online! (uncomment a line to try it)
First answer: a simple ternary condition upon the assignment of the variable s. On the first run, it is evaluated as false. As it is not assigned yet, it is parsed as a null string, which is false.
Second answer: just a for loop.
Barrel, 8 bytes
L#∞(ol
Implicitly prints L, then infinitely loops over implicitly printing ol. The parenthesis makes o and l into one statement, since a loop can only execute one statement. (In barrel, parentheses are self-closing.)
Turbo Assembler, 136 119 bytes
.model small
.code
start:
mov dl,'L'
mov ah,2
int 21h
i:
mov dl,'o'
mov ah,2
int 21h
mov dl,'l'
int 21h
jmp i
end start
Ungolfed version:
.model small
.code
start:
mov dl, 'L' ; move "L" character to DL register
mov ah, 02h ; print "L" character
int 21h ; interrupt
infinity_loop:
mov dl, 'o' ; move "o" character to DL register
mov ah, 02h ; print characters
int 21h ; interrupt
mov dl, 'l' ; move "l" character to DL register
int 21h ; interrupt
jmp infinity_loop ; go to "infinity_loop" label
end start
-17 bytes thanks to @Kamila Szewczyk
Lololololo[...] in action:
Fueue, 14 bytes
76):[111)108:]
Explanation
76 is the character code for L, 111 is the code for o, and 108 is the character code for l. This code first prints an L and then goes into an infinite loop that keeps printing out ol.
76):[111)108:]
76 Print 'L'.
):[ ] Turn the stuff in the brackets into 111)108:[111)108:]
111 108 Print 'ol'.
) : Loop infinitely.
BRASCA, 14 12 11 bytes
-1 bytes from RezNesX
`loL`o[:mo]
Explanation
`loL` - Push 'Lol' to the stack
o - Output the 'L'
[:mo] - Output the next character of ['o', 'l']
MATLAB/Octave, 38 35 33 31 bytes
-2 bytes thanks to flawr -2 bytes thanks to tsh
"L";while fprintf(ans);"ol";end
Try it online!
In MATLAB the output in GUI command window is truncated, but the code itself executes forever. Maybe if you run script from actual command prompt it will actually display new ols infinitely. Dunno, didn't try. Online Octave implementations I tried (tio.run & octave-online.net) obiously kill the execution of script at some point.
Also, if you decide to run this in MATLAB, use Ctrl+C to stop, because clicking Pause won't do anything.
Batch, 42 40 bytes
@set/p=L<nul
:g
@set/p=ol<nul
@goto g
set/p outputs the string after the = as the prompt, and then expects to read from the console, which ends the line when you hit enter. But we redirect the input, so no enter happens, and we simply end up with a infinite series of "prompts" all on one line. Edit: Saved 2 bytes thanks to @T3RROR.
PHP, 24 bytes
L<?php for(;;)echo'ol';
Poetic, 147 bytes
haha l-o-l funny!i saw a thingy,it was soo funny
o?what
i am crying
o?what
i am dying,literal CHOKING
dying r-n?goddamn
just see
ohhhhhh heh,lol ig
In the form of a text conversation between two people collectively laughing at something they found online.
SABDT, 23 bytes
pr"L";wh(0=0){pr"ol";}
Exspanded:
pr "L";
wh(0 = 0){
pr "ol";
}
the 1st line prints "L".
the 2nd line is a while loop. 0 is a variable reference, since it has not been declared yet it starts as "", an empty string. essentially it is a while true loop.
the 3rd line prints "ol".
Golang, 53 27 bytes
print("L");for{print("ol")}
EDIT: Apparently package main and func main() don't necessarily count towards the byte count for Go e.g. https://codegolf.stackexchange.com/a/107159/95793.
Previous version:
package main
func main(){print("L");for{print("ol")}}
Raku, 14 chars, 16 bytes
Per standard rules, an infinite generator is acceptable.
{|<L ol>,~*…*}
Since this can be directly assigned or passed into other functions, the brackets aren't per se necessary but not sure if I can do that (if so, -2 chars/bytes). Enforcing the standard out bit is as simple as add a >>.print adds an extra 8 chars (22 chars, 24 bytes total).
(|<L ol>,~*…*)>>.print
Stax, 7 6 bytes
║►yü[c
Explanation
.Lo{cpvW
.Lo push two letter string "Lo"
{ W loop forever
c duplicate → ["Lo", "Lo"]
p print and pop → ["Lo"]
v lowercase → ["lo"]
begin next iteration
R, 26 25 bytes
cat('L');repeat cat('ol')
Well, this one is pretty straightforward.
−1 byte thanks to Steffan
Labyrinth, 7 bytes
762
8.3
Adds 623 % 256 == 111 to the previous answers below.
76 Push 76 and turn right (three-way junction)
. Pop and print % 256 as char (L)
Now the top is 0, so it should go straight, but instead it reflects to North
623 Turn right at 6 and push 623, going around the corners
. Pop and print % 256 as char (o); go straight (three-way junction)
876 Push 876
Loop forever, printing "lo"
10 bytes
76
8.1
11
Same idea, but using 876 % 256 == 108. Turns out that going from an uppercase to lowercase is just a matter of prepending a 8 because 800 % 256 == 32. At the center junction, the top is always 0 right after pop and print, so the IP goes straight (first from north to south, and second from east to west). All the numbers are corners which turn the IP 90 degrees, so the overall path is infinity-shaped 76.111.876.111. .... This form is one byte shorter than the naive square loop:
11 bytes
76.
8 1
.11
14 bytes
7
.63
1 1
11.
How it works
First, the flow: the execution starts at the first valid command, which is 7 on top. The only junction is 6, and since it causes the top of stack to be positive, the IP always turns right. It turns 180 degrees if it hits a dead end. So the sequence of commands executed in order is:
76.111.13676.111.13676.111. ...(runs indefinitely)
The stack has implicit zeros, and each of 0-9 adds that digit to the end of the top of the stack (in other words, n changes the top number x to 10x + n). So the program is supposed to print the characters with charcode 76, 111, 13676, 111, 13676, ...
But 13676 is not l! Actually, Labyrinth's character output is done modulo 256.
How did I find such a number? With the path designed like this
7
.6?
1 ?
11.
The problem is to find a number ??676 that is same as l (108) modulo 256. Note that, the equation ??xxx == yyy modulo 256 (x and y are givens and ?s are unknown) is solvable if xxx == yyy modulo 8, and if so, it always has a solution within two or fewer digits, in particular 0 <= ?? < 32. Since 676 % 8 == 108 % 8 == 4, this is solvable, and the solution here is 13.
!@#$%^&*()_+, 7 bytes
L(@o@l)
L(@o@l)
L Pushes character literal 'L'
( ) Loop while top of stack:
@ Output top of stack as character ('L' first iteration, 'l' otherwise)
o@ Output 'o'
l Push 'l', repeating the loop
Flobnar, 18 bytes
og,!<
\l@>\<
2:L!_
Try it online! (requires the -i flag)
Explanation
Flobnar is a 2D language where expressions are laid out geometrically. For example, for a program that computes the number 10, you might write:
5
+ @
5
Here, @ indicates the entry point for the program, and has the effect of evaluating the term to its west; + evaluates the terms to the north and south and returns their sum; etc.
The basic idea for this program is to embed the characters 'o', 'l', and 'L' in the source code at coordinates (0, 0), (1, 1), and (2, 2) respectively. Execution proceeds roughly like this:
def step(n):
step(!n if (!putchar(get(n, n))) else "impossible since putchar() returns 0")
step(2)
Here's what the program looks like ungolfed:
o >>>>v
l ^ \ < \ @
L v 2
:!_
:
g , !<
:
See the specification for more detailed information about what each term does.
Keg, 5 bytes
L,{ǪȽ
Finally! A reasonable use for the push'n'print commands!
Explained
- Print the letter "L" (
L,) - While true: (
{) - ---- Print the letter "o" (
Ǫ) - ---- Print the letter "l" (
Ƚ)
x86-16 machine code MS-DOS - 23 bytes
This answer inspired by 640KB answer.
000000: B4 02 B7 4C 8A D7 CD 21 B2 6F CD 21 8A D7 80 F2 ...L...!.o.!.... 000010: 20 CD 21 EB F3 CD 20 .!...
Listing:
6 0100 B4 02 MOV AH, 02H
7 0102 B7 4C MOV BH, 'L'
8 0104 8A D7 MOV DL, BH
9 0106 CD 21 INT 21H
10
11 0108 PRINT:
12 0108 B2 6F MOV DL, 'o'
13 010A CD 21 INT 21H
14 010C 8A D7 MOV DL, BH
15 010E 80 F2 20 XOR DL, 20H
16 0111 CD 21 INT 21H
17 0113 EB F3 JMP PRINT
18
19 0115 CD 20 INT 20H
Output:
x86-16 machine code, IBM PC DOS, 13 10 bytes
00000000: b04c cd29 0c20 3403 ebf8 .L.). 4...
Listing:
B0 4C MOV AL, 'L' ; start off with capital L
PRINT:
CD 29 INT 29H ; write to console
0C 20 OR AL, 20H ; lowercase it
34 03 XOR AL, 3 ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8 JMP PRINT ; loop forever
A standalone PC DOS executable COM program. Output to console.
-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.
Runtime:
Forever and ever...
Marbelous, 14 31 bytes
6C
6F@0
@0/\4C
Marbelous is a language based on marble machines
@n(nfrom0toZ) is a portal which teleport the marble to another portal with the same value00-FFinitiate a marble with this value/\create a duplicate passing marble to it's left and right..is a noop- marbles going out of the machine from the bottom are implicitly outputed
-17 bytes thanks to DLosc
Wolfram Language (Mathematica), 31 bytes
#0[ol,$Output~WriteString~#]&@L
Stops when the program hits the $IterationLimit, which defaults to 4096.
34 bytes does the job without worrying about that:
Do[$Output~WriteString~L;L=ol,∞]
Bash + coreutils, 23 bytes
(echo L&yes)|tr "
y" ol
Explanation
We can generate infinite output using yes: without arguments, it outputs an infinite stream of y separated by newlines. echo L & yes outputs an L first, so our output stream looks like
L
y
y
y
y
To turn this into the output we want, we just need to change newline to o and y to l. tr "\ny" ol does this transliteration, and we can save a further byte by using an actual newline in place of \n.
Powershell v5 32 Byte
while(1-ne2){Write-Host -n 'lo'}
Has someone an idea how to shorten Write-Host? Is there an alias?
New One 52 Byte
for(1){Write-Host -n 'L'
for(1){Write-Host -n 'ol'}}
05AB1E, 8 6 bytes
ovs' far superior 6-byter:
„Lo[?l
Explanation:
„Lo Push 2-char string onto stack ('lo')
[ Begin infinite loop
? Output with no newline
l Push lowercase of top of stack ('Lo' -> 'lo')
(Implicitly close infinite loop)
05AB1E, 8 bytes
My pitiful 8-byter:
'L?„ol[?
It might still be golfable, perhaps if there's a way to compress 'Lol' even further.
Explanation:
'L Push 'L' onto stack
? Print without newline ('L')
„ol Push 2-char string onto stack ('ol')
[ Loop Forever
? Print without newline ('ol')
(Implicitly close infinite loop)
Japt, 14 11 bytes
-3 bytes thanks to @Shaggy
OoUª'L
ß"ol
Explanation
OoUª'L // Output input if it exists else 'L'
ß"ol // Run program with input being "ol"
Husk, 7 bytes
:'L¢"ol
Commented:
: -- prepend
'L -- the character L
¢ -- to the infinitely repeated
"ol" -- string "ol" (closing quote not required)
Equivalent to this Haskell function:
(:) 'L' (cycle "ol")
Labyrinth, 29 26 bytes
7 :::.:+
6 1 # #
.11 -:.
How?
Labyrinth starts with the instruction pointer at the top left and executes the character underneath, performing actions on the top of the main stack (and an auxiliary stack, not used here). After executing an instruction the instruction pointer then moves in a direction which is dependent on how many neighbouring instructions there are (spaces are not instructions) and the value of the top of the main stack. As such this code does the following:
7 - pop (implicit 0), multiply by 10 and add seven main stack: [7]
6 - pop (y), multiply by 10 and add six [76]
. - pop (76), print that byte ('L') []
1 - pop (implicit 0), multiply by 10 and add one [1]
1 - pop (1), multiply by 10 and add one [11]
1 - pop (11), multiply by 10 and add one [111]
: - duplicate the top of the main stack [111,111]
: - duplicate the top of the main stack [111,111,111]
: - duplicate the top of the main stack [111,111,111,111]
. - pop (111), print that byte ('o') [111,111,111]
three neighbours (::#), positive top of main -> turn
# - push depth of main stack [3,111,111,111]
- - pop (b=3), pop (a=111), subtract (a-b=108), push [108,111,111]
: - duplicate the top of the main stack [108,108,111,111]
. - pop (108), print that byte ('l') [108,111,111]
# - push depth of main stack [3,108,111,111]
+ - pop (b=3), pop (a=108), add (a+b=111), push [111,111,111]
: - duplicate the top of the main stack [111,111,111,111]
. - pop (111), print that byte ('o') [111,111,111]
three neighbours (::#), positive top of main -> turn
# - ...now we will continue to print 'l' then 'o' ad-infinitum
Jelly, 7 bytes
”L⁾olȮ¿
A full program which prints an L then repeatedly prints ol.
How?
”L⁾olȮ¿ - Main Link: no arguments
”L - set the left argument to 'L'
¿ - while...
Ȯ - ...condition: print & yield the left argument
⁾ol - ...do: set the left argument to "ol"
Python 3, 44 bytes
print('L',end='')
while 1:print('ol',end='')
How it works: The program first prints 'L' and then infinitely prints 'ol' on a single line using the end=''.
Python 3, 32 bytes
x='L'
while[print(end=x)]:x='ol'
In Python 3, the print function by default has end='\n' to put a newline after what you print. Rather than changing that to the empty string, we stick the value x that we want to be printed there, and don't provide any value to be printed.
We stick the printing in the while loop condition. Since print returns None by default but this is Falsey and won't continue the loop, we wrap it in a singleton list to make it Truthy.
I had tried to stick an infinite iterator into print like print(*iter(...),sep=''), but it looks like Python will consume the whole iterable first and never actually print.
Befunge-98 (PyFunge), 8 bytes
"loL",<,
How?
Lo:
Initially the IP is going east.
"loL" pushes l, o and L to the stack.
, prints L, < turns the IP west and , prints o.
lo forever:
The IP is now moving west.
"loL" pushes L, o and l to the stack.
The IP wraps around and ,<, prints l and o.
L is left on the stack, but since we usually assume infinite resources, this is fine.
Python 3, 37 34 bytes
-3 thanks to xnor - noting that print may have no unnamed argument!
x='L'
while x:x=print(end=x)or'ol'





![Lololololo[...]](https://i.sstatic.net/0nU4g.png)

