g | x | w | all
Bytes Lang Time Link
069AWK250506T202016Zxrs
020Vyxal 3250501T184402Zpacman25
020Vyxal 3250501T183845Zpacman25
071Atari 800 Standard Basic250429T080828ZLars
077Swift 6231231T192154ZmacOSist
086Tcl170210T232259Zsergiol
070C gcc231230T040937ZNicholas
113Swift231229T165404ZAnnett S
075Python 3231229T152650ZLarry Ba
036Vis editor231229T082158ZROGUH
061Ex230104T172142Zgildux
080Python 3230104T183339ZJoao-3
058POSIX Shell + Utilities230104T181111Zнабиячлэ
nan230104T174546ZThe Thon
025Vyxal J210907T130952ZSjoerdPe
017Vyxal L210908T124905Zemanresu
025APLDyalog Unicode210908T144934Zovs
026K ngn/k210819T161450Zcoltim
065JavaScript V8210907T113051ZEternal
060Python201127T191924Zgarrison
065Zsh190911T192953Zroblogic
159StupidStackLanguage200618T185913ZLebster
086C200618T143437Zanatolyg
027Pyth200618T132258ZSok
021Stax200617T164250Zrecursiv
248brainfuck200226T123641ZThe rand
081JavaScript Babel Node200224T142154ZSarreph
064Python 3.8200223T193858ZIan Poe
081C gcc200205T002720ZS.S. Ann
023Japt191201T173407ZGymhgy
058Perl170719T233256ZKjetil S
nanCommodore BASIC V2/V7 Commodore C64/128190909T162239ZShaun Be
037Keg190913T054059Zlyxal
059Python 3191201T023447ZJBernard
064Python 3191201T021413Zlbragile
061Wren191201T002154Zuser8505
081x8664 Machine Code190913T111454Zme'
025Japt R190911T084642ZShaggy
028Japt R190910T134640ZOliver
070TSQL190909T170139ZBradC
052SmileBASIC170205T231259Z12Me21
034J171102T122903ZFrownyFr
0748th170719T191300ZChaos Ma
059Common Lisp170210T192906Zuser6516
109C170211T042942ZAlbert R
083Python 3161122T171345ZJuntos
069Python161110T174315ZNeRoboto
033Pyth161011T202527ZDignissi
065Scala161014T100215Zcorvus_1
097C161010T183942ZMatthew
087C161013T072643ZBNik
056Microscript II161012T175020ZSuperJed
060Python 3161012T142437ZTim Shaf
075Python 3161012T020700Zzawata
028CJam161011T082650ZLinus
082Racket161010T132005Zrnso
056Python 3.5161012T023630Zxnor
092C161011T184825ZCSM
nanBrainFlak161011T030605ZWheat Wi
099Jvascript 99 Bytes161011T140321ZEsteru
146SQL161011T165622Zdatagod
046Gloo161010T044012ZKade
049Perl 5161011T151101Zilkkachu
075JavaScript ES6161010T234001ZCroer01
074C#161011T113918ZNibblyPi
035Vim161011T130640Zm-chrzan
072Mathematica161010T082150Zuser5863
065SX161011T131815ZXiKuuKy
032Charcoal161011T130619ZASCII-on
944Xasm161011T130438ZXiKuuKy
089Java 7161010T125738ZKevin Cr
026Vim161011T115340Zudioica
054GNU sed161010T122054Zseshouma
051q161011T040204ZBoston W
061Python 2161010T231900Zxnor
064Python 3161010T221425ZDomPar
024Jelly161010T030353ZDennis
092C#161010T072950Zadrianmp
065JavaScript ES6161010T095544ZArnauld
044Ruby161010T032045ZLevel Ri
050Vim161010T111151Z永劫回帰
089Emotinomicon161010T190343ZLinnea G
073Bash161010T183424ZMatthew
026V161010T024447ZDJMcMayh
052J161010T024813ZConor O&
032Jolf161010T030231ZConor O&
224Brainfuck161010T155033ZHunter V
037Japt161010T144045ZETHprodu
044PowerShell v2+161010T134625ZAdmBorkB
02405AB1E161010T093729ZEmigna
052///161010T105100ZErik the
062PHP161010T101456Zaross
026MATL161010T084015ZLuis Men
073JavaScript ES6161010T081402Zedc65
073Powershell161010T082800ZCallie J
075R161010T082151ZBillywob
105Batch161010T084858ZNeil
026Pyke161010T075734ZBlue
062Dart161010T083809Zlrn
069IBM/Lotus Notes Formula161010T082750ZElPedro
068Python 2161010T070805ZDomPar
063Python 2161010T063531ZDLosc
053Haskell161010T050221Znimi
056Cheddar161010T025119ZDowngoat
026Actually161010T024128Zuser4594

AWK, 69 bytes

$0=(a="rnbqkbnr\n")(b="pppppppp\n")(c="........\n")c c c toupper(b a)

Attempt This Online!

Vyxal 3, 20 bytes

">⤻⑵u⎙„'p'.⎂8×:WæʁJ”

Vyxal It Online!

could save 2 bytes if flags existed but this new "both" modifier is pretty cool

">⤻⑵u⎙„'p'.⎂8×:WæʁJ”­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁢​‎⁠⁠⁠⁠‎⁡⁠⁣⁤‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁤⁣‏‏​⁡⁠⁡‌⁢⁢​‎‎⁡⁠⁤⁤‏‏​⁡⁠⁡‌⁢⁣​‎‎⁡⁠⁢⁡⁡‏‏​⁡⁠⁡‌⁢⁤​‎‎⁡⁠⁢⁡⁢‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏‏​⁡⁠⁡‌­
">⤻⑵u⎙„               # ‎⁡compressed string "rnbqkbnr"
           ⎂          # ‎⁢apply to both
       'p'.           # ‎⁣the string 'p' and '.'
            8×        # ‎⁤repeat 8 times
              :       # ‎⁢⁡duplicate the periods
               W      # ‎⁢⁢wrap the stack
                æ     # ‎⁢⁣bifurcate it (push a reverse copy)
                 ʁJ”  # ‎⁢⁤Uppercase it, join and print on newlines
💎

Created with the help of Luminespire.

Vyxal 3, 20 bytes

">⤻⑵u⎙„'p'.⎂8×:WæʁJ”

Vyxal It Online!

could save 2 bytes if flags existed but this new "both" modifier is pretty cool

Atari 800 - Standard Basic, 71 Bytes

The Atari computer system may be a little bit older, since 1979. This old home computer starts into Atari Basic if cartridge is present. On "newer" XL/XE systems the Atari computer starts into Basic per default. The trick is to set the right margin to 9. The left margin is set to 2 by the OS per default. Therefore no 'newline' is need. The ? is the short form for the PRINT command.

POKE83,9:?:?"rnbqkbnrpppppppp";:FORI=0TO31:?".";:NEXTI:?"PPPPPPPPRNBQKBNR"

74 Bytes.

It is possible to use some code abbreviations.

POKE83,9:?:?"rnbqkbnrpppppppp";:F.I=0TO31:?".";:N.I:?"PPPPPPPPRNBQKBNR"

71 Bytes.

Swift 6, 80 77 bytes

let d="........\n",c="rnbqkbnr\npppppppp\n\(d)\(d)\(d)\(d)PPPPPPPP\nRNBQKBNR"

Tcl, 86 bytes

proc R {s n\ 8} {string repe $s $n}
puts rnbqkbnr\n[R p]\n[R [R .]\n 4][R P]\nRNBQKBNR

Try it online!

C (gcc), 71 70 bytes

I would be really surprised if someone could make this any shorter (seems impossible to me, but who knows?).

Edit: The cat has one-upped me again.

*c=L"湲煢扫牮瀊灰灰灰ੰ⸮⸮⸮⸮⸊⸮⸮⸮ਮ⸮⸮⸮⸮⸊⸮⸮⸮ਮ偐偐偐偐刊䉎䭑乂ꁒ";main(){for(;printf(c++););}

Try it online (with explanation)

Explanation:

// The full output stored as wide characters.
// Each wide character stores 2 ASCII characters (represented as U+XXYY).
// For example, to store "rn" take the ASCII values (r => 0x72, n => 0x6E) and
// find the character U+6E72. Notice the order is reversed. I assume this is
// because x86 is little-endian.
*c=L"湲煢扫牮瀊灰灰灰ੰ⸮⸮⸮⸮⸊⸮⸮⸮ਮ⸮⸮⸮⸮⸊⸮⸮⸮ਮ偐偐偐偐刊䉎䭑乂ꁒ";
main(){
    // printf() returns the number of characters printed. When 'c' contains
    // '\0' at the end of the string, printf() will return 0. Resulting in
    // the loop terminating.
    for(;printf(c++););
}

Swift, 113 bytes

func p()->String{var m="rnbqkbnr";for c in "p....P"{m+="\n";for _ in 1...8{m+="\(c)"}};m+="\nRNBQKBNR";return m}

(Start with the first row, append 8 times p, . and P and then append the last row.)

Python 3, 75 bytes

lambda a="rnbqkbnr",b="p"*8:"\n".join([a,b,*["."*8]*4,b.upper(),a.upper()])

Try it online!

Vis editor, 36 bytes

irnbqkbnr<Escape>5o<Escape>4<Ctrl-k>:i8/.<Enter><Escape>08rpykGpddpVkU
irnbqkbnrX5oX4K:i8/.NX08rpykGpddpVkU

Sequences and are counted as 1 byte each.

  1. i - Insert the first row.
  2. <E>5o<E> - Add 5 newlines under the first line, cursor is now at end of file.
  3. 4<C-k> - Add 4 additional cursors above current cursor
  4. :i8/. - Use a Sam command to insert 8 periods at all 5 cursor locations. Still in NORMAL mode.
  5. <Esc> - Get rid of all but the primary cursor, which is conveniently located at the 2nd line. Still in NORMAL mode.
  6. 08rp - Go to begining and replace the following 8 dots with p.
  7. yk - Yank current line and line above (j is down, k is up).
  8. G - Jump to end of file.
  9. pddp - Paste 1st and 2nd line, then swap them.
  10. VkU - Select entire last line and line above (as before, k is up), uppercase both.

I had a slightly shorter codegolf in vis, but this is more instructure because it uses a Sam expression :i8/ and multi cursors (including the location of the primary cursor).

rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Ex, 66 61 bytes

(not a language per se, but reproductible line-oriented editor)

a
rnbqkbnr
.
t.
%t.
%t.
2s/./p/g
7s/./P/g
8s/./\u&/g
3,6s/././g
x

Second version, shorter, and sure there's room for improvement while staying POSIX.

a
rnbqkbnr
.
t.
%t.
%t.
2,7s/./p/g
7,8s/./\u&/g
3,6s/././g
x

usage notes

To try online, just launch ex yourfilename then paste the lines. The result will be viewable with cat yourfilename.

ungolfed/explanation

It's a line oriented editor (which will serve our purpose here as we operate line by line), with commands following the general syntax "line/range command parameters" (so 3 colomns plus one for comment following)

    a         " append following lines until line with dot only
rnbqkbnr
.
    t .       " duplicate current line
              "rnbqkbnr
              "rnbqkbnr
%   t .       " duplicate the whole buffer (2 lines)
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
%   t .       " copy the whole buffer (4 lines)
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
              "rnbqkbnr
2,7 s/./p/g   " from line 2 to 7, replace each character with lower P
              "rnbqkbnr
              "pppppppp
              "pppppppp
              "pppppppp
              "pppppppp
              "pppppppp
              "pppppppp
              "rnbqkbnr
7,8 s/./\u&/g " on lines 7 and 8, replace each character with its uppercase
              "rnbqkbnr
              "pppppppp
              "pppppppp
              "pppppppp
              "pppppppp
              "pppppppp
              "PPPPPPPP
              "RNBQKBNR
3,6 s/././g   " from line 3 to 6, replace each character with a dot
              "rnbqkbnr
              "pppppppp
              "........
              "........
              "........
              "........
              "PPPPPPPP
              "RNBQKBNR
    x         " write the buffer into file and close the editor

Commands have a full name and a shortcut used here, as we're golfing.

That's all.

Python 3, 80 bytes

print(*(l:=["rnbqkbnr",'p'*8,b:='.'*8,b]),*[m.upper()for m in l][::-1],sep='\n')

Try it online!

When you first look at this code, you might ask: why so many asterisks? 2 asterisks are splat operators, and the other 2 are string multiplication.

I'll first work from the inner-most layer of code and I'll work the way up, explaining everything.

We make a variable b, which is one of the blank lines. Which is the string '.' repeated 8 times. We put that and another copy of b.

That is inside a list, which has some more items before that. There's the top row and the pawn row ('p' repeated 8 times). That is saved into a variable l and splatted into print.

Then we have a comprehension, which makes every line in l have uppercase letters (white's side). We need to reverse that array and then splat it into print.

Finally, we use the new line as an argument separator and we are done!

POSIX Shell + Utilities, 58 bytes

printf rnbqkbnr%08d%32sPPPPPPPPRNBQKBNR|tr 0\  p.|fold -w8

Always nice to outdo a Bash-specific solution :)

$ cat cg; echo; wc -c cg
printf rnbqkbnr%08d%32sPPPPPPPPRNBQKBNR|tr 0\  p.|fold -w8
58 cg
$ ./cg
rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Thunno N, \$28 \log_{256}(96) \approx\$ 23 bytes

(The leaderboard needs an integer, so I rounded it. It's actually 23.05 bytes)

"rnbqkbnr"'p8*'.8*DZMDrusA+r

Attempt This Online!

Port of Emigna's 05AB1E answer.

"rnbqkbnr"  # Push "rnbqkbnr"           STACK: "rnbqkbnr"
'p8*        # Push "pppppppp"           STACK: "rnbqkbnr", "pppppppp"
'.8*D       # Push "........" twice     STACK: "rnbqkbnr", "pppppppp", "........", "........"
ZMD         # Push the stack twice      STACK: ["rnbqkbnr", "pppppppp", "........", "........"],
                                               ["rnbqkbnr", "pppppppp", "........", "........"]
ru          # Reverse, uppercase        STACK: ["rnbqkbnr", "pppppppp", "........", "........"],
                                               ["........", "........", "PPPPPPPP", "RNBQKBNR"]
sA+         # Concatenate               STACK: ['RNBQKBNR', 'PPPPPPPP', '........', '........',
                                                '........', '........', 'pppppppp', 'rnbqkbnr']
r           # Reverse                   STACK: ['rnbqkbnr', 'pppppppp', '........', '........',
                                                '........', '........', 'PPPPPPPP', 'RNBQKBNR']
            # N flag joins by newlines

Vyxal J, 26 24 31 28 25 bytes

-2 bytes thanks to the j flag.
+7 bytes, added code to swap Q and K to make it valid.
-3 bytes thanks to Aaron Miller!
-3 bytes thanks to Kevin Cruijssen

«æ≠⁺tO«\p8*\.8*:W⁋Ḃ⇧‛KQḂV

Explanation

«æ≠⁺tO«                         - Push "rnbqkbnr"
       \p8*                     - Push "pppppppp"
           \.8*:                - Push "........" twice
                W⁋              - Listify, then join by \n
                  Ḃ⇧            - Bifurcate and uppercase the second half
                    ‛KQḂV       - Replace "KQ" with "QK"
<flag>                          - Join by newlines and print entire stack implicitly

Try it Online!

Vyxal L, 17 bytes

«æ≠⁺tO«ƛ`p..`+Ḃ⇧+

Try it Online!

-1 thqnks to Aaron Miller.

«...«           # Compressed string `rnbqkbnr`
     ƛ          # Map...
      `p..`+    # Append `p..` to each
            Ḃ   # Duplicate, reverse
             ⇧+ # Uppercase the reversed copy and append
                # (L flag) vertical join (rotate 90°) at the end.

APL(Dyalog Unicode), 26 25 bytes SBCS

Taking some inspiration from coltim's K answer.

-1 byte thanks to Razetime!

(⎕C⍪⊖)'RNBQKBNR'⍪8/⍪'P..'

Try it on APLgolf! or Get some intermediate values


APL(Dyalog Unicode), 30 28 bytes SBCS

(⎕C∘⊖⍪⊢)⍉'..P'⍪⍤1⍪'RNBQKBNR'

Try it on APLgolf!

⍪'RNBQKBNR' Make a 8x1 matrix of characters
'..P'⍪⍤1 Prepend three columns made from the characters from '..P'
Transpose to get the bottom half of the result
⎕C∘⊖ Mirror vertically and convert to lower case
⍪⊢ Stack this on top of the bottom half

Try it with step by step output

K (ngn/k), 28 26 bytes

-2 bytes from @ngn's improvements

|a,_|a:+"RNBQKBNR",\:"P.."

Try it online!

JavaScript (V8), 65 bytes

_=>`rnbqkbnr
pppppppp
`+`........
`.repeat(4)+`PPPPPPPP
RNBQKBNR`

Try it online!

Explanation :

_ =>            // beginning of function param is not needed so we do _ instead of ()
    `rnbqkbnr
pppppppp
`             // first two lines are written better than doing line1+\n+line2+\n
+             // add to it
`........
`repeat(4)   // repeat this line of ........ 4 times
+`PPPPPPPP
RNBQKBNR`    // last two lines 

Python, 70 60 bytes

print("rnbqkbnr","p"*8,*["."*8]*4,"P"*8,"RNBQKBNR",sep='\n')

Also if someone could explain to me why this doesn't work, I'd appreciate it!

map(print,["rnbqkbnr","p"*8,*["."*8]*4,"P"*8,"RNBQKBNR"])

Zsh, 69 65 bytes

69bytes   try it online!!

build array, print it forwards, print it backwards+lowercase

D=........ X=(RNBQKBNR PPPPPPPP $D $D);printf %s\\n $X ${(Oa)X:l}

StupidStackLanguage, 159 bytes

avvqimqvdflfqwwddflqiiifqwdfbblfbflfavvflddfffffffflfqvvvvvvvifffffffflflfffffffflflfffffffflflfffffffflflvvvvvvvdfffffffflfliifqwifqwwddfbldfldddfwwifvviifbif

Try it online!

Note: Due to StupidStackLanguage not being on tio.run, I have linked the python interpreter with the program loaded in. Close the header and footer tabs to hide the interpreter and only show the StupidStackLanguage program & output.

C, 86 bytes

k(x,y){for(y=x=8;y;putchar(!x--?--y,x=8,10:"RNBKQBNR.P"[y-3u<4?8:y%5^2?x:9]+y/7*32));}

Yet another attempt to golf a loop.

Pyth, 27 bytes

js.erbk_B+"rnbqkbnr"*L8"p..

Try it online!

js.erbk_B+"rnbqkbnr"*L8"p..   
                       "p..   The string "p.."
                    *L8       Repeat each character 8 times, yields ["pppppppp", "........", "........"]
         +"rnbqkbnr"          Prepend "rnbqkbnr" to the list
       _B                     Pair the list with itself, reversed
  .e                          Map as b, with index k:
    rbk                         Change case of elements of b
                                The r token converts to lower case if one of the arguments is 0, and
                                converts to uppercase if one of the arguments is 1.
 s                            Concatenate the two halves of the output
j                             Join on newlines, implicit print

Stax, 22 21 bytes

î}-øΓ╤Ö¼└°≤╠ç]♀WσG`pÑ

Run and debug it

brainfuck, 248 bytes

There is probably a better way to do this.

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

Try it online!

JavaScript (Babel Node), 89 81 bytes

console.log("rnbqkbnr\npppppppp\n"+"........\n".repeat(4)+"PPPPPPPP\nRNBQKBNR\n")

Try it online!

Python 3.8, 64 bytes

I've just started code-golfing, so I'm not very good at it. This is what I got.

print('rnbqkbnr\n'+'p'*8+('\n'+'.'*8)*4+'\n'+'P'*8+'\nRNBQKBNR')

Try it online

C (gcc), 81 bytes

f(){printf("rnbqkbnr\npppppppp\n%s%1$s%1$s%1$sPPPPPPPP\nRNBQKBNR","........\n");}

I'd try reusing more but that wouldn't beat the naive solution because there's no easy upper() or lower() functions.

Try it online!

C (gcc), 92 bytes

f(){puts("rnbqkbnr\npppppppp\n........\n........\n........\n........\nPPPPPPPP\nRNBQKBNR");}

When not overthinking it, this is the best solution.

Try it online!

Japt, 23 bytes

`rnbqkbnr`y+"p.."
y_+Ôu

Test it

`rnbqkbnr`           //String "rnbqkbnr"
          y          //Map each column
           +"p.."    //  and add "p.." to the column
                     //Save to variable 'U'
y_                   //Map each column again
   Ôu                //Reversed, then converted to uppercase
  +                  //Append that

Perl, 58 Bytes

say for map/../?$_:$_ x8,qw(rnbqkbnr p . . . . P RNBQKBNR)

Run like this:

perl -E'say for map/../?$_:$_ x8,qw(rnbqkbnr p . . . . P RNBQKBNR)'

For each elem in the list (qw), print (say) the element if its length is two (or more) or print the element eight times if just length of one.

Commodore BASIC V2/V7 (Commodore C64/128, VIC-20, TheC64Mini) - 129 tokenized and BASIC bytes

 0n$=cH(13):a$="{clear}{ctrl+h}{ctrl+n}rnbqkbnr"+n$:p$="pppppppp"+n$:?a$p$;:fOi=0to3:?"........":nE:goS1:?p$a$:end
 1a$="RNBQKBNR"+n$:p$="PPPPPPPP"+n$:reT

This should be entered into BASIC on a Commodore 128 and saved, it will then load into the VIC/C64 okay (you may need LOAD "CHESS",8,0 on the VIC-20), or use CBM PRG Studio. The reason for this is that I'm going over the 80/88 character limit in line 0 for the C64/VIC-20 respectively. The C128 allows a 160 PETSCII character limit, so with keyword abbreviations this could easily be > 160 character per BASIC line.

The {clear} character is achieved by SHIFT + CLR/HOME, whereas (in a string) CTRL+H disables the SHIFT+C= key to toggle between graphics and business mode, and CTRL+N changes the case to business mode in BASIC.

The resulting listing is as in the screen shot. Copy the listing above and paste it into WinVICE with a right-click on your mouse over the VICE window.

I've added the resulting output on the VIC-20 to prove that it'll load on that mighty micro as well.

Commodore 128 BASIC listing of PETSCII art chess board VIC-20 PETSCII chess board simulator

Keg, 43+1 40 39 37 bytes

rnbqkbnr
∑p)
(4|`.`8*
)(8|P)
RNBQKBNR

Try it online!

Answer History

39 bytes

rnbqkbnr
(8|p)
(4|`.`8*
)(8|P)
RNBQKBNR

Try it online!

40 bytes

rnbqkbnr
(8|p)
(4|(8|\.)
)(8|P)
RNBQKBNR

Try it online!

-4 bytes due to fixing a bug. That's new.

44 bytes

rnbqkbnr\
(8|p)\
(4|(8|\.)\
)(8|P)\
RNBQKBNR

Try it online!

Run length encoding where possible. Implicitly print the result.

In depth:

rnbqkbnr    #push rnbqkbnr
(8|p)   #8 times, push the letter "p" 
\   #escaped newline
(4| #4 times, do
    (8|\.   #8 times, push "."
)\  #then push a newline
) 
(8|P)   #8 times, push P
\       #escaped newline
RNBQKBNR    #push RNBQKBNR

Python 3, 59 bytes

print('rnbqkbnr','p'*8,*['.'*8]*4,'P'*8,'RNBQKBNR',sep='\n')

Interesting that with better unpacking and print function, Python 3 can be much better than Python 2 for golf

This was based on https://codegolf.stackexchange.com/a/95758/2212

Python 3, 66 64 bytes

64 bytes:

print('rnbqkbnr','p'*8,('.'*8+'\n')*4,'P'*8,'RNBQKBNR',sep='\n')

Logic:

  1. Pieces remain the same as previously
  2. pawns and dots get repeated 8 times
  3. "." is appended a new line and the whole thing is repeated 4 times.
  4. entire print is separated with sep='\n'

66 bytes:

print('\n'.join(['rnbqkbnr']+[i*8for i in 'p....P']+['RNBQKBNR']))

Logic:

  1. create the piece arrays as is at first and last positions.
  2. create the middle 6 rows by list comprehension - using repetition i*8.
  3. Sum the lists to get 8 elements
  4. Join elements with a line break in between (\n)
  5. print()

Output:

rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Wren, 61 bytes

I suppose this is not a good way of programming, but this is worth it when it comes to code golf.

Fn.new{"rnbqkbnr
"+"p"*8+"
"+("."*8+"
")*4+"P"*8+"
RNBQKBNR"}

Try it online!

Explanation

Fn.new{          // New function
       "rnbqkbnr
"                // rnbqkbnr\n
+"p"*8           // pppppppp
+"
"                // \n
+("."*8          // ........
       +"
"                // \n
)*4              // above strings 4 times
   +"P"*8        // PPPPPPPP
         +"
RNBQKBNR"        // \nRNBQKBNR
}

x86-64 Machine Code, 81 bytes

57                   push        rdi  
48 BA 52 4E 42 4B 51 42 4E 52 mov         rdx,524E42514B424E52h
52                   push        rdx  
BA 50 50 50 50       mov         edx,50505050h  
52                   push        rdx  
89 54 24 04          mov         dword ptr [rsp+4],edx  
51                   push        rcx  
5A                   pop         rdx  
6A 30                push        30h  
59                   pop         rcx  
48 2B E1             sub         rsp,rcx  
54                   push        rsp  
5F                   pop         rdi  
B0 2E                mov         al,2Eh  
F3 AA                rep stos    byte ptr [rdi]  
0F 10 44 24 30       movups      xmm0,xmmword ptr [rsp+30h]  
0F 11 04 24          movups      xmmword ptr [rsp],xmm0  
54                   push        rsp  
52                   push        rdx  
56                   push        rsi  
5A                   pop         rdx  
5F                   pop         rdi  
5E                   pop         rsi  
B1 10                mov         cl,10h  

80 74 8C FF 20       xor         byte ptr [rsp+rcx*4-1],20h  
E2 F9                loop        addLoop (07FF66A5A13B8h)  
B1 08                mov         cl,8  
B0 0A                mov         al,0Ah  

48 A5                movs        qword ptr [rdi],qword ptr [rsi]
AA                   stos        byte ptr [rdi]  
E2 FB                loop        addLoop+0Bh (07FF66A5A13C3h)  
C6 07 00             mov         byte ptr [rdi],0  
48 83 C4 40          add         rsp,40h  
48 8B F2             mov         rsi,rdx  
5F                   pop         rdi  
C3                   ret  

Create using abuse of push/pop instructions. Could probably save a few bytes by using Linux calling conventions. Outputs to a pointer specified in the first parameter rcx.

Japt -R, 25 bytes

"rnbqkbnr"¬m+'.²ip)®+ÔuÃÕ

Test it

"rnbqkbnr"¬m+'.²ip)®+ÔuÃÕ
"rnbqkbnr"                    :String literal
          ¬                   :Split
           m+                 :Map & append
             '.²              :  "." repeated twice
                ip            :  Prepend "p"
                  )           :End map
                   ®+         :Map & append
                     Ô        :  Reversed string
                      u       :  Uppercased
                       Ã      :End map
                        Õ     :Transpose
                              :Implicit output, joined by newlines

Japt -R, 28 bytes

`rnbqkbnr p . .`¸m!î8
cUmu w

Test it

T-SQL, 70 bytes

PRINT REPLACE('rnbqkbnr
pppppppp
1111PPPPPPPP
RNBQKBNR',1,'........
')

SQL allows line breaks inside quotes, I used that in both the main and the replaced strings. Using a numeral instead of a symbol as my replacement character lets me save 2 additional bytes.

Tried to replace the other two strings, but couldn't find anything shorter than 80 bytes:

SELECT r+p+e+e+e+e+UPPER(p+r)FROM(SELECT'rnbqkbnr
'r,'pppppppp
'p,'........
'e)a

SmileBASIC, 52 bytes

?"rnbqkbnr
?"p"*8?("."*8+CHR$(10))*4;"P"*8?"RNBQKBNR

J, 34 bytes

(tolower,|.)4 8$'RNBQKBNR',8#'P..'

Try it online!

8th, 74 bytes

Code

"RNBQKBNR\n" dup lc . "PPPPPPPP\n" dup lc . ( "........\n" . ) 4 times . .

Output

ok> "RNBQKBNR\n" dup lc . "PPPPPPPP\n" dup lc . ( "........\n" . ) 4 times . .
rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Common Lisp, 72 69 68 65 63 59 bytes

(format t"rnbqkbnr
~8@{p~}
~4@{~8@{.~}
~}~8{P~}
RNBQKBNR"1)

Ideas for improvement are welcomed.

C, 112 109

char *e="rnbqkbnr";main(a){for(;a<65;)putchar((a++-1)%9?a<11?e[a-3]:a<20?112:a<48?46:a<57?80:e[a-57]-32:13);}

Readable:

char *e="rnbqkbnr";
main(a){
    for(;a<65;)
        putchar((a++-1)%9?a<11?e[a-3]:a<20?112:a<48?46:a<57?80:e[a-57]-32:13);
}

Notes:
•char 13 = new line
•char 112 = 'p'
•char 46 = '.'
•char 80 = 'P'
•lowercase char-32 = UPPERCASE CHAR

Thoughts: It's annoying because this is very well golfed for a short solution, but at the same time I could have gone sub-100 in my byte count by just hard coding in most of the chess board and just repeating the . . . part with a puts loop. But that's a very boring answer


Thanks @Ahemone for 3 bytes off!

Python 3, 83 Bytes

t="rnbqkbnr"
n="\n"
print((t)+n+("p"*8)+n+(("."*8+"\n")*4)+n+("P"*8)+n+(t.upper()))

Python, 69 bytes

n='\n'
p,a='p'*8+n,'rnbqkbnr'+n
print a+p+('.'*8+n)*4+(p+a).upper()

There are two things that frustrate me with this code: the print and "upper". Wouldn't an up function be cool? Anyway, here's my first golf answer.

Pyth, 41 35 34 33 Bytes

K*z\p8J"rnbqkbnr"JKp*+*\.8b4rK1rJ1

Golfed a byte thanks to @daHugLenny

Try It Online

Explanation

K*\p8          K="pppppppp"
J"rnbqkbnr"    J="rnbqkbnr"
J              print The Variable J
K              print The Variable K
p+*+*\.8b4     print"........\n" 4 times
rK1            print K but in uppercase
rJ1            print J but in uppercase

Scala, 65 bytes

Seq("rnbqkbnr","p",".",".",".",".","P","RNBQKBNR")map(_*8 take 8)

Really straightforward; makes use of the repeat 8 times and take the first 8 chars

C, 97 bytes

char *e="........\n";main(){printf("rnbqkbnr\npppppppp\n%s%s%s%sPPPPPPPP\nRNBQKBNR\n",e,e,e,e);}

C, 87 bytes

#define E "........\n"
main(){puts("rnbqkbnr\npppppppp\n"E E E E"PPPPPPPP\nRNBQKBNR");}

This uses preprocessor and string literal joining. Sorry, Matthew Greci and CSM, I don't have any reputation here to comment on your solution

Microscript II, 56 bytes

"rnbqkbnr\npppppppp"P"........"PPPP"PPPPPPPP\nRNBQKBNR"

Python 3, 60 bytes

print('rnbqkbnr','p'*8,*['.'*8]*4,'P'*8,'RNBQKBNR',sep='\n')

Python 3, 82 80 75 Bytes

Not the shortest answer in python but it's my first and i think its pretty good for a first time

print('\n'.join((i*8)[:8]for i in'rnbqkbn p . . . . P RNBQKBN'.split()))

CJam, 29 28 bytes

"rnbqkbnr"{"p.."+_W%eu+}%zN*

Try it online!


Explanation:

This new version saves a byte by doing the work on columns inside a map { }% instead of 8*-ing rows. An interesting feature is that the string (array of chars) becomes an array of strings which can then be transposed without splitting.

"rnbqkbnr"  e# hard-coded pieces
{           e# do to each piece
  "p.."+    e# append "p.."
  _W%       e# copy and reverse
  eu+       e# capitalize and append
}%z         e# transpose to rows
N*          e# insert newlines

Racket 82 bytes

(display"rnbqknbr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKNBR")

Another version: 162 bytes

(display(string-append"rnbqknbr\n"(make-string 8 #\p)(list->string(for/list((i
(range 0 37)))(if(= 0(modulo i 9))#\newline #\.)))(make-string 8 #\P)"\nRNBQKNBR"))

Ungolfed:

(define (f)
  (display (string-append
            "rnbqknbr\n"
            (make-string 8 #\p) 
            (list->string
             (for/list ((i (range 0 37)))
               (if(= 0 (modulo i 9)) #\newline #\.)))
            (make-string 8 #\P)
            "\nRNBQKNBR"))
  )

Testing:

(f)

Output:

rnbqknbr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKNBR

Python 3.5, 56 bytes

for r in['rnbqkbn',*'p....P','RNBQKBN']:print((r*8)[:8])

This uses an idea by zawata to encode each line as (r*8)[:8], with a string repeated 8 times and trimmed to length 8. The pawns and empty rows are just 'p'*8, '.'*8, and 'P'*8, with no trimming. The first row uses 'rnbqkbn', with ('rnbqkbn'*8)[:8] including another rook on the right when multiplied and trimmed. The last row is the same but capitalized.

We express the list of row-parts compactly ['rnbqkbn','p','.','.','.','.','P','RNBQKBN'] using Python 3.5's generalized unpacking. We write out the first and last-entries, and the remaining single-character ones are unpacked from a string.

In Python 2, we could settle for split instead for 60 bytes:

for i in'rnbqkbn p . . . . P RNBQKBN'.split():print(i*8)[:8]

C, 113 92 bytes

main(){printf("rnbqkbnr\npppppppp\n%s%1$s%1$s%1$s%1$s%1$sPPPPPPPP\nRNBQKBNR","........\n");}

This makes use of the %1$s parameter-position to repeat the empty lines. Sorry, Matthew Greci, I don't have any reputation here to comment on your solution (you could also have removed some whutespace to get yours down a bit.

Edit 1: Removed arguments (thanks Martin Ender), removed a few too many empty-square lines.

Brain-Flak, 366 350 + 3 = 353 bytes

Try it online!

(((((((((((()()())){}(((({}))){}{}(([((({})){}){}](([({}())](((((({}()){}){}){}()){})<>))<>)<>)<>)))<<>({}<>)<>({}<>)<>({}<>)([]()())>[()]))))))))(()()()()){({}[()]<((((((((((((()()()()()){})()){}()){}))))))))>)}{}(((()()()()()){})<((((((((([][]()()()()))))))))<>)<>>)(((((()()()))){})(({}{})(([{}({})](([{}()](<>({}()())<>)<>)<>)<>)<>))){<>({}<>)}{}

This gets a plus 3 because it requires the -A flag to run properly.

Explanation

First we push the last 5 letters to the active stack.
We also push copies of last 3 numbers to the inactive stack.
This is done with fairly simple methods I won't go into for the sake of brevity.

 (((()()())){}(((({}))){}{}(([((({})){}){}](([({}())](((((({}()){}){}){}()){})<>)<><>)<>)<>)<>)))

We Move Everything from the offstack to the onstack.
The first 3 letters are the same as the last 3 letters in the first line

{<>({}<>)}{}

We push 10 for a new line

((()()()()()){})

Using the value of Q we create a P and push it 8 times

((((((((<...>[()]))))))))

We loop 4 times each time pushing 8 dots and a newline

(()()()())
{({}[()]<
    ((((((((((((()()()()()){})()){}()){}))))))))
>)}{}

We push the last two lines in a very similar way to the first two.

(((()()()()()){})<((((((((([][]()()()()))))))))<>)<>>)(((()()()){})(({}()()())(([{}(()()())](([{}()](<>({}()())<>)<>)<>)<>)<>))){<>({}<>)}{}

Jvascript 152 Bytes - 146 Bytes - 99 Bytes

Golfed code:

(n="rnbqkbnr",l=`
`,s=l+"........",t=n+l+"pppppppp"+s+s)=>t+l+[...t].reverse().join``.toUpperCase()

Ungolfed:

t = (n = "rnbqkbnr", l = "\n", s = l + ".".repeat(8), t = n + l + "p".repeat(8) + s + s) => {
        console.log(t + l + t.split("").reverse().join("").toUpperCase());
    }
    (() => { t(); })();

SQL, 146 Bytes

declare @ char(8)='rnbqkbnr'
print 'pppppppp'
print '........'
print '........'
print '........'
print '........'
print 'PPPPPPPP'
print upper(@)

Gloo, 46 Bytes

Gloo is a very, erm, young language with very little stack manipulation implemented. I think this is probably the best I can do since there's also no uppercase function. The raw bytes are below, and can be run from the interpreter using gloo.py -f <file>.

Offset   00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000000   22 72 6E 62 71 6B 62 6E 72 0A 22 22 70 22 38 2A   "rnbqkbnr.""p"8*
000010   22 0A 22 22 2E 22 38 2A 22 0A 22 2B 34 2A 22 50   ".""."8*"."+4*"P
000020   22 38 2A 22 0A 52 4E 42 51 4B 42 4E 52 22         "8*".RNBQKBNR"

This doesn't count because it was updated after the challenge started, but now there's an easy 32 byte solution:

"rnbqkbnr"'p8*[_?¶Ä'.4*‘8*’;[¶jj

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  22 72 6E 62 71 6B 62 6E 72 22 27 70 38 2A 5B 5F  "rnbqkbnr"'p8*[_
00000010  3F B6 C4 27 2E 34 2A 91 38 2A 92 3B 5B B6 6A 6A  ?¶Ä'.4*‘8*’;[¶jj

Perl 5, 49 bytes

print join$/,$_=rnbqkbnr,"p"x8,("."x8)x4,"P"x8,uc

If only we had something like p instead of print, the remaining legible words could be removed.

print join $/, ...    - print the items joined by the input 
                        record separator, $/, which is "\n" by default
$_ = rnbqkbnr         - set (and return) the default variable. 
                        A bare string is taken as a string constant,
                        but gives a warning...  but only if they're enabled
"p" x 8               - string multiplier
("."x8)x4             - string and list multiplier.
"P" x 8               - same
uc                    - uppercase, if no expression given, uses $_

Of course this depends on the order of evaluation of the parameters to join, as $_ needs to be set before uc is called. Also, this doesn't print a trailing newline, which makes it look ugly if executed from the command line.

JavaScript (ES6), 63 75 bytes

original

a=`rnbqkbnr
`;for(j of'p....P')a+=j.repeat(8)+`
`;a+='RNBQKBNR'

edited, with output integrated:

a=`rnbqkbnr
`;for(j of'p....P')a+=j.repeat(8)+`
`;console.log(a+'RNBQKBNR')

alternative version using throw but I think this is not valid because write extra output. Total 69 bytes:

a=`
rnbqkbnr
`;for(j of'p....P')a+=j.repeat(8)+`
`;throw a+'RNBQKBNR'

C#, 85 84 83 74 bytes

Edit: Accidentally had too many rows of blank spaces!

Edit: Freed an extra character and fixed the ordering (accidentally had it all reversed) many thanks to @KevinCruijssen

Edit: Reverted back to 83 cos I had the prawns on the wrong line

Edit: Thanks to @adrianmp who helped me shrink it further by omitting return

Using the same format as @adrianmp answer above:

x=>"rnbqkbnr\npppppppp\nxxxxRNBQKBNR\nPPPPPPPP".Replace("x","........\n");

Full program using the above function:

using System;

namespace DrawAnASCIIChessBoard
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<object, string> f = 
                x=>"rnbqkbnr\npppppppp\nxxxxRNBQKBNR\nPPPPPPPP".Replace("x","........\n");
                    Console.WriteLine(f(1));
        }
    }
}

Vim, 35 bytes

4irnbqkbnr<cr><esc>ddVkr.kVrpkyG:g//m0<cr>gUGP 

 

4irnbqkbnr<cr><esc> # enter 4 lines, each containing the lowercase figures
dd                  # delete the empty line at the bottom
Vkr.                # replace the bottom two lines with '.'s
kVrp                # replace the next line up with 'p's
kyG                 # go up and copy all lines
:g//m0<cr>          # move the lines with periods to the top
                    # now instead of the black half of the board, we have the white half
gUG                 # change all characters upper case
P                   # paste what we had copied before (the black half) above the current line

The :g//m0 trick is copied from this answer by Lynn.

Mathematica, 76 72 bytes

{"rnbqkbnr
","p"~(t=Table)~8,"
",t["."~t~8<>"
",4],"P"~t~8}<>"
RNBQKBNR"

Table is used to generate lists of strings. When lists of strings meet the concatenation operator <>, they get flattened into strings automatically, so the construction { ... , ... , ... }<>... is preferred over using <> throughout when there are sufficiently many strings to be concatenated.

Also 72 bytes:

{"rnbqkbnr
","p"~(t=Table)~8,"
",{"."~t~8,"
"}~t~4,"P"~t~8}<>"
RNBQKBNR"

In comparison, the direct string itself is 73 bytes:

"rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR"

SX, 65 bytes

我("""rnbqkbnr
pppppppp
"""+('.'*8+"\n")*4+"PPPPPPPP\nRNBQKBNR")

By the way, I am planning on making some radical changes to SX to make it better for code golfing.

Charcoal, 32 bytes

rnbkqbnr¶P×p⁸M⁵↓⁺×P⁸¶RNBKQBNRUB.

Explanation

rnbkqbnr¶                            Print "rnbkqbnr\n"
         P×p⁸                       Print "p" * 8 without moving cursor
              M⁵↓                   Move cursor 5 characters down
                  ⁺×P⁸¶RNBKQBNR      Print "p" * 8 + "\nRNBKQBNR"
                               UB. Set background to '.'

Xasm, 944 Bytes

00000001 114
00000001 110
00000001 98
00000001 113
00000001 107
00000001 98
00000001 110
00000001 114
00000001 10
00000001 112
00000001 112
00000001 112
00000001 112
00000001 112
00000001 112
00000001 112
00000001 112
00000001 10
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 10
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 10
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 10
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 46
00000001 10
00000001 80
00000001 80
00000001 80
00000001 80
00000001 80
00000001 80
00000001 80
00000001 80
00000001 10
00000001 82
00000001 78
00000001 66
00000001 81
00000001 75
00000001 66
00000001 78
00000001 82
00000011

I just did this for novelty. I won't win shortest code but maybe longest! ^_^

Java 7, 103 99 89 bytes

String f(){return"rnbqkbnr\npppppppp\nxxxxPPPPPPPP\nRNBQKBNR".replace("x","........\n");}

10 bytes saved compared to hardcoded output thanks to @SLC's approach in his C# answer.

Try it here.

Output:

rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Vim, 26 bytes

irnbqkbnr<Esc>Y6p5Vr.VrpYGPgUj

Relies on a fresh Vim, or else 5V may select the wrong area.

GNU sed, 54 bytes

s:^:rnbqkbnr:p;h
s:.:p:gp;G
h;s:[^\n]:.:gp;G
s:.:\U&:g

Try it online!

Explanation:

The black pieces are printed first, saving the two associated board ranks in reverse order in the hold space. The white pieces are printed by converting the hold space to uppercase letters.

s:^:rnbqkbnr:p;h   # change pattern and hold spaces to 'rnbqkbnr' and print string
s:.:p:gp           # replace each pattern space letter with a 'p', then print
G;h                # append hold space, then copy pattern space to hold space
s:[^\n]:.:gp       # replace each pattern space letter with a '.', then print
G;s:.:\U&:g        # append hold space and convert pattern space to uppercase
                   # (automatic printing of pattern space at the end)

q, 51 bytes

"\n"sv flip{x,"p...P","c"$("i"$x)-32}each"rnbqkbnr"

Python 2, 61 bytes

print'rnbqkbnr\npppppppp\n'+('.'*8+'\n')*4+'P'*8+'\nRNBQKBNR'

Very brute-force. The 'P'*8 is worth it on the right, but the left pppppppp is flanked by newlines that make it not worth doing as 'p'*8.

Python 3, 64 bytes

Based off DLosc answer to Python 2 as on mine I could not improve.

print(*["rnbqkbnr","p"*8]+["."*8]*4+["P"*8,"RNBQKBNR"],sep="\n")

1 byte less compared to using "\n".join

print("\n".join(["rnbqkbnr","p"*8]+["."*8]*4+["P"*8,"RNBQKBNR"]))

Jelly, 25 24 bytes

“.“.“p“rnbqkbn”ṁ€8µṚ;ŒuY

Try it online!

Thanks to @Lynn for golfing off 1 byte!

How it works

“.“.“p“rnbqkbn”ṁ€8µṚ;ŒuY  Main link. No arguments.

“.“.“p“rnbqkbn”           Yield [".", ".", "p", "rnbqkbnr"].
               ṁ€8        Mold-each 8; reshape each string like the array
                          [1, 2, 3, 4, 5, 6, 7, 8], i.e., cyclically repeat its
                          contents to create strings of length 8.
                          This yields the upper half of the board in reversed
                          order, i.e., the string array
                          A := "........", "........", "pppppppp", "rnbqkbnr"].
                  µ       Begin a new, monadic chain. Argument: A
                   Ṛ      Reverse A.
                     Œu   Convert all characters in A to uppercase.
                    ;     Concatenate the results to both sides.
                       Y  Join the strings, separating by linefeeds.

C#, 94 92 bytes

Edit: Thanks to milk for saving 1 byte by changing string order to remove the return whitespace.

Edit: Saved 1 more byte by adding a dummy parameter (x instead of ()) for the anonymous function and calling it with any object.

x=>{string a="RNBQKBNR\n",b="PPPPPPPP\n",c="........\n";return(a+b).ToLower()+c+c+c+c+b+a;};

Full program using the above function:

using System;

namespace DrawAnASCIIChessBoard
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<object,string>f= x=>{string a="RNBQKBNR\n",b="PPPPPPPP\n",c="........\n";return(a+b).ToLower()+c+c+c+c+b+a;};
            Console.WriteLine(f(1));
        }
    }
}

C# is a very verbose language...


C# full program, 131 bytes

class P{static void Main(){string a="rnbqkbnr\n",b="pppppppp\n",c="........\n";System.Console.Write(a+b+c+c+c+c+(b+a).ToUpper());}}

Ungolfed:

class P
{
    static void Main()
    {
        string a="rnbqkbnr\n",
            b="pppppppp\n",
            c="........\n";
        System.Console.Write(a+b+c+c+c+c+(b+a).ToUpper());
    }
}

JavaScript (ES6), 69 65 bytes

Saved 4 bytes thanks to edc65

let f =

_=>`rnbqkbnr
p....PRNBQKBNR`.replace(/p|\./ig,c=>c.repeat(8)+`
`)

console.log(f());

Ruby, 45 44

1 byte saved thanks to tuxcrafting.

puts"rnbqkbnr",?p*8,[?.*8]*4,?P*8,"RNBQKBNR"

This is 45

puts s="rnbqkbnr",?p*8,[?.*8]*4,?P*8,s.upcase

Trying anything cleverer just seems to make it longer.

Vim, 50 strokes

qairnbqkbnr<enter><esc>8ip<esc><enter><esc>q3@a3ggqaVr.gqj@aj@aj@ajgU$jgU$

Golfed out 8 bits thanks to @DJMcMayhem

Emotinomicon, 89 bytes

Sadly Emotinomicon has nothing like an duplicate stack function. Would be usefull. But at least shorter than Java. :)

😭RNBKQBNR
PPPPPPPP
........
........
........
........
pppppppp
rnbkqbnr😲⏪⏬⏩

Explanation:

😭(...)😲⏪⏬⏩
😭(...)😲            String literal
         ⏪  ⏩      Loop
           ⏬        Pop one char and output

Bash, 73 bytes

e=........\\n
echo -e "rnbqkbnr\npppppppp\n$e$e$e${e}PPPPPPPP\nRNBQKBNR"

V, 27, 26 bytes

i¸P
RNBQKBNRäkgujddppÒ.4Ä

Try it online!

This contains some unprintable characters, so here is the readable version:

i¸P
RNBQKBNR<esc>äkgujddppÒ.4Ä

where <esc> represents 0x1B. Explanation:

i                               " Enter insert mode
 ¸P                             " Enter 8 'P' characters
                                " and a newline
RNBQKBNR<esc>                   " Enter the first row and escape to normal mode.
             äk                 " Duplicate this line and the line above
               guj              " Convert this line, and the line below to lowercase
                  dd            " Delete this line
                    pp          " And paste it twice below us
                      Ò.        " Replace this whole line with '.' chars
                        4Ä      " And create four copies of this line

J, 55 52 bytes

'.rnbkqpPQKBNR'{~(+-@|.)8 8$1 2 3 4 5 3 2 1,8 48#6 0

Test and intermediate steps

   '.rnbkqpPQKBNR'{~(+-@|.)8 8$1 2 3 4 5 3 2 1,8 48#6 0
rnbkqbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBKQBNR
   8 48#6 0
6 6 6 6 6 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   1 2 3 4 5 3 2 1,8 48#6 0
1 2 3 4 5 3 2 1 6 6 6 6 6 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   8 8$1 2 3 4 5 3 2 1,8 48#6 0
1 2 3 4 5 3 2 1
6 6 6 6 6 6 6 6
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
   (+-@|.)8 8$1 2 3 4 5 3 2 1,8 48#6 0
 1  2  3  4  5  3  2  1
 6  6  6  6  6  6  6  6
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
_6 _6 _6 _6 _6 _6 _6 _6
_1 _2 _3 _4 _5 _3 _2 _1
   '.rnbkqpPQKBNR'{~(+-@|.)8 8$1 2 3 4 5 3 2 1,8 48#6 0
rnbkqbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBKQBNR

Jolf, 32 bytes

pη++γͺ"rnbqkbnr"*8'p*²*8'.6ΜγdBH

I oughta remake this language soon... Try it here!

Bonus: all-ascii version:

pη++on~."rnbqkbnr"*8'p*~:*8'.6ΜndBH

Explanation

pη++γͺ"rnbqkbnr"*8'p*²*8'.6ΜγdBH
     ͺ                           pair
      "rnbqkbnr"                  this string
                *8'p              and 8 p's
    γ                            (call this γ)
   +                             add that with
                      *8'.        8 .'s
                     ²             wrapped in an array
                    *     6         repeated 6 times
  +                               add THAT with
                            Μγd    γ mapped over
                              BH   the uppercase version of H
pη                                and join all this with newlines

Brainfuck, 224 bytes

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

Took almost an hour to get this.

Japt, 37 bytes

[A="rnbqkbnr"B='pp8 C='.p8 CCCBu Au]·

I really oughta remake this language soon... Test it online!

How it works

[                                  ]  // Wrap all of the following in an array:
 A="rnbqkbnr"                         //   A = "rnbqkbnr",
             B='pp8                   //   B = 8 "p"s,
                    C='.p8            //   C = 8 periods,
                           CCC        //   3 more copies of C,
                              Bu      //   B.toUpperCase(),
                                 Au   //   and A.toUpperCase().
                                    · // Join everything with newlines and implicitly print.

PowerShell v2+, 44 bytes

'rnbqknbr'
'p'*8
,('.'*8)*4
'P'*8
'RNBQKNBR'

Strings left on the pipeline are implicitly printed with Write-Output at program execution. We couple that with the default newline behavior for an array to produce the four lines of periods with the comma-operator.

PS C:\Tools\Scripts\golfing> .\draw-ascii-chess-board.ps1
rnbqknbr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKNBR

05AB1E, 24 bytes

Uses CP-1252 encoding.

"rnbqkbnr"'p8×'.8×D)Âu«»

Try it online!

Explanation

"rnbqkbnr"                # push the string "rnbqkbnr"
                          # STACK: "rnbqkbnr"
          'p8×            # push the char "p" repeated 8 times
                          # STACK: "rnbqkbnr", "pppppppp"
              '.8×        # push the char "." repeated 8 times
                          # STACK: "rnbqkbnr", "pppppppp", "........"
                  D       # duplicate
                          # STACK: "rnbqkbnr", "pppppppp", "........", "........"
                   )      # wrap in list
                          # STACK: ["rnbqkbnr", "pppppppp", "........", "........"]
                    Â     # push a reversed copy of the list
                          # STACK: ["rnbqkbnr", "pppppppp", "........", "........"], 
                                   ["........", "........", "pppppppp", "rnbqkbnr"]
                     u«   # convert to upper-case and concatenate
                          # STACK: ['rnbqkbnr', 'pppppppp', '........', '........', 
                                    '........', '........', 'PPPPPPPP', 'RNBQKBNR']
                       »  # join list by newline

///, 52 bytes

/:/........
/rnbqkbnr
pppppppp
::::PPPPPPPP
RNBQKBNR

Try it online!

PHP, 67 64 63 62 bytes

Note: uses IBM-850 encoding.

<?=~str_pad(ìæØÄöØæì§ÅÅÅÅÅÅÅÅ,54,§ÐÐÐÐÐÐÐÐ)?>PPPPPPPP
RNBQKBNR

Run like this:

echo '<?=~str_pad(ìæØÄöØæì§ÅÅÅÅÅÅÅÅ,54,§ÐÐÐÐÐÐÐÐ)?>PPPPPPPP
RNBQKBNR' | php 2>/dev/null;echo

And in "unencoded" form:

echo '<?=str_pad("rnbqkbnr\npppppppp",54,"\n........"),"PPPPPPPP\nRNBQKBNR";' | php 2>/dev/null;echo

Explanation

Unfortunately I couldn't find a more interesting approach (that actually saves bytes) than to just print the string, except for the 4 middle lines which are repeated using str_repeat str_pad.

Tweaks

MATL, 26 bytes

'rnbqkbnr' 'p..'!l8X"vtPXk

Try it online!

Explanation

'rnbqkbnr'   % Push this string (1×8 char array)
'p..'!       % Push this string transposed (3×1 char array)
l8X"         % Repeat 1×8 times: gives 3×8 char array
v            % Concatenate the two arrays vertically into a 4×8 char array
tP           % Duplicate and flip vertically
Xk           % Convert to uppercase. Implicitly display the two 4×8 arrays

JavaScript (ES6), 73

.toUpperCase is simply too long

_=>`rnbqkbnr
${r=c=>c[0].repeat(8)+`
`,r`p`+(b=r`.`)+b+b+b+r`P`}RNBQKBNR`

O.textContent=(
  
_=>`rnbqkbnr
${r=c=>c[0].repeat(8)+`
`,r`p`+(b=r`.`)+b+b+b+r`P`}RNBQKBNR`

)()
<pre id=O></pre>

Powershell, 82 73 bytes

$x=("rnbqkbnr",$("p"*8),$("."*8),$("."*8));$x+$x[3..0].ToUpper()-join"`n"

R, 75 bytes

Edit: Fixed a silly error and simply write out the uppercase part of the board now.

cat("rnbqkbnr\npppppppp\n",rep("........\n",4),"PPPPPPPP\nRNBQKBNR",sep="")

Batch, 105 bytes

@set e=@echo ........
@echo rnbqkbnr
@echo pppppppp
%e%
%e%
%e%
%e%
@echo PPPPPPPP
@echo RNBQKBNR

Batch is seriously verbose...

Pyke, 28 27 26 bytes

"rnbqkbnr"i"P..p"1c8m*Xil3

Try it here!

I learned something new about my language today: 1c can be used as a 2 char way of splitting a string into a list of characters.

"rnbqkbnr"i                - i = "rnbqkbnr"
                             stack = ["rnbqkbnr"])
           "P..p"1c        -  chunk("P..p", 1)
                             stack = ["rnbqkbnr", ["P", ".", ".", "p"]]
                   8m*     - map(8*>, ^)
                             stack = ["rnbqkbnr", ["PPPPPPPP", "........", "........", "pppppppp"]]
                      X    - splat(^)
                             stack = ["rnbqkbnr", "pppppppp", "........", "........", "PPPPPPPP"]
                       il3 - i.changecase()
                             stack = ["rnbqkbnr", "pppppppp", "........", "........", "PPPPPPPP", "RNBQKBNR"]
                           - implicit join with newlines

rnbqkbnr
pppppppp
........
........
PPPPPPPP
RNBQKBNR

Dart, 62 bytes

f()=>"rnbqkbnr\n${"p"*8}\n${"........\n"*4+"P"*8}\nRNBQKBNR";

I am annoyed that I can't reduce the "........\n"*4 part further, but due to the newline being included in the multiplication, all rewrites come out at the same length as the original:

"${"."*8}\n"*4
("."*8+"\n")*4  
"........\n"*4

Dart's string functions, like toUpperCase(), have too long names to use them in golfing.

IBM/Lotus Notes Formula, 69 bytes

A:="rnbqkbnr";B:="pppppppp";C:="........";A:B:C:C:C:C:@Uppercase(B:A)

Formula in a multi-value field with newline as the seperator.

Output:

enter image description here

Python 2, 68 bytes

Posting anyway although the above Python 2 version is shorter. It would not have to be a one liner for the amount of bytes, just played with it.

x,y,z="rnbqkbnr\n","p"*8+"\n","."*8+"\n";print x,y,4*z,(y+x).upper()

Python 2, 63 bytes

print"\n".join(["rnbqkbnr","p"*8]+["."*8]*4+["P"*8,"RNBQKBNR"])

Unfortunately, the fairly simple approach was much shorter than the "clever" stuff I tried at first...

Bonus answer, also 63 bytes:

print"\n".join(["rnbqkbnr"]+[c*8for c in"p....P"]+["RNBQKBNR"])

Haskell, 53 bytes

a="rnbkqbnr" 
unlines$a:map(<$a)"p....P"++["RNBKQBNR"]

a is used as the first line and to determine the length of strings made of p, . and P (-> <$a). .

Cheddar, 56 bytes

a=['rnbqkbnr','p'*8]+['.'*8]*2->(a+a.rev=>@.upper).vfuse

Uses the new => feature.

Explanation

a=                      // set a to the first half
  ['rnbqkbnr','p'*8] +  // First two rows
  ['.'*8]*2             // Next two dots
->(
   a +
   a.rev=>@.upper       // Reverse and map all items to uppercase
).vfuse                 // Join on newlines

Actually, 26 bytes

'p8*"rnbqkbnr"│û@û4'.8*n((

Try it online!

Explanation:

'p8*"rnbqkbnr"│û@û4'.8*n((
'p8*                        "p"*8 ["pppppppp"]
    "rnbqkbnr"              that string ["rnbqkbnr", "pppppppp"]
              │             duplicate stack ["rnbqkbnr", "pppppppp", "rnbqkbnr", "pppppppp"]
                û@û         uppercase the dupes ["RNBQKBNR", "PPPPPPPP", "rnbqkbnr", "pppppppp"]
               4   '.8*n    "."*8, 4 times ["RNBQKBNR", "PPPPPPPP", "........", "........", "........", "........", "rnbqkbnr", "pppppppp"]
                        ((  move the uppercase strings to the bottom of the stack, implicitly print