g | x | w | all
Bytes Lang Time Link
032GolfScript241227T013928ZErikDaPa
025Regenerate221101T161328ZDLosc
043QBasic210204T033832ZDLosc
038C64 Assembler250817T092531ZOSI8
014Vyxal 3250816T164259ZThemooni
060C64 Basic250816T091351ZOSI8
463Bespoke250814T090102ZJosiah W
403JavaScript Node.js241226T071642Zl4m2
2251250309T124852ZGaner
020Kakoune241125T174512ZJoshM
036AWK241126T143807Zxrs
107Linux binary241226T181802Zнабиячлэ
049YASEPL241127T223741Zmadeforl
013Jelly210131T054846ZUnrelate
023Uiua240421T163448Znoodle p
010Vyxal S210131T020456Zlyxal
2183Buffalo210131T154055ZDingus
014Vyxal 3 S241122T153649Zpacman25
070C#241121T182540ZEzlandin
023Joeasus241121T153016ZUnrelate
046JavaScript Node.js240808T072241ZAndrew B
016Japt S240808T112732ZShaggy
033sed221101T203722ZJiří
179brainfuck210210T012515ZDingus
008Scratch221103T041450Zjoyofori
084Pascal221102T050328ZKai Burg
030Knight v2221103T070634ZSampersa
060C gcc221102T121517Zjdt
018MathGolf221102T095313ZKevin Cr
038Julia 1.0221101T205418Zamelies
nanawk221101T151708ZRARE Kpo
048R210430T011703Zqwr
049Excel210429T184545ZAxuary
01305AB1E210131T035549ZMakonede
050JavaScript V8210202T060330ZThatCool
030BRASCA210323T092703ZSjoerdPe
068VBScript210323T090613Zwasif
055BBC BASIC210224T141259Zbaffinsq
463Deadfish~210224T084254Zemanresu
069Whispers v2210223T215355ZMichael
084StupidStackLanguage210213T210240ZLebster
052AWK210212T213214ZPedro Ma
062C gcc210210T191321ZAntonin
042Rattle210209T032045Zd01
063Kotlin210210T171302Zgrian
nanx8616 machine code210202T190918Z640KB
057Javascript210205T114658Zkanine
031ThumbGolf210207T023140ZEasyasPi
226brainfuck210205T130240ZRezNesX
030Raku210203T025722Zbb94
033Julia REPL210202T085833Zspacetyp
039Ruby210202T175104ZTravis
051JavaScript ES6210204T131901ZIrratix
022Pyth210202T105332ZIan H.
049Java JDK210201T091254ZOlivier
034TeX210204T042144ZLok
035jq210204T035527Zmanatwor
079Whispers v2210202T232601ZLeo
022Pyth210203T211201ZScott
038PowerShell210203T183935ZZaelin G
049Java JDK210203T153651ZSansStef
025K ngn/k210201T082629ZGalen Iv
131C#210203T090811ZBill T&#
041x8616 machine code210201T084318Zuser9915
4745PHP210202T215002Z640KB
017Bubblegum210202T191356ZDigital
030Haskell210202T133756Zceased t
037Perl 5210201T184226ZZaid
060Clojure210201T231105Zwintermu
117Python 3210201T223054ZNala Nka
039R210131T233746ZDominic
061C gcc210131T022235Zgastropn
047TSQL210201T202311ZBradC
072Python 3210201T165814Zjam berr
126C++11210201T180822ZQuuxplus
370brainfuck210201T173243Zuser9940
020LabVIEW210201T170808Zijustlov
039Python 3210201T161413Zwizzwizz
020Ohm v2210201T145606ZCinaski
098Whispers v2210201T110410Zlyxal
020V vim210201T092641Ztsh
042Julia210201T084717ZMax
043JavaScript V8210201T072742ZNina Lis
028Bash210131T030004ZGammaFun
045JavaScript Node.js210201T034841Ztsh
036Python 2210131T021023ZSisyphus
063C gcc210131T025938ZanotherO
048Wolfram Language Mathematica210131T191038Zatt
016Stax210131T171501ZRazetime
3936PowerShell210131T151541Zwasif
021APL+WIN210131T114836ZGraham
057Red210131T095448ZGalen Iv
046JavaScript ES6210131T093735ZArnauld
049Batch210131T013707ZNeil
054Mathematica210131T045554Znumberma
047TIBASIC210131T044317ZTiKevin8
032Perl 5210131T043053ZSisyphus
038Perl 5210131T034308ZXcali
014Husk210131T032406ZLeo
016Charcoal210131T013012ZNeil
025Retina 0.8.2210131T012630ZNeil

GolfScript, 36 32 bytes

162 2base{'bB'=['uffalo']+}%' '*

Explanation:

162 2base{'bB'=['uffalo']+}%' '*
162 2base                        => [1 0 1 0 0 0 1 0]
         {                }%     => map
          'bB'=                  => 'B' if == 1, else 'b'
               ['uffalo']+       => add 'uffalo'
                            ' '* => ' '.join()

Try this online!

Regenerate, 27 25 bytes

B(((uffalo) b$3) B$2) b$1

Attempt This Online!

Pretty simple: golf repeated substrings using capture groups.

QBasic, 43 bytes

u$="uffalo buffalo
?"B"u$" B"u$" b"u$" B"u$

Abuses a couple tricks with the autoformatter (besides the standard ? for PRINT shortcut): the missing double quote is added at the end of line 1, and semicolons are inferred in the print statement whenever a literal string is next to a variable. After expansion, the code becomes

u$ = "uffalo buffalo"
PRINT "B"; u$; " B"; u$; " b"; u$; " B"; u$

The semicolon trick, plus the fact that string variables need the $ sigil, meant that approaches using more variables to build the string ended up longer.

C64 Assembler, 38 bytes

00fe  e7
00ff  62 ; "B"
0100  55 ; "u"
0101  46 ; "f"
0102  46 ; "f"
0103  41 ; "a"
0104  4c ; "l"
0105  4f ; "o"
0106  a2 ff       ldx #$ff
0108  86 22       stx $22
010a  e8          inx
010b  86 23       stx $23
010d  a2 07       ldx #$07
010f  20 25 ab    jsr $ab25
0112  46 fe       lsr $fe
0114  f0 0d       beq $0123
0116  90 06       bcc $011e
0118  a5 ff       lda $ff
011a  49 20       eor #$20
011c  85 ff       sta $ff
011e  20 3f ab    jsr $ab3f
0121  d0 e3       bne $0106
0123  60          rts

The program ist started with SYS 262.

screenshot

Try in emulator

Vyxal 3, 14 bytes

"↜4”8Y162B#Ṭ!„

Vyxal It Online!

"↜4”8Y162B#Ṭ!„­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠⁠‏​⁡⁠⁡‌⁣​‎⁠⁠⁠⁠⁠‎⁡⁠⁤⁡‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁣⁣‏⁠‎⁡⁠⁣⁤‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‎⁡⁠⁤⁢‏‏​⁡⁠⁡‌­
"↜4”            # ‎⁡"buffalo"
    8Y          # ‎⁢repeat 8 times
            !   # ‎⁣title case
          #Ṭ    # ‎⁤where truthy...
      162B      # ‎⁢⁡162 to binary
             „  # ‎⁢⁢join on spaces
💎

Created with the help of Luminespire.

<script type="vyxal3">
"↜4”8Y162B#Ṭ!„
</script>
<script>
    args=[]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

C64 Basic, 61 60 bytes

0fOi=0to7:?cH(sG(i)*32);cH(66+32*((69/2^i)aN1));"uffalo";:nE

screenshot

Try in emulator

Bespoke, 463 bytes

any thing(s)in a language same in name do stun us
city in west New York/bullocks in a cattle or goat-like family/to vex or baffle
all of varied senses"BUFFALO"denotes
the grammar all is correct,strangely,reciting it any unlimited amount;buffalos/bison(a bison=a buffalo)do things
Buffalo buffalo buffalo buffalo
if noun has use(s)as verb,language allows mixing it all
you,I am sure,continue bewildered;it will buffalo you
so clever:it will"buffalo"you!a-ha!wise,I

This uses a similar technique to my solution to Sing Happy Birthday to your favourite programming language, but with base-124 numbers.

JavaScript (Node.js), 40 bytes by jdt -3 by Weird Glyphs

_=>[...'BbBbbbBb '].join`uffalo `.trim()

Try it online!

, 22 chars (51 bytes)

Solution

𝚲⬄⭠‹buffalo ›8ᖘ⁰􍪙􋁍¹⁶󷺺⫰

Note: ☾ uses a custom font, but you can run this code in the Web UI

Diagram

Kakoune, 24 20 bytes

8oBuffalo<esc><a-j>))<a-,>3)<a-,>`kd

demo animation

basically we write Buffalo with 8 cursors then remove the selections we want to keep capitalized, then lowercase the rest

<a-,> = alt+comma

AWK, 38 36 bytes

$0="BbBbbbBb"{gsub(/./,"&uffalo ")}1

Attempt This Online!

Different approach from other AWK solutions.

-2 bytes, thank you Shaggy

Linux binary, 107 bytes

This is a "Linux/i386 demand-paged executable (QMAGIC) binary" that only works on Linux pre-2.6 (tested on 1.2.13):

0   cc 00 64 00     ; a_midmag
4   43 00 00 00     ; a_text
8   00 00 00 00     ; a_data
12  b0 04           ; a_bss eax=4   mov    al,0x4   number=__NR_write
14  EB 10           ;               jmp    +16
18  00 00 00 00     ; a_syms
22  0C 10 00 00     ; a_entry
26  00 00 00 00     ; a_trsize
30  00 00 00 00     ; a_drsize

34  31db            ; xor ebx, ebx
36  b900200000      ; mov ecx, 0x2000
41  c70120427566    ; mov dword [ecx],       0x66754220; " Buf"
47  c7410466616c6f  ; mov dword [ecx + 0x4], 0x6f6c6166; "falo"
54  41              ; inc ecx
55  89cf            ; mov edi, ecx
57  31d2            ; xor edx, edx
59  b207            ; mov dl, 0x7
61  cd80            ; int 0x80
63  fec2            ; inc dl
65  49              ; dec ecx

66  803720          ; xor byte [edi], 0x20
69  b004            ; mov al, 0x4
71  cd80            ; int 0x80

73  803720          ; xor byte [edi], 0x20
76  b004            ; mov al, 0x4
78  cd80            ; int 0x80

80  803720          ; xor byte [edi], 0x20
83  b004            ; mov al, 0x4
85  cd80            ; int 0x80

87  b004            ; mov al, 0x4
89  cd80            ; int 0x80

91  b004            ; mov al, 0x4
93  cd80            ; int 0x80

95  803720          ; xor byte [edi], 0x20
98  b004            ; mov al, 0x4
100 cd80            ; int 0x80

102 803720          ; xor byte [edi], 0x20
105 b004            ; mov al, 0x4
107 cd80            ; int 0x80

(base64 zABkAEMAAAAAAAAAsATrEAAAAAAMEAAAAAAAAAAAAAAx27kAIAAAxwEgQnVmx0EEZmFsb0GJzzHSsgfNgP7CSYA3ILAEzYCANyCwBM2AgDcgsATNgLAEzYCwBM2AgDcgsATNgIA3ILAEzYA=)

This is equivalent to

memcpy(0x2000, " Buffalo", 8);
write(0, 0x2001, 7);

*(char *)0x2001 ^= 0x20;
write(0, 0x2000, 8);

*(char *)0x2001 ^= 0x20;
write(0, 0x2000, 8);

*(char *)0x2001 ^= 0x20;
write(0, 0x2000, 8);

write(0, 0x2000, 8);

write(0, 0x2000, 8);

*(char *)0x2001 ^= 0x20;
write(0, 0x2000, 8);

*(char *)0x2001 ^= 0x20;
write(0, 0x2000, 8);

writing Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo, then segfaulting and filling your disk (so disable coredumps):

$ ./x
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffaloSegmentation fault
$ ls -l x
-rwxr-xr-x   1 nab      nab           107 Dec 26 18:43 x
$ md5sum x
1a5de49bd215235103508bce1e84c6dc  x
$ ./x
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffaloSegmentation fault
$ strace ./x
write(0, "Buffalo", 7Buffalo)                  = 7
write(0, " buffalo", 8 buffalo)                 = 8
write(0, " Buffalo", 8 Buffalo)                 = 8
write(0, " buffalo", 8 buffalo)                 = 8
write(0, " buffalo", 8 buffalo)                 = 8
write(0, " buffalo", 8 buffalo)                 = 8
write(0, " Buffalo", 8 Buffalo)                 = 8
write(0, " buffalo", 8 buffalo)                 = 8
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

The text section is mapped r-x, so we can't stuff " Buffalo" in there, hence copying it to BSS at 0x2000 which is mapped rwx (it may be possible to put it in data, but the memory map is already broken because we're stuffing instructions in BSS). Syscalls preserve all arguments except putting the result in eax, hence the need to put 4 (__NR_write) in after each syscall; ^= 0x20 flips between upper and lower-case. I've documented getting a system to run this in a previous code-golf entry.

YASEPL, 49 bytes

=a!1)"BbBbbbB"`1!b¥a,1~#"uffalo "!+}2,7#"buffalo"

Jelly, 15 13 bytes

“ƤhƤDȷ»Ḳ162ṃK

Try it online!

        162ṃ     Convert 162 to binary, and 1-index each digit into
“ƤhƤDȷ»          "Buffalo buffalo"
       Ḳ         split on spaces.
            K    Join on spaces.

I was in fact doing something terribly wrong 3 (almost 4) years ago, but this still comes out two bytes shorter than title-casing dynamically:

Jelly, 17 15 bytes

162B“¦ȯø»Œtṛ¡ⱮK

Try it online!

162B               Convert 162 to binary,
             Ɱ     and for every digit
         Œt        title-case
    “¦ȯø»          "buffalo"
           ṛ¡      that many times.
              K    Join on spaces.

Uiua, 25 23 bytes

↘2/$"_ _uffalo"⍥¯⋯372@B

Try it!

Take the binary digits of 372, making a B lowercase where there are ones. Reduce by inserting a space between and appending "uffalo", then drop the first two characters.

uses little-endian binary, so instead of using 162, I'd use 186. However because I combined steps of the joining by spaces and appending "uffalo" into one step, the first character ends up without the "uffalo" and just has to be removed. To fix this, I prepended an extra 0 to the binary representation to get 372, and just drop the first two characters of the result.

Vyxal S, 11 10 bytes

⁺=bƛ‛ḋ¤nßǐ

Try it Online!

-1 byte thanks to pacman256

Explained (old)

⁺>bƛḃ‛ḋ¤$ßǐ
⁺>           # Push 163
  b          # and convert it to binary
   ƛ         # for each digit:
    ḃ        #   push whether the digit is "truthy"
     ‛ḋ¤     #   and push the string "buffalo"
        $    #   swap those two values
         ßǐ  #   and if the digit actually is truth, title case it

Buffalo, 2711 2571 2517 2447 2279 2183 bytes

It takes 304 buffalo to produce 8 buffalo?! Yep, you herd that right.

BuffaloBuffaloBuffaloBuffaloBuffaloBuffalo(buffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo(buffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo(buffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffalobuffalobuffalo)buffaloBuffalobuffalobuffalobuffaloBuffaloBuffaloBuffalobuffaloBuffalobuffalobuffalobuffaloBuffalobuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffalobuffalobuffalo)Buffalobuffalobuffalobuffalo)buffaloBuffalobuffaloBuffalobuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo.buffaloBuffalo.buffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo..buffaloBuffalobuffalobuffalobuffalobuffalo.buffaloBuffalo.buffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo.buffaloBuffalobuffalobuffalobuffalobuffalobuffalobuffalobuffalobuffalo.BuffalobuffaloBuffalobuffaloBuffalobuffaloBuffaloBuffalo.BuffalobuffaloBuffalobuffalo.buffaloBuffalo..buffaloBuffalobuffalobuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.BuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffalo.buffaloBuffalo.buffaloBuffalo..buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffaloBuffalo(BuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffaloBuffalo.BuffalobuffaloBuffalobuffalo.buffaloBuffalo..buffaloBuffalobuffalobuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffalobuffalobuffalo)BuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffaloBuffalobuffalo.buffaloBuffalo.buffaloBuffalo..buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.buffaloBuffalo.BuffalobuffaloBuffalobuffaloBuffalobuffaloBuffaloBuffalo.BuffalobuffaloBuffalobuffalo.buffaloBuffalo..buffaloBuffalobuffalobuffalo.buffaloBuffalo.buffaloBuffalo.

Try it online! Link is to a Buffalo interpreter written in PHP (the header is copied from GitHub). You can also copy-and-paste the code above into the official online interpreter.

Buffalo is a cell-based language like brainfuck or COW. It has seven instructions:

Aiming to get the ASCII codes of Bufalo into successive cells, we first do a coarse initialisation using three nested loops. A correction is then applied to each cell (outside the loops) as necessary. The selected iteration counts (3 for the outer and middle loops and 4 for the inner loop) are apparently optimal. The ASCII code for the lowercase b does not get its own cell; rather, we generate it on the fly in the a cell.

Once the ASCII codes have been generated, the output is printed character-by-character as Buffalo buffalo Buffalo (buffalo )Buffalo buffalo, where the segment in parentheses represents a loop that runs 3 times.

Vyxal 3 -S, 14 bytes

162bƛ"Tᶪэd„n¿V

Vyxal It Online!

Similar to vyxal 2, but with a better set up

C#, 70 bytes

Console.Write(string.Join("uffalo ","BbBbbbBb ".ToCharArray())[..^2]);

Try it online!

Joeasus, 29 27 23 bytes

pp![BufflotongueTwister

Run Peq Online

-2 thanks to emanresu A

-4 thanks to lyxal

Joeasus is a joke programming language "interpreted" by the Llama 3 LLM, prompted with a minimal description of itself under the name "Peq". It's often very bad at this, forgetting that it's supposed to be a programming language at all or refusing to bullshit functionality for various operators, not to mention it's virtually unusable outside Kolmogorov complexity challenges, but the bright side is that it can also hallucinate its way out of typos.

A previous solution I nearly posted was C.BufflobTongueTwisterNoPeriod for 30 bytes. Getting it to "programmatically" strip the trailing period is much harder than making it imagine the constant hardcoded that way, or at least without also surrounding the output with extraneous quotes, and one of the few "ground truths" about the language is the presence of a "library of helpful constants" named CT--which in this case I can apparently just abbreviate to C.

JavaScript (Node.js), 47 46 bytes

_=>'B b B b b b B b'.replace(/b/gi,'$&uffalo')

Try it online!

Japt -S, 16 bytes

#¢ìbpu)m+"uffalo

Test it

#¢ìbpu)m+"uffalo
#¢                   :162
  ì                  :To digit array in base
   b                 :   Literal "b"
    p                :   Append
     u               :     Uppercase
      )              :End base conversion
       m             :Map
        +"uffalo     :  Concatenate "uffalo"
                     :Implicit output joined with spaces

sed, 35 33 bytes

-2 bytes thanks to user41805

s/^/BbBbbbBb/
s/./ &uffalo/g
s///

Attempt This Online!

34B solution:

-1 byte thanks to user41805

s/^/B b B b b b B b/
s/\>/uffalo/g

Attempt This Online!

35B solution: (The regex matches empty string at first and then is reused for the second s command)

s/b*/B b B b b b B b/i
s//&uffalo/g

Attempt This Online!

brainfuck, 190 179 bytes

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

Try it online!

The ASCII codes are initialised using a similar method to my Buffalo answer, though here both b and the second f get their own cells. Printing the output requires fewer instructions in brainfuck compared with Buffalo because of a key difference in the way that loops are handled: brainfuck uses the currently active cell to decide whether a loop ends, whereas Buffalo refers back to the cell that was originally active when the loop was entered. Consequently, we can print runs of letters in successive cells with a simple [.>] loop in brainfuck, a construction that isn't possible in Buffalo.

Scratch, 8 blocks

hi if you’re reading this

Try it on scratch!

I tried to refrain from doing anything too illegal like setting the costume as Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo or setting a variable as that.

Here is the scratchblocks code (102 bytes):

when gf clicked
for each[i v]in(8){set[B v]to(join(B)(join(letter(i)of[BbBbbbBb])[uffalo ])
}::control

Usually when people submit scratch, they submit Tosh (https://tosh.blob.codes/), which is Scratch but text-based or an image of the blocks compiled on scratchblocks (https://scratchblocks.github.io). I would’ve done both, but the for each [i v] in (8) block is old and removed and I can’t figure out how to do it on Tosh.

Pascal, 84 B

This program complies to ISO standard 7185 “Pascal” (level 0 sufficient):

program p(output);const s='uffalo buffalo B';begin write('B',s,s:15,'b',s,s:14)end.

Knight (v2), 30 bytes

O S^+@'BbBbbbBb.''uffalo '63T@

Try it online!

C (gcc), 60 bytes

f(n){for(n=8;n--;)printf("%cuffalo%*.s","bBbbbBbB"[n],!!n);}

Try it online!

MathGolf, 18 bytes

9G*âx{ûbB§╕«Γ╢ô };

Try it online.

âx{ûbB§╕«Γ╢ô could alternatively be à{ENR**╦\i╛δ for the same byte-count: try it online.

Explanation:

9G*               # Push 9*18=162
   â              # Convert it to a binary list
                  # (which is unfortunately in reversed order due to a bug)
    x             # Reverse it to the correct order
     {            # Loop over each of these bits as integers:
      ûbB         #  Push string "bB"
         §        #  (0-based) index the current bit into it
          ╕«Γ     #  Push compressed string "uffa"
             ╢ô   #  Push compressed string "lo"
                  #  Push a space character " "
     };           # After the loop: discard the final space
                  # (after which the entire stack is joined and output implicitly)

   à              # Convert it to a binary string (in correct order..)
    {             # Loop over each of these bits as characters:
     ENR**        #  Push 15*25*29=10875
          ╦       #  Get the dictionary word at this index: "buffalo"
           \      #  Swap so the current bit is at the top of the stack
            i     #  Convert it from a character to an integer
             ╛    #  If it's truthy:
              δ   #   Titlecase the string

Julia 1.0, 38 bytes

show(join(["BbBbbbBb"...].*"uffalo "))

Try it online!

awk, 22- or 41-bytes. basic approach is 41-bytes:

echo Buffalo | 
mawk 'NF+=sub("  ",OFS=" "tolower($2=$4=$1)" ")'       
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo

but if we're going with the entirely hard-coded approach, that can massively cut it down to just 22-bytes (and that's already inclusive of the single quotes for OFS) :

echo BbBbbbBb | 
mawk NF++ FS= OFS='uffalo '
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo 

Trivia tidbit - if we view "B"'s as "1"'s and "b"'s as "0"'s,

then the requirement would appear 10100010, while its decimal form can be reached via either

  2 * ( 3 ^ 4 )
                or
  3  *  6 * 9 

R, 48 bytes

Similar to Dominic van Essen's recycling solution, but with paste0.

cat(paste0(scan(,''),'uffalo'))
B
b
B
b
b
b
B
b

Try it online!

Same idea, also 48 bytes

cat(paste0(scan(,''),'uffalo buffalo'))
B
B
b
B

Try it online!

Excel, 49 bytes

=TEXTJOIN(" ",,CHAR(98-{4;4;0;4}*{8,0})&"uffalo")

Explanation

98-{4;4;0;4}*{8,0} =>  66 98 CHAR()=> B b
                       66 98          B b
                       98 98          b b
                       66 98          B b

Shortest Alternative, 51 bytes

=TEXTJOIN(" ",,MID("BbBbbbBb",ROW(1:8),1)&"uffalo")

05AB1E, 13 bytes

Inspired by @Leo's answer, so make sure to upvote him! and me too please ;)

Ƶzbε'±ˆsi™]ðý

Try it online!

Ƶzbε'±ˆsi™]ðý  # full program
            ý  # join...
    '±ˆ        # "buffalo"...
   ε           # for map over all digits of...
Ƶz             # 162...
  b            # in binary...
         ™     # in title case...
        i      # if...
       s       # current digit in...
   ε           # map over all digits of...
Ƶz             # 162...
  b            # in binary...
        i      # is 1...
           ð   # by spaces
          ]    # exit if statement and map
               # implicit output

Boring, trivial alternative, 64 bytes

"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo

Try it online!

"...  # full program
"...  # literal
      # implicit output

EDIT: I have stood unbeaten for three months... Brownie points to anyone who outgolfs me.* Oh, and possibly some rep if I like your answer. ;)

*Just to clarify, outgolfs in any language will be accepted. It doesn't have to be 05AB1E.

JavaScript (V8), 57 50 bytes

a='uffalo';b='B'+a+' b'+a;c='b'+a;print(b,b,c,c,b)

Try it online!

You have to run these at Try it online! because running it in a browser console will try to print this webpage

57 bytes:

a='uffalo ';b='B'+a+'b'+a;c='b'+a;print(b+b+c+c+b.trim())

47 bytes but Try it online! doesn't understand String.replaceAll and it outputs a trailing space:

print('B'+('bBbbbBb'.replaceAll('','uffalo ')))

46 bytes but it outputs a trailing space (thanks to @lm42):

print('B'+('bBbbbBb'.replace(/|/g,'uffalo ')))

This is my first golf.

BRASCA, 30 bytes

`bBbbbBbB`[o` olaffu`7[aoA{]x]

Try it

Explanation

`bBbbbBbB`                     - Push the first letters of each [Bb]uffalo
          [                  ] - While non-zero: 
           o                   -   Output the b/B
            ` olaffu`          -   Push "uffalo "
                     7[aoA{]x  -   Output it and clean up the counter

VBScript, 68 bytes

s="'BbBbbbBb'":k=""
For i=1 To Len(s)
k=k&Mid(s,i,1)&"uffalo "
Next 

BBC BASIC, 55 bytes

F.I%=1TO8:P.CHR$(98+32*((I%AND(I%+1))=0));"uffalo ";:N.

Try it online!

Deadfish~, 463 bytes

{{i}dddd}iiiiiic{{i}ddddd}ic{d}dddddccdddddc{i}iciiic{{d}ii}ic{{i}dddd}iiiiiic{i}{i}dc{d}dddddccdddddc{i}iciiic{{d}ii}ic{i}{i}{i}iiiic{{i}ddddd}ic{d}dddddccdddddc{i}iciiic{{d}ii}ic{{i}dddd}iiiiiic{i}{i}dc{d}dddddccdddddc{i}iciiic{{d}ii}ic{{i}dddd}iiiiiic{i}{i}dc{d}dddddccdddddc{i}iciiic{{d}ii}ic{{i}dddd}iiiiiic{i}{i}dc{d}dddddccdddddc{i}iciiic{{d}ii}ic{i}{i}{i}iiiic{{i}ddddd}ic{d}dddddccdddddc{i}iciiic{{d}ii}ic{{i}dddd}iiiiiic{i}{i}dc{d}dddddccdddddc{i}iciiic

Try it online!

Whispers v2, 69 bytes

> "BbBbbbBb"
> "uffalo "
> -1
>> L+2
>> Each 4 1
>> 5ᶠ3
>> Output 6

Try it online!

StupidStackLanguage, 89 84 bytes

avvqmddlblbqaviqvmlblblqqqaviqvmlblblaviqvmlblbtfavvdqvdmfwwwffwfvvifiiifbvvvvdfbbbu

Try it online!

AWK, 52 bytes

BEGIN{B="Buffalo";b="buffalo";print B,b,B,b,b,b,B,b}

Try it online!

I could not come up with a shorter example.

C (gcc), 62 bytes (using binary properties)

n=8;f(){while(n--)printf("%cuffalo%c",98^(n==3^n&1)<<5,9+!n);}

Explanations:

Try it online!

Thanks to caird coinheringaahing for catching the superfluous extra newline ;)

Rattle, 51 46 42 bytes

Rattle just hit release today - this is my first golf with the released version! If you're interested in learning a fun and easy new language, I would highly recommend checking it out!

B&b&uffalo& |I=[b0[2b^b1]b2b3b1b2[3q]b3+]4

Try it online!

Try to out-golf me! You'll probably want to consult the documentation

Explanation

B&b&uffalo&      creates an array of hard-coded strings: ["B","b","uffalo"," "]
    |            syntax for taking input
     I           stores this data in first memory slots
      =          sets top of stack to 0
       [ ... ]4  loops 4 times
    b0           adds item in slot 0 to buffer
      [2 ... ]   executes statements inside if top of stack is equal to 2
        b^       deletes last item from buffer
          b1     adds item in slot 1 to buffer
    b2b3b1b2     adds item in slot 2, 3, 1, 2 to buffer
    [3 ... ]     executes statement inside if top of stack is equal to 3
      q          ends program - buffer is implicitly printed
    b3           adds item in slot 3 to buffer
      +          adds 1 to top of stack

Kotlin, 63 bytes

fun main(){"BbBbbbB".map{print(it+"uffalo ")};print("buffalo")}

Kotlin Playground

I used the fairly common strategy of concatenating the first letter to "uffalo", but I had to print the last one to avoid trailing white space, I'm yet to find a better solution.

x86-16 machine code, IBM PC DOS, 35 33 32 bytes

00000000: b820 09b1 e7ba 1801 cd21 d0e9 7409 7303  . .......!..t.s.
00000010: 3044 19cd 29eb f1c3 4275 6666 616c 6f24  0D..)...Buffalo$

Listing:

B8 0920     MOV  AX, 0920H          ; AH = 9 DOS string function, AL = ' ' 
B1 E7       MOV  CL, 11100111b      ; magic buffalo number 11100111 
BA 0118     MOV  DX, OFFSET BUF     ; 'Buffalo' pointer for display 
        STAMPEDE:
CD 21       INT  21H                ; write our *uffalo to screen 
D0 E9       SHR  CL, 1              ; LSB of magic buffalo number into CF 
74 09       JZ   BYE_BUFFALO        ; loop until CL is 0 
73 03       JNC  HI_BUFFALO         ; if LSB bit is a 0, don't change case 
30 44 19    XOR  [SI+BUF-100H], AL  ; swap case on first letter 
        HI_BUFFALO:  
CD 29       INT  29H                ; if not last of the buffalo, display a space 
EB F1       JMP  STAMPEDE           ; keep 'em coming 
        BYE_BUFFALO: 
C3          RET                     ; return to DOS 
        BUF:
            DB   'Buffalo$'         ; the real Buffalo

Try it online!

Explanation:

Uses the byte 0xe7 (1110 0111 binary) to determine if the case should be swapped. Each [Bb]uffalo corresponds to the next least significant bit of the byte where a 1 means to change the case and a 0 means don't change.

The case of the first character can be alternated by doing an xor 0x20 on the ASCII value. Now 0x20 just happens to be the ASCII value for a space character, so we can put that in al and use for both the xor and to write the space character.

enter image description here

Props:

Javascript, 57 bytes

console.log('BbBbbbBb'.replace(/./g, '$&uffalo ').trim())

Try it online!

If a trailing space is allowed, it can be 50 bytes:

console.log('BbBbbbBb'.replace(/./g, '$&uffalo '))

Try it online!

ThumbGolf, 31 bytes

Machine code (little endian pairs):

a005 22ba 0852 bf2c 2162 2142 de11 de00
d001 de3b d1f6 4770 6675 6166 6f6c 00

Commented assembly:

        // Include ThumbGolf wrapper macros
        .include "thumbgolf.inc"
        .globl main
        .thumb_func
main:
        // r0 = "uffalo"
        adr     r0, .Luffalo
        // Bitmask representing the case of the B.
        // 0 = B, 1 = b, little endian bit order.
        // Also allows us to determine the length.
        // This fits perfectly into a narrow movs.
        //             bBbbbBbB
        movs    r2, #0b10111010
.Lloop:
        // Read a bit from the bitmask into the carry flag by shifting right.
        // Also detects when we have read all of the bits: lsrs will set the
        // zero flag.
        lsrs    r2, r2, #1
        // r1 = (r2 & 1) ? 'b' : 'B'
        ite     cs
        movcs   r1, #'b'
        movcc   r1, #'B'
        // print either 'b' or 'B'
        putc    r1 // udf #0021
        // print "uffalo" (w/o newline)
        puts    r0 // udf #0000
        // Yes, none of the output instructions affect the flags despite using
        // stdio AND executing the stdio call on the main thread (since stdio in
        // signal handlers is unsafe), and this is proof.
        //
        // If the bitmask is zero, exit.
        it      eq
        bxeq    lr
        // Use the "put special" instruction to print a space.
        putspc  ' ' // udf #0073
        // More flexing that the flags are preserved, it is just as good to do
        // `b .Lloop`.
        // The proof is that this won't crash, since the ASCII as code will store
        // random garbage to uninitialized registers.
        bne     .Lloop
        // string literal
.Luffalo:
        .asciz "uffalo"

Mostly a demo to show how ThumbGolf preserves the condition flags on output instructions.

I could do the same thing with cbz and an unconditional b, but this is a nice party trick.

As I explained in the code, I use a bitmask to control whether Buffalo or buffalo is printed. It just happens to be a perfect 8-bit constant for movs.

brainfuck, 226 bytes

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

Try it online!

The cells are set to <space>Bbuffalo

<[<]> Goto the space cell
.  (dot = print a space)
>. (dot = print B)
>. (dot = print b)
>[.>] print uffalo

Buffalo is printed using <[<]>.>.> >[.>] but is this if it is the first time, we use <[<]> >.> >[.>]

buffalo is printed using <[<]>.> >.>[.>] but we can golf this to <[<]>.> > [.>]

The only thing that I can think of that could probably be better golfed is the preparation part.

If you put the B before the space you might be able to save some bytes.

Raku, 33 30 bytes

put "BbBbbbBb".comb X~"uffalo"

Try it online!

Julia REPL, 33 bytes

join("BbBbbbBb ","uffalo ")[1:63]

Julia, 40 bytes

print(join("BbBbbbBb ","uffalo ")[1:63])

Ruby, 49 39 bytes

-10 bytes thanks to Dingus

$><<('BbBbbbBb '.chars*'uffalo ').strip

Try it online!

JavaScript ES6, 51 bytes

(c=n=>n?c(n>>1)+'bB'[n&1]+'uffalo ':'')(162).trim()

Made sure to trim a trailing space. If we don't trim it, we get 44 bytes (but of course that violates the problem description).

Pyth, 23 22 bytes

Save a byte thanks to @Scott!

V"BbBbbbBb"p+N"uffalo 

Try it online!


I wanted to be smart and encode the state of the upper- and lowercase letters as bits, but that ended up taking a byte more. Here's the code and explanation anyway!

24 bytes

FNj162 2p+?N\B\b"uffalo 
FN                         # loop with N
  j162 2                   # convert 162 into binary as list of bits
        p                  # print without newlines
         +                 # concatinate strings
          ?N\B\b           # ternary operator, checks if the bit is falsey (0)
                "ufallo    # note the trailing space

Java (JDK), 49 bytes

v->"B b B b b b B b".replaceAll("\\w","$0uffalo")

Try it online!

Credits

TeX, 34 bytes

\def~{uffalo }B~b~B~b~b~b~B~b~\bye

jq, 35 characters

"BbBbbbBb "/""|join("uffalo ")[:-2]

Sample run:

bash-5.0$ jq -nr '"BbBbbbBb "/""|join("uffalo ")[:-2]'
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo

Try it online!

Whispers v2, 86 79 bytes

> "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo"
>> Output 1

Try it online!

Well, this is embarrassing...

The first line alone could even be enough, as a function returning the string

For something a bit more interesting, here's my previous solution:

Whispers v2, 86 bytes

> "Buffalo "
> "buffalo "
>> 1+2
>> 3+3
>> 2+2
>> 5+3
>> 4+6
> 63
>> 7ᶠ8
>> Output 9

Try it online!

First approach to the language of the month for me :) It looks like building the string by manually concatenating pieces is the best approach in Whispers.

Explanation

Whispers starts the execution from the last line of the program, and then follows references from there. Any number in a line starting with >> refers to the result of the corresponding line, while numbers in lines starting with > have their normal value. We can only have a single operation per line (hence why so many lines).

Most lines here simply concatenate two strings, while line 9 takes the first 63 characters from the string in line 7, which is all except for the trailing space. It should be pretty easy to read, but here's the value computed by each line:

> "Buffalo "        1:"Buffalo "
> "buffalo "        2:"buffalo "
>> 1+2              3:"Buffalo buffalo "
>> 3+3              4:"Buffalo buffalo Buffalo buffalo "
>> 2+2              5:"buffalo buffalo "
>> 5+3              6:"buffalo buffalo Buffalo buffalo "
>> 4+6              7:"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo "
> 63                8:63
>> 7ᶠ8              9:"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo"
>> Output 9         10:prints out line 9

Pyth, 22 bytes

jdm+d"uffalo""BbBbbbBb

Try it online!

PowerShell, 41 38 bytes

-3 bytes thanks to @mazzy

'BbBbbbBb'-replace'.',' $0uffalo'|% *m

Try it online!

Java (JDK), 49 bytes

v->"B b B b b b B b".replaceAll("b|B","$0uffalo")

Try it online!

K (ngn/k), 27 25 bytes

-2 bytes thanks to ngn!

" "/"BbBbbbBb",\:"uffalo"

Try it online!

J, 30 bytes

echo}:,/'BbBbbbBb',"{'uffalo '

Try it online!

C#, 131 bytes

using System.Linq;using System;class A{static void Main(){Console.Write($"{String.Join("uffalo ", "BbBbbbBb".ToArray())}uffalo");}}

Try it online!

x86-16 machine code, 43 42 41 bytes

0BED:0100  BA 19 01 BE 22 01 B4 09-B1 07 CD 21 AC A2 19 01   ...."......!....
0BED:0110  E2 F8 C6 44 F7 24 CD 21-C3 42 75 66 66 61 6C 6F   ...D.$.!.Buffalo
0BED:0120  20 24 62 42 62 62 62 42-62                         $bBbbbBb

Instruction listing (nasm syntax):

    org 100h      ;           | Execution of .COM files start at CS:0100

    mov dx, msg   ; BA 1B 01  | DX = offset of "Buffalo $" (for INT 21H)
    mov si, buf   ; BE 24 01  | SI = Address of "bBbbbBb"  (for LODSB)
    mov ah, 09h   ; B4 09     | AH = Opcode code INT 21H   (Output string up to '$')
    mov cl, 7     ; B1 07     | CX = 7 (we want to iterate 7 times before the last 'Buffalo')
loop:
    int 21h       ; CD 21     | Output string at msg
    lodsb         ; AC        | AX = [SI], ++SI
    mov byte [msg], al
                  ; A2 1B 01  | Set the first character of msg as the current character at buf
    loop loop     ; E2 F8     | Jump to tag 'loop' while CX >= 0
    mov byte [si - 9], "$"
                  ; C6 44 F7 24 | (After loop) Replace the last space with a '$'
    int 21h       ; CD 21     | Print the last 'buffalo'
    ret           ; C3        | Exit to DOS

msg:    db "Buffalo $"
buf:    db "bBbbbBb"

Example run

C:\test>debug code.com
-g
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo
Program terminated normally

PHP, 47 45 bytes

while($x<8)echo~_[!$x],BbBbbbBb[$x++],uffalo;

Try it online!

-2 bytes thx to @manatwork!

Bubblegum, 17

Obligatory bubblegum answer generated with zopfli --deflate --i1000 -c buffalo.txt | xxd

00000000: 732a 4d4b 4bcc c957 4882 d2e8 fc24 fcf2  s*MKK..WH....$..
00000010: 00                                       .

Try it online!

Haskell, 30 bytes

init$"BbBbbbBb">>=(:"uffalo ")

Try it online!

(Cf. Are objects in Haskell valid if there is no input?)

Perl 5, 37 bytes

say"@{[map{(21%$_?b:B).uffalo}1..8]}"

Try it online!

Clojure, 60 bytes

(clojure.string/join " " (map #(str % "uffalo") "BbBbbbBb"))

Python 3, 117 bytes

o=['buffalo']
for x in ['B' if int(i) else 'b' for i in bin(69)[:1:-1]]:
  o.insert(0,x+o[-1][1:])
print(' '.join(o))

Try it online!

69 is the reverse of the binary representation of the capitalization pattern.

R, 40 39 bytes

Edit: -1 byte thanks to Dingus

cat(c('buffalo','Buffalo')[1+!21%%1:8])

Try it online!

Chooses whether to output 'buffalo' or 'Buffalo' by indexing with the vector 2 1 2 1 1 1 2 1, which is constructed as the zero values of 21 modulo each of 1...8, plus one.

Sadly, trying to recycle the 'uffalo' is significantly longer (54 bytes) due to R's somewhat cumbersome string-manipulation functions (Edit after reading the 'Anarchy Golf' link: still longer, but can be done in 46 bytes)

C (gcc), 62 61 bytes

Realised the 61 byte version was not compliant (outputted a space at the end). Reverted and updated it to be.

-1 byte thanks to Arnauld

f(n){for(n=8;n--;)printf("%cuffalo%s","bBbbbBbB"[n]," "+!n);}

Try it online!

T-SQL, 45 51 47 bytes

PRINT REPLACE('B0 B0 b0 B0',0,'uffalo buffalo')

PRINT is shorter than SELECT. Using a numeral in the REPLACE eliminates a set of quotes and saves 2 bytes.

EDIT: Fixed trailing space, at the cost of 6 bytes. Saved 4 by replacing a longer phrase, thanks @Giuseppe

Python 3, 72 bytes

print('Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo')

I mean, that works.

Try it online!

C++11, 126 bytes

#include<random>
#include<cstdio>
int main(){std::knuth_b g(7);for(char i{},s[]=" buffalo";i-8;++i)s[1]^=*s&g(),printf(s+!i);}

Try it online!

Not a serious contender for shortest program — but I was inspired by the (original, now-deleted) requirement not to use a random number generator. ;)

brainfuck, 370 bytes

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

Try it online!

Not exactly the most optimized answer and could probably be golfed much further. Makes lots of use of copying cells, as well as repeadedly performing the same print function near the end.

Original un-minified version (sadly uncommented) can be found here.

LabVIEW, 20 bytes

LabVIEW code (masked to 0)

LabVIEW code (masked to nonzero)

Graphical languages are harder to count, so here's my attempt:

And yes, how'd you know about my EE degree?

Python 3, 39 bytes

print('uffalo '.join('BbBbbbBb ')[:-2])

Try it online!

Potentially invalid, 35 bytes

print('uffalo '.join('BbBbbbBb\b'))

Try it online!

Ohm v2, 20 bytes

‥bB.¢`b}®:_”cåχíð”↔ù

Try it online!

Whispers v2, 98 bytes

> 81
> 2
>> 1⊥2
> "Buffalo "
> "buffalo "
> "buffalo"
>> If L 4 5
>> Each 7 3
>> 8+6
>> Output 9

Try it online!

V (vim), 20 bytes

8ibuffalo <esc>xbb~5b~0~

Try it online!

Julia, 42 bytes

join(collect("BbBbbbBb").*"uffalo ")[1:63]

Very similar to what was done with Python above.

JavaScript (V8), 43 bytes

write(a=`B${b='uffalo'} b`+b,a,c='b'+b,c,a)

Try it online!

Bash, 28 bytes

echo {B,b,B,b,b,b,B,b}uffalo

Try it online!

Brace expansion (Bash Reference Manual)

Same length, slightly more interesting:

echo {B,b,B,b{,,},B,b}uffalo

JavaScript (Node.js), 45 bytes

_=>[...'BbBbbbBb'].map(x=>x+'uffalo').join` `

Try it online!

Python 2, 36 bytes

for c in'BbBbbbBb':print c+'uffalo',

Try it online!

Relies on the Python 2 print magic that automagically adds a space before a printed object if it thinks it's not at the beginning of a line.

Python 2 (anagol), 36 bytes

print'uffalo '.join('BbBbbb'*2)[:63]

Try it online!

A trivial modification of the anagol solution is the same length.

Python 3, 38 bytes

print(*[x+'uffalo'for x in'BbBbbbBb'])

Try it online!

Python 3, 41 bytes

print(*map("{}uffalo".format,'BbBbbbBb'))

Try it online!

C (gcc), 63 bytes

-2 bytes thanks to @Arnauld

n=7;f(){printf("%cuffalo%c","bBbbbBbB"[n],9+!n),n--?f():(n=7);}

Try it online!

Could have been shorter if it wasn't for the reusability rule killing recursive functions.

Wolfram Language (Mathematica), 48 bytes

##<>#&//"B"~Print~#["uffalo"~#~b~#~" B",b=" b"]&

Try it online!

Port of TiKevin83's TI-BASIC solution.

Stax, 16 bytes

Æ▼.#t!♦ΩÿN+╪\7êI

Run and debug it

Uses mixed base conversion and some zipping.

Made with a lot of @recursive's help.

PowerShell, 39 36 bytes

''+('BbBbbbBb'|% t*y|%{$_+'uffalo'})

Try it online!

-3 bytes thanks to @mazzy!

APL+WIN, 21 bytes

'BbBbbbBb',¨⊂'uffalo'

Try it online! Thanks to Dyalog Classic

This could be shortened to 5 bytes if the two strings were given as input rather than being hard coded.

Red, 57 bytes

prin collect[foreach b"BbBbbbBb"[keep rejoin[b"uffalo"]]]

Try it online!

Alternative:

Red, 60 bytes

parse s:"B b B b b b B b"[any["b"insert"uffallo"|" "]]prin s

Try it online!

JavaScript (ES6), 46 bytes

Builds the string recursively and in reverse order.

f=n=>(n>6?'':f(-~n)+' ')+"bB"[n&n!=3]+'uffalo'

Try it online!

Alternate version

f=n=>(n>6?'':f(-~n)+' ')+"bB"[25/n&1]+'uffalo'

Try it online!

Commented

f = n =>             // f is a recursive function taking a counter n,
                     // which is initially undefined (zero'ish)
  ( n > 6 ?          // if n is greater than 6 (last iteration):
      ''             //   append nothing
    :                // else:
      f(-~n)         //   append the result of a recursive call with n + 1
      + ' '          //   followed by a space
  )                  //
  + "bB"[n & n != 3] // append "B" if n is odd and not equal to 3,
                     // or "b" otherwise
  + 'uffalo'         // append "uffalo"

Batch, 50 49 bytes

@set s=B_b_B_b_b_b_B_buffalo
@echo %s:_=uffalo %

Batch's string handling is so poor it's golfier to explicitly include the last "buffalo" rather than trying to trim the trailing space at the end.

Mathematica, 54 bytes

Print@@Riffle[#<>"uffalo"&/@Characters@"BbBbbbBb"," "]

Try it online!

TI-BASIC, 47 bytes

"uffalo
Ans+" b"+Ans
Ans+" B"+Ans
"B"+Ans+" b"+Ans

Builds the sentence up in chunks to eliminate the need for string variables which are two byte tokens; Ans is always a single byte even when it holds a string. The strategy also minimizes use of the lowercase letters as they are two byte tokens. The final line is automatically output and you can scroll left-right for the full sentence.

Perl 5, 32 bytes

@_=<{,b,B,b}uffalo>;say"B@_ b@_"

Try it online!

Beats the best anagol answer by one byte:

@_=($_=Buffalo,lc)x2,print"@_ \l@_." # Mithran
@_=<{,b,B,b}uffalo>;print"B@_ b@_."  # Sisyphus

Perl 5, 38 bytes

$,=$";say$_=Buffalo,lc,$_,(lc)x3,$_,lc

Try it online!

Husk, 14 bytes

wM?Im_ḋ162¨Ḃ=F

Try it online!

This was a simple challenge but fun :)

Explanation

wM?Im_ḋ162¨Ḃ=F
          ¨Ḃ=F    Taking the compressed string "Buffalo" (uppercase B)
 M                For each digit in    
      ḋ162         the binary digits of 162 ([1,0,1,0,0,0,1,0]):
  ?               if the digit is 1
   I               return the string itself
                  if the digit is 0
    m_             convert each character to lowercase
w                 Join all strings with spaces

Charcoal, 16 bytes

F⍘¹⁶²bB«ιuffalo→

Try it online! Link is to verbose version of code. Explanation:

F⍘¹⁶²bB«

Convert 162 to base 2, but use b for 0 and B for 1, and loop over the "digits".

ι

Print the b or B.

uffalo

Print the rest of the buffalo.

Prepare to leave a space before the next b, if any.

Retina 0.8.2, 25 bytes


BbBbbbBb
.
$&uffalo 
 $

Try it online! Explanation:


BbBbbbBb

Insert the bs in the correct capitalisation.

.
$&uffalo 

Expand the buffalo (buffaloes?).

 $

Remove the trailing space.