5 Favorite Letters

91

9

The challenge is actually extremely simple. Pick 5 distinct letters (you can just pick the 5 that allow you the shortest code if you like) and output them to the console. However, the twist is that they must be from the following list:

 AAA      BBBB       CCCC     DDDD      EEEEE     FFFFF      GGG      H   H
A   A     B   B     C         D   D     E         F         G         H   H
AAAAA     BBBB      C         D   D     EEEE      FFFF      G  GG     HHHHH
A   A     B   B     C         D   D     E         F         G   G     H   H
A   A     BBBB       CCCC     DDDD      EEEEE     F          GGG      H   H


IIIII         J     K   K     L         M   M     N   N      OOO 
  I           J     K  K      L         MM MM     NN  N     O   O
  I           J     KKK       L         M M M     N N N     O   O
  I       J   J     K  K      L         M   M     N  NN     O   O
IIIII      JJJ      K   K     LLLLL     M   M     N   N      OOO 


PPPP       QQQ      RRRR       SSSS     TTTTT     U   U     V   V     W   W
P   P     Q   Q     R   R     S           T       U   U     V   V     W   W
PPPP      Q   Q     RRRR       SSS        T       U   U     V   V     W   W
P         Q  QQ     R  R          S       T       U   U      V V      W W W
P          QQQQ     R   R     SSSS        T        UUU        V        W W 


X   X     Y   Y     ZZZZZ
 X X       Y Y         Z 
  X         Y         Z  
 X X        Y        Z   
X   X       Y       ZZZZZ

Additional Rules:

  • 5 of the same letter is not allowed, no repeat choices.
  • Each letter must use the capital of itself as the ascii-character to draw it.
  • Each letter output must be on the "same line" and have 5 spaces between each letter.
  • You may choose any 5 letters that you want, this will allow you to reuse some code and lower your byte count. Figuring out which letters will allow you to do this most efficiently is part of the challenge.
  • Trailing spaces are acceptable.
  • A single trailing newline is acceptable, no more than one trailing newline though.
  • This is code-golf, lowest byte-count wins.

Examples:

A B C D E

 AAA      BBBB       CCCC     DDDD      EEEEE
A   A     B   B     C         D   D     E    
AAAAA     BBBB      C         D   D     EEEE 
A   A     B   B     C         D   D     E    
A   A     BBBB       CCCC     DDDD      EEEEE

E F L I P

EEEEE     FFFFF     L         IIIII     PPPP 
E         F         L           I       P   P
EEEE      FFFF      L           I       PPPP 
E         F         L           I       P    
EEEEE     F         LLLLL     IIIII     P    

C R A Z Y

 CCCC     RRRR       AAA      ZZZZZ     Y   Y
C         R   R     A   A        Z       Y Y 
C         RRRR      AAAAA       Z         Y  
C         R  R      A   A      Z          Y  
 CCCC     R   R     A   A     ZZZZZ       Y  

Don't be afraid to submit more than one answer with different letters or different strategies each time, this can be accomplished various different ways.

Magic Octopus Urn

Posted 2016-11-15T15:07:27.783

Reputation: 19 422

22I like that you get to choose which letters to output; that adds another layer to the golfing. Minor issues with the ASCII art: there's a ton of trailing spaces, and two Js. – ETHproductions – 2016-11-15T15:16:14.580

1@ETHproductions Rofl, the 2 J's got past both ME and the sandbox, fixing. – Magic Octopus Urn – 2016-11-15T15:17:22.057

2Can you add a bonus for taking 5 letters as input? – Mukul Kumar – 2016-11-15T18:22:58.220

5Bonuses are frowned upon and there are too many answers to make a drastic change such as that. But I will give you an upvote ;). – Magic Octopus Urn – 2016-11-15T19:05:42.333

Are leading blanks ok? – Titus – 2016-11-17T17:40:30.520

@Titus no, only trailing. – Magic Octopus Urn – 2016-11-17T18:13:39.173

What about a leading linebreak instead of a trailing one? – Titus – 2016-11-17T22:56:50.103

1@Titus I don't know why you'd need them; trailing makes more sense. If you can logically explain how a limitation of the language you are using and not the logic you've written is causing a leading \n, I will allow it. – Magic Octopus Urn – 2016-11-18T14:26:30.787

Not needing them, they would only save a byte on my code. – Titus – 2016-11-18T17:19:20.517

1@Titus then no. The trailing newlines and spaces are due to programmatic limitations of certain languages. – Magic Octopus Urn – 2016-11-18T17:31:19.707

Answers

12

Jelly,  41  40 bytes

N.B. I have a 39 byte answer too.

LICTE

141D+“ȷɓSɠ’“ðƁ ƥ“JrŀṘ’jḃ11“LICTE”K¤żⱮŒṙY

TryItOnline!

Idea

Use a run length decode with letters that have as similar middle as possible with only one run length of each "pixel value" per row per letter.

Put a flat start like "L" to avoid different run length decode values for the rows.

Place the one different letter (could not find 5) of the three middle rows at the end so the smallest difference may be added arithmetically.

Output wanted; the run lengths; and these converted from base 11:

                                                  L,  , I,  , C,  , T,  , E   value
                                                  -------------------------
L         IIIII      CCCC     TTTTT     EEEEE     1, 9, 5, 6, 4, 5, 5, 5, 5   399633415
L           I       C           T       E         1,11, 1, 7, 1,11, 1, 7, 1   431646160+1
L           I       C           T       EEEE      1,11, 1, 7, 1,11, 1, 7, 4   431646160+4
L           I       C           T       E         1,11, 1, 7, 1,11, 1, 7, 1   431646160+1
LLLLL     IIIII      CCCC       T       EEEEE     5, 5, 5, 6, 4, 7, 1, 7, 5   1179122455

The three values 399633415, 431646160, and 1179122455 in base 250 as Jelly code page indices are then ðƁ ƥ, ȷɓSɠ, and JrŀṘ which can be used to encapsulate the run-length information.

The code

141D+“ȷɓSɠ’“ðƁ ƥ“JrŀṘ’jḃ11“LICTE”K¤żⱮŒṙY - Main link
141D                                     - 141 as a decimal list: [1, 4, 1]
     “ȷɓSɠ’                              - 431646160
    +                                    - add: [431646161, 431646164, 431646161]
           “ðƁ ƥ“JrŀṘ’                   - list [399633415,1179122455]
                      j                  - join: [399633415, 431646161, 431646164, 431646161, 1179122455]
                       ḃ11               - convert to bijective base 11: [[1, 9, 5, 6, 4, 5, 5, 5, 5], [1, 11, 1, 7, 1, 11, 1, 7, 1], [1, 11, 1, 7, 1, 11, 1, 7, 4], [1, 11, 1, 7, 1, 11, 1, 7, 1], [5, 5, 5, 6, 4, 7, 1, 7, 5]]
                                  ¤      - nilad followed by link(s) as a nilad:
                          “LICTE”        -   list of characters "LICTE"
                                 K       -   join with spaces   "L I C T E"
                                    Ɱ    - map across (the lists of numbers) applying:
                                   ż     -   zip             e.g. [['L',1],[' ',9],['I',5],[' ',6],['C',4],[' ',5],['T',5],[' ',5],['E',5]]
                                     Œṙ  - run-length decode e.g. "L         IIIII      CCCC     TTTTT     EEEEE"
                                       Y - join with line feeds

Jonathan Allan

Posted 2016-11-15T15:07:27.783

Reputation: 67 804

1You did the idea I had initially that I was not smart enough to do in 05AB1E!!! Amazing job man. – Magic Octopus Urn – 2016-11-15T19:04:56.690

32

Charcoal, 51 49 bytes (ECXKI)

G←⁵↓³→⁴EM⁷→G↑²↗²→⁴CM⁶→GH↘↗³XM⁶→GH↓→↗³KM⁸→PTIII‖O↓

Outputs

EEEEE      CCCC     X   X     K   K     IIIII
E         C          X X      K  K        I  
EEEE      C           X       KKK         I  
E         C          X X      K  K        I  
EEEEE      CCCC     X   X     K   K     IIIII

Try it online!

Using characters that are vertically symmetrical, draws the top halves and then reflects. Most of these make use of Polygon () and PolygonHollow (GH) to draw a series of connected line segments with a particular character. I can more easily be done with MultiPrint (), using T as the direction.

Note: PolygonHollow just draws the segments specified, without completing the polygon or filling it. Polygon will complete and fill (not what we want) if the polygon can be completed with a simple line in one of the eight cardinal or intercardinal directions. Otherwise, it behaves like PolygonHollow, for a savings of one byte.

The order of characters was chosen to require only horizontal moves from the endpoint of one to the start of the next. Here's how the cursor proceeds:

Cursor movement, drawing top halves of ECXKI

DLosc

Posted 2016-11-15T15:07:27.783

Reputation: 21 213

2Nice. I was trying a charcoal solution but the lack of documentation honestly killed me – Bassdrop Cumberwubwubwub – 2016-11-16T08:43:19.733

6@Bassdrop Yeah, we're... um... working on that. [goes to add GH to the docs] – DLosc – 2016-11-16T16:31:32.003

19

PowerShell v2+, 138 128 114 112 106 105 bytes (LICTD)

"L1    IIIII1 CCCC1TTTTT1DDDD
$("L11 I1  C11 T1  D   D
"*3)LLLLL1IIIII1 CCCC1  T1  DDDD"-replace1,'     '

The idea is to maximize the spaces between the letters so we can get repeated compressions.

Borrows the middle-row deduplication trick from Florent's answer. Saved 6 bytes thanks to Ben Owen by using string multiplication for the middle three rows, and an additional byte thanks to Matt.

Output is like the following at 227 bytes, for a 53.7% reduction --

PS C:\Tools\Scripts\golfing> .\5-favorite-letters.ps1
L         IIIII      CCCC     TTTTT     DDDD
L           I       C           T       D   D
L           I       C           T       D   D
L           I       C           T       D   D
LLLLL     IIIII      CCCC       T       DDDD

AdmBorkBork

Posted 2016-11-15T15:07:27.783

Reputation: 41 581

I love it when the first answer is something you didn't expect at all. Neat method. – Magic Octopus Urn – 2016-11-15T15:43:10.647

2How about $("L11 I1 C11 T1 D D`n"*3) instead of the middle 3 lines – Ben Owen – 2016-11-15T16:45:52.700

@BenOwen Excellent idea - thanks! – AdmBorkBork – 2016-11-15T16:50:53.280

13

JavaScript, 110 109 bytes (CLOUD)

` CCCC5L9 OOO6U3U5DDDD
${x=`C9L9O3O5U3U5D3D
`,x+x+x} CCCC5LLLLL6OOO7UUU6DDDD`.replace(/\d/g,c=>" ".repeat(c))

console.log(
` CCCC5L9 OOO6U3U5DDDD
${x=`C9L9O3O5U3U5D3D
`,x+x+x} CCCC5LLLLL6OOO7UUU6DDDD`.replace(/\d/g,c=>" ".repeat(c))
)

Output is 227 bytes:

 CCCC     L          OOO      U   U     DDDD
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
 CCCC     LLLLL      OOO       UUU      DDDD

Florent

Posted 2016-11-15T15:07:27.783

Reputation: 2 557

1Nice use of deduplication in the middle three rows. – AdmBorkBork – 2016-11-15T16:21:00.433

13

PHP, 107 104 102 94 86 bytes

Ok I'm confident I have the smallest possible source with this method now. I wrote a script to generate and then gzip every possible combination of five letters. There are two solutions that match for the shortest compressed -- LODIC and LDOIC. I'm going with the former because it's more fun to say.

Source:

<?=gzinflate(base64_decode('81GAA39/fwjDBQggLE8QgDCdgYDLB6EYioGqoRisHkrTSCUIEOtWAA'));

Output:

% php foo.php
L          OOO      DDDD      IIIII      CCCC
L         O   O     D   D       I       C
L         O   O     D   D       I       C
L         O   O     D   D       I       C
LLLLL      OOO      DDDD      IIIII      CCCC

Alex Howansky

Posted 2016-11-15T15:07:27.783

Reputation: 1 183

3you can save 2 bytes by dropping the 's: the string will get treated as a constant with a value of itself. – user59178 – 2016-11-15T17:45:08.387

Damnit, I always forget to do that. :) – Alex Howansky – 2016-11-15T18:23:23.143

If L was your last letter you'd save more bytes too. – Magic Octopus Urn – 2016-11-15T19:03:35.430

Nice exploiting of a loophole. – Ismael Miguel – 2016-11-17T19:58:18.420

Which loophole? – Alex Howansky – 2016-11-17T21:00:35.343

The problem here is that you just compress the string, not the algorithm. I would have loved to see a compress program that you would eval – Adam – 2016-11-18T11:59:05.957

Compression is not a loophole and at this size, the uncompressor and evaluator would add more characters than the compression saves. I.e., eval()'ing compressed source code doesn't help until your code is well into the hundreds of bytes. Here is an example where I did just that. – Alex Howansky – 2016-11-20T03:53:32.877

Not very creative, is it ? – FliiFe – 2016-11-22T18:00:08.517

2Creativity is subjective and immeasurable. The goal of the challenge is to minimize code size and this is the shortest entry for a non-golfing language. – Alex Howansky – 2016-11-22T18:35:39.927

I like this answer, because, although it seems unimaginative by just compressing the output, the fact that you found the shortest combination to compress shows that you actually put effort into the answer, rather than just choosing, say ABCDE, and compressing that – caird coinheringaahing – 2019-11-07T08:03:00.963

12

ES6 (Javascript), 194, 181 bytes (IGOLF/ANY)

This one is long, and is not really optimized (not yet at least), but can be modified to print any particular message, by only changing the bitmap data.

EDIT: Replaced inner reduce with map, use bit shift for padding

Golfed

[0x1f73a1f,0x484610,0x49c61e,0x48c610,0x1f73bf0].map(r=>[0,1,2,3,4].map(p=>('0000'+(r>>(20-p*5)<<5).toString(2)).substr(-10).replace(/(1|0)/g,b=>' IGOLF'[(p+1)*b])).join``).join`\n`

Demo

[0x1f73a1f,0x484610,0x49c61e,0x48c610,0x1f73bf0].map(r=>[0,1,2,3,4].map(p=>('0000'+(r>>(20-p*5)<<5).toString(2)).substr(-10).replace(/(1|0)/g,b=>' IGOLF'[(p+1)*b])).join``).join`\n`

IIIII      GGG       OOO      L         FFFFF     
  I       G         O   O     L         F         
  I       G  GG     O   O     L         FFFF      
  I       G   G     O   O     L         F         
IIIII      GGG       OOO      LLLLL     F         

Theory

Take a letter:

IIIII      
  I        
  I        
  I        
IIIII 

convert it to binary matrix (bitmap)

11111
00100
00100
00100
11111

do the same for other 4 letters, scan a line, by taking "top" 5 bits off each

11111 01110 01110 10000 11111

convert to a hexadecimal string (should be using base36 or even printable ASCII here)

0x1f73a1f

apply the same algorithm to other 4 lines, to get the bitmap.

Render in the reverse order.

zeppelin

Posted 2016-11-15T15:07:27.783

Reputation: 7 884

1You can remove the parentheses in the regex to save 2 bytes :-) – ETHproductions – 2016-11-16T00:04:08.327

1[32979487,4736528,4834846,4769296,32979952] is shorter than its hexadecimal representation – Florent – 2016-11-16T07:50:08.567

@ETHproductions True, will make use of this, when I'll be back to optimize it. Thx! – zeppelin – 2016-11-16T08:32:25.837

1You could replace /(1|0)/g by /\d/g to save a few bytes. Also \n could be replace by an actual new line. – Florent – 2016-11-16T09:27:57.157

ockquote>

is shorter than its hexadecimal representation

Yep, that is true (due to 0x), at least for these specific letters, I'll probably compress this into a continuous hex (or even Base32/Base36/ASCII) string, on the next iteration.

You could replace /(1|0)/g by /\d/g to save a few bytes. Also \n could be replace by an actual new line.

Yep, thank you for your tips, I will make use of them once I'm back to this one. – zeppelin – 2016-11-16T19:19:21.880

Also, (p+1)*b could be either p*b+b or -~p*b, saving 2 bytes. – ETHproductions – 2016-11-19T15:20:35.770

10

05AB1E, 44 bytes

This was a fun one.
I feel like I need to come back and try and golf it some more when I have time.

Uses CP-1252 encoding.
Inspired by carusocomputing's answer.

ECOIH

‘ÓÑOIHH‘SðýJ3×S•Td<UÕ‘áÓ?¢tWvkÔÚ•S)øü×J3äû»

Try it online!

Explanation

‘ÓÑOIHH‘ pushes the string "ECOOIHH".

SðýJ3×S joins the string by spaces, repeats it thrice and converts it to a list.
The resulting list is ['E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H', 'E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H', 'E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H'].

•Td<UÕ‘áÓ?¢tWvkÔÚ• pushes the number 564631055513119191317171314619131717500.

S)ø zips the list and the number together.

ü×J does pairwise string repetition and joins them together.
The result is the string EEEEE CCCC OOO IIIII H HE C O O I H HEEEE C O O I HHHHH.

3äû»splits that into 3 pieces, adds the first and second piece in reverse order and joins by newlines.

Emigna

Posted 2016-11-15T15:07:27.783

Reputation: 50 798

14"•Td<UÕ‘áÓ?¢tWvkÔÚ• pushes the number 564631055513119191317171314619131717500" because why wouldn't it... – geisterfurz007 – 2016-11-16T10:58:42.030

3@geisterfurz007: To be more precise, it's the base-214 representation of the base-10 number :) – Emigna – 2016-11-16T11:10:50.887

So potentially if you could go up to a higher base, your string would get shorter? – geisterfurz007 – 2016-11-16T11:12:41.677

@geisterfurz007: If we could yes. Unfortunately 214 is the max in 05AB1E. – Emigna – 2016-11-16T11:25:52.630

3You can beat Jelly, I believe in you; 3 bytes left to go haha! – Magic Octopus Urn – 2016-11-16T17:33:59.267

9

Bash+coreutils with figlet, 55440 solutions, 112 106 bytes each

 set H E L P D;for l;do figlet -f banner $l|sed "s/.//3;s/.//5;s/#/$l/g;2d;5d">$l;done;paste $@|expand -t10

Output:

H   H     EEEEE     L         PPPP      DDDD  
H   H     E         L         P   P     D   D 
HHHHH     EEEE      L         PPPP      D   D 
H   H     E         L         P         D   D 
H   H     EEEEE     LLLLL     P         DDDD  
                                              

Hey, we already have a program for ASCII art! The banner font almost does the job, except it outputs 7x7 letters. Hmm, let's just remove the 3rd and 5th columns, and the 2nd and 5th lines, and see what it gives...

It turns out that many letters will be output the required way, namely, B D E F H J L P T U Z.

It suffices to replace the arguments of the first set command with any combination of those letters to still obtain a correct result! Hence, this gives us 11*10*9*8*7=55440 solutions, each of those being 106 bytes long.

yoann

Posted 2016-11-15T15:07:27.783

Reputation: 640

1My first thought when reading the challenge was "one has to use figlet to solve this" – FliiFe – 2016-11-22T18:01:25.767

9

JavaScript (ES6), 96 bytes (DIOCL)

`${x="DDDD6IIIII6OOO7CCCC5L"}
${y=`D3D7I7O3O5C9L
`,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d))

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x="DDDD6IIIII6OOO7CCCC5L"}
${y=`D3D7I7O3O5C9L
`,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

ETHproductions

Posted 2016-11-15T15:07:27.783

Reputation: 47 880

You can save a byte by putting the D first. – Neil – 2016-11-16T11:12:13.913

@Neil Thanks. I had to move the C past the I and O as well – ETHproductions – 2016-11-16T16:41:25.183

Ah, right, you can't have the I immediately after the C, although interestingly doing that improves my Batch solution, for the same reason. – Neil – 2016-11-16T20:20:09.267

6

Vim, 116 bytes 99 bytes

ELITC

Golfed it under 100 with the help of @DrMcMoylex.

9i59Yo191919171
E L I T CPqqjx:%s/\d/\=repeat('"',submatch(0))
q8@q3bi  Y7w.PP4rE{wl4r 22wl.2x

This contains unprintable characters, so I've added them in below (Vim style), so you can see them.

9i5^[9^AYo191919171
E L I T C^[Pqqjx:%s/\d/\=repeat('^R"',submatch(0))
q8@q3bi  ^[Y7w.PP4rE{wl4r 22wl.2x

TryItOnline!

It basically uses the same run-length decode that the jelly answer does. I used letters where I could (hopefully) repeat the top on the bottom, and the middles would all 3 be the same. Once the tops, bottoms, and middles are created I edit the characters to make them correct:

  1. Add two spaces to the I (more on that below)
  2. Add two spaces to the T
  3. Add the bar of the E
  4. Remove the top of the L
  5. Remove the bottom of the T (and delete the 2 spaces)

I have to add two spaces to the I, because I didn't allow two digit numbers (so I wouldn't need a separator. This leads to a 9 space run where I need 11.

nmjcman101

Posted 2016-11-15T15:07:27.783

Reputation: 3 274

Welcome to PPCG, nice answer :). – Magic Octopus Urn – 2016-11-16T17:30:07.810

I was almost begging for a Vim answer. – Zoltán Schmidt – 2016-11-17T18:53:28.583

2I always upvote vim. :) Some improvements I see. 1) you don't need the trailing slash on your substitute command. 2) Some useful synonyms: Y instead of Vy, FI instead of ?I<cr>, { instead of gg, w instead of fl. 3) If you use r instead of R, you can remove the <esc>. – James – 2016-11-17T22:35:23.697

6

05AB1E, 102 90 89 69 bytes (EOIXC)

•Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚúNÏŒº9¨gÚSÞ•34B2ð:2ôvy`×}J3äû»

Try it online!

Output (230 bytes):

EEEEE      OOOO     IIIII     X   X      CCCC
E         O    O      I        X X      C    
EEEE      O    O      I         X       C    
E         O    O      I        X X      C    
EEEEE      OOOO     IIIII     X   X      CCCC

69 / 230 = 70% Compression

Explanation:

The theory was to pick vertically symmetrical letters, then encode the first 3 lines an palindromize them. Basically, I encoded as {#} of {Letter} in 2 byte pairs. I'm sure there's a better way to do this.

•Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚîòvÅr葾)jM•34B
                    <decodes to>
"E5 6O4 5I5 5X1 3X1 6C4E1 9O1 4O1 6I1 8X1 1X1 6C1 4E4 6O1 4O1 6I1 9X1 7C1 4"

2ô            # Split into encoded pairs.
  vy   }      # Loop through each letter and number pair.
    `×        # Add the letter X number of times.
       J      # Join together.
        3ä    # Split into 3 parts length.
          û   # Palindromize.
           »  # Print separated by newlines.

-20 bytes thanks to Emigna, I'll be in the chat to ask some questions soon ;).

Magic Octopus Urn

Posted 2016-11-15T15:07:27.783

Reputation: 19 422

1You can save 19 bytes by replacing the string with •Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚîòvÅr葾)jM•34B2ð:. Hop in the 05AB1E chat if you have questions about encoding. – Emigna – 2016-11-15T19:48:37.387

1Also, 45ô can be . – Emigna – 2016-11-15T19:52:23.027

@Emigna A is not vertically symmetrical, and neither is F. Going to guess that once you start using G or higher it'll ruin what you're talking about right? Also, with my compression methodology I wanted to avoid letters that had more than 1 occurrence per row. If you want to golf that solution and beat me I'd welcome the example :). – Magic Octopus Urn – 2016-11-15T19:54:49.997

There's a 0 in the O (center row, right side) – ETHproductions – 2016-11-15T20:09:45.483

1•Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚúNÏŒº9¨gÚSÞ• fixes the O at the same byte count. – Emigna – 2016-11-15T20:53:47.467

5

Brainf*** 512 411 Bytes

Better redo:

This one does a better job at optimizing the tape, sacrificing setup characters for printing characters. The tape in this one looks like 'C' 'E' ' ' 'F' 'I' 'L' '\n', improving efficiency. I chose these because they lack internal spaces, making it so that they don't have to go back and forth between character and space more than necessary

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

If you want to read what it's doing:

Set the tape with 67,69,32,70,73,76,10
++++++++[>+++++++++>+++++++++>++++>+++++++++>+++++++++>+++++++++>+<<<<<<<-]>----->--->>-->+>++++>++<<<< 
.<<....>>.....<.....>.....>.....<.....>>.....<<.....>>>.>.<<<<<< First Line
.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<<<< Second Line
.>>.........<....>......>....<........>>.<<.......>>>.>.<<<<<< Third Line
.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<< Fourth Line
.<<....>>.....<.....>.....>.<.........>>.....<<.....>>>..... Fifth Line

Output:

 CCCC     EEEEE     FFFFF     IIIII     L
C         E         F           I       L
C         EEEE      FFFF        I       L
C         E         F           I       L
 CCCC     EEEEE     F         IIIII     LLLLL

Former Submission:

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

I chose to go with ABCDE because it make setting up the tape for output much easier, but the time and characters I wasted in going from the letter to ' ' for all the negative space inside the A, B, and D and the placement of the endline at the end of the tape kinda killed me, I think.

I ended up with a tape that had the values 0 0 'A' 'B' 'C' 'D' 'E' ' ' \n and then output from there

++++++++[>++++<-]>[>++>++>++>++>++>+<<<<<<-]>+>++>+++>++++>+++++>>++++++++++     This all sets up the tape as 0 0 A B C D E ' ' '\n'
<.<<<<<...>>>>>......<<<<....>>>>.......<<<....>>>.....<<....>>......<.....>>.<<<<<< First Line
.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<< Second Line
.....>>>>>.....<<<<....>>>>......<<<.>>>.........<<.>>...<<.>>.....<....>>.<<<<<< Third Line
.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<< Fourth Line
.>>>>>...<<<<<.>>>>>.....<<<<....>>>>.......<<<....>>>.....<<....>>......<..... Last Line

Output:

 AAA      BBBB       CCCC     DDDD      EEEEE
A   A     B   B     C         D   D     E
AAAAA     BBBB      C         D   D     EEEE
A   A     B   B     C         D   D     E
A   A     BBBB       CCCC     DDDD      EEEEE

bioweasel

Posted 2016-11-15T15:07:27.783

Reputation: 307

You can use [<]> on 3 occasions to save 6 bytes. – Jo King – 2018-01-20T11:51:03.467

5

JavaScript ES6, 168 bytes, CHAMP

We can stop looking guys, we have a CHAMP over here

f=_=>
` C3cHaHdA2dMaMcP3
CgHaHcAaAcMM MMcPaP
CgH4cA4cM M McP3
CgHaHcAaAcMaMcP
 C3cHaHcAaAcMaMcP`.replace(/[a-z\d]/g,(a,i,c)=>+a?c[i-1].repeat(a):' '.repeat(parseInt(a,36)-7))

a.innerHTML = f()
<pre id=a>

Bassdrop Cumberwubwubwub

Posted 2016-11-15T15:07:27.783

Reputation: 5 707

5

MATL, 49 bytes

5:lyI&(g84*t0*ytP+g73*yy!qy5XyPl5LY(90*yy!P12-&hc

Try it online!

This produces the letters TIHZN:

TTTTT     IIIII     H   H     ZZZZZ     N   N
  T         I       H   H        Z      NN  N
  T         I       HHHHH       Z       N N N
  T         I       H   H      Z        N  NN
  T       IIIII     H   H     ZZZZZ     N   N

Explanation

T is relatively easy to build from scratch. I can be obtained essentially as T plus its vertical reflection. H is I transposed. N is Z transposed and vertically reflected.

5:        % Push [1 2 3 4 5]
lyI&(     % Write [1 ;2; 3; 4 ;5] in the third column, filling with zeros.
          % This gives the shape of the 'T'
g84*      % Change nonzeros into 84 (ASCII for 'T'). Zeros will be displayed
          % as spaces
t0*       % Duplicate and multiply by zeros. This gives the separator
y         % Duplicate from below: pushes the 'T' again
tP+       % Duplicate, flip vertically, add. Gives the shape of the 'I'
g73*      % Change nonzeros into 73 (ASCII for 'I')
yy        % Duplicate separator and 'I' array
!         % Transpose. Gives the shape of the 'H'
q         % Subtract 1. Transformss 73 into 72 (ASCII for 'H'), and 0 into -1,
          % which will later be changed back into 0 when converting to char
y         % Duplicate separator
5XyP      % Size-5 identity matrix flipped vertically: gives slash of the 'Z'
l5LY(     % Fill first and last rows with ones. Gives the shape of the 'Z'
90*       % Multiply by 90 (ASCII for 'Z')
yy        % Duplicate separator and 'Z' array
!P        % Transpose and flip vertically. Gives shape of the 'N'
12-       % Subtract 12 to yield ASCII code for 'N'. 0 is converted to -12
&h        % Concatenate the nine arrays horizontally
c         % Convert to char. Implicitly display

Luis Mendo

Posted 2016-11-15T15:07:27.783

Reputation: 87 464

4

Stax, 33 bytes "BCDEO"

┌☼&.àτ▲█╟;c♦▌ΩÅ╡≤♫¿(┌▲▲≡3*╤J s*è«

Run and debug it

I picked letters that

  • have vertical symmetry
  • whose middle three columns are identical

These properties mean that each letter can be represented by a 3x3 grid. Here are the 9 regions, represented by digits.

12223
45556
78889
45556
12223

Consider the letter "B". It can be represented by 3 octal digits: 656. Each digit contains three bits, which control which regions are enabled for that letter. This technique also works for "CDEO".

Unpacked, ungolfed, and commented, the program looks like this.

"!^*14>G2eo"!   crammed integer literal             [63672, 54545, 64565]
|p              palindromize                        [63672, 54545, 64565, 54545, 63672]
m               for each, run this and output...    
  E             extract decimal digits to array     [6, 3, 6, 7, 2]
  `)"+0`        compressed string literal           "BCDEO"
  \             zip arrays                          [[6, 66], [3, 67], [6, 68], [7, 69], [2, 79]]
  {             map array using block               
    E           explode array                       6, 66
    Z\          tuck a zero under, and make pair    6, [0, 66]
    :B          custom base convert                 [66, 66, 0] 
    3)          pad to length 3                     [66, 66, 0]
    3O\         tuck a one under a 3 and pair       [66, 66, 0], [1, 3]
    :B          repeat elements corresponding times [66, 66, 66, 66, 0]
    A(          pad right to length 10              [66, 66, 66, 66, 0, 0, 0, 0, 0, 0]
  m

Run this one

recursive

Posted 2016-11-15T15:07:27.783

Reputation: 8 616

4

V, 62, 53 bytes

iC±  I· D³ Dµ O³ O¸ Z3ñYp$XñS ´Cµ µIµ ´D· ³O¶ µZYHP

Try it online!

This outputs C I D O Z:

 CCCC     IIIII     DDDD       OOO      ZZZZZ
C           I       D   D     O   O        Z
C           I       D   D     O   O       Z
C           I       D   D     O   O      Z
 CCCC     IIIII     DDDD       OOO      ZZZZZ

James

Posted 2016-11-15T15:07:27.783

Reputation: 54 537

3

Python 2, 124 bytes

d,i,o,c,l,s,n='DIOCL \n'
T=d*4+s*6+i*5+s*6+o*3+s*7+c*4+s*5+l
M=d+s*3+d+s*7+i+s*7+o+s*3+o+s*5+c+s*9+l+n
print T+n,M,M,M,T+l*3

Similar to my other answer, but with better letter choices. Outputs this:

DDDD      IIIII      OOO       CCCC     L
D   D       I       O   O     C         L
D   D       I       O   O     C         L
D   D       I       O   O     C         L
DDDD      IIIII      OOO       CCCC     LLLL

nedla2004

Posted 2016-11-15T15:07:27.783

Reputation: 521

3

Ruby, 110 107 102 bytes (DOCIL)

puts a=?D*4+(t=' '*7)+?O*3+t+?C*4+(s=' '*5)+?I*5+s+?L,['D   D'+s+'O   O'+s+?C+' '*11+?I+t+?L]*3,a+?L*4

Prints

DDDD       OOO       CCCC     IIIII     L
D   D     O   O     C           I       L
D   D     O   O     C           I       L
D   D     O   O     C           I       L
DDDD       OOO       CCCC     IIIII     LLLLL

EDIT: Saved some chars by avoiding join and moving things around

Lee W

Posted 2016-11-15T15:07:27.783

Reputation: 521

3

Perl, 109 bytes (ABCDE)

Note: this contains unprintable characters, escaped for ease of testing here, xxd dump below.

$_="\x0e\x1e\x0f\x1e\x1f
\x11\x11\x10\x11\x10
\x1f\x1e\x10\x11\x1e
\x11\x11\x10\x11\x10
\x11\x1e\x0f\x1e\x1f";s!.!(eval'(sprintf"%5b",ord$&)=~y/01/ '.(A..E)[$i++%5].'/r').$"x5!ge;print

Stores the binary representation of the letter positions as a number, then unpacks back into binary, replacing 0s with spaces and 1s with the corresponding letter, using a lookup. Storing the letter representations is quite easy, but replacing them turned out more tricky than I'd hoped. I'm sure there are better ways to do this so I might well continue to play with this.

To recreate the file, run xxd -r > favourite-letter.pl, paste in the below and press Ctrl+D:

0000000: 245f 3d22 0e1e 0f1e 1f0a 1111 1011 100a  $_="............
0000010: 1f1e 1011 1e0a 1111 1011 100a 111e 0f1e  ................
0000020: 1f22 3b73 212e 2128 6576 616c 2728 7370  .";s!.!(eval'(sp
0000030: 7269 6e74 6622 2535 6222 2c6f 7264 2426  rintf"%5b",ord$&
0000040: 293d 7e79 2f30 312f 2027 2e28 412e 2e45  )=~y/01/ '.(A..E
0000050: 295b 2469 2b2b 2535 5d2e 272f 7227 292e  )[$i++%5].'/r').
0000060: 2422 7835 2167 653b 7072 696e 74         $"x5!ge;print

Usage

perl favourite-letter.pl
 AAA      BBBB       CCCC     DDDD      EEEEE     
A   A     B   B     C         D   D     E         
AAAAA     BBBB      C         D   D     EEEE      
A   A     B   B     C         D   D     E         
A   A     BBBB       CCCC     DDDD      EEEEE     

Dom Hastings

Posted 2016-11-15T15:07:27.783

Reputation: 16 415

3

C#, 290 279 267 265 Bytes

Edit: Saved 12 bytes thanks to @milk! And 2 more thanks to @TheLethalCoder

Golfed:

void F(){string g="     ",h="H   H",A="A   A",B=h+"|"+A;Func<string,string>j=a=>a.Replace("|",g)+"\n";Console.Write(j(" SSSS|"+h+"| AAA |RRRR |PPPP")+j("S    |"+B+"|R   R|P   P")+j(" SSS |HHHHH|AAAAA|RRRR |PPPP")+j("    S|"+B+"|R  R |P")+j("SSSS |"+B+"|R   R|P"));}

Ungolfed:

public void F()
{
  string g = "     ", h = "H   H", A = "A   A", B = h + "|" + A;
  Func<string, string> j = a => a.Replace("|", g) + "\n";
  Console.Write(j(" SSSS|" + h + "| AAA |RRRR |PPPP") +
  j("S    |" + B + "|R   R|P   P") +
  j(" SSS |HHHHH|AAAAA|RRRR |PPPP") +
  j("    S|" + B + "|R  R |P") +
  j("SSSS |" + B + "|R   R|P"));
}

Outputs:

 SSSS     H   H      AAA      RRRR      PPPP
S         H   H     A   A     R   R     P   P
 SSS      HHHHH     AAAAA     RRRR      PPPP
    S     H   H     A   A     R  R      P
SSSS      H   H     A   A     R   R     P

Pete Arden

Posted 2016-11-15T15:07:27.783

Reputation: 1 151

There was a second where I thought that your C code was 290279 bytes in length. – Steven H. – 2016-11-16T00:17:47.330

1@StevenH. It feels that way Golfing in C# :) – Pete Arden – 2016-11-16T00:30:02.770

-12 bytes if you define the local function like this Func<string,string>j=a=>a.Replace("|",g)+"\r\n"; – milk – 2016-11-16T06:46:07.807

@milk Cool, thanks! :) – Pete Arden – 2016-11-16T11:07:04.407

Do you need the \r in the \r\n? Would save 2 bytes – TheLethalCoder – 2016-11-17T17:00:29.600

Also convert to an Action so the declaration is then just ()=>... and a ; after the last } for -5 bytes – TheLethalCoder – 2016-11-17T17:02:01.270

@TheLethalCoder Cheers :) I'll take the -2 for removal of "\r" - I know it works without, but I tend to leave it in so I can output to a text file to paste the text here. And the other one, I can't get to work - is this only in a new version of .NET? – Pete Arden – 2016-11-17T17:30:25.570

I'm in my phone at the moment but I believe it should be Action action = () => { ... }; – TheLethalCoder – 2016-11-17T18:21:26.857

3

Befunge, 120 bytes (CKYTF)

Source

#&49+14489+56*1449135*44711425*:12p9138*7+:89+:56*55*v_@
-1g05$$_\#!:2#-%#16#\0#/g#20#,g#+*8#4<80\9*2p06%5p05:<^:,g2!%5:

Output

  CCCC     K   K     Y   Y     TTTTT     FFFFF
 C         K  K       Y Y        T       F
 C         KKK         Y         T       FFFF
 C         K  K        Y         T       F
  CCCC     K   K       Y         T       F

Try it online!

In case it matters, I should point out that my output has a leading space on each line. The rules didn't explicitly prohibit that, so I'm hoping that's OK. If not, please just consider this a non-competing entry.

Explanation

The letters of the word are encoded as a simple sequence of 25 integers, each integer being a binary representation of 5 pixels. Since Befunge requires you to perform a calculation to instantiate any integer greater than 9, the letters were chosen so as to minimize the number of calculations required, and ordered so potential repeating values could be duplicated rather than recalculated.

We also need to store the ASCII value of each letter, offset by 32, in an array which is indexed by the modulo 5 of a decrementing index (so it goes 0 4 3 2 1 ...). The reason for offsetting by 32 is so the value can be multiplied by a pixel bit (1 or 0) and then added to 32 to produce either a space or the character required.

This array of letter values is stored in the first 5 bytes of the code, so it's easy to access. This also then influenced the choice of letters, since those values needed to be meaningful when interpreted as a code sequence. This is the sequence #&49+. The # jumps over the & and the 49+ just pushes 13 onto the stack which is subsequently ignored.

James Holderness

Posted 2016-11-15T15:07:27.783

Reputation: 8 298

You're asking for integer input with the &, but your program doesn't actually take input...what's going on? – Brian Gradin – 2016-11-16T00:06:36.460

That character is skipped by '#' – 12Me21 – 2018-02-05T19:30:04.467

@12Me21 I explained the reasoning behind that in the last paragraph. – James Holderness – 2018-02-11T13:47:56.537

3

Befunge-98, 109 98 bytes (FUNGE / ANY)

:5%!2>j#4_;\$&\#;\:0`!#@_:::'@/'@*-\'@/2%*' +,:'@/:2/-'@*-\1+:5%!2>j#4_;' 3k:4k,#;:55*%!2>j#4_;a,;

Try it online!

Input (115 characters):

2022 1141 1134 935 2021 102 1141 1262 103 101 998 1141 1390 1639 997 102 1141 1646 1127 101 102 949 1134 935 2021 0

Input is the integer version of a binary number with the format aaaaabbbbbb where aaaaa is a reversed map of the character to print (for example, the second row in the N is NN N, so the mask is 10011), and bbbbbb is the ascii character to print, minus 32.

I also created a befunge-98 program to create my inputs:

4k~44p34p24p14p04p          v
+1.+-**244g4%5\**88_@#`0:&::<

Try it online!

Output (255 characters):

FFFFF     U   U     N   N      GGG      EEEEE     
F         U   U     NN  N     G         E         
FFFF      U   U     N N N     G  GG     EEEE      
F         U   U     N  NN     G   G     E         
F          UUU      N   N      GGG      EEEEE     

(255 - (115 + 98)) / 255 = 16% compression

Explanation:

:5%!2>j#4_;\$&\#;\:0`!#@_     Get input if it is available, else end program
:::'@/'@*-\'@/2%*' +,         Output the current input character (or a space,
                              if the mask dictates so)
:'@/:2/-'@*-                  Throw away current mask bit
\1+                           Swap loop iterator to top of stack, increment it
:5%!2>j#4_;' *3k:4k,#;        If iterator % 5 == 0, print five spaces
:55*%!2>j#4_;a,;              If iterator % 25 == 0, print newline character

This is probably pretty golfable; I've spent barely any time thinking about potential reductions.

Theoretically this can print any sequence of 5x5 ascii art.

Thanks to James Holderness for helping me get out of triple digits!

Brian Gradin

Posted 2016-11-15T15:07:27.783

Reputation: 569

To take the idea further, 48* can be replaced with ' (since this is 98 after all), and 88* can be replaced with '@. Thanks for helping me get out of triple digits! – Brian Gradin – 2016-11-16T19:32:35.817

2

C 176 bytes

If implicit ints are allowed then it's possible to cut off another 8 bytes.

#define C ,//11 bytes
#define R(r)r r r r r//21 bytes
T(int l){int c=324;printf(R(R("%c")R(" "))"\n" R(R(C(++c,l>>=1)&1?c/5:32)));}//77 bytes
f(){T(67010460);T(34702434);T(66160574);T(34702434);T(67010466);}//65 bytes

Output: E D C B A

EEEEE     DDDD       CCCC     BBBB       AAA      
E         D   D     C         B   B     A   A     
EEEEE     D   D     C         BBBB      AAAAA     
E         D   D     C         B   B     A   A     
EEEEE     DDDD       CCCC     BBBB      A   A     

How it works: The macro R just repeats a piece of code 5 times. Given how often fives appear in this problem, very useful. Now: here's what T(int) does. T takes an integer, and uses it as a bit field to determine where to print letters and where to print white space. For example, if given T(0b11111111100111111110011100), it will output: EEEEE DDDD CCCC BBBB AAA. It progressively counts down as to what letter it prints. First it prints E, then D, then C, then B, then A. Calling f() will print the entire thing.

J. Antonio Perez

Posted 2016-11-15T15:07:27.783

Reputation: 1 480

2

Batch, 135 bytes (DOCILe)

@set b=     
@set s=@echo DDDD%b%  OOO%b%  CCC%b% IIIII%b%L
@set t=@echo D   D%b%O   O%b%C%b%%b% I%b%  L
%s%
%t%
%t%
%t%
%s%LLLL

Note: the first line ends in 5 spaces.

Neil

Posted 2016-11-15T15:07:27.783

Reputation: 95 035

2

BASH, 95, 111 bytes (EBASH)

Golfed

base64 -d<<<4ADlADhdACLpBDSMnNdRTj0Ob2qBPVT3HkdMRZzZ3kL+yIb6mhkz06EM+KOspSDy2EBoUKKL6pfwNo0akV0zAA==|xz -dqFraw

Explanation

Base64 over raw LZMA byte stream

Demo

>base64 -d<<<4ADlADhdACLpBDSMnNdRTj0Ob2qBPVT3HkdMRZzZ3kL+yIb6mhkz06EM+KOspSDy2EBoUKKL6pfwNo0akV0zAA==|xz -dqFraw

EEEEE     BBBB       AAA       SSSS     H   H
E         B   B     A   A     S         H   H
EEEE      BBBB      AAAAA      SSS      HHHHH
E         B   B     A   A         S     H   H
EEEEE     BBBB      A   A     SSSS      H   H

Disclaimer

Yes, I'm well aware that this is not really portable, that's why I've paid a byte to suppress the xz warnings with -q in the first case >:)

zeppelin

Posted 2016-11-15T15:07:27.783

Reputation: 7 884

2

Python 2, 208 194 193 bytes

This is my first ever code golf ;) Fun to do

for i in range(0,25,5):
 for c,p in {'M':18732593,'O':15255086,'N':18667121,'T':32641156,'Y':18157700}.items():
  print format(p,'025b')[i:i+5].replace('0',' ',).replace('1',c)+'   ',
 print

Output:

Y   Y    M   M    TTTTT     OOO     N   N
 Y Y     MM MM      T      O   O    NN  N
  Y      M M M      T      O   O    N N N
  Y      M   M      T      O   O    N  NN
  Y      M   M      T       OOO     N   N

Using a dictionary destroys the sort order of the letters, but that was not a requirement

Pleiadian

Posted 2016-11-15T15:07:27.783

Reputation: 21

It could do -4 if we take letters that do not use the upper left corner. This would result in a 24 bit (instead of a 25 bit) number which takes up one less digit in hex. – Pleiadian – 2016-11-17T15:22:01.383

2

perl 94 bytes.

The first 4 letters (D, O, I, C) are specifically chosen to have the upper and lower lines similar, and the middle ones similar. As there is not any other similar letter, I chose the "L" to be able to apply the same algorithm and add the missing 4L.

for(($a="D5 6O3 6I5 6C4 5L")."
","D 3D 5O 3O 7I 7C 9L
"x3,$a."4L
"){s/(.)(\d)/$1x$2/eg;print}

I saved some extra bytes by replacing the \n in the code with a real new line.

Result:

DDDD       OOO      IIIII      CCCC     L
D   D     O   O       I       C         L
D   D     O   O       I       C         L
D   D     O   O       I       C         L
DDDD       OOO      IIIII      CCCC     LLLLL

Adam

Posted 2016-11-15T15:07:27.783

Reputation: 591

2

Jelly,  40  39 bytes (FSLIC)

- Yep, the United States' Federal Savings & Loan Insurance Corporation!

“=;⁻ʋ®Ʋ\⁸d°5ġ$SƲ!ėɠẈvr’ḃ13s9“Ƭß»K¤żⱮŒṙY

Try it online!

How?

A similar method to my other answer (LICTE) but "FSLIC" is in Jelly's dictionary*, making up for the lack of vertical symmetry of the three middle rows which I made use of there.

“...’ḃ13s9“Ƭß»K¤żⱮŒṙY - Link: no arguments
“...’                 - (base 250) number     56608997404020628145427517841908851108342355529865
     ḃ13              - to bjective base 13   [5,6,4,5,1,9,5,6,4,1,9,1,9,1,11,1,7,1,4,7,3,6,1,11,1,7,1,1,13,1,5,1,11,1,7,1,1,9,4,6,5,5,5,6,4]
        s9            - split into nines      [[5,6,4,5,1,9,5,6,4],[1,9,1,9,1,11,1,7,1],[4,7,3,6,1,11,1,7,1],[1,13,1,5,1,11,1,7,1],[1,9,4,6,5,5,5,6,4]]
               ¤      - nilad followed by link(s) as a nilad:
          “Ƭß»        -   list of characters  "FSLIC"
              K       -   join with spaces    "F S L I C"
                 Ɱ    - map across (the lists of numbers) applying:
                ż     -   zip                 [[['F',5],[' ',6],['S',4],[' ',5],['L',1],[' ',9],['I',5],[' ',6],['C',4]],...]
                  Œṙ  - run-length decode     ["FFFFF      SSSS     L         IIIII      CCCC",...]
                    Y - join with newline characters

* In fact it is the only dictionary entry with five (or more) distinct capital letters with single runs on every row (CEFILSTZ, as required by the method), and it also happens to start with one which is also a flat-left letter (EFL, again as required for the method).

Jonathan Allan

Posted 2016-11-15T15:07:27.783

Reputation: 67 804

2

Python 3, 234 228 227 166 bytes (CLOUD):

import base64,gzip;b=b'ABzY86gn$d0{>HR1_A{T@KJyRe}8`nBNU1i6kLFS%Nec$q1YdaQ51tPO;sx(oDBkK&Q=Hwg(wC)8vxUXJX_-c000';print(gzip.decompress(base64.b85decode(b)).decode())

Prints:

 CCCC     L          OOO      U   U     DDDD
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
 CCCC     LLLLL      OOO       UUU      DDDD

L3viathan

Posted 2016-11-15T15:07:27.783

Reputation: 3 151

2

Python 3, 178 bytes

e,f,i,t,h,s='EFITH '
p=print
S=s*5
D=i+s*9+t+s*7
A=e*5+S
F=S+i*5+S
B=e+s*9+f+s*11+D+h+s*3+h
C=h+s*3+h
p(A+f*5+F+t*5+S+C)
p(B)
p(e*4+s*6+f*4+s*8+D+h*5)
p(B)
p(A+f+s*4+F,s+t+s*7+C)

Won't win, but does not use any compression. It makes this:

EEEEE     FFFFF     IIIII     TTTTT     H   H
E         F           I         T       H   H
EEEE      FFFF        I         T       HHHHH
E         F           I         T       H   H
EEEEE     F         IIIII       T       H   H

Any help is welcome, I probably missed something. I didn't use Python 2 because you can't do the p=print, and that saves 17 bytes. Try it on repl.it.

nedla2004

Posted 2016-11-15T15:07:27.783

Reputation: 521

2What is up with that F? – Destructible Lemon – 2016-11-15T22:03:47.247

@DestructibleWatermelon I don't know how I missed that, but it is fixed now. – nedla2004 – 2016-11-15T22:14:18.113

Golfed below original size: 160 bytes, Python 2

– CalculatorFeline – 2016-11-17T01:07:05.180

Rather than using p=print, you can use a single print statement with the kw argument sep='\n'. – Luca Citi – 2018-03-29T08:29:19.557

2

Ruby, 101 bytes (TIFLE)

"o@h@u".bytes{|i|k=3+i%2;puts "%-10s"*5%"TIFLE".chars.map{|j|i/=2;(i/16>i%2*3?'  ':'')+j+j*k*(i%2)}}

TTTTT     IIIII     FFFFF     L         EEEEE
  T         I       F         L         E
  T         I       FFFF      L         EEEE
  T         I       F         L         E
  T       IIIII     F         LLLLL     EEEEE

I picked letters that required a single block of letters (1,4 or 5 letters long) on each line. F,L and E are left justified, but T and I require leading spaces where a single letter (vertical part) is printed. The code for adding these spaces looks like it could be improved.

ungolfed

"o@h@u".bytes{|i|               #for each byte (64 always set, 32...2 bits set for horiz bar, 1 bit=length of bar)
   k=3+i%2                      #decode least sig. bit for no of chars printed if a 1 is found
   puts "%-10s"*5%              #puts "%-10s%-10s%-10s%-10s%-10s" format string (expects array of subsitutes)
     "TIFLE".chars.map{|j|      #for each letter 
        i/=2                    #halve i
        (i/16>i%2*3?'  ':'')+   #if i large enough and i%2 zero, add leading space (or T and I)
        j+j*k*(i%2)             #print the letter once, then additional letters if bar required.
     }
}

Level River St

Posted 2016-11-15T15:07:27.783

Reputation: 22 049

1

PHP, 109 bytes (LHKNM+BDEFP)

Talking about looping over a single value ... take a hex string as value (LHKNM):

for(;$i<25;)echo strtr(decbin(16+hexdec("011110129b0fc5501231f1111"[$i])<<5),[" ",LHKNN[$i%5]]),"\n"[++$i%5];

PHP, 122 bytes

foreach([4369,4763,64597,4657,987409]as$x)for($i=5;$i--;$x>>=4)echo strtr(decbin(512|32*$x&480),[" ",LHKMN[$i]]),"\n"[$i];

This exploits that all used letters have all pixels set in the first column:

The integer array holds the values for the other pixels converted from binary to decimal.
I didn´t test, but I think I have the shortest decimals possible.

In the loop body, the missing first column and the 5 spaces are added to the value before converting it back to binary; after that, 0 is replaced with space and 1 with space the letter (MNKHL).


I just noticed: If I had a 128 bit system; I could do a single loop over just one value :D

Titus

Posted 2016-11-15T15:07:27.783

Reputation: 13 814

1

PHP, 246 bytes (EFOIH)

$q='~([A-Z';$r='preg_replace';$c=$r.'_callback';$m=' 7I 7O"';$v='E 9F 9H"'.$m;echo $r("$q])\"~", '$1   $1', $c("$q\s])([1-9])~",function($m){return str_repeat($m[1],$m[2]);},'E5 5F5 5H" 5I5 6O3
'.$v.'
E4 6F4 6H5'.$m.'
'.$v.'
E5 5F 9H" 5I5 6O3'));

Which prints:

EEEEE     FFFFF     H   H     IIIII      OOO
E         F         H   H       I       O   O
EEEE      FFFF      HHHHH       I       O   O
E         F         H   H       I       O   O
EEEEE     F         H   H     IIIII      OOO

Xesau

Posted 2016-11-15T15:07:27.783

Reputation: 81

1

Scala, 122 bytes (DIOCL)

()=>{val t="DDDDgIIIIIgOOOhCCCCfL"
val m="DdDhIhOdOfCjL\n"
t+"\n"+m+m+m+t+"L"*4 map(c=>if(c<90)c else " "*(c-97))mkString}

Explanation:

()=>{                          //define an anonymous function with no args
  val t="DDDDgIIIIIgOOOhCCCCfL"  //define these strings
  val m="DdDhIhOdOfCjL\n"
  t+"\n"+m+m+m+t+"L"*4           //return this string
    map(c=>                        //map each char...
      if(c<90)                       //if it's an uppercase letter
        c                              //...to itself
      else                           //else
        " "*(c-97)                     //...to a space repeated (the index of c in the latin alphabet) times
    )mkString}                     //and join the mix of chars and strings together

corvus_192

Posted 2016-11-15T15:07:27.783

Reputation: 1 889

1

PHP, 124 bytes (ABCDE+FHOPSTU)

This version works for all characters where the middle three pixels are either all set or all empty, except for J, which would require an additional case for the ternary mapping.

for(;$x="2636755454764565545456367"[$i];)echo strtr(sprintf("%5b     ",($x&7)+($x>5?24:12)),[" ",ABCDE[$i%5]]),"\n"[++$i%5];

The string contains octal representations of the character lines; the middle bit is used three times: ($x&7)+($x>5?24:12) is short for (4&$x)*4|($x&2)*7|$x&1, but that does not work for 001.

sprintf converts to binary (it is shorter here to add the 5 spaces literally than shifting the number (that would require additional parentheses);
and strtr replaces 0 with space and 1 with the letter, like in my other answer.


Again, looping through a string saves a couple of bytes from looping through an array of integers,
in this case 20 bytes.

Titus

Posted 2016-11-15T15:07:27.783

Reputation: 13 814

1

PHP, 123 bytes (TIDOC)

I wanted a purely calculating variant ... ITDOC would have cost another 7 bytes, unfortunately.

for(;$i<25;)echo strtr(sprintf("%10b",$i>4&$i<21?$p>1?18.5-$p/2:4:($p>2?$p+11:31.5-$p/2)),[" ",TIDOC[$p]]),"\n"[$p=++$i%5];

the .5s ruin it all ... nothing saved from the partly mapping version:

for(;$i<25;)echo strtr(sprintf("%10b",($i>4&$i<21?[4,4,17,17,16]:[31,31,30,14,15])[$p=$i++%5]),[" ",TIDOC[$p]]),"\n"[$p<4];

Titus

Posted 2016-11-15T15:07:27.783

Reputation: 13 814

1

CJam, 46 bytes, FPLHB

"\x1ca-8
6"512b4b{2bEbG+32*2b}%5/"FPLHB"f.f{S?}N*

Replace \x1c with the actual byte.

Try it online!

Output:

DDDDD     PPPP      L         H   H     BBBB      
D         P   P     L         H   H     B   B     
DDDD      PPPP      L         HHHHH     BBBB      
D         P         L         H   H     B   B     
D         P         LLLLL     H   H     BBBB      

This seems golfable.

jimmy23013

Posted 2016-11-15T15:07:27.783

Reputation: 34 042

1

Python 3, 153 138 136 133 130 bytes

for l in"ffffbjfff blbhblbhb eibhblbhe blbhblbhb bjfffhbhf".split():print("".join("F I L T E"[i]*(ord(l[i])-97)for i in range(9)))

or for 128 bytes

for l in"           ".split(" "):print("".join("F I L T E"[i]*ord(l[i])for i in range(9)))

this uses the first 11 characters instead, which don't show up on stackoverflow, this does compile and run though.

Output:

FFFFF     IIIII     L         TTTTT     EEEEE
F           I       L           T       E
FFFF        I       L           T       EEEE
F           I       L           T       E
F         IIIII     LLLLL       T       EEEEE

This is a quick attempt, I was thinking of seeing if I could generate the numbers in the list without just writing them out. I picked letters which didn't had any "gaps" horizontally (e.g. H wouldn't work) which are FILTECZ.

Annoyingly it's lengthened by some of the gaps being 11 (two characters), not sure if there's a combination with makes it only gaps 9 and less, would shorten it to 125 chars

saved some bytes by using adding i%2*3

saved 2 bytes by using split() instead of a list

saved 3 bytes by using ord instead of i%2*3, would be great if I didn't have to -97 but using the first characters doesn't seem to work with split() well

saved 2 bytes by using range instead of enumerate

can save 2 bytes by using the first characters, to generate the string required you can use the following code snippet, but I'm not sure if this is allowed!

alpha="".join(chr(i) for i in range(20))
def convert(s):
    new_s = ""
    for c in s:
        if c == " ":
            new_s += c
        else:
            n = 11
            if c != "x": n = int(c)
            new_s += alpha[n]
    return new_s
print(convert("555519555 1x171x171 48171x174 1x171x171 195557175"))

Billyoyo

Posted 2016-11-15T15:07:27.783

Reputation: 121

L before Move L after T and all 11 gaps are removed. – Magic Octopus Urn – 2016-11-21T14:32:07.497

@carusocomputing second row F to I would still be 11 – Billyoyo – 2016-11-21T17:08:07.457

Errr, I know there's a combination of those letters that does accomplish it. My initial strategy was the exact same as yours. – Magic Octopus Urn – 2016-11-21T17:11:21.107

there are combinations that would allow for this, but due to the way I've done it, the first character has to have a straight vertical edge at the start, so there are no leading spaces (like F). Because of this I don't think it's possible to get below 11. – Billyoyo – 2016-11-21T18:27:26.633

1

brainfuck, 380 371 bytes

Edit: -9 bytes by switching to multiples of 17 and combining printing the first line with correcting the offsets

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

Try it online!

Output:

EEEEE     TTTTT      CCCC      SSSS     FFFFF
E           T       C         S         F
EEEE        T       C          SSS      FFFF
E           T       C             S     F
EEEEE       T        CCCC     SSSS      F

The best thing about this code is that it vaguely represents the actual letter themselves. The letters FIZEL ETCSF were chosen because each line of the letters were continuous (e.g. A is disqualified because the second line is A A). Other candidates were the letters ILZ, which weren't chosen because it was shorter to generate letters with character codes close to multiples of 18 17.

How It Works

Sets up the tape in the format:
 10  76 69 90 32   73 70
(\n  L  E  Z  " "  I  F )
+[>-[-<]>>]>+[>++++>+++++>++>++++>+++++>++++>+[<]>-]
Ending on the first letter "F". The order of the letters are largely arbitrary, as long as the last letter is F (saves on printing trailing spaces. This isn't L because it saves more than 3 bytes in producing F) and the first letter is E or F (saves on printing leading spaces). The tape is actually initialised to multiples of 17 and are corrected on the first line

+.....>->--.....<.....>......>-....<......>>--....<<.....>>>++.....>-------.[<]> Fixes offsets in the letters
 .>>....   .......<.>....... >.<.........  >>.<<.........>>>.>.[<]>
 ....>>.   .......<.>....... >.<..........  >>...<<......>>>....>.[<]> Extra 3 bytes from F instead of L made up by F being closer to a multiple of 17
 .>>....   .......<.>....... >.<.............  >>.<<.....>>>.>.[<]>
 .....>>   .......<.>........ >....<.....  >>....<<......>>>.

Jo King

Posted 2016-11-15T15:07:27.783

Reputation: 38 234

1

Jelly, 43 bytes

Bs5ŒḄ;ÆP$×
“BỊ“z£“qġ“z¤“Eḃ’ç"5R¤o-51+83ỌẎZY

Try it online!

Maybe this could be shorter, I'm not good at compressing stuff in Jelly.

Bs5                   Convert to binary, split into three 5-bit chunks.
   ŒḄ                 Bounce: turn [α, β, γ] into [α, β, γ, β, α].
     ;ÆP$             Concat by is-prime. This turns our 5×5 binary matrix
                        into a 10×5 binary matrix, padding with zeroes.
         ×            Multiply by the right argument.

“BỊ“z£“qġ“z¤“Eḃ’      The list 16927,30753,28737,30754,17732.

…ç"5R¤                Do the above with those numbers and [1, 2, 3, 4, 5].
      o-51+83Ọ        Map the resulting matrices to spaces and “TUVWX”.
              ẎZY     Stitch them together, and join by newlines.

I thought to make use of the fact that TUVWX is an adjacent run of letters where each letter has horizontal symmetry, making it easy to encode (15 bits per letter).

Lynn

Posted 2016-11-15T15:07:27.783

Reputation: 55 648

1

C (gcc), 124 bytes

Chose symmetrical letters to try and exploit that somehow. Haven't quite found a way yet.

f(i,j){for(i=0;i<25;printf("%5c",++i%5?32:10))for(j=5;j--;)printf("%c",("QQQQQQQQJJQQQDDQJUJDNDJQD"[i]-64>>j&1)?85+i%5:32);}

Try it online!

gastropner

Posted 2016-11-15T15:07:27.783

Reputation: 3 264

Suggest putchar() for the second printf() and you can ditch the parens before the ?: – ceilingcat – 2018-08-06T07:40:21.820

1

R, 175 or 215

The size to beat is 9×5×5=225 bytes, so...

The obvious (and... surprisingly efficient!) solution in 175 bytes is just to hard-code the lines, noticing that two are identical:

e="        "
y=c(" T",e,"I        C",e,"E",e,"L    \n")
cat(gsub(0,s,c("TTTTT0IIIII0 CCCC0EEEEE0L    \n",y," T    0I  0C    0EEEE 0L    \n",y," T0  IIIII0 CCCC0EEEEE0LLLLL")))

If one needs to prove that he has a Ph.D. in programming, (s)he may use the slightly longer version, still beating the original string length, with the help of run-length encoding (215 bytes).

v=el(strsplit(" T I C E L \n",""))
j=c(2,1,9,1,7,1,9)
f=rep(5,3)
m=matrix(c(0,f,6,4,f,1,4,1,j,1,9,1,4,1,j,4,6,1,4,1,2,1,7,5,6,4,f,5,0,1),4,,T)
m=m[c(1:3,2,4),]
for(r in 1:5)for(i in 1:12)cat(rep(v[i],m[r,i]),sep="")

Premature optimisation is the root of all evil. (D. E. K.)

Andreï Kostyrka

Posted 2016-11-15T15:07:27.783

Reputation: 1 389

1

Stax, 48 45 44 bytes(DOXHI)

ü⌠_Δs☺₧╞i╥⌂6⌂╤°qû╬╛∟|▀Ig‼£=U╣♪'q÷k╘îî♀P<ç)n½

Run and debug it

Thanks @recursive for -1 byte.

Chosen letters have two (in-plane) 2-fold axes except for "D". If there were another letter with two 2-fold axes the answer would be shorter.

Weijun Zhou

Posted 2016-11-15T15:07:27.783

Reputation: 3 396

10]5* is z5(, which saves a byte even after packing. – recursive – 2018-03-25T18:44:39.127

This actually exposes a bug. If I assign the D after palindromizing, it still works while it shouldn't. Maybe the subarrays aren't copied properly upon palindromization. I think we had this issue with transposition, I don't know whether there are more instructions with this issue. – Weijun Zhou – 2018-03-26T01:02:49.927

1I've found a bunch of inappropriate mutation bugs so far. There are probably many more to go. – recursive – 2018-03-26T01:45:47.903

0

Python 2, 171 bytes

Best I could get after 2 hours:

E,s,I,L,T,U,n="E ILTU\n"
S,b,B,D,u=s*5,s*11,s*9,s*7,"U   U"
C,Z=u+n+E,I+D+L+b+T+D
print E*5+S+I*5+S+L+B+T*5+S+C+b+Z+C+E*3+s*8+Z+C+b+Z+U+s*3+U+n+E*5+S+I*5+S+L*5+D+T+s*8+U*3

Try it online!

Outputs:

EEEEE     IIIII     L         TTTTT     U   U
E           I       L           T       U   U
EEEE        I       L           T       U   U
E           I       L           T       U   U
EEEEE     IIIII     LLLLL       T        UUU

FantaC

Posted 2016-11-15T15:07:27.783

Reputation: 1 425

0

Java 8, 218 bytes (CHLTU)

v->{String s="     ",n="\n",c="C    ",h="H   H",l="L    ",t="  T  ",u="U   U";return" CCCC"+s+h+s+l+s+"TTTTT"+s+u+n+c+s+h+s+l+s+t+s+u+n+c+s+"HHHHH"+s+l+s+t+s+u+n+c+s+h+s+l+s+t+s+u+n+" CCCC"+s+h+s+"LLLLL"+s+t+s+" UUU";}

Explanation:

Try it online.

v->{                 // Method with empty unused parameter and String return-type
  String s="     ",  //  String containing five spaces
         n="\n",     //  String containing new-line
         c="C    ",  //  String for three repeated parts in C
         h="H   H",  //  String for four repeated parts in H
         l="L    ",  //  String for four repeated parts in L
         t="  T  ",  //  String for four repeated parts in T
         u="U   U";  //  String for four repeated parts in U
  return" CCCC"+s+h+s+l+s+"TTTTT"+s+u+n        //  Line 1
        +c+s+h+s+l+s+t+s+u+n                   //  Line 2
        +c+s+"HHHHH"+s+l+s+t+s+u+n             //  Line 3
        +c+s+h+s+l+s+t+s+u+n                   //  Line 4
        +" CCCC"+s+h+s+"LLLLL"+s+t+s+" UUU";}  //  Line 5

At first I was using letters that looked similar and used a replace function with if-checks. This ended up over 400 bytes however, so I dropped it completely instead of trying to golf it.

I then looked at letters with repeated parts. There are four letters with four repeated parts on their five lines: H, L, T and U.
And although I already had them in alphabetic order, it is also the best order for these five letters, because I can omit the trailing space in the bottom part of the U (" UUU "" UUU").

Kevin Cruijssen

Posted 2016-11-15T15:07:27.783

Reputation: 67 575

0

Powershell, 89 bytes

Inspired by the AdmBorkBork's nice trick.

$d="DDDD5  OOO5  CCCC5IIIII5L"
"$d
$("D   D5O   O5C55 I5  L
"*3)$d`LLLL"-replace5,'     '

Output:

DDDD       OOO       CCCC     IIIII     L
D   D     O   O     C           I       L
D   D     O   O     C           I       L
D   D     O   O     C           I       L
DDDD       OOO       CCCC     IIIII     LLLLL

Powershell (without tricks), 106 bytes

Any 5 letters, 25 chars with 5 lower bits as mask:

0..4|%{-join(0..4|%{0..4|%{(' ','GOLFA'[$i%5])[(+'NNA_NAQAAQYQAG_QQAAQNN_AQ'[+$i]-shr$_)%2]}
$i++
' '*5})}

Output:

 GGG       OOO      L         FFFFF      AAA 
G         O   O     L         F         A   A
G  GG     O   O     L         FFF       AAAAA
G   G     O   O     L         F         A   A
 GGG       OOO      LLLLL     F         A   A

mazzy

Posted 2016-11-15T15:07:27.783

Reputation: 4 832