| Bytes | Lang | Time | Link |
|---|---|---|---|
| 116 | C gcc | 250808T203903Z | CaydendW |
| 069 | Vyxal | 250322T120357Z | lyxal |
| 220 | brainfuck | 250311T171949Z | Weird Gl |
| 151 | JavaScript Node.js | 250313T115024Z | Steve Be |
| 1034 | Bespoke | 250311T162355Z | Josiah W |
| 145 | Python 3.8 prerelease | 240810T001742Z | squarero |
| 062 | Uiua | 240809T161948Z | noodle p |
| 125 | JavaScript Node.js | 240807T064613Z | Andrew B |
| 082 | Perl 5 p | 161115T165746Z | Dom Hast |
| 351 | brainfuck | 180120T123529Z | Jo King |
| 700 | MAWP | 200814T054943Z | Razetime |
| 087 | APL Dyalog Classic | 200704T181027Z | Andriy M |
| 083 | FEU | 200704T162114Z | PkmnQ |
| 040 | Jelly | 161115T170426Z | Jonathan |
| 039 | Jelly | 180325T201852Z | Jonathan |
| 089 | Powershell | 181003T222145Z | mazzy |
| nan | R | 180325T155724Z | Andre |
| 033 | Stax | 180326T042541Z | recursiv |
| 044 | Stax | 180325T170114Z | Weijun Z |
| 218 | Java 8 | 180206T082940Z | Kevin Cr |
| 124 | C gcc | 180205T121832Z | gastropn |
| 043 | Jelly | 180120T130925Z | lynn |
| 171 | Python 2 | 180120T025656Z | qqq |
| 130 | Python 3 | 161120T183235Z | Billyoyo |
| 049 | MATL | 161115T223443Z | Luis Men |
| 099 | Vim | 161116T162603Z | nmjcman1 |
| 094 | perl | 161118T120532Z | Adam |
| 046 | CJam | 161118T010908Z | jimmy230 |
| 109 | PHP | 161117T180027Z | Titus |
| 123 | PHP | 161117T225558Z | Titus |
| 411 | Brainf*** 411 Bytes | 161117T201332Z | biowease |
| 124 | PHP | 161117T204444Z | Titus |
| 122 | Scala | 161117T202918Z | corvus_1 |
| 246 | PHP | 161117T193759Z | Xesau |
| 265 | C# | 161115T225125Z | Pete Ard |
| 193 | Python 2 | 161117T145716Z | Pleiadia |
| 106 | Bash+coreutils with figlet | 161116T221743Z | yoann |
| 111 | BASH | 161116T191112Z | zeppelin |
| 098 | Befunge98 | 161116T000029Z | Brian Gr |
| 096 | JavaScript ES6 | 161116T001159Z | ETHprodu |
| 049 | Charcoal | 161116T032953Z | DLosc |
| 102 | Ruby | 161115T161648Z | Lee W |
| 135 | Batch | 161116T111546Z | Neil |
| 109 | JavaScript | 161115T161102Z | Florent |
| 176 | C | 161116T023716Z | Alecto |
| 120 | Befunge | 161115T234137Z | James Ho |
| 124 | Python 2 | 161116T012454Z | nedla200 |
| 101 | Ruby | 161115T233040Z | Level Ri |
| 178 | Python 3 | 161115T215946Z | nedla200 |
| 044 | 05AB1E | 161115T220925Z | Emigna |
| 069 | 05AB1E | 161115T190243Z | Magic Oc |
| 086 | PHP | 161115T171802Z | Alex How |
| 053 | V | 161115T181239Z | DJMcMayh |
| 181 | ES6 Javascript | 161115T162736Z | zeppelin |
| 105 | PowerShell v2+ | 161115T154121Z | AdmBorkB |
| 166 | Python 3 | 161115T162106Z | L3viatha |
| 168 | JavaScript ES6 | 161115T163150Z | Bassdrop |
C (gcc), 116 bytes, FUBAR
i;main(){for(;++i<126;)printf("%c%s",L"~|î
c|ñýb)¸#"[i/8]&1<<i%8?"FUBAR"[~-i/5%5]:32,i%25?i%5?"":" ":"\n");}
Fubar!
This would likely be shorter if I used symmetry but I sorta wanted this to work with whatever string I wanted and I succeeded.
Ouputs:
FFFFF U U BBBB AAA RRRR
F U U B B A A R R
FFFF U U BBBB AAAAA RRRR
F U U B B A A R R
F UUU BBBB A A R R
How it works: Store the bitmap of the characters as an L string and access that to determine whether to put a char down or not. Add spaces and newlines to taste.
I offset the bitmap by one so I didn't have to do more painful checks to prevent a bunch of preceeding whitespace.
Since this is so radically different to the other C answer here, I decided to submit this as its own answer.
Vyxal, 69 bytes (VYXAL)
»∆V₆‛B»»∆O←o(»»∆O←u;»»†J₂Ėa»»½Q√√`»W₈vτb5vv∆Z`VYXAL`Zƛ÷*vv‡ð∴Ṡ5IvJ;∩⁋
There is most certainly a more optimal letter set than this. There is also most certainly a shorter approach than this. However, it's too funny to pass up.
Explained
»∆V₆‛B»»∆O←o(»»∆O←u;»»†J₂Ėa»»½Q√√`»W₈vτb5vv∆Z`VYXAL`Zƛ÷*vv‡ð∴Ṡ5IvJ;∩⁋
»∆V₆‛B»»∆O←o(»»∆O←u;»»†J₂Ėa»»½Q√√`»W # A list of compressed numbers, equivalent to [73300773380, 73182479364, 73182480913, 60416790801, 68988964895]
₈vτ # Convert each to base 256
b # And convert each to binary
5vv∆Z # Zero-padding each to length 5. This creates the shape of each list as binary
`VYXAL`Z # Zip the shapes with each letter in the word "VYXAL"
ƛ ; # To each shape/letter pair:
÷* # Apply the shape mask to the letter
vv‡ð∴ # And replace empty strings with spaces
Ṡ # Sum each row
5IvJ # And add 5 spaces to each
∩⁋ # Tranpose, and join on newlines
💎
Created with the help of Luminespire.
brainfuck, 303 280 263 220 bytes
+++++++++++[->++++++>+++>+++++++>+<<<<]>+>-<<++[->>.<....>.....<+....->.......>++...<......>------.....<.....>+++.+>->+++[[-<.<<<.>.........<+.>...<.->.....>++.<...>.<.......>------.<.......>+++.+>>]<.>]---<<<<<]>>>-....
Try it online! (with comments)
Output:
CCCC DDDD OOO IIIII L
C D D O O I L
C D D O O I L
C D D O O I L
CCCC DDDD OOO IIIII LLLLL
Using these letters, the second, third and fourth line are identical, and the first and last line are also very similar, with the final line having four extra Ls. Therefore, we can use two loops in order to compress this code as much as possible. This technique was already used for other answers.
JavaScript (Node.js), 151 bytes
_=>(s='',q=[1113151,4329809,1097263,4329631,4539953],q.map((_,r)=>q.map((j,l)=>{q.map((_,c)=>s+=j&(1<<(r*5+c))?'FYPTV'[l]:' ');s+=' '},s+='\n')),s)
Bespoke, 1034 bytes (LTICJ)
PUT XX:SEVENTH FOUR;PUSH TRI
PUSH SEXTET
PUT XX:SEXTET SEVENTH;PUSH FOUR
PUSH SEXTET
PUT XX:SEVENTH TRI;PUSH FIFTH
PUSH SEVENTH
PUT XX:INTEIGHT FOUR;PUSH I
PUSH SEVENTH
PUT XX:SEVENTH SEXTET;PUSH FIFTH
PUSH I
PUT XX:I NUMBERZERO;PUSH I
PUSH I
PUT XX:SEVENTH FOUR;PUSH I
PUSH TRI
PUT XX:SEVENTH FOUR;PUSH I
PUSH DIGITNINE
PUT XX:SEXTET SEVENTH;PUSH I
PUSH SEVENTH
PUT XX:SEVENTH TRI;PUSH I
PUSH DIGITNINE
PUT XX:INTEIGHT FOUR;PUSH I
PUT XX:I I
PUT XX:SEVENTH SEXTET;PUSH I
PUSH I
PUT XX:I NUMBERZERO;PUSH I
PUSH I
PUT XX:SEVENTH FOUR;PUSH I
PUT XX:I TRI
PUT XX:TRI FIFTH
CONTROL DOWHILE
PUT XX:I DIGITNINE;DO COPYN
DO SWITCH
STACKTOP MINUSONE
DO COPY
CONTROL END
DO P
PUSH DIGITNINE
PUT XX:SEXTET SEVENTH;PUSH FOUR
PUSH SEXTET
PUT XX:SEVENTH TRI;PUSH FIFTH
PUSH FIFTH
PUT XX:INTEIGHT FOUR;PUSH FIFTH
PUSH DIGITNINE
PUT XX:SEVENTH SEXTET;PUSH I
PUSH I
CONTROL DOWHILE
CONTROL DOWHILE
PUT XX:TRI BI;OUTPUT CH
STACKTOP MINUSONE
DO COPY
CONTROL END
DO P
CONTROL DOWHILE
PUSH BI DO COPYN
OUTPUT CH
STACKTOP MINUSONE
DO COPY
CONTROL END
DO P
Output
L TTTTT IIIII CCCC J
L T I C J
L T I C J
L T I C J J
LLLLL T IIIII CCCC JJJ
Encoding
I went with an RLE-like encoding for the characters of the output; the numbers on the stack are iterated through in groups of 3, with the meaning [space_count run_length char] (from top to bottom). For example, [6 3 74] means output 6 spaces, then 3 copies of ASCII 74 (J), resulting in JJJ.
Note: thanks to how my encoding scheme works, the letters end up having one leading space each, because it would take more code to handle a space count of 0. I'm pretty sure this is okay; trailing spaces are acceptable, nothing in the rules says I can't have leading spaces, and the Befunge answer has leading spaces as well.
The numbers are mostly pushed directly onto the stack one by one (because there's no shorter way); however, a sequence is repeated in the middle, which I take advantage of using a short CONTROL DOWHILE loop:
PUT XX:TRI FIFTH
CONTROL DOWHILE
PUT XX:I DIGITNINE;DO COPYN
DO SWITCH
STACKTOP MINUSONE
DO COPY
CONTROL END
DO P
I should do more experimentation on how to take better advantage of this with a different letter set: J starts this repeated sequence a bit late, and it's not ideal.
Python 3.8 (pre-release), 145 bytes (BDEFP)
Not the best.
p=0
for s in range(25):
print(''.join(chr(i&b'bdefp'[p])for i in b'____ __ __ __ _ _'[28604128575066>>2*s&3::4])+' '*5,end=p//4*'\n');p=-~p%5
Python 3.8 (pre-release), 131 bytes (ITCOL)
Run-length encoding is actually really easy to implement.
x='\n1'.join(['I5 5T5 6C4 6O3 6L1',*[' 2I1 9T1 7C1 9O1 3O1 5L1']*3,'I5 7T1 8C4 6O3 6L5'])
while x:print(end=x[0]*int(x[1]));x=x[2:]
Uiua, 62 bytes (ZNHIL)
≡&p/≡⊂⊏×+1°⊏≡≡⬚0↙10[⇌∩⊸⍉⊞⊃(¬↧±◿4:⊸≠|¬↧≠2:±◿4|¬↧≠4).⇡5]" ZNHIL"
Output:
ZZZZZ N N H H IIIII L
Z NN N H H I L
Z N N N HHHHH I L
Z N NN H H I L
ZZZZZ N N H H IIIII LLLLL
I chose Z, N, H, and I because Z and H are transposed copies of N and I so I only have to do half of the work. I chose L because its implementation is super easy.
There is some duplicate code here with the ¬↧s and the ±◿4s but every attempt I made to reduce it has been longer than just leaving it there.
JavaScript (Node.js), 125 bytes
k=>[s=`BBBB7CCCC5EEEEE5H3H5IIIII
`,t=`B3B5C9E9H3H7I
`,e=`BBBB6C9EEEE6HHHHH7I
`,(s+t+e+t+s).replace(/\d/g,c=>''.padEnd(c))][3]
Perl 5 -p, 82 bytes (DOCIL)
Using the same letters and strategy everyone else is using (reusing the lines where possible), combined with an RLE decoder.
}{$_=($;="4D7 3O7 4C5 5I5 L")."
D3 D5 O3 O5 C11 I7 L"x3 ."
$;4L";s/\d+(.)/$1x$&/ge
Perl 5 -p, 95 bytes (ABCDE)
Contains unprintables, so the link includes them in \x## notation. Verification for 95 bytes.
}{$_=unpack B125,"w...0.?.G..#....";s;.;($&?(A..E)["@-"/5%5]:$").("@+"%25?$"x5x!("@+"%5):$/);ge
Explanation
The main data is stored as a binary matrix in the 16 byte string passed to unpack, which is called to convert to binary. Then s/// is called to replace each character with either $" (space) or if $& is falsy (0) or (A..E)["@-"/5%5] otherwise, where "@-" is the start index of the current character (@- is a list so $-[0] would return the first element, but interpolating into a string is 1 byte shorter) and we divide it by 5 and then take that result modulo 5 resulting in 0-4 (as the decimal part is ignored in list indices) based on the position, this correctly gets the letters in the right place for each of the larger letters. This is then appended to with, if "@+"%25 (like "@-" above, but @+ contains the end index of the current match) is truthy, $"x5x!("@+"%5) (space repeated [x] five times, repeated once when "@+"%5 is false) which adds the required spaces after each letter, or $/ (newline) otherwise.
brainfuck, 380 371 351 bytes
Edit: -9 bytes by switching to multiples of 17 and combining printing the first line with correcting the offsets Edit: -20 by just using one cell to store the letters, you moron past me
+[[-<+>>++<]>]<<<++....<.......>+....<.....>++.....<......>++...<......>-.....----<<------.>>.<...>.<.....>+.<.........>++.<.........>++.<.........>-.----<<.>>.....<.....>+.<.........>++....<......>++.<..>..<.....>-....----<<.>>.<...>.<.....>+.<.........>++.<.........>++.<...>.<.....>-.----<<.>>....<.......>+....<.....>++.....<......>++...<......>-.
The best thing about this code is that it vaguely represents the actual letter themselves when the appropriate whitespace is added.
How It Works
Sets up the tape in the format:
1 2 4 8 16 32 64 128 0 0'
+[[-<+>>++<]>]
....<. ..... .>+.... <..... >++..... <..... .>++...<. ..... >-..... ----<<------.>>
.<...>.<.....>+.<.... ..... >++.<.... ..... >++.<.... ..... >-. ----<<.>>
..... <..... >+.<.... ..... >++....<. ..... >++.<..>..<.....>-.... ----<<.>>
.<...>.<.....>+.<.... ..... >++.<.... ..... >++.<...>.<..... >-. ----<<.>>
....<. ..... .>+....< ..... >++.....< ..... .>++...<. ..... >-.
MAWP, 700 bytes
It would've been real dandy if this question was about 4 characters.
499WA;48W!!;;;499WA;48W!!!!!;;;;;;188WM!!;;;48W!!!!!!;;;;;;;299WA!!;;;48W!!!!!;;;;;;699WM;48W!!;;;699WM;48W!!!!;;;;;199WA!!!;;;;25W;499WA!;;48W;499WA!;;48W!!!!;;;;;188WM;48W!!;;;188WM;48W!!!!;;;;;299WA;48W!!;;;299WA;48W!!!!;;;;;699WM;48W!!;;;699WM;48W!!!!;;;;;199WA;48W!!;;;199WA;25W;499WA;48W;499WA;48W;499WA;48W!!!!;;;;;188WM!!!!;;;;;48W!!!!;;;;;299WA;48W!!;;;299WA;48W!!!!;;;;;699WM;48W!!;;;699WM;48W!!!!;;;;;199WA!!!;;;;25W;499WA;48W!!;;;499WA;48W!!!!;;;;;188WM;48W!!;;;188WM;48W!!!!;;;;;299WA;48W!!;;;299WA;48W!!!!;;;;;699WM;48W;699WM;48W;699WM;48W!!!!;;;;;199WA;25W;499WA;48W!!;;;499WA;48W!!!!;;;;;188WM;48W!!;;;188WM;48W!!!!!;;;;;;299WA!!;;;48W!!!!!!;;;;;;;699WM;48W;699WM;48W!!!!!;;;;;;199WA;
Made with the help of Kevin Cruijssen's MAWP string generator and a lot patience and exclamation marks.
Output:
M M AAA OOO W W PPPP
MM MM A A O O W W P P
M M M AAAAA O O W W PPPP
M M A A O O W W W P
M M A A OOO W W P
APL (Dyalog Classic), 87 bytes
Decodes 45 vertical lines of 5 types from 15 characters. Converts them to binary matrix and then multiplies it by a coefficient matrix. The final matrix contains indices of letters in a string.
' DILOC'[1+(⊃,/{9\⍪5⍴⍵}¨⍳5)×(⍉5 5⍴(25⍴2)⊤47679)[;1+∊(5 5 5⊤⊢)¯6+⎕AV⍳'ÏSSS9i⌶⌶⌶⌶RSÐSS']]
Output:
DDDD IIIII L OOO CCCC
D D I L O O C
D D I L O O C
D D I L O O C
DDDD IIIII LLLLL OOO CCCC
FEU, 83 bytes, DOCIL
a/4\n5554LLLL
m/5/D1D2O1O2C0020I03\n/4/DDDD02OOO02CCCC2IIIII3/3/2L/2/10/1/0 /0/ /g
Explanation
0, 1, and 2 are for spacing. They're 2, 3, and 5 spaces respectively.
3 starts the letter L.
4 is line 1, and line 5 is just line 1 with 4 extra L's.
5 is line 2, 3, and 4.
Jelly, 41 40 bytes
N.B. I have a 39 byte answer too.
LICTE
141D+“ȷɓSɠ’“ðƁ ƥ“JrŀṘ’jḃ11“LICTE”K¤żⱮŒṙY
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
Jelly, 40 39 bytes (FSLIC)
- Yep, the United States' Federal Savings & Loan Insurance Corporation!
“=;⁻ʋ®Ʋ\⁸d°5ġ$SƲ!ėɠẈvr’ḃ13s9“Ƭß»K¤żⱮŒṙY
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).
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
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.)
Stax, 33 bytes "BCDEO"
┌☼&.àτ▲█╟;c♦▌ΩÅ╡≤♫¿(┌▲▲≡3*╤J s*è«
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
Stax, 48 45 44 bytes(DOXHI)
ü⌠_Δs☺₧╞i╥⌂6⌂╤°qû╬╛∟|▀Ig‼£=U╣♪'q÷k╘îî♀P<ç)n½
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.
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:
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").
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);}
Jelly, 43 bytes
Bs5ŒḄ;ÆP$×
“BỊ“z£“qġ“z¤“Eḃ’ç"5R¤o-51+83ỌẎZY
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).
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
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
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"))
MATL, 49 bytes
5:lyI&(g84*t0*ytP+g73*yy!qy5XyPl5LY(90*yy!P12-&hc
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
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
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:
- Add two spaces to the I (more on that below)
- Add two spaces to the T
- Add the bar of the E
- Remove the top of the L
- 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.
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
CJam, 46 bytes, FPLHB
"\x1ca-8
6"512b4b{2bEbG+32*2b}%5/"FPLHB"f.f{S?}N*
Replace \x1c with the actual byte.
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.
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
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];
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
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.
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
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
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
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
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.
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 >:)
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,;
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:&::<
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!
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)))
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
Using characters that are vertically symmetrical, draws the top halves and then reflects. Most of these make use of Polygon (G) and PolygonHollow (GH) to draw a series of connected line segments with a particular character. I can more easily be done with MultiPrint (P), 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:
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
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.
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
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.
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
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.
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
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.
}
}
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.
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äû»
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.
05AB1E, 102 90 89 69 bytes (EOIXC)
•Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚúNÏŒº9¨gÚSÞ•34B2ð:2ôvy`×}J3äû»
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 ;).
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
V, 62, 53 bytes
iC± I· D³ Dµ O³ O¸ Z3ñYp$XñS ´Cµ µIµ ´D· ³O¶ µZYHP
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
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.
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
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
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>
