g | x | w | all
Bytes Lang Time Link
014Minus250908T072033Z鳴神裁四点一号
024punchcode240927T170217Zmadeforl
041Rust240813T001456Zuser9403
010?Q?240807T151257ZGilbert
014Befalse quirkster240520T051650ZBubbler
024Raku Perl 6 rakudo240804T205604Zbb94
042Acc!!240509T090248Zemanresu
021Befalse240518T051359ZAdelie
010Pip240517T153055ZDLosc
019🕳️240517T131838ZNone1
012><> Fish230602T201929Zchunes
034ELVM IR240509T132745ZNone1
042Acc!!240415T112036ZMukundan
012Uiua231129T143105ZRomanPro
011YASEPL240212T184821Zmadeforl
025Perl 5240212T174921ZXcali
017Hussy.Net240211T224441ZTaco
058>231129T213409ZBee H.
007Vyxal 3231129T140001Zpacman25
009///231120T192102ZPhilippo
041JavaScript Node.js231120T080643Zl4m2
028Desmos Graphing Calculator231120T140730ZInfigon
031Commodore BASIC V2 Commodore C64 33 BASIC Bytes230521T191146ZShaun Be
048JavaScript Node.js210727T212028Zuser9403
020Basic230804T080222Zsteenber
389Taxi230804T034413Zjoyofori
008Bytebased instruction jumping230603T111212ZPeter
042SAS230521T200741ZBartosz
014makina230520T201735ZButter F
045Python230520T162649ZThe Empt
010Flip230520T140805Zuser1180
008MathGolf230329T192212Zemirps
033Thue220317T231920ZDLosc
013Trilangle230326T230442ZBbrk24
023Zsh + jot230326T212047Zroblogic
510Nibbles230326T211058ZDominic
019Lean Mean Bean Machine230326T192556Zjoyofori
008><>230326T152245ZThe Thon
057Fortran GFortran cpp230326T175802Zroblogic
013Binaryencoded Golifcal230326T162655ZSuperJed
014Knight220807T021538ZAiden Ch
nan230326T143713ZThe Thon
015Underload220315T115655ZJoao-3
010Alice220807T072909ZJulian
041Rust220625T020445Zcode
049A0A0210807T154429Zstefvans
048Piet220331T015014ZAiden Ch
024Clojure220331T040509ZBbrk24
025PHP220331T021343Zuser1117
041Rust220326T204020ZSylveste
011Befunge98 PyFunge220317T184856ZBowlingP
082Arduino220317T223535ZBbrk24
200Pyramid Scheme220317T074531Zemanresu
023Etch220307T202141ZGinger
008Pyth220307T155742Zsinvec
014APL Dyalog Unicode220126T055816ZJayant C
033Lexurgy220126T053912Zbigyihsu
022Pari/GP220126T035719Zalephalp
029Turing Machine220126T021444ZFmbalbue
008Vyxal211227T160526ZAlan Bag
049JavaScript Node.js211223T005939ZAlan Bag
010convey211222T185446Zwhqwert
nanNeither beats Johan du Toit's answer210811T034425ZM Virts
009Gaia210929T145746Zovs
022BrainCrash210929T140930Zuser1004
011Pxem210801T021416Zuser1004
011Vim +startinsert210512T132033ZAaroneou
047Java JDK210819T132712Z0xff
042C#210805T213802ZTaco
009Z80Golf210819T115334ZFZs
025Haskell210819T020530ZNoLonger
039Minim210817T031720ZChristia
030BitCycle210814T013221Zemanresu
014Cascade210816T102728Zemanresu
028COMET II "CASLシミュレータ (CASL II 対応)" by Daytime210723T070523Zuser1004
025Forte Forter210807T163407ZDLosc
029Factor210807T221604Zchunes
030Batch 30 Bytes210805T224045ZTaco
031Bash pure bash210805T202018Zsvin83
009WedgeScript210805T200707ZLuke_
027C gcc210804T131618Zjdt
087Perl 5 ppencodecpmpatible210801T024134Zuser1004
013FALSE210726T185309ZJoseph W
028Flipbit210724T042242ZAaroneou
030GForth210726T065544Zuser1052
024Flipbit210724T172048Zovs
031Lua210723T081552ZJ. А. de
010><> and Gol><>210723T042103ZBubbler
005Hexagony210721T082544ZBubbler
006Hexagony210512T170112Za stone
047C# 9201027T233159ZJohn Bau
031Kotlinscript210516T022439ZYamin Si
006Canvas210516T030826Zhakr14
012><>210516T004007ZSoup Gir
033AWK210516T003215ZPedro Ma
008Barrel210515T135947ZLorenDB
nanTurbo Assembler210512T170613Zsech1p
014Fueue210511T155643Zuser1011
011BRASCA210511T075544ZSjoerdPe
031MATLAB/Octave200924T213015Zelementi
040Batch200912T162731ZNeil
011Splinter210511T085733Zemanresu
009Vyxal 5210511T085231Zwasif
024PHP200928T055941ZNoOorZ24
147Poetic201028T152344ZJosiahRy
023SABDT201027T104121ZQTpye
027Golang201019T224151Zjared_ma
016Raku201020T175841Zuser0721
032Scala201020T113210ZTomer Sh
006Stax200924T105959ZRazetime
025R200927T194025ZRobert H
010MAWP200928T084205ZDion
007Labyrinth200924T235250ZBubbler
012braingasm200927T223353Zdaniero
014dc200927T220839Zdaniero
007!@#$%^&*_+200927T213651ZConor O&
026StupidStackLanguage200912T143226ZLebster
018Flobnar200926T051637ZEsolangi
005Keg200926T045305Zlyxal
023x8616 machine code MSDOS200926T031454ZFebriyan
1310x8616 machine code200912T142930Z640KB
1431Marbelous200924T114803Zjonatjan
031Wolfram Language Mathematica200925T043018Zatt
023Bash + coreutils200925T002531ZDLosc
532Powershell v5 32 Byte200924T112508ZAdd-TheN
00605AB1E200924T093740ZSam
013Haskell200924T084157Zflawr
011Japt200912T134104ZMukundan
007Husk200912T131918Zovs
040brainfuck200912T142033ZRezNesX
026Labyrinth200912T145503ZJonathan
007Jelly200912T131004ZJonathan
044Python 3200912T141312Zaidan062
032Python 3200912T134220Zxnor
008Befunge98 PyFunge200912T134007Zovs
034Python 3200912T132841ZJonathan
008Pyth200912T132447ZMukundan

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|

Rust, 42 41 bytes

fn main(){print!("L");loop{print!("ol")}}

Attempt This Online!

?Q?, 10 bytes

this is the code:

#[L]$[ol]*

explained

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.

Raku (Perl 6) (rakudo), 24 bytes

("L",|("ol"xx*))>>.print

Attempt This Online!

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"

Attempt This Online!

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.

><> (Fish), 13 12 bytes

'L'o'lo'o20.

Try it

-1 thanks to Bubbler

ELVM IR, 34 bytes

putc 76
a:
putc 111
putc 108
jmp a

Try it online!

Acc!!, 48 42 bytes

Count i while 1 {
Write 108-0^i*32+i%2*3
}

Try it online!

Uiua 0.3.1 0.11.0, 16 12 bytes

Original solution:

⍢(&pf"ol")1&pf@L

New solution by Tbw:

⍢"ol"‿&pf1@L

YASEPL, 11 bytes

#"L"#"ol"?2

Perl 5, 25 bytes

print"L";print'ol'while 1

Try it online!

Hussy.Net, 17 bytes

A("L");R(A,"ol");

><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

Vyxal 3, 7 bytes

'L{§ᶴol

Try it Online!

Lolololololol

/// 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? (-;

JavaScript (Node.js), 41 bytes

for(x='L';process.stdout.write(x);)x='ol'

Try it online!

-2 from Dom Hastings

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:

Please see the screen shot for this in action.

Commodore C64 Lololol challenge

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`

Try it online!

Basic, 20 bytes

?"L";:DO:?"ol";:LOOP

Try it online!

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.

Try it online!

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;

makina, 14 bytes

v<<
>P^
 >tlo;

I AM BUTTER FEED ME BOT

Python, 45 Bytes

print('Lo',end='')
while 1:print('lo',end='')

Try it online!
Seems ungolfable.

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'

Try it online!

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!↑

Try it online!

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:

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`

Nibbles, 5 bytes (10 nibbles)

"L"^~"ol"

Attempt This Online!

Lean Mean Bean Machine, 19 bytes

OOO
"""
Lol
U!!
 ~~

Try it online!

Lol

><>, 8 bytes

"loL"o<o

Try it online!

Port of ovs's Befunge-98 answer.

Explanation

Old 12-byter:

"L"v
o"o>o"l

Fortran (GFortran) --cpp, 57 bytes

#define p(s)call fput(s)
p('L')
1 p('o');p('l');goto1;end

Try it online!.

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:

enter image description here

Magnified 70x with RGB colors labeled: enter image description here

Knight, 14 bytes

;O'L\'W1O'ol\'

Try It Online!

My first Knight answer :D

Thunno, \$ 8 \log_{256}(96) \approx \$ 6.58 bytes

'L[ZL"ol

Attempt This Online!

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:^):^

Try it online!

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

Try it online!

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

Rust, 41 bytes

fn main(){print!("L");loop{print!("ol")}}

Try it online!

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

Enlarged version

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

Try it online!

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"

Try it online!

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\
       -----

Try it online!

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

Pyth, 8 bytes

p\LWp"ol

Try it online!

APL (Dyalog Unicode), 14 bytes

{∇⍞←'ol'}⍞←'L'

Try it online!

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

Pari/GP, 22 bytes

until(!L=ol,print1(L))

Try it online!


Pari/GP, 22 bytes

while(!print1(L),L=ol)

Try it online!

Turing Machine, 29 bytes

0 _ L r 1
1 _ o r 2
2 _ l r 1

Try it online!

Vyxal, 8 bytes

\L₴{‛ol₴

Try it Online!

Will add an explanation soon.

JavaScript (Node.js), 49 bytes

for(i=0;++i;){process.stdout.write(i<2?"L":"ol")}

Try it online!

convey, 10 bytes

['L'}'lo'}

Try it online!

Visualization (separated)

Visualization (separated)

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"););}

Try it online!

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);}

Try it online!

Gaia, 9 bytes

:p⌋
Lo”↑∞

Try it online!

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⌋⟩∞.

BrainCrash, 43 22 bytes.

^^+++++++++++.>>[.<.>]

I'll golf off later.

Try it online!

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

Try it online!

Vim +startinsert, 14 11 bytes

ol<C-v><C-r>"<C-o>ddL<C-r>"

Try it online!

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);}

Try it online!

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

Try it online!

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.

GitHub Repository

BitCycle, 30 bytes

v001000<   ~010!

~1011000110^

Try it online!

Outputs as a stream of bits.

Cascade, 22 14 bytes

@o|
.l@
L"^
/"

Try it online!

-8 thanks to Jo King.

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.

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

Try it online!

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

Try it online!

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.

5 7 PRINT "ol"; : LET 6 = 6 + 0 2

Print ol again, and set 6 to 8.

6 8 LET 0 2 = 2 : LET 5 7 = 5 7 + 2

Set 2 to 2, and set 7 to 9.

5 7 9 PRINT "ol"; : LET 6 8 = 6 8 + 0 2

Print ol again, and set 8 to 10.

And so on forever.

Factor, 29 bytes

"L"write [ "ol"write t ] loop

Try it online!

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.

Bash (pure bash), 43 34 31 bytes

printf L;for((;;)){ printf ol;}

Thanks manatwork

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

C (gcc), 27 bytes

f(i){f(!printf("Lol"+!i));}

Try it online!

enter image description here

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

Try it online!

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"]#

Try it online!

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

^>>>^>^>>.<<<<<^>>>[>^>^.<<]

Try it online!

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

<<^>>>^>^>>.^<^<^<^<<,^]

Try it online!

or, using a bit less odd behavior:

^[>>>^>^>>.^<^<^<^<<,^<]

Try it online!

Lua, 31 bytes

u=io.write u"L"::x::u"ol"goto x

Try it online!

><> and Gol><>, 10 bytes

"volL
:>o$

Try it online! (><>)

Try it online! (Gol><>)

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

Try it online!

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;

Try it online!

  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";}

Using top-level statements.

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

Try it online!

Canvas, 6 bytes

LWol+]

Try it here!

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:

Lololololo[...]

Fueue, 14 bytes

76):[111)108:]

Try it online!

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]

Try it online!

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.

Splinter, 11 bytes

A{\o\lA}\LA

Try it online!

Interpreter breaking version. Would run forever otherwise.

Vyxal 5, 9 bytes

\L₴{`ol`₴

Try it Online!

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

Try it online!

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")}

Try it online!

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>,~*…*}

Try it online!

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

Try it online!

Scala, 35 34 32 bytes

print("L")
while(1>0)print("ol")

Try it online!

Stax, 7 6 bytes

║►yü[c

Run and debug it

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')

Try it online!

Well, this one is pretty straightforward.

−1 byte thanks to Steffan

MAWP, 10 bytes

76;["ol":]

Try it!

Labyrinth, 7 bytes

762
8.3

Try it online!

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

Try it online!

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

Try it online!


14 bytes

 7
.63
1 1
11.

Try it online!

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.

braingasm, 12 bytes

76.28524+[.]

Prints the byte streams 76 once, then 28524 forever

dc, 14 bytes

76P[[ol]Pdx]dx

Try it online!

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

L(@o@l)

Try it online!

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

StupidStackLanguage, 26 bytes

avqvvmifavvqimiqdddltflflu

Try it online!

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,{ǪȽ

Try it online!

Finally! A reasonable use for the push'n'print commands!

Explained

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:

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

Try it online!

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:

enter image description here

Forever and ever...

Marbelous, 14 31 bytes

6C
6F@0
@0/\4C

Marbelous is a language based on marble machines

interpretor

-17 bytes thanks to DLosc

Wolfram Language (Mathematica), 31 bytes

#0[ol,$Output~WriteString~#]&@L

Try it online!

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,∞]

Try it online!

Bash + coreutils, 23 bytes

(echo L&yes)|tr "
y" ol

Try it online!

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

Try it online!

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[?

Try it online!

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)

Haskell, 13 bytes

'L':cycle"ol"

Try it online!

Japt, 14 11 bytes

-3 bytes thanks to @Shaggy

OoUª'L
ß"ol

Try it online!

Explanation

OoUª'L    // Output input if it exists else 'L'
ß"ol      // Run program with input being "ol"

Husk, 7 bytes

:'L¢"ol

Try it online!

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")

Try it online!

brainfuck, 41 40 bytes

-1 byte thanks @ovs

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

Try it online!

Labyrinth,  29  26 bytes

7 :::.:+
6 1  # #
.11  -:.

Try it online!

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.

Try it online!

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=''.

Try it online!

Python 3, 32 bytes

x='L'
while[print(end=x)]:x='ol'

Try it online!

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",<,

Try it online!

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'

Try it online!

Pyth, 8 bytes

p\L#p"ol

Try it online!

Explanation

p\L#p"ol
p\L        : print "L"
   #       : while True:
    p"ol   :     print "ol"