Generate alphabet with 4 copies of each letter

28

3

Note that this is not the same as Print the alphabet four times.

This task is to write a program to generate four copies of each letter of the English alphabet, one letter per line, on standard output:

A
A
A
A
B
B
B
B

etc.

The output should include newlines after each letter.

Uppercase letters with no extra output are preferred; however, lowercase letters and/or extra whitespace are acceptable if capitalizing/stripping would lengthen your solution.

EDITED TO ADD: The solution must be complete enough to execute. I should be able to invoke an implementation of the language, paste the code from the answer, and get results, without typing any additional code.

The above question of completeness came up in the context of a C solution. Surely there must be a standing rule or convention about this on a code golfing site? If so, I'll gladly yield to the community guidelines. But this is my take:

  1. With regard to C specifically, you need to include (and count) the main(){...} around the code, since it won't compile otherwise. Warnings because there's no #include <stdio.h> are fine as long as the code still compiles. In general, a compiled language requires a compilable unit.

  2. A bare expression that yields the desired results is acceptable if there's a way to execute the expression directly; for instance, if the language has a REPL. So you can submit Haskell without a main= as long as it actually works as written at e.g. the ghci prompt. But since that means putting let on your declarations, it may be a net win to stick with the runhaskell format.

  3. Similarly, awk scripts should be in BEGIN (or END, with the assumption that stdin is attached to /dev/null) blocks since we're not processing any input.

etc.

Mark Reed

Posted 2013-12-13T17:10:13.383

Reputation: 667

4I'm slightly confused. Is the challenge here just to output the alphabet with each letter repeated four times, or does the output actually need to be stored in a file as well? – Iszi – 2013-12-13T17:26:35.687

And do I have to output only the alphabet? – Justin – 2013-12-13T17:33:25.533

@MarkReed Do I need to print it with newlines in between? Why not just print it, but newlines optional? – Justin – 2013-12-13T17:44:28.813

3Also, I recommend rephrasing your challenge so that it is more like a challenge and less like telling the story of how you invented your answer. – Justin – 2013-12-13T17:46:33.117

The last bit muddies the whitespace rules just a tad. Could you please clarify? Particularly, am I reading it right to interpret that extra whitespace is okay but omission of newlines is not? – Iszi – 2013-12-13T19:44:33.120

Answers

16

APL (5)

⍪4/⎕A

Matrix format () of 4-replication (4/) of alphabet (⎕A).

marinus

Posted 2013-12-13T17:10:13.383

Reputation: 30 224

1I count 9 bytes. – Oliver Ni – 2016-10-23T04:06:11.670

APL uses a code-page that maps each of the characters it uses to one byte. This code page can be found here, on IBM's website.

– Steven H. – 2016-10-23T04:08:31.877

1Seems unlikely to be beaten. :) – Mark Reed – 2013-12-17T12:53:32.470

@StevenH. Link is dead – Stan Strum – 2018-03-25T22:59:20.333

@StanStrum I believe the link is dead because of deprecation, but for the sake of code golfing this meta answer should work.

– Steven H. – 2018-03-27T02:11:06.777

11

Python - 37

for i in range(104):print chr(i/4+65)

i goes from 0 to 104; it is divided by four and added to the ascii value for A, and the resulting character is printed.

Justin

Posted 2013-12-13T17:10:13.383

Reputation: 19 757

I take it Python uses integer division by default? Would kinda be nice if PowerShell did right now. As it is, the code necessary to force it into integer division is too long for this trick to help me save anything on my script. – Iszi – 2013-12-13T17:42:02.687

@lszi - Python takes its cue from the type of the operands. 3/4 is 0, while 3.0/4.0 is 0.75; range() generates integers. – Mark Reed – 2013-12-13T17:43:25.653

1This does not work on newer versions of python. First, the print function must be called with brackets, and / no longer does integer division by default (even if both numbers are integers), which is //'s job

Try: for i in range(104):print(chr(i//4+65)) – None – 2013-12-14T08:27:24.420

3@Consciousness I know that. I deliberately chose to use an old version so that it can be golfed better. If you were to run this at Ideone.com, you'd choose "Python" instead of "Python 3" – Justin – 2013-12-14T19:48:40.803

3@Consciousness - by "newer versions of python", you're referring to "Python 3", which is far from universally adopted at this point. I generally assume that anything claiming to be "Python" without a specified version is Python 2.x until proven otherwise; Python 3 code tends to be explicitly so labeled. – Mark Reed – 2014-04-10T20:01:39.503

8

R, 30 28 27

write(rep(LETTERS,e=4),1,1)

Former version with 30 bytes:

cat(rep(LETTERS,e=4),sep="\n")

Sven Hohenstein

Posted 2013-12-13T17:10:13.383

Reputation: 2 464

I think a literal newline is a byte shorter :) – Giuseppe – 2017-07-25T15:31:20.813

@Giuseppe Can you specify this idea? – Sven Hohenstein – 2017-07-25T15:34:02.330

1Try it online! – Giuseppe – 2017-07-25T15:36:34.147

@Giuseppe Really good idea! Thanks for pointing out. – Sven Hohenstein – 2017-07-25T15:37:59.573

You can use 1 instead of "" to specify stdout in write as well, which saves another byte. – Giuseppe – 2018-03-16T12:53:09.107

@Giuseppe Thanks for the hint. – Sven Hohenstein – 2018-03-16T15:09:04.403

The final 1 is not necessary, making it 25 bytes.

– Robin Ryder – 2019-09-23T15:53:50.413

7

C, 59

I submit this, an uncompetitively long answer, simply because I don't see a C submission yet. And that makes me sad. :-/

LATER: Props to @moala for doing a "/4" int version of this, saving 13 chars!

float i;main(){while(i<26)printf("%c\n",65+(int)i),i+=.25;}

Darren Stone

Posted 2013-12-13T17:10:13.383

Reputation: 5 072

I've edited my answer, now saving even 2 more chars! – moala – 2013-12-17T01:37:14.670

and another one! – moala – 2013-12-17T02:42:47.890

6

J: 18 13

4#u:65+i.26 1

I'm still pretty shaky with J, so this could probably be improved

p.s.w.g

Posted 2013-12-13T17:10:13.383

Reputation: 573

3You can use replicate (#) instead of division like so: 4#u:65+i.26 1. Also, ~ swaps a function's arguments, so if you ever find yourself doing (expression) F value, you can replace that with value F~ expression to save a character. – marinus – 2013-12-14T01:34:34.310

@marinus Thanks for the tip. I'm still learning J and it's hard to find any good info with those kinds of tricks. – p.s.w.g – 2013-12-14T01:55:25.077

14#65{26,.\a. for 12 bytes. – FrownyFrog – 2017-10-29T06:59:41.147

5

PowerShell: 32 23

Golfed code:

[char[]](65..90*4)|Sort

Walkthrough:

[char[]](...) takes an array of objects and converts them to ASCII characters.
65..90 are the ASCII codes for A-Z.
*4 repeats the series 4 times.
|Sort sorts the output.

Note:

If you want this written to a file, just throw >, followed by a file name, at the end.

Iszi

Posted 2013-12-13T17:10:13.383

Reputation: 2 369

5

Befunge 98 - 18

1+::'g`#@_4/'A+,a,

Works by storing a number and ending when it reaches 104. Prints out the corresponding character of the alphabet for the number divided by 4, followed by a newline. But if I need not add a newline after each letter, then it is 16 chars:

1+::'g`#@_4/'A+,

Can be reduced if I can print more characters (ie all of them four times)(7 6 chars, even works in Befunge 93):

1+:4/,

With newline:

1+:4/,a,

Justin

Posted 2013-12-13T17:10:13.383

Reputation: 19 757

5

Ruby, 23

puts ([*?A..?Z]*4).sort

All credit to @manatwork -- upvote his comment, not this. :)

Darren Stone

Posted 2013-12-13T17:10:13.383

Reputation: 5 072

Huge. @manatwork, I'll make the edit but obviously I don't deserve any credit! – Darren Stone – 2013-12-13T19:01:29.093

5Better make it puts [*?A..?Z].map{|i|[i]*4} or puts ([*?A..?Z]*4).sort, so the letters get ordered as in the example. – manatwork – 2013-12-13T19:02:39.913

2@manatwork: puts (?A..?Z).map{|i|[i]*4} is a character shorter. You can call map directly on a Range, so you don't need the splat in this case. – Mark Reed – 2013-12-13T19:08:01.410

5

Haskell, 46

x a=a++a
main=putStr$['A'..'Z']>>=x.x.(:"\n")

MtnViewMark

Posted 2013-12-13T17:10:13.383

Reputation: 4 779

1putStr$['A'..'Z']>>=("golf">>).(:"\n") saves 8 bits – Angs – 2016-10-23T17:03:34.213

4

GolfScript: 17 15 characters

26,{65+...}%+n*

manatwork

Posted 2013-12-13T17:10:13.383

Reputation: 17 865

4

C, 46 44 43

46:

i;main(){while(i<104)printf("%c\n",65+i++/4);}

44:

i=260;main(j){for(;(j=i++>>2)<91;puts(&j));}

44 too:

i=260;main(j){while(j=i++>>2,j<91)puts(&j);}

Thanks to @marinus, 43:

i=260;main(j){while(j=i++/4,j<91)puts(&j);}

Should I add a bounty for getting to 42? :)

moala

Posted 2013-12-13T17:10:13.383

Reputation: 221

650 rep. is needed to comment on anything, and you have 101 at the time of posting this comment. – syb0rg – 2013-12-13T22:44:50.453

Great! Thanks! Answer edited! – moala – 2013-12-14T10:39:09.167

1You can replace >>2 by /4. – marinus – 2013-12-17T02:37:08.350

4

Perl 5, 21

map{print"$_
"x4}A..Z

Dom Hastings

Posted 2013-12-13T17:10:13.383

Reputation: 16 415

2It has never occurred to me to put a literal newline inside a double-quoted string in Perl. +1. – Mark Reed – 2013-12-14T04:44:55.173

I should note, that I didn't either, but @manatwork mentioned it on another answer of mine and it's stuck! – Dom Hastings – 2013-12-14T09:00:21.840

4

Forth, 37

'h 0 [do] [i] 4 / 'A + emit cr [loop]

Darren Stone

Posted 2013-12-13T17:10:13.383

Reputation: 5 072

35 bytes by avoiding +. – Bubbler – 2019-10-12T08:41:22.663

4

Java: 56

for(int i=0;i<104;)System.out.println((char)(i++/4+65));

edit: changed from 'print' to 'println'

reblerebel

Posted 2013-12-13T17:10:13.383

Reputation: 61

2The solution must be complete enough to execute. I should be able to invoke an implementation of the language, paste the code from the answer, and get results, without typing any additional code. i think your solution violates this condition – user902383 – 2016-07-20T11:58:15.943

2@user902383 If you paste it into JShell (the Java REPL in Java 9) it works, and you don't even need the final semicolon. – David Conrad – 2016-07-20T12:09:10.953

@DavidConrad Its awesome then, I think I might start using REPL/JShell. – user902383 – 2016-07-20T12:13:33.650

@user902383 You can download an early access release here. It was glitchy under Cygwin so I run it directly from a cmd prompt; should be find on other OS's and hopefully they'll fix the Cygwin problems for the final release.

– David Conrad – 2016-07-20T12:20:05.750

The output should include newlines after each letter. – Pierre Arlaud – 2013-12-17T14:14:07.500

thanks for pointing that out, it should print a new line each time now – reblerebel – 2013-12-17T19:51:55.410

4

Actually, 6 bytes

4ú*SÖi

Try it here!

Explanation

4ú*SÖi

4 *         Do 4 times
 ú          Create string of alphabet in lowercase
   S        Sort it
    Ö       Switch Case
     i      Push each character of string

4 Bytes with lowercase and no newline:

4ú*S

Stupe

Posted 2013-12-13T17:10:13.383

Reputation: 151

1Welcome to PPCG! – Erik the Outgolfer – 2016-07-21T09:56:30.180

4

16-bit x86 machine code MS-DOS COM, 25 bytes

In hex:

B409BA160189D7B96800F6C1037502FE05CD21E2F5C3400A24

This is a complete MS-DOS .COM program. Copy the byte sequence to the file with .com extension and run it from DOSBox

Disassembly:

00: B4 09        mov    ah,0x09         ;INT 21h "Write string to STDOUT" function
02: BA 16 01     mov    dx,0x116        ;Address of the string s ('$'-terminated)
05: 89 D7        mov    di,dx           ;Because there's no way to dereference address in DX
07: B9 68 00     mov    cx,104          ;CX=26*4
_0000000A:
0A: F6 C1 03     test   cl,0x03         ;When lower two bits are zero...
0D: 75 02        jne    _00000011       ;...do not skip the next instruction
0F: FE 05        inc    b,[di]          ;*s++
_00000011:
11: CD 21        int    21              ;Print the string
13: E2 F5        loop   _0000000A       ;Until --CX==0
15: C3           retn
16: 40           db     0x40            ;s[0], starts with 'A'-1
17: 0A           db     0x0A            ;'\n'
18: 24           db     '$'             ;Terminator required by the print function

meden

Posted 2013-12-13T17:10:13.383

Reputation: 711

3

Perl 6, 32

.say for (('A'..'Z') »xx»4)[*;*]

Mark Reed

Posted 2013-12-13T17:10:13.383

Reputation: 667

I think this is the first time that Perl 6 was the first solution I thought of, but the hyperoperator just seemed a natural fit. – Mark Reed – 2013-12-15T04:43:55.790

3

Bash: 24 characters

printf %s\\n {A..Z}{,,,}

manatwork

Posted 2013-12-13T17:10:13.383

Reputation: 17 865

3

BrainF* ,79 60

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

AShelly

Posted 2013-12-13T17:10:13.383

Reputation: 4 281

4+++++++++++++[>+>+++++>++<<<-]>--->>[<.<.>.<.>.<.>.<.>+>-] – alephalpha – 2013-12-14T07:32:00.127

3

AWK, 48

Lets try it with AWK...

END{s=65;for(i=104;i--;s+=0==i%4)printf"%c\n",s}

As suggested by manatwork we can get rid of 2 chars

AWK, 46 (Edit)

END{for(i=104;i--;s+=0==i%4)printf"%c\n",s+65}

AWK,40 (editing MarkReed's code)

END{for(;i<104;){printf"%c\n",i++/4+65}}

Wasi

Posted 2013-12-13T17:10:13.383

Reputation: 1 682

By removing the initialization of variable s you can spare 2 characters: END{for(i=104;i--;s+=0==i%4)printf"%c\n",s+65}. – manatwork – 2013-12-14T20:01:32.690

1Putting the code in an END block means it requires an input stream (even if it's /dev/null) to work. Does that modify the char count? Anyway, BEGIN{for(;++i<104;){printf"%c\n",i/4+65}} is 5 chars shorter. – Mark Reed – 2013-12-15T02:36:04.363

@MarkReed Your code isn't working. Check this

– Wasi – 2013-12-15T09:03:36.367

D'oh. So close! :) But I still don't like the END pattern's requirement for an input stream... – Mark Reed – 2013-12-15T22:00:25.340

3

PowerShell, 21

65..90|%{,[char]$_*4}

A slightly different approach to Iszi's. And shorter :-)

Joey

Posted 2013-12-13T17:10:13.383

Reputation: 12 260

3

Canvas, 5 bytes

Z41*⟳

Try it here!

Explanation:
Code        | Explanation                                  | Stack
------------+----------------------------------------------+------------------------------
Z          | The uppercase alphabet                       | "ABC..."
  41*     | Stretched by 4 horizontally and 1 vertically | "AAAABBBBCCCC..."
        ⟳  | Rotated clockwise                            | "A¶A¶A¶A¶B¶B¶B¶B¶C¶C¶C¶C¶..."
            | Print ToS (implicit)                         |

With replaced with \n upon printing.

hakr14

Posted 2013-12-13T17:10:13.383

Reputation: 1 295

3

Kotlin, 66 59 bytes

Save 7 bytes removing for loop.

fun main(a:Array<String>){repeat(104){println('A'+(it/4))}}

Try it online!

JohnWells

Posted 2013-12-13T17:10:13.383

Reputation: 611

3

brainfuck, 48 bytes

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

Try it online!

Prints in lowercase, separated by carriage returns. Uses wrapping 8 bit cells as well as cells left of the origin, though you can prepend a > to counter the latter.

Jo King

Posted 2013-12-13T17:10:13.383

Reputation: 38 234

I was about to post a new one, but you managed to completely out-do my best, i got 71 bytes with ++++++[->++>++++>++++++++++<<<]++++>+>++>+++++<[->.<<.>>.<<.>>.<<.>>.+<<.>] – KrystosTheOverlord – 2019-01-31T15:17:50.357

3

C# LINQ 115 Bytes110 Bytes

Enumerable.Range(65, 26).SelectMany(i => Enumerable.Repeat(i,4))
.ToList().ForEach(i=> Console.WriteLine((char)i));

supermeerkat

Posted 2013-12-13T17:10:13.383

Reputation: 113

1Welcome to PPCG! Nice first post! – Rɪᴋᴇʀ – 2016-07-20T14:09:52.403

3

05AB1E, 6 bytes

A4×{S»

Explanation:

A       # Push 'abcdefghijklmnopqrstuvwxyz'
 4×     # Repeat four times
   {    # Sort
    S   # Split into list
     »  # Join by newlines
        # Implicit print

Without newlines, 4 bytes

A4×{

Try it online!

Oliver Ni

Posted 2013-12-13T17:10:13.383

Reputation: 9 650

3

Jelly, 5 bytes (non-competing?)

ØAx4Y

Try it online!

Explanation:

ØAx4Y Main link
ØA    “ABCDEFGHIJKLMNOPQRSTUVWXYZ”
   4  4
  x   Repeat each element of x y times
    Y Join x with newlines

Erik the Outgolfer

Posted 2013-12-13T17:10:13.383

Reputation: 38 134

2

Common Lisp, 58 bytes

(dotimes(i 26)(format t"~4@{~c
~:*~}"(code-char(+ 65 i))))

Explanation

(dotimes(i 26) ; loop for i from 0 to 25
(format t"~4@{~c
~:*~} ;output four times character given by (code-char(+ 65 i)) followed by newline

Try it online!

user65167

Posted 2013-12-13T17:10:13.383

Reputation:

2

Japt -R, 7 6 bytes

;B²²¬n

Test it

;B²²¬n
;B         :Uppercase alphabet
  ²        :Duplicate
   ²       :Duplicate
    ¬      :Split
     n     :Sort
           :Implicitly join with newlines

Shaggy

Posted 2013-12-13T17:10:13.383

Reputation: 24 623

2

Vim, 27 bytes

:h<_
jjYZZPVUqqx4O<C-r>"<esc>jq25@q

Thanks @Lynn for the trick of grabbing the alphabet from helpfiles.

James

Posted 2013-12-13T17:10:13.383

Reputation: 54 537

2

Brain-Flak, 122 bytes

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

this is 120 bytes of source code, and +2 bytes for the -Ar flags.

Try it online!

James

Posted 2013-12-13T17:10:13.383

Reputation: 54 537

2

Pyth, 8 bytes

-2 bytes thanks to Mr. Xcoder

VGj*4rN1

Try it online!

Explanation

VG          # For N in G (the alphabet)...
     rN1    # ...convert N to uppercase...
   *4       # ...generate the string NNNN...
  j         # ...join on newlines
            # Implicit print for each iteration

Jim

Posted 2013-12-13T17:10:13.383

Reputation: 1 442

18 bytes: VGj*4rN1 – Mr. Xcoder – 2017-08-20T20:29:25.797

VrG1NNNN is also 8 bytes and is way simpler... – hakr14 – 2018-03-24T16:11:26.937

2

05AB1E, 5 bytes

Aε4F=

Try it online!

Magic Octopus Urn

Posted 2013-12-13T17:10:13.383

Reputation: 19 422

2

PHP, 36 bytes

while($i<104)echo"
",chr($i++/4+65);

bonus version, 38 bytes

while($i<104)echo"@K"^chr($i++/4+1).A;

Run with -nr or try it online.

Titus

Posted 2013-12-13T17:10:13.383

Reputation: 13 814

2

Perl 6, 22 bytes

.say xx 4 for "A".."Z"

Even though this is an old challenge, I found a different approach to the Perl 6 answer, so I decided to post it.

Try it online!

Luke

Posted 2013-12-13T17:10:13.383

Reputation: 4 675

2

///, 73 bytes

/./\/A
A
A
A
\/A\///~/.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!

This just replace . by /AAAA/A/ to get AAAA/A/B/AAAA/A/C/AAAA... (newlines excluded for legibility). The /~/ is the first part of a dummy replacement which does nothing; it's there to grab initial / from the first replacement. We don't need to worry about the final /A/ (/Z/ by the time the interpreter gets there), because /// simply exits if it encounters EOF while reading a replacement

stellatedHexahedron

Posted 2013-12-13T17:10:13.383

Reputation: 871

2

Whitespace, 126 117 bytes

[S S S T    S S S S S S N
_Push_64][S N
S _Duplicate][N
S S S N
_Create_Label_LOOP][S N
N
_Discard_top][S S S T   N
_Push_1][T  S S S _Add][S N
S _Duplicate][S N
S _Duplicate][S S S T   S T T   S T T   N
_Push_91][T S S T   _Subtract][N
T   S S S N
_Jump_to_Label_EXIT_if_0][S S S T   S S N
_Push_4][N
S S T   N
_Create_Label_INNER_LOOP][S S S T   N
_Push_1][T  S S T   _Subtract][S N
S _Duplicate][N
T   T   S N
_Jump_to_Label_LOOP_if_negative][S N
T   _Swap_top_two][S N
S _Duplicate][T N
S S _Print_as_character][S S S T    S T S N
_Push_10][T N
S S _Print_as_character][S N
T   _Swap_top_two][N
S N
T   N
_Jump_to_Label_INNER_LOOP]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online (containing raw spaces, tabs and new-lines only).

General explanation in pseudo-code:

Integer i = 64
Start Loop:
  i = i+1
  If i == 91: Exit program with error
  Integer j = 4
  Start Inner Loop:
    j = j-1
    If j is negative: Go to the next iteration of the outer Loop
    Print i as character
    Print new-line
    Go to the next iteration of the Inner Loop

Example run:

Command        Explanation                            Stack            STDOUT    STDERR

SSSTSSSSSSN    Push 64                                [64]
SNS            Duplicate top (64)                     [64,64]
NSSSN          Create Label_LOOP                      [64,64]
 SNN            Discard top                           [64]
 SSSTN          Push 1                                [64,1]
 TSSS           Add (64+1)                            [65]
 SNS            Duplicate top (65)                    [65,65]
 SNS            Duplicate top (65)                    [65,65,65]
 SSSTSTTSTTN    Push 91                               [65,65,65,91]    
 TSST           Subtract (65-91)                      [65,65,-26]
 NTSSSN         If 0: Jump to Label_EXIT              [65,65]
 SSSTSSN        Push 4                                [65,65,4]
 NSSTN          Create Label_INNER_LOOP               [65,65,4]
  SSSTN          Push 1                               [65,65,4,1]
  TSST           Subtract (4-1)                       [65,65,3]
  SNS            Duplicate top (3)                    [65,65,3,3]
  NTTSN          If negative: Jump to Label_LOOP      [65,65,3]
  SNT            Swap top two                         [65,3,65]
  SNS            Duplicate top (65)                   [65,3,65,65]
  TNSS           Print as character                   [65,3,65]        A
  SSSTSTSN       Push 10                              [65,3,65,10]
  TNSS           Print as character                   [65,3,65]        \n
  SNT            Swap top two                         [65,65,3]
  NSNTN          Jump to Label_INNER_LOOP             [65,65,3]

  SSSTN          Push 1                               [65,65,3,1]
  TSST           Subtract (2-1)                       [65,65,2]
  SNS            Duplicate top (2)                    [65,65,2,2]
  NTTSN          If negative: Jump to Label_LOOP      [65,65,2]
  SNT            Swap top two                         [65,2,65]
  SNS            Duplicate top (65)                   [65,2,65,65]
  TNSS           Print as character                   [65,2,65]        A
  SSSTSTSN       Push 10                              [65,2,65,10]
  TNSS           Print as character                   [65,2,65]        \n
  SNT            Swap top two                         [65,65,2]
  NSNTN          Jump to Label_INNER_LOOP             [65,65,2]

  SSSTN          Push 1                               [65,65,2,1]
  TSST           Subtract (2-1)                       [65,65,1]
  SNS            Duplicate top (1)                    [65,65,1,1]
  NTTSN          If negative: Jump to Label_LOOP      [65,65,1]
  SNT            Swap top two                         [65,1,65]
  SNS            Duplicate top (65)                   [65,1,65,65]
  TNSS           Print as character                   [65,1,65]        A
  SSSTSTSN       Push 10                              [65,1,65,10]
  TNSS           Print as character                   [65,1,65]        \n
  SNT            Swap top two                         [65,65,1]
  NSNTN          Jump to Label_INNER_LOOP             [65,65,1]

  SSSTN          Push 1                               [65,65,1,1]
  TSST           Subtract (1-1)                       [65,65,0]
  SNS            Duplicate top (1)                    [65,65,0,0]
  NTTSN          If negative: Jump to Label_LOOP      [65,65,0]
  SNT            Swap top two                         [65,0,65]
  SNS            Duplicate top (65)                   [65,0,65,65]
  TNSS           Print as character                   [65,0,65]        A
  SSSTSTSN       Push 10                              [65,0,65,10]
  TNSS           Print as character                   [65,0,65]        \n
  SNT            Swap top two                         [65,65,0]
  NSNTN          Jump to Label_INNER_LOOP             [65,65,0]

  SSSTN          Push 1                               [65,65,0,1]
  TSST           Subtract (0-1)                       [65,65,-1]
  SNS            Duplicate top (-1)                   [65,65,-1,-1]
  NTTSN          If negative: Jump to Label_LOOP      [65,65,-1]

 (Note: Contains additional trailing `[65,` here, but we'll ignore that for now.)
 SNS            Discard top                           [65]
 SSSTN          Push 1                                [65,1]
 TSSS           Add (65+1)                            [66]
 SNS            Duplicate top (66)                    [66,66]
 SNS            Duplicate top (66)                    [66,66,66]
 SSSTSTTSTTN    Push 91                               [66,66,66,91]    
 TSST           Subtract (66-91)                      [66,66,-25]
 NTSSSN         If 0: Jump to Label_EXIT              [66,66]
 SSSTSSN        Push 4                                [66,66,4]
 NSSTN          Create Label_INNER_LOOP               [66,66,4]
  SSSTN          Push 1                               [66,66,4,1]
  TSST           Subtract (4-1)                       [66,66,3]
  SNS            Duplicate top (3)                    [66,66,3,3]
  NTTSN          If negative: Jump to Label_LOOP      [66,66,3]
  SNT            Swap top two                         [66,3,66]
  SNS            Duplicate top (66)                   [66,3,66,66]
  TNSS           Print as character                   [66,3,66]        B
  SSSTSTSN       Push 10                              [66,3,66,10]
  TNSS           Print as character                   [66,3,66]        \n
  SNT            Swap top two                         [66,66,3]
  NSNTN          Jump to Label_INNER_LOOP             [66,66,3]

  ... etc. etc. for all letters in the alphabet

 SNN            Discard top                           [90]
 SSSTN          Push 1                                [90,1]
 TSSS           Add (90+1)                            [91]
 SNS            Duplicate top (91)                    [91,91]
 SNS            Duplicate top (91)                    [91,91]
 SSSTSTTSTTN    Push 91                               [91,91,91]    
 TSST           Subtract (91-91)                      [91,91,0]
 NTSSSN         If 0: Jump to Label_EXIT              [91,91]                    error
                (Label_EXIT doesn't exit, so exits program with an error to STDERR)

Kevin Cruijssen

Posted 2013-12-13T17:10:13.383

Reputation: 67 575

2

C# (Visual C# Interactive Compiler), 46 bytes

for(var a=259;a++<363;WriteLine((char)(a/4)));

Try it online!

arekzyla

Posted 2013-12-13T17:10:13.383

Reputation: 201

2

Pyt, 6 bytes

ʊ4*ąşÁ

Explanation:

ʊ     Pushes "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
4*    Quadruples the string
ą     Convert to array of characters
ş     Sort the array in ascending order
Á     Push contents of the array onto the stack
      implicit output

Try it online!


If outputting it as an array is acceptable:

Pyt, 5 bytes

ʊ4*ąş

mudkip201

Posted 2013-12-13T17:10:13.383

Reputation: 833

2

Julia, 39, 36

println([char(i/4+64.5)for i=0:103])

Sven Hohenstein

Posted 2013-12-13T17:10:13.383

Reputation: 2 464

2

Dc: 35 characters

[rdP10Pr1-d1<p]sp65[5lpx+d91>l]dslx

manatwork

Posted 2013-12-13T17:10:13.383

Reputation: 17 865

2

Mathematica 50 41 30

With help from alephalpha and Mark S.

Print/@{#,#,#,#}&/@Alphabet[];

DavidC

Posted 2013-12-13T17:10:13.383

Reputation: 24 524

1Print /@ {#, #, #, #} & /@ "A"~CharacterRange~"Z"; – alephalpha – 2013-12-14T07:27:18.570

The semicolon in @alephalpha's comment is necessary. Also, using a newer version of Mathematica you can use Print/@{#,#,#,#}&/@Alphabet[]; instead of Print/@{#,#,#,#}&/@"A"~CharacterRange~"Z"; – Mark S. – 2017-07-25T23:08:02.760

2

F#: 61 62 49

for i in 'A'..'Z'do for j in 0..4 do printfn"%c"i

p.s.w.g

Posted 2013-12-13T17:10:13.383

Reputation: 573

hm, do you not need ;; at the end? – Mark Reed – 2013-12-15T02:32:52.540

@MarkReed If executed from fsi.exe, yes, you would usually need that. However, this is a complete program by itself, so you can simply compile and run it as is. – p.s.w.g – 2013-12-17T23:06:47.240

2

Scala, 42

('A'to'Z')map(x=>List.fill(4)(println(x)))

pt2121

Posted 2013-12-13T17:10:13.383

Reputation: 309

2

Q (13)

.........

-1@''4#'.Q.A;

skeevey

Posted 2013-12-13T17:10:13.383

Reputation: 4 139

2

Javascript 55

for(i=65;i<91;i+=1/4)document.write("&#"+(i|0)+";<br>")

1 character shorter, but outputs to the screen instead of console.

WallyWest

Posted 2013-12-13T17:10:13.383

Reputation: 6 949

2

SmileBASIC, 29 bytes

FOR I=260TO 363?CHR$(I/4)NEXT

12Me21

Posted 2013-12-13T17:10:13.383

Reputation: 6 110

This is a polyglot, and will function in Yabasic - Try it online!

– Taylor Scott – 2018-07-09T18:23:23.610

2

VBA, 30 bytes

An anonymous VBE immediate window function that takes no input and outputs to the console.

For i=260To 363:?Chr(i\4):Next

Taylor Scott

Posted 2013-12-13T17:10:13.383

Reputation: 6 709

2

x86-16 ASM, IBM PC DOS, 29 22 bytes

Binary:

00000000: 400d 0a24 8bd6 b11a b409 b304 cd21 4b75  A..$.........!Ku
00000010: fbfe 04e2 f5c3                           ......

Build with xxd -r and test in DOSBox or your favorite DOS VM.

Unassembled:

40 0D 0A 24 DB   '@',0DH,0AH,'$'    ; output string at [SI] (100H)
8B D6       MOV  DX, SI             ; DX to output string 
B1 1A       MOV  CL, 'Z'-'A'+1      ; set up main loop counter (26) 
B4 09       MOV  AH, 9              ; DOS display string function 
        ALOOP: 
B3 04       MOV  BL, 4              ; reset repeat counter 
FE 04       INC  BYTE PTR [SI]      ; increment to next ASCII char
        DISP: 
CD 21       INT  21H                ; output letter string to display 
4B          DEC  BX                 ; decrement repeat counter 
75 FB       JNZ  DISP               ; if BL > 0, repeat

E2 F5       LOOP ALOOP              ; go to next letter 
C3          RET                     ; return to DOS 

Notes:

The output string's ('@',0DH,0AH,'$') opcodes decode to two benign instructions (INC AX, OR AX, 240A), which have no effect on the program. This is helpful since [SI] defaults to the beginning of the program (100H) which saves bytes by not having to encode an address into DX or SI.

Output:

A>ALPHA.COM
A
A
A
A
B
B
B
B
C
C
C
C
...
(you get the idea)
...
X
X
X
Y
Y
Y
Y
Z
Z
Z
Z

640KB

Posted 2013-12-13T17:10:13.383

Reputation: 7 149

2

Pyke, 6 bytes (noncompetitive)

G4m*_X

Try it here!

Or 4 bytes without newline separation

G4m*

Blue

Posted 2013-12-13T17:10:13.383

Reputation: 26 661

2

CJam, 15 13 characters

'[,65>4f*e_N*

Probably very golf-able; I'm new to CJam and even code golfing.

Jamie Sanborn

Posted 2013-12-13T17:10:13.383

Reputation: 121

2

Swift 3, 53

(0...103).map{print(String(UnicodeScalar($0/4+65)!))}

IF one day Apple decided to include Foundation by default, we could have

(0...103).map{print(String(format:"%c",$0/4+65))} //49 bytes

Apollonian

Posted 2013-12-13T17:10:13.383

Reputation: 61

1

C#, 88 bytes

var s="";int i,j;for(i=0;i++<26;){for(j=0;j++<4;)s+=(char)(i+64)+"\n";}Console.Write(s);

Try it with this REPL shell: https://csharppad.com/

Brandon Hao

Posted 2013-12-13T17:10:13.383

Reputation: 31

1

Lua, 53 Bytes

Simple solution, we're using the range [260,363] which is 65*4 and 90*4+3 (letter A and Z) to iterate.

Then we just have to do an euclidian division by 4 and print out each letter 4 times this way.

Edit: Approved @MCAdventure10's edit that pointed out a rounding error that made only one Z being printed out, it wasn't deviating from my original idea and didn't change the byte count, thus,I approved it.

for i=260,363 do print(("").char(math.floor(i/4)))end

Katenkyo

Posted 2013-12-13T17:10:13.383

Reputation: 2 857

1

Funky, 32 bytes

fori=0i<104i++print("%c"%65+i/4)

Try it online!

ATaco

Posted 2013-12-13T17:10:13.383

Reputation: 7 898

1

Pyth - 7 Bytes

VrG1V4N

Explanation

VrG1V4N
V       For each character N in
  G     The alphabet
 r 1    Converted to uppercase:
    V4  For each variable from 0 to 3:
      N Implicitly print N

Tornado547

Posted 2013-12-13T17:10:13.383

Reputation: 389

1

F# (.NET Core), 43 bytes

for i in 260..363 do printfn"%c"(char(i/4))

Try it online!

arekzyla

Posted 2013-12-13T17:10:13.383

Reputation: 201

1

PHP, 53

for($i=65;$i<91;$i++)echo str_repeat(chr($i)."\n",4);

ub3rst4r

Posted 2013-12-13T17:10:13.383

Reputation: 282

3I count 53 chars; where's the 44 from? – Mark Reed – 2013-12-14T05:01:01.860

I know a 44 character long solution, but definitely not with that str_repeat(): http://pastebin.com/decsAZXi

– manatwork – 2013-12-14T12:58:30.433

@manatwork - that looks like 40, even. Why not post it as an answer? – Mark Reed – 2013-12-15T01:27:50.233

Sorry, I didn't count the $i – ub3rst4r – 2013-12-15T03:02:43.357

It doesn't includes ZZZZ – VarunAgw – 2013-12-15T12:16:52.160

@MarkReed, indeed. Seems my character counter bookmarklet fails on pastebin. I not consider it significantly different to post it as separate answer. Just intended to help ub3rst4r to get into codegolfing. – manatwork – 2013-12-15T13:15:59.203

What VarunAgw said; needs to be $i<91 instead of $i<90. Doesn't affect the char count, though. – Mark Reed – 2013-12-16T15:20:48.447

Its been fixed. – ub3rst4r – 2013-12-16T18:30:27.380

@ub3rst4r, if you feel the improvement I suggested earlier is too far from your taste, you can still manipulate the loop: 1) remove the explicit incrementation: for($i=65;$i<91;)echo str_repeat(chr($i++)."\n",4); and/or 2) remove the explicit initialization: for(;$i<26;)echo str_repeat(chr($i+++65)."\n",4);. – manatwork – 2013-12-16T18:36:11.227

1

Matlab, 38

x=repmat(char(65:90)',1,4)';disp(x(:))

Sven Hohenstein

Posted 2013-12-13T17:10:13.383

Reputation: 2 464

1

JavaScript (59 56)

for(i=65;i<91;i+=1/4)console.log(String.fromCharCode(i))

quietmint

Posted 2013-12-13T17:10:13.383

Reputation: 204

Hey @user113215, you can save 1 extra char by doing i|0 instead of i,10! – Dom Hastings – 2013-12-14T16:09:08.343

@DomHastings No, i,10 prints a newline as well as the letter. i|0 is the same as just i. Considering that console.log adds an implicit newline, however, I suppose this could be shortened to just i. – quietmint – 2013-12-15T05:19:04.087

Ahhh, i see! Apologies, for some reason I thought it was doing some kind of parseInt! – Dom Hastings – 2013-12-15T09:09:38.290

1

Clojure 41 45

(doseq[i(range 65 91 0.25)](println(char i)))

wrong answer:

(doseq[i(range 65 91 0.25)](prn(char i)))

Shlomi

Posted 2013-12-13T17:10:13.383

Reputation: 121

except that outputs the letters in reader character syntax (\A, \B, etc). And I don't count leading backslashes as "whitespace". :) Replacing prn with println yields the correct output at a cost of 4 additional characters. – Mark Reed – 2013-12-16T00:42:30.377

you'r right, i was too lazy to test it out :D fixed – Shlomi – 2013-12-16T00:52:47.460

1

Add++, 19 bytes

L,91 65rbU€C4€*JbUn

Try it online!

How it works

L,			; Create an anonymous function
	91 65rbU	; Push [65 ... 90]	STACK = [65 66 ... 89 90]
	€C		; Convert to chars;	STACK = ['A' 'B' ... 'Y' 'Z']
	4€*		; Repeat each 4 times;	STACK = ['AAAA' ... 'ZZZZ']
	JbUn		; Join by newlines;	STACK = ['A\nA\n ... Z\nZ']

caird coinheringaahing

Posted 2013-12-13T17:10:13.383

Reputation: 13 702

1

Jelly, 5 bytes

ØAx4Y

Try it online!

chromaticiT

Posted 2013-12-13T17:10:13.383

Reputation: 211

1

Python 2.7, 78 bytes

x='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for e in x:
    for d in range(0, 4):
        print e

StealthyPanda

Posted 2013-12-13T17:10:13.383

Reputation: 41

1

Golfing challenge submissions have to make an attempt at golfing. In your code there is unnecessary white space, the variable x is declared once so could be inlined and the last for loop's body is not a compound statement so could be put on the same line. I also suggest reading the Python tips page.

– Jonathan Frech – 2018-07-09T20:09:24.250

1

Attache, 28 bytes

Print@Char=>Flat!4&`&=>65:90

Try it online!

Conor O'Brien

Posted 2013-12-13T17:10:13.383

Reputation: 36 228

1

K (oK), 17 16 bytes

Solution:

`0:`c$+,65+&26#4

Try it online!

Explanation:

`0:`c$+,65+&26#4 / the solution
            26#4 / generate a vector of 26 4s
           &     / where, turns this into 0 0 0 0 1 1 1 1 2 2 2 2 etc
        65+      / add 65 to this vector
       ,         / enlist (,:) each-both (')
      +          / flip
   `c$           / convert to characters
`0:              / print to stdout

Notes:

  • -1 byte with thanks to @ngn!

streetster

Posted 2013-12-13T17:10:13.383

Reputation: 3 635

1,:' -> +,­­ – ngn – 2019-01-27T15:40:54.363

1

@NUM, 43 bytes

#1@13#0@65|#1$#0$#1$#0$#1$#0$#1$#0$+<90{*0}

(I messed up on some of the code, now it works, but is almost double the size...)

KrystosTheOverlord

Posted 2013-12-13T17:10:13.383

Reputation: 681

1Welcome to PPCG! Languages are required to have an implementation (interpreter/compiler), so you'll need to either link to one or write one. – lirtosiast – 2019-01-29T02:41:45.530

I would call your language implementation an interpreter. Also, I am unsure if a leading newline is valid. Furthermore, I would recommend not to send the execution time to stdout.

– Jonathan Frech – 2019-01-29T08:01:45.370

1

BRAINF 115 BYTES...

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

I know this isn't going to in any awards for being the smallest, but I just thought it would be funny to use one of the hardest to understand languages.

Breakdown of Code

Cell zero is used for counting for setup, cell 1 and 3 are used to print, and cell two is used to count for the printing sequence

0 1 2 3 [setup][newline char][print counter][output char (set to A to begin)]

++++[->+++>+++>+++<<<]>+>+>+  sets cells 1, 2, and 3 to 13(new line)
<<<++++[->>+++>+++<<<]>>+>+   sets cells 2 and 3 to 26 (length of alphabet)
<<<+++++++++++++[->>>+++<<<]  sets cell  3 to 65(A)
>>[->.<<.>>.<<.>>.<<.>>.<<.>>+<] increments cell 3, prints alternating between cell 1 
                              and 3, and decrements cell 2.

Here is a Brainf compiler to test it (use the one w/out any newlines)

KrystosTheOverlord

Posted 2013-12-13T17:10:13.383

Reputation: 681

1Is it so hard to just say brainfuck? At the very least brainf*ck if you're that uncomfortable with swearing. Saying BRAINF just makes everyone confused about what you're referring to – Jo King – 2019-01-31T11:54:39.800

also, the triple exclamation mark is a bit too excitable for almost twice the bytecount of the previous brainfuck answer

– Jo King – 2019-01-31T12:07:46.250

@JoKing I wrote this before i realized that there was another Brainfuck program, sorry about that, i never got to fixing it – KrystosTheOverlord – 2019-01-31T12:09:37.370

having a longer answer is okay, especially in a language like brainfuck. the tips for golfing in brainfuck page might interest you for future submissions

– Jo King – 2019-01-31T12:18:35.517

1

Charcoal, 6 bytes

Fα↓×⁴ι

Try it online (verbose) or try it online (pure).

Explanation:

Loop over the characters of the uppercase alphabet:

For(a)
Fα

Repeat the current letter 4 times, and print it in a downward direction:

Print(:Down, Times(4, i));
↓×⁴ι

Kevin Cruijssen

Posted 2013-12-13T17:10:13.383

Reputation: 67 575

Hm, that's 6 characters, but I don't see how you can encode them into 6 bytes. I would change the title to just claim "6" instead of "6 bytes". Sadly, 6 characters is still one more than APL. – Mark Reed – 2019-01-29T17:01:56.657

@MarkReed In UTF-8 this would indeed be a bit more than 6 bytes (15 to be exact). However, Charcoal uses, just like most codegolf languages (i.e. Jelly, 05AB1E, etc.), a custom code page for all 256 characters it knows, where each character is encoded as a single byte.

– Kevin Cruijssen – 2019-01-29T17:07:53.830

Ah, my mistake. Didn't realize it was limited to a single code page. Carry on. :) – Mark Reed – 2019-01-30T04:49:01.970

1

Cardinal, 68 bytes

%+v
(A+
~ =
([t
' >t*~v
8 v~'n<
D<v< #
-~
~+,
 ,,
 ,,~
 ,,-
 ,~
>^R^

Try it online!

Explanation

%+v
(A+
~ =
([t
' >t*~v
8 v~'n<
**** #

Sets up loops for printing and corrects timing between loops. Right column sets up space to be printed in a loop of 25 times while left column sets up letters of alphabet starting with A to be printed.

D<v<
-~
~+,
 ,,
 ,,~
 ,,-
 ,~
>^R^

Left 2 columns print out each letter in alphabet while right 2 columns print out newlines.

How the loops work:

The inactive value of the pointer is set to the number of times to iterate through the loop. The timing of the loops is set up so that it will print alphabet character then newline four times before decrementing the inactive value of the pointer. The alphabet character to print was selected at the start by assigning the ascii value of A to the active value of the pointer "(A" in the code. After each loop of printing, this active value is incremented by one to print the next character in the alphabet.

fəˈnɛtɪk

Posted 2013-12-13T17:10:13.383

Reputation: 4 166

1

Keg, 20 bytes (SBCS on Keg wiki)

AZɧ^(\
(3|$:\
)$(8|,

Push range from A to Z and then 4-speak it.

user85052

Posted 2013-12-13T17:10:13.383

Reputation:

1

naz, 72 bytes

9a1a2x1v9m2x2v3d2m4a1x1f1a2x3v1o1v1o3v1o1v1o3v1o1v1o3v1o1v1o3v3x2v1l0x1f

Explanation (with 0x commands removed)

9a1a2x1v                                         # Set variable 1 equal to 10 (newline)
9m2x2v                                           # Set variable 2 equal to 90 ("Z")
3d2m4a                                           # Set the register to a value of 64 ("@")
1x1f                                             # Function 1
    1a                                           # Add 1 to the register
      2x3v                                       # Store the new value in variable 3
          1o1v1o3v1o1v1o3v1o1v1o3v1o1v1o         # Output it, then a newline, four times
                                        3v       # Load variable 3 into the register
                                          3x2v1l # Jump back to the start of the function
                                                 # if the register is less than variable 2
1f                                               # Call function 1

sporeball

Posted 2013-12-13T17:10:13.383

Reputation: 461

1

C#, 86 bytes

class P{static void M(){for(var i=65d;i<91;i+=.25)System.Console.WriteLine((char)i);}}

a full program...

aloisdg moving to codidact.com

Posted 2013-12-13T17:10:13.383

Reputation: 1 767

1

LINQ, 59 bytes

from i in Enumerable.Range(0, 104)select(char)(65+i/4)+"\n"

LINQ expression, try it with LinqPad. The select part is a bit too C#ist but I guess that fine.

from i                        // for each variable
in Enumerable.Range(0, 104)   // in the range 0, 26*4
select(char)(65+i/4)+"\n"     // get the letter and a newline

aloisdg moving to codidact.com

Posted 2013-12-13T17:10:13.383

Reputation: 1 767

0

dc, 23 bytes

260[d4/PAP1+d364>M]dsMx

Try it online!

Since precision is 0 by default, 260, 261, 262, and 263 all return 65 when divided by 4. All we need to do, then, is start with 260 on the stack, and continue duplicating the top of stack, dividing by 4, printing that code point and a line feed and then incrementing by one until we hit 364 (91*4).

brhfl

Posted 2013-12-13T17:10:13.383

Reputation: 1 291

0

dzaima

Posted 2013-12-13T17:10:13.383

Reputation: 19 048

0

Taxi, 1215 449 bytes

(I am calling this the Magna Carta byte count)

It turns out to be way shorter to just hard code the text.

'A\nA\nA\nA\nB\nB\nB\nB\nC\nC\nC\nC\nD\nD\nD\nD\nE\nE\nE\nE\nF\nF\nF\nF\nG\nG\nG\nG\nH\nH\nH\nH\nI\nI\nI\nI\nJ\nJ\nJ\nJ\nK\nK\nK\nK\nL\nL\nL\nL\nM\nM\nM\nM\nN\nN\nN\nN\nO\nO\nO\nO\nP\nP\nP\nP\nQ\nQ\nQ\nQ\nR\nR\nR\nR\nS\nS\nS\nS\nT\nT\nT\nT\nU\nU\nU\nU\nV\nV\nV\nV\nW\nW\nW\nW\nX\nX\nX\nX\nY\nY\nY\nY\nZ\nZ\nZ\nZ' is waiting at Writer's Depot.Go to Writer's Depot:w 1 r 3 l 2 l.Pickup a passenger going to Post Office.Go to Post Office:n 1 r 2 r 1 l.

Try it online!

Ungolfed / formatted:

'A\nA\nA\nA\nB\nB\nB\nB\nC\nC\nC\nC\nD\nD\nD\nD\nE\nE\nE\nE\nF\nF\nF\nF\nG\nG\nG\nG\nH\nH\nH\nH\nI\nI\nI\nI\nJ\nJ\nJ\nJ\nK\nK\nK\nK\nL\nL\nL\nL\nM\nM\nM\nM\nN\nN\nN\nN\nO\nO\nO\nO\nP\nP\nP\nP\nQ\nQ\nQ\nQ\nR\nR\nR\nR\nS\nS\nS\nS\nT\nT\nT\nT\nU\nU\nU\nU\nV\nV\nV\nV\nW\nW\nW\nW\nX\nX\nX\nX\nY\nY\nY\nY\nZ\nZ\nZ\nZ' is waiting at Writer's Depot.
Go to Writer's Depot: west 1st right 3rd left 2nd left.
Pickup a passenger going to Post Office.
Go to Post Office: north 1st right 2nd right 1st left.

Engineer Toast

Posted 2013-12-13T17:10:13.383

Reputation: 5 769

0

Tcl, 51 bytes

time {puts [format %c [expr (259+[incr i])/4]]} 104

Try it online!

sergiol

Posted 2013-12-13T17:10:13.383

Reputation: 3 055

0

Bash 28 26

echo {a..z}{,,,}|tr \  \\n

Martin York

Posted 2013-12-13T17:10:13.383

Reputation: 896

A shame bash doesn't do curly-brace expansion on here-strings. – Mark Reed – 2013-12-15T04:40:51.477

0

Q, 16

........

-1@'(,/)4#'.Q.A;

tmartin

Posted 2013-12-13T17:10:13.383

Reputation: 3 917

0

4DOS, 59 (including newlines)

Why? Because not enough people use it any more and it's still the same size as C and shorter than F#!

do i=65 to 90
@for %j in (1 2 3 4) do echo %@CHAR[%i]
enddo

Ben

Posted 2013-12-13T17:10:13.383

Reputation: 198

0

Python 2, 39 bytes

i=65;exec('print chr(i);'*4+'i+=1;')*26

Try it online!

mdahmoune

Posted 2013-12-13T17:10:13.383

Reputation: 2 605

0

05AB1E, 6 bytes

A€D€D»

Try it online!

Explanation

A        # push lowercase alphabet
 €       # for each char:
  D      # duplicate it
   €D    # duplicate each char again
     »   # join by newlines
         # implicit output

Sagittarius

Posted 2013-12-13T17:10:13.383

Reputation: 169

0

cQuents, 18 bytes

|
#104&h64+k,Z,Z,Z

Try it online!

Explanation

|
                  use newline as delimiter
#104              default input n = 104
    &             print first n terms in sequence
                  each term is the next term in the comma-delimited sequence, restarting 
                  and incrementing k when the end of the terms list is reached
     h64+k        chr ( 64 + k )
          ,Z,Z,Z  next three terms equal the previous term

Stephen

Posted 2013-12-13T17:10:13.383

Reputation: 12 293

0

Brian & Chuck, 32 bytes

A{<?
!{>-_{.>.<.>.<.>.<.+>.>-?

Try it online!

code:

Brian:
A                       ["A", 11, 26] Variables: Letter, newline+1, letter count
{<?                        restart current code portion of Chuck

Chuck:
code 1:
{>-                        go to "newline+1" and decrement it, so it becomes a newline

code 2:
{                          go to letter
.>.<.>.<.>.<               print letter and newline three times
.+                         print and increment letter
>.                         print 4th newline
>-                         decrement counter
?                          if counter > 0, switch to Brian (who just restarts Chuck's code 2)

Dorian

Posted 2013-12-13T17:10:13.383

Reputation: 1 521

0

GolfScript, 17 bytes

91,65>''+{...}%n*

Try it online!

Explanation

91,65>            # Genearate initial alphabet
      ''+         # Convert to a string
         {...}%   # For every item, copy 3 times
               n* # Join the resulting string by newlines
                  # (because a string is a codepoint array)

user85052

Posted 2013-12-13T17:10:13.383

Reputation:

0

Burlesque, 16 bytes

@AZr@4?*{)'
}\mQ

Try it online!

@AZr@ # Array of A-Z as chars
4?*   # 4 of each as strings
{
 )'   # Add a newline between each letter
}\m   # Map for each string of 4 and concatenate
Q     # Pretty print for newlines instead of "\n"

DeathIncarnate

Posted 2013-12-13T17:10:13.383

Reputation: 916

0

///, 207 bytes

A
A
A
A
B
B
B
B
C
C
C
C
D
D
D
D
E
E
E
E
F
F
F
F
G
G
G
G
H
H
H
H
I
I
I
I
J
J
J
J
K
K
K
K
L
L
L
L
M
M
M
M
N
N
N
N
O
O
O
O
P
P
P
P
Q
Q
Q
Q
R
R
R
R
S
S
S
S
T
T
T
T
U
U
U
U
V
V
V
V
W
W
W
W
X
X
X
X
Y
Y
Y
Y
Z
Z
Z
Z

Erik the Outgolfer

Posted 2013-12-13T17:10:13.383

Reputation: 38 134