# Print a Tabula Recta!

The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius cipher. It looks like this:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY


I frequently need this, but can't find it anywhere on the internet to copy and paste from. Because the square table is so long, and takes frigging ages to type, your code must be as short as possible.

### Rules/Requirements

• Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.
• If it is possible, provide a link to a site where your program can be tested.
• Your program must not write anything to STDERR.
• Standard Loopholes are forbidden.
• Your program can output in any case, but it must be printed (not an array or similar).

### Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

## Submissions

# Language Name, N bytes


where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

# Ruby, <s>104</s> <s>101</s> 96 bytes


If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

# Perl, 43 + 2 (-p flag) = 45 bytes


You can also make the language name a link which will then show up in the leaderboard snippet:

# [><>](http://esolangs.org/wiki/Fish), 121 bytes


Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 86986; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 53406; // This should be the user ID of the challenge author.

/* App */

return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(a) {
});
comment_page = 1;
}
});
}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(c) {
if (c.owner.user_id === OVERRIDE_USER)
});
else process();
}
});
}

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

function getAuthorName(a) {
return a.owner.display_name;
}

function process() {
var valid = [];

var body = a.body;
if(OVERRIDE_REG.test(c.body))
body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
});

var match = body.match(SCORE_REG);
if (match)
valid.push({
user: getAuthorName(a),
size: +match[2],
language: match[1],
});

});

valid.sort(function (a, b) {
var aB = a.size,
bB = b.size;
return aB - bB
});

var languages = {};
var place = 1;
var lastSize = null;
var lastPlace = 1;
valid.forEach(function (a) {
if (a.size != lastSize)
lastPlace = place;
lastSize = a.size;
++place;

.replace("{{NAME}}", a.user)
.replace("{{LANGUAGE}}", a.language)
.replace("{{SIZE}}", a.size)

var lang = a.language;
if (/<a/.test(lang)) lang = jQuery(lang).text();

languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link};
});

var langs = [];
for (var lang in languages)
if (languages.hasOwnProperty(lang))
langs.push(languages[lang]);

langs.sort(function (a, b) {
if (a.lang > b.lang) return 1;
if (a.lang < b.lang) return -1;
return 0;
});

for (var i = 0; i < langs.length; ++i)
{
var language = jQuery("#language-template").html();
var lang = langs[i];
language = language.replace("{{LANGUAGE}}", lang.lang)
.replace("{{NAME}}", lang.user)
.replace("{{SIZE}}", lang.size)
language = jQuery(language);
jQuery("#languages").append(language);
}

}
body { text-align: left !important}

width: 290px;
float: left;
}

#language-list {
width: 290px;
float: left;
}

font-weight: bold;
}

table td {
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr>

</tbody>
</table>
</div>
<div id="language-list">
<h2>Winners by Language</h2>
<table class="language-list">
<tr><td>Language</td><td>User</td><td>Score</td></tr>
<tbody id="languages">

</tbody>
</table>
</div>
<table style="display: none">
</tbody>
</table>
<table style="display: none">
<tbody id="language-template">
</tbody>
</table>

• Regarding rule 1: do we have to include each header for each function we use? – owacoder Jul 30 '16 at 15:59
• I meant if we use printf, we need to include stdio.h, if isalpha is used, ctype.h is needed, etc. Is this correct? – owacoder Jul 30 '16 at 16:03
• You should probably put "lowercase is allowed" in the challenge specification itself. Just so people are less likely to miss it if they don't see these comments. – Sherlock9 Jul 30 '16 at 18:25
• do i have to print it or can i return a string/char array – downrep_nation Jul 30 '16 at 19:57
• Thanks for the question for making me stay awake all night. (+1) – Anastasiya-Romanova 秀 Aug 22 '16 at 18:45

# 05AB1E, 6 5 bytes

Thanks to Downgoat for saving 1 byte. Code:

ADv=À


Explanation:

A      # Push the lowercase alphabet.
D     # Duplicate it.
v    # For each in the alphabet...
=   #   Print without popping and with a newline.
À  #   Rotate 1 to the left.


Uses the CP-1252 encoding. Try it online!.

• What is the purpose of duplicating it? – Esolanging Fruit Nov 19 '16 at 19:32
• @Challenger5 The v command consumes a value, iterating over it. In this case, it consumes the alphabet, so it iterates 26 times. That's also the exact amount of times we need to iterate of the =À function. The = leaves the stack intact and the À only rotates the top of the stack element 1 to the left. Does this answer your question? :) – Adnan Nov 19 '16 at 20:01

# Vim, 25 23 bytes

:h<_↵jjYZZP25@='Ypx$p'↵  Where ↵ is the Return key. :h<_↵ Open the help section v_b_<_example. jjY Copy the "abcdefghijklmnopqrstuvwxyz" line. ZZP Close this buffer and paste in ours. 25@=' '↵ Run these commands 25 times: Yp Duplicate line and move to column 1 of new line. x Cut the first character.$p       Move to the end and paste.


EDIT: lowercase is okay, so I can save two keys.

• That :h<_<cr>jjY is genius – Downgoat Jul 30 '16 at 18:18
• Wow, that's amazing! OP said lowercase was OK so you can remove V~ – DJMcMayhem Jul 30 '16 at 18:22
• @RobStarling see: meta.codegolf.stackexchange.com/q/8995/40695 – Downgoat Jul 30 '16 at 22:57
• I dare someone to try this in emacs. – addison Jul 31 '16 at 3:49

# Python 2, 5957 53 bytes

a=range(65,91)*27
a[::-27]=[10]*26
print bytearray(a)


Thanks to @xsot for -4 bytes!

• I like this one. By the way, you can shorten the last line to print bytearray(a). – xsot Jul 31 '16 at 4:44

## ///, 220 bytes

/|/\/\///n/WXY|m/JKL|l/PQRS|k/CDEF|j/ZaNfV|i/MbAeI|h/TUcO|g/GHdB|f/OlTU|e/BkGH|d/ImMbA|c/VnZaN|b/NfVnZ|a/AeImM/ab
ed
kg
DEFgC
EFgCD
FgCDE
gk
HdBkG
de
mi
KLiJ
LiJK
im
ba
fc
lh
QRShP
RShPQ
ShPQR
hl
UcOlT
cf
nj
XYjW
YjWX
jn


Try it online!

This was surprisingly non-trivial and I have no clue whether it's optimal.

The only way to golf a problem like this in /// is by extracting common substrings. (Turns out I was wrong.) However, due to the nature of the output it's not at all clear which substrings should best be extracted since you can't actually extract the entire alphabet due to the linebreaks. So you'll need to extract some substrings of the wrapped alphabet, but then there are trade-offs in terms of how long you make the substrings and which ones you choose.

So here's what I did. This is a CJam script which finds all substrings up to length 25 in the given string and for each of them computes how many bytes its extracting would save. Basically if there are N copies of a length-M substring, you'd save (N-1)*(M-1) - 5 substrings, these substrings don't contain slashes. Also, technically, when you've already extract 8 substrings or so, the constant offset at the end reduces to -4, but the script doesn't consider that.

Anyway, here's what I did with the script:

• Run the script against the current code (which is initially just the output).
• Out of the substrings that yield the largest improvement, pick the shortest one. If there are several, pick the lexicographically smallest (from what I can tell, for the given input this reduces overlaps between substrings).
• Replace all occurrences of the chosen substring in the code with an unused lower case letter.
• Prepend /x/ABC/ to the code where x is the chosen letter and ABC is the substring.
• Repeat until there are no substrings left that would save anything.

At the end, we save a few more bytes by replacing the resulting // with | and prepending /|/\/\// (this is why extracting substrings only costs 4 instead of 5 bytes after the 8th substring or so).

Like I said, I have no clue whether this is optimal and I find the rather irregular-looking result quite interesting. It might be possible to get to a shorter solution by chosing non-optimal (but more) substrings somewhere down the line. I wonder what the complexity class of this problem is...

• That... is... brilliant... – George Gibson Jul 31 '16 at 11:12
• @GeorgeGibson Thanks... I had to start over halfway through when I noticed a certain YX in the output. ;) – Martin Ender Jul 31 '16 at 11:13
• My answer is gone, it was a dupe of this (bigger and later). +1 for that [incredible golfing]! – Erik the Outgolfer Aug 1 '16 at 8:51
• Regarding complexity class, shouldn't the problem be undecidable since /// is Turing complete? The problem is "given a string, find the shortest /// program that outputs it". Except for small strings, there would exist /// programs that loop indefinitely (but cannot be proven to loop indefinitely) that cannot be shown to not produce the desired output without running them forever. Formal proof I'm myself not sure yet but intuitively isn't it possible? – ghosts_in_the_code Jun 1 '19 at 14:07

# C, 47 bytes

i;f(){for(i=702;i--;)putchar(i%27?90-i%26:10);}


Try it on Ideone

A single loop, printing the alphabet every 26 characters but with every 27th character replaced by a newline.

• Damn! I just wrote the exact same function! :-) You can save the first semicolon by using f(i) then just call f() without any arguments. – Level River St Jul 31 '16 at 2:23
• @LevelRiverSt That would be relying on undefined behavior. – Anders Kaseorg Jul 31 '16 at 3:07
• It's ultimately up to you, but PPCG considers languages to be defined by their implementations, so as long as you mention in which compiler it works, relying on UB is not considered a problem. – Dennis Jul 31 '16 at 5:53
• you can shave 1 byte by initializing i when first mentioned: i=702;f(){for(;i--;)//... – tucuxi Aug 2 '16 at 12:49
• @tucuxi No, because function answers have to be reusable. – Anders Kaseorg Aug 2 '16 at 20:14

# J, 15 bytes

u:65+26|+/~i.26

u:65+26|+/~i.26
i.26  creates vector [0 1 2 ... 25]
+/~      builds an addition table with itself
26|         modulo 26 to every element
65+            add 65 to every element
u:               convert every element from codepoint to character

• Nice! Very clever arithmetic. The simplest approach that uses |. (Shift) is 8 bytes longer! (i.26)(|."0 _)u:65+i.26 – Dan Oak Jul 30 '16 at 18:55
• @dahnoak You can shorten it to 16 bytes u:65+1&|.^:]i.26 since the power adverbs tracks previous results if given a list. – miles Jul 30 '16 at 22:53
• @miles Nice, my approach using |. is 17 bytes: u:65+|."0 1/~i.26 (still using /~) – Leaky Nun Jul 30 '16 at 23:04
• @LeakyNun Another 17 byte approach is u:65+(|./~,.)i.26. I got rid of the rank by using a hook and ,. to columnize the range but it ended up the same length. – miles Jul 30 '16 at 23:19
• don't you know if I can find the source code of tryj.tk somewhere? I couldn't find any info neither about it neither about the author (f211) – Dan Oak Aug 5 '16 at 11:27

## ///, 128 bytes

/:/fABCDEFGHIJKLMNOPQRSTUVWXYZ
fbfbAfxf
xbA_xf_x
xfbbbAfbb//x/bff//f/\///b/\\:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:


Try it online!

Inspired by Jakube's amazing answer to the L-phabet challenge, I thought I'd try my hand as well at actual programming in /// as opposed to just using it for compression. This was pretty tricky and I needed four attempts, but in the end it came out much shorter than my compression-based solution.

### Explanation

A quick primer on ///: basically the interpreter just reads the code character by character and does the following:

• If it's neither a \ nor a /, print it.
• If it's a \, print the next character.
• If it's a /, parse a /x/y/ instruction (with the same escaping rules) and repeatedly substitute all x in the remaining code with y.

Taking some more inspiration from Jakube, for simplicity I'll just explain a 4x4 version of this:

/:/fABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbb//x/bff//f/\///b/\\:B:C:D:


We start by replacing those : with the stuff between the second and third /. This will end up being the code the rotates the subsequent rows. We get this:

/x/bff//f/\///b/\\fABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbBfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbCfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbDfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbb


The f, b and x are just shorthands for common strings, which we'll expand now. The f is for slashes, the b is for backslashes and the x is for \// which happens to come up quite a lot. The reason I'm using aliases for the single-character substrings / and \ is that they'd have to be escaped in the first substitution instruction, so I'm actually saving quite a lot of bytes by not needing all those backslashes. Here's what we get after x, f and b have been filled in:

ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\B/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\C/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\D/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\


So the first line is just printed verbatim. Then we get to the funky part that rotates all further rows. It actually consists of four different instructions. One thing to notice is that I've escaped all occurrences of A within these instructions. The reason for this is that it allows me to distinguish As within the instructions from As in the remaining rows, which need to be processed differently.

/\/\A/\//


This matches /A and replaces it with /, removing the A. Note that this substring only appears at the front of each ABCD, so this drops the first character of all subsequent lines:

/
\//\A_\//


This matches a linefeed followed by a slash and replaces it with A_/. So this inserts an A at the end of each line, completing the rotation and also turns the linefeed into an underscore.

/_\//
\//


This matches _/ and replaces it with a linefeed followed by a slash. The reason I need to make this detour via the underscore is the fact that /// applies each instruction repeatedly until the string no longer matches. That means you can never use an instruction of the form /x/axb/ where x, a and b are arbitrary strings, because after the substitution x will always still match. In particular, this means we can't just insert something in front of a linefeed. We need to replace the linefeed in the process and the undo this replacement.

/\\\A/\\B/


This matches \A and replaces it with \B, so that the instructions after the remaining rows process the next character. After all four instructions have been processed the remaining string looks like this:

BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\C/BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\D/BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\


So now the first rotated row gets printed, and then the next set of instructions rotates the remaining rows by another cell and so on. After the last rotation, we have a few more instructions that we can ignore and then we end with the incomplete instruction:

/\\\B/\\


Incomplete instructions at the end are simply ignored and the program terminates.

• Nice one. Yesterday I experimented a little bit with a different idea. I wanted to substitute each character in each line. Something like A->B, B->C, ... But it didn't quite work. Removing the first char and appending it at the end is definitly a much better approach. – Jakube Aug 2 '16 at 8:56
• @Jakube I tried that as well but wasn't getting anywhere. It's too hard to avoid messing up the subsequent instructions as well. – Martin Ender Aug 2 '16 at 9:42
• 124 bytes: goo.gl/efSLKQ This is just your solution, but I've managed add a few additional substitutions, so that you only need to write out the alphabet once. Used the same strategy on similar problem as well. – Jakube Sep 10 '17 at 19:12
• 122: goo.gl/zRsBbR – Jakube Sep 10 '17 at 19:17

# Jelly, 7 bytes

ØAṙJṢj⁷


Try it online!

### How it works

ØAṙJṢj⁷  Main link. No arguments.

ØA       Set argument and return value to "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
J     Yield the indices of the argument, i.e., [1, ..., 26].
ṙ      Rotate the alphabet 1, ..., 26 units to the left.
This generates all rotations, but not in the correct order.
Ṣ    Sort the rotated alphabets.
j⁷  Join, separating by linefeeds.


# Emacs, 47 bytes

abcdefghijklmnopqrstuvwxyz^M
^P
<F3>
^K ^K ^Y ^Y
^P
^<space> ^F ^W ^E ^Y ^A
<F4>
^U 2 4 F4


Where ^P means "Control P", etc. That's 47 bytes, since the F3 and F4 keys require two ASCII bytes.

After entering the starting input, it defines a keyboard macro to duplicate the line and move the first character to the end. It then runs the macro a further 24 times.

• Welcome to PPCG, nice answer! It's very rare to see a Emacs answer, I don't even know if a Emacs answer already have been posted. – TuxCrafting Aug 3 '16 at 12:59

## JavaScript (ES6), 56 bytes

_=>"ABCDEFGHIJKLMNOPQRSTUVWXYZ".replace(/./g,"$&$'$\n")  Yes, that's right, half my code is the alphabet string literal. Best I could do without the literal is 81 bytes: _=>[...Array(26)].map((_,i,a)=>a.map(_=>(i++%26+10).toString(36)).join).join   If you want a program rather than a function, then remove the _=> and wrap in console.log() for a cost of 10 bytes. • Woah, well done. A very elegant solution. How does it work? – Polyducks Aug 8 '16 at 10:16 • @Polyducks Lots and lots of regexp magic. Naturally /./g matches each letter of the supplied alphabet string. In the replacement string, $& represents the match itself, $' the part of the string after the match and $ the part of the string before the match. $$&$' would therefore represent the original string, but of course it's trivial to move the part after the match to the beginning, thus providing the rotation effect. – Neil Aug 8 '16 at 10:41 • Super smart! Well done @Neil! – Polyducks Aug 9 '16 at 14:04 # Mathematica 68 61 bytes Column[""<>RotateLeft["A"~CharacterRange~"Z",#]&/@0~Range~25]  Thanks to... @MartinEnder (7 bytes) • Also, Array might be shorter that mapping over a Range. – Martin Ender Jul 30 '16 at 16:21 • I just checked and Array does indeed save a byte, but you can then save another by avoiding Column: Array[{"A"~CharacterRange~"Z"~RotateLeft~#,"\n"}&,26,0]<>"" (you'll just need to replace the \n with an actual linefeed). – Martin Ender Jul 30 '16 at 16:31 • Wait no built-in? Impossible – MC ΔT Jul 31 '16 at 13:35 • Print@@@NestList[RotateLeft,"A"~CharacterRange~"Z",25] – alephalpha Aug 1 '16 at 17:21 • Grid@Array[FromCharacterCode[Mod[+##-2,26]+65]&,{26,26}] – matrix89 Jul 28 '17 at 7:59 # Python 2, 756561 58 bytes a='%c'*26%tuple(range(65,91)) for x in a:print a;a=a[1:]+x  Gets the alphabet with map(chr,range(65,91)), then manually applies the string shift operation. Thanks to @LeakyNun and @TheBikingViking for -4 bytes! Thanks to @xnor for -3 bytes! • Apparently a="ABCDEFGHIJKLMNOPQRSTUVWXYZ" is shorter. – Leaky Nun Jul 30 '16 at 16:49 • You can do a[1:] instead of a[1:26]. – TheBikingViking Jul 30 '16 at 17:40 • Your loop can be done as for x in s:print s;s=s[1:]+x. – xnor Jul 30 '16 at 21:09 • You can do one byte shorter than hardcoding the alphabet: s='%c'*26%tuple(range(65,91)). – xnor Jul 30 '16 at 21:24 # C, 88 64 bytes Call f() without arguments. f(i,j){for(i=j=0;i<26;putchar(j==26?j=0,i++,10:65+(i+j++)%26));}  # Piet, 247 bytes/190 codels Try it Online! So, this took far longer than I had anticipated, and I have a few ideas on some other more efficient (more stack-friendly) approaches, but I finally got the dang thing working (and fixed an interpreter bug and added IDE features along the way), so here it is. Hardly the most byte-efficient language, but a hell of a lot of fun. Here's a larger view, and a trace showing the path taken. History up on my GitHub. As a stack-based language, it's far too convoluted to explain briefly, but here's a basic overview of what the various sections/loops do. All variable and function names are just for explanation, as there are no variables or functions in Piet. • Initialization (upper-left): starts line_counter at 27, loads '@' as cur_letter, sets letter_count to 27 • Main loop (starting at dark purple, center top) • Decrements letter_counter • Branches to reset_line if zero (light cyan 2-block) • Rolls cur_letter to the top of the stack • Branches to check_done if cur_letter > 'X' (teal/red block, right side) • Increments cur_letter and outputs it (lower-right corner) • Branches to reset_letter if cur_letter > 'Y' (light green block, left) • Rolls letter_counter_ back to top of stack, back to top of loop • reset_line branch (big pink square): • Outputs newline character • Resets letter_count to 27 • Continues back to top of main loop • check_done branch (right half inside) • Rolls line_counter to top • Branches to end if zero • Decrements line_counter and rolls back to bottom of stack • Resumes where it left off, printing letter • reset_line branch (left side, green block): • Resets cur_letter to '@' • Resumes where it left off, rolling/returning to top of loop # MATL, 8 bytes With thanks to @Dennis, who suggested that MATL should incorporate modular indexing, and to @Suever, who had the idea of automatic pairwise operations. 1Y2t&+Q)  Try it online! 1Y2 % Predefined literal: string 'AB...Z' t % Push another copy of it &+ % 2D array with all pairwise additions of ASCII code points from that string. % Gives the 26×26 array [130 131... 155; 131 132... 146; ...; 155 156... 180] Q % Add 1 to each element. First entry is now 131, etc ) % Index into string 'AB...Z'. Since it has length 26 and MATL uses modular % indexing, 131 is the first entry (character 'A'), etc. Implicitly display  # Javascript, 1139691 76 bytes A super-short version for running in the console: l="ZABCDEFGHIJKLMNOPQRSTUVWXY";for(C=26;C--;console.log(l=l.slice(1)+l[0])); # Javascript/HTML, 140123118 105 bytes A prettier version, with an HTML output that makes it easier for OP to copy and paste: <script>l="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(C=26;C--;document.write(l+"<br>"),l=l.slice(1)+l[0]);</script> (EDIT: I should've just used the string A-Z instead of generating it) (EDIT 2: Thanks to @Neil and @DanTheMan for their input (see comments)) • Isn't the first C=26 irrelevant? – DanTheMan Jul 30 '16 at 21:57 • Oh snap. Looks like I forgot to delete it when I moved it to the for. Fixed! Thanks @DanTheMan :) – Polyducks Jul 30 '16 at 22:00 • l.slice(0,1) is just l[0], while the ,27 is unnecessary, at which point you can move the slice and end up with l.slice(1)+l[0]. Also I think you can move the console.log to the loop body thus avoiding the trailing ;. – Neil Jul 30 '16 at 22:46 • Testing this now, thanks @Neil! EDIT: Sweet holy moly. Thanks to you both, I'll add you to credit in the comment. – Polyducks Jul 30 '16 at 22:48 • Ooh, nice, that's an even better way of simplifying the console.log. – Neil Jul 30 '16 at 23:06 # PowerShell, 44 bytes -1..24|%{-join[char[]](65..90)[($_-25)..$_]}  # R, 4742 41 bytes write(rep(LETTERS,27)[-27*1:26],1,26,,'')  Try it online! Generates 27 alphabetes, removes 27-th letters and prints in 26 columns. Improvement inspired by @Giuseppe's solution. • 46 bytes – Giuseppe Jan 31 '18 at 18:49 • Wow, I thought I had tried every indexing trick to use rep but this was particularly inspired! Very nice. I'd upvote again if I could. – Giuseppe Feb 1 '18 at 19:28 • you can use 1 instead of "" for stdout. – Giuseppe Mar 22 '18 at 19:02 # Sesos, 27 25 bytes 0000000: 685902 ae7b33 764992 c45d9b 397360 8fef1f 7bca72 hY..{3vI..].9s...{.r 0000015: 3adc33 07  Try it online! Check Debug to see the generated SBIN code. ### Sesos assembly The binary file above has been generated by assembling the following SASM code. add 26 jmp jmp rwd 1, add 1, rwd 1, add 1, fwd 2, sub 1 jnz rwd 2, add 64 jmp fwd 2, add 1, rwd 2, sub 1 jnz fwd 1, sub 1 jnz fwd 1 jmp jmp put, fwd 1 jnz rwd 27 jmp put, fwd 1 jnz add 10, put, get, fwd 1 jmp rwd 1, add 1, fwd 1, sub 1 jnz fwd 1 ; jnz (implicit)  ### How it works We start by initializing the tape to ABCDEFGHIJKLMNOPQRSTUVWXYZ. This is as follows. Write 26 to a cell, leaving the tape in the following state.  v 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 26 0  As long as the cell under the data head is non-zero, we do the following. Copy the number to the two cells to the left and add 64 to the leftmost copy.  v 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 90 26 0 0  Move the leftmost copy to the original location, then subtract 1 from the rightmost copy.  v 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 25 90 0  The process stops after 26 iterations, since the rightmost copy is 0 by then. We move a cell to the right, so the final state of the tape after the initialization is the following.  v 0 0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  Now we're ready to generate the output, by repeating the following process until the cell under the data head is zero. First, we print the character under the data head and move to the right, repeating this step until a cell with value 0 is found. After printing ABCDEFGHIJKLMNOPQRSTUVWXYZ, the tape looks as follows.  v 0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  Now we move the data head 27 units to the left (back to the leading 0) and repeat the print-move combination until a cell with value 0 is found. This prints nothing and leaves the tape as follows. v 0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  Now, we write 10 to the current cell, print the corresponding character (linefeed) and zero the cell with a call to get on empty input, leaving the tape unchanged. Afterwards, we move the content of the cell to the right to the current cell, then move the data head to units to the right.  v 65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  The next iteration is slightly different. The first printing step prints BCDEFGHIJKLMNOPQRSTUVWXYZ, leaving the tape as follows.  v 65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  Now we move the data head 27 units to the left.  v 65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  The subsequent printing loop prints A and leaves the tape as follows.  v 65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  Once again, we print a linefeed, move the content of the cell to the right to the current cell, then move the data head to units to the right.  v 65 66 0 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0  After 24 more iterations, the final step of moving the data head to the right leaves the tape in the following state.  v 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0 0  The cell under the data head is now 0 and the program terminates. TIO uses a newer version of Sesos, which is backwards-compatible for SASM, but generates shorter SBIN code. # Haskell, 5653 52 Bytes mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']  same length: (using a suggestion by @AndersKaseorg) a=['A'..'Z'] mapM putStrLn[take 26$[x..'Z']++a|x<-a]


to do modular stuff you have to import Data.Char to get the chr function, 74 59 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
}T01L_L
\.
$&$'$¶  Leading linefeed is significant. Try it online! # Brain-Flak, 222 bytes (((()()()()){})<(((({}){}){}){})>)((((([[]]{}){}()){}))<>()){<>({}<>)<>{({}<(({}()))>[()])}{}<>([({})]<>{})<>(({}<>))<>({}[()])}{}<>(({}<>))<>{}{}{}<>{({}<(({}())[()]<{({}<<>({}<>)>[()])}{}{}((()()()()()){})>)>[()])}{}{}{}  Try it online! I'm new to Brain-Flak, so maybe this can be golfed a lot, but at least it's a first try. It stores 27 full alphabets on the left stack, then moves the alphabets to the right and replaces every 27th letter by a newline. My sourcecode is a bit confusing, but i will add it nevertheless. (((()()()()){}) park 8 in third <(((({}){}){}){})> push 64 ) ((((([[]]{}){}()){}))<>()) push 26 twice on left and 27 on right left stack: 64 letter, 26 letter count, 26 constant right stack: 27 alphabet count { while alphabet count <> ({}<>)<> push 26 back to right { while counter ( {} park counter in third <(({}()))> add next letter to stack [()] decrement counter ) } {} pop 0 counter <>([({})]<>{}) set Z back to A-1 <>(({}<>)) move 26 twice from right to left <> go to right stack ({}[()]) decrement counter } {} pop 0 <>(({}<>)) push 26 twice on right stack <>{}{}{} pop counter, @ and Z from left stack <> go to right stack { while alphabet count ( {} save alphabet count on third stack <( ({}())[()] save constant on third stack and push lettercount 26 + 1 for lf < { while lettercount ( {} save lettercount on third stack < <>({}<>) pull letter from left to right > [()] decrement lettercount ) } {} pop 0 {} pop last letter ((()()()()()){}) push lf > )> [()] decrement alphabet count ) } {}{}{} pop alphabet count, constant and lf  # V, 36, 10 bytes ¬AZ25ñÙx$p


Try it online!

This uses the "Latin1" encoding.

Explanation:

¬AZ         " Insert the alphabet
25ñ      " 25 times...
Ù     "   Duplicate this line
x    "   Cut the first character
$p " Move to the end of the line and past the character we just cut  • Go and add it then ;) – Conor O'Brien Aug 4 '16 at 7:36 • @CᴏɴᴏʀO'Bʀɪᴇɴ You should know by now that the only way anything gets done in this language is at a snails pace. I'll probably have that up and running sometime next January. :P – DJMcMayhem Aug 4 '16 at 9:25 • Oh, in the next 6-8 weeks? – Conor O'Brien Aug 4 '16 at 18:00 # C#, 98 bytes I have tried to see if I can generate the letters shorter than just initializing them as a string, but it's not really possible. The letters are 26 bytes and this snippet alone for(char a='A';a<'[';a++)  is 25 bytes. I think initializing them and then appending them with a+=a is a good solution, but with C# you are limited by the bytecount of functions like Substring() and Console.WriteLine(). My attempt at 98 bytes: var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a;for(int i=0;i<26;i++)Console.WriteLine(a.Substring(i,26));  # Octave, 27 bytes We're adding a row and a column vector, and Octave nicely expands the sigleton dimensions, no need for bsxfun (as you would need in Matlab). [mod((v=0:25)+v',26)+65,'']  # q, 20 bytes (til 26)rotate\:.Q.A  • 14 bytes -1_'26 27#.Q.A – streetster Jul 5 '18 at 19:08 # Java, 190176172 163 bytes class C{public static void main(String[] a){int s=0;while(s<26){p(s,26);p(0,s++);p(-1,0);}}static void p(int s,int e){for(;s<e;s++)System.out.write(s<0?10:65+s);}}  • You can easily shave off some more bytes: System.out.printf("%c", ...) -> System.out.write(...), '\n' -> 10, 'A' -> 65. Note sure the newline/line feed char suggestion is allowed, but ideone output requirement. :) – MH. Jul 31 '16 at 13:34 • @MH. great tips! saved 9 bytes :) – Master_ex Jul 31 '16 at 14:19 • I know it's been more than a year since you've answered this, but you can still golf a few things: The space at String[]a can be removed; and int s=0;while(s<26){p(s,26);p(0,s++);p(-1,0);} can be for(int s=0;s<26;p(0,s++),p(0,s++))p(s,26);. – Kevin Cruijssen Sep 18 '17 at 9:58 # Bash, 66 bytes A=printf %c {A..Z} for i in {0..25};do echo${A:$i}${A::$i};done  I create a full alphabet in A, then print 26 rotated versions of it by taking the characters beginning at n and appending those preceding position n. # Perl, 42 bytes Full credit to @Dom Hastings for this. @l=A..Z;say@l[$_..25],@l[0..$_-1]for 0..25  Or (same byte count) : $_=join"",A..Z;eval'say;/./;$_=$\'.$&;'x26  Needs -M5.010 or -E to run, for instance : perl -E '@l=A..Z;say@l[$_..25],@l[0..$_-1]for 0..25'  My old answer (55 bytes) : @t=A..Z;for$i(0..25){print$t[($_+$i)%26]for 0..25;say}  Need -M5.010 to run. So run with : perl -M5.010 -e '@t=A..Z;for$i(0..25){print$t[($_+$i)%26]for 0..25;say}'  It's probably possible to do shorter though, but i didn't find out how... yet • Managed to come up with a couple of 42 byte solutions: @l=A..Z;say@l[$_..25],@l[0..$_-1]for 0..25 and $_=join"",A..Z;eval'say;/./;$_=$\'.\$&;'x26 both require -E/-M5.010`. – Dom Hastings Aug 1 '16 at 15:58
• Nicely done. Looks much better than my try! thanks – Dada Aug 1 '16 at 17:19