Tribute to Stan Lee
up vote
34
down vote
favorite
Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we must do something as well.
Challenge
Print The Avengers Logo
Note: You may use any other character in place of # other than a space character; while you must use a space character for the space
In ASCII-art
######
###############
##### ##########
#### ####### ####
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### ########### ###
### ########### ###
### #### ### ###
### ### ### ###
#### #### ####
######## ######
#################
###
Optional
Who was (in your opinion) his greatest hero and villain in the entire marvel universe?
Standard code-golf rules apply
code-golf ascii-art kolmogorov-complexity
|
show 2 more comments
up vote
34
down vote
favorite
Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we must do something as well.
Challenge
Print The Avengers Logo
Note: You may use any other character in place of # other than a space character; while you must use a space character for the space
In ASCII-art
######
###############
##### ##########
#### ####### ####
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### ########### ###
### ########### ###
### #### ### ###
### ### ### ###
#### #### ####
######## ######
#################
###
Optional
Who was (in your opinion) his greatest hero and villain in the entire marvel universe?
Standard code-golf rules apply
code-golf ascii-art kolmogorov-complexity
3
What happened to the → in Ⓐ?
– Adám
yesterday
3
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
33
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
Can we use other characters instead of#
and space?
– Jo King
yesterday
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
yesterday
|
show 2 more comments
up vote
34
down vote
favorite
up vote
34
down vote
favorite
Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we must do something as well.
Challenge
Print The Avengers Logo
Note: You may use any other character in place of # other than a space character; while you must use a space character for the space
In ASCII-art
######
###############
##### ##########
#### ####### ####
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### ########### ###
### ########### ###
### #### ### ###
### ### ### ###
#### #### ####
######## ######
#################
###
Optional
Who was (in your opinion) his greatest hero and villain in the entire marvel universe?
Standard code-golf rules apply
code-golf ascii-art kolmogorov-complexity
Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we must do something as well.
Challenge
Print The Avengers Logo
Note: You may use any other character in place of # other than a space character; while you must use a space character for the space
In ASCII-art
######
###############
##### ##########
#### ####### ####
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### #### ### ###
### ########### ###
### ########### ###
### #### ### ###
### ### ### ###
#### #### ####
######## ######
#################
###
Optional
Who was (in your opinion) his greatest hero and villain in the entire marvel universe?
Standard code-golf rules apply
code-golf ascii-art kolmogorov-complexity
code-golf ascii-art kolmogorov-complexity
edited 22 hours ago
asked 2 days ago
Luis felipe De jesus Munoz
3,95411253
3,95411253
3
What happened to the → in Ⓐ?
– Adám
yesterday
3
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
33
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
Can we use other characters instead of#
and space?
– Jo King
yesterday
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
yesterday
|
show 2 more comments
3
What happened to the → in Ⓐ?
– Adám
yesterday
3
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
33
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
Can we use other characters instead of#
and space?
– Jo King
yesterday
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
yesterday
3
3
What happened to the → in Ⓐ?
– Adám
yesterday
What happened to the → in Ⓐ?
– Adám
yesterday
3
3
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
33
33
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
Can we use other characters instead of
#
and space?– Jo King
yesterday
Can we use other characters instead of
#
and space?– Jo King
yesterday
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
yesterday
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
yesterday
|
show 2 more comments
21 Answers
21
active
oldest
votes
up vote
19
down vote
Jelly, 62 59 58 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙḂa⁶s27Y
Thanks to @JonathanAllan for golfing off 1 byte!
Try it online!
How it works
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’
is a bijective base-250 integer literal, which uses the characters in Jelly's code page as digits.
The literal encodes the integer $scriptsize 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163$, which b12
converts to duodecimal, yielding $scriptsize 30b620b40ba54a64771433841333139413468423468423467433467433466b466b465453465363431424b43896860ba3_{12}$.
There are some zeroes, because 14 spaces (e.g.) are encoded as 3 spaces, 0 hashes, and 11 spaces. This maintains the base small (the largest run consists of 17 hashes), without adding any additional logic to the decoder.
Ė
(enumerate) prefixes every base-12 digit by its 1-based index, then Œṙ
performs run-length decoding.
Now, for each integer in the resulting array, Ḃ
extracts the least significant bit, then a⁶
(AND space) replaces ones with spaces, while leaving zeroes unchanged.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
add a comment |
up vote
13
down vote
R, 198, 173, 163, 157, 144, 142 bytes
write(rep(rep(c(' ',4),44),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC")-64),1,27,,'')
Try it online!
Also R
honors to the great Stan.
Notes :
- instead of the character
#
we've used the character4
because saves 2 bytes and :
- it's a reference to the Fantastic Four and/or the next Avengers 4 movie
- it like we're repeating the logo inside the logo (since
4
seems a mini "slanted"A
)
- -15 bytes thanks to @Giuseppe
Explanation :
Applying a Run Length Encoding (rle
function) on the characters of the string (excluding 'n'
) returns 88 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 88 repetitions are all values in the range [1,17]
hence, summing 64
we get the code points of the letters [A...Q]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADC...")-64 # convert the string back to [1...17] vector
e <- rep(rep(c(' ',4),44),v) # perform the inverse of rle function obtaining an
# expanded vector of <space>'s and <four>'s
write(e,1,27,,'') # write the vector to stdout arranging it
# in rows of maximum 27 characters
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for#
, using0
in place of"#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.
– Giuseppe
22 hours ago
add a comment |
up vote
9
down vote
C (gcc), 244 243 bytes
#define z <<10|117441415
x={8064,2097088,8142832,31473596,58751886,30 z,60 z,60 z,120 z,120 z,255 z,255 z,480 z,448 z,63897630,33423612,2097136,1835008};b(_,i){i&&b(_/2,i-1),putchar(" #"[_%2]);}main(_){_<19&&b(x[_-1],27)&puts("")&main(_+1);}
Try it online!
-1 Thanks to Peter Cordes
Uses bit compression.
Explanation:
The goal is to print a set of numbers in binary using space and # as digits which represent the logo. A bit of bash magic converts the logo to binary masks:
echo "ibase=2;$(<code which echoes the logo [see my bash solution for example]> | tr ' #' 01)" | bc
This results in the binary 'numbers' being:
8064,2097088,8142832,31473596,58751886,117472135,117502855,117502855,117564295,117564295,117702535,117702535,117932935,117900167,63897630,33423612,2097136,1835008
There is an obvious pattern in the middle where every line contains ### ### ###
We can save some space by compressing that middle section based on saving that pattern and OR-ing against it. In addition, all of those lines merely add some stuff to the left of the middle section, so we make the z
macro which takes ??????????????
and converts it into ###??????????????### ###
. This involves bitshifting left by 10 and OR-ing with the binary of that pattern, which is 117441415.
Now we can more easily understand the code:
#define z <<10|117441415 // Define z to be the compression defined above
x={ // Define x to be an array storing each line's number
8064,2097088,8142832, // The first 5 lines are uncompressed
31473596,58751886,
30 z,60 z,60 z,120 z, // The middle 9 lines are z-compressed
120 z,255 z,255 z,480 z,
448 z,
63897630,33423612, // The last 4 lines are uncompressed
2097136,1835008};
b(_,i){ // we also need a function to print n-bit binary numbers
i&& // i is the bit counter, we recurse until its zero
b(_/2,i-1), // each recursive call halves the input and decrements i
putchar(" #"[_%2]);} // this just prints the correct character
main(_){ // this is the main function, called as ./? will have 1 in _ (argc)
_<19? // if _ is less than 19 then...
b(x[_-1],27), // print the binary expansion of x[_-1]
puts(""), // print a new line
main(_+1) // recurse with _++
:0;}
Canx?y:0
be replaced withx&&y
, or does operator precedence not work? Maybe with&
instead of,
separating the 3 function calls because&
has higher precedence than&&
or,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.
– Peter Cordes
yesterday
It doesn't work with&&
indeed because of the precedence, while&
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.
– LambdaBeta
yesterday
I meant with&
or|
or^
replacing,
(because they don't short-circuit) and&&
replacing?
(because it does). Like_<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects onstdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.
– Peter Cordes
yesterday
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
add a comment |
up vote
8
down vote
Canvas, 74 73 71 bytes
qc2-Az↓n⁴╫m┬ff╷\_↘Tt)%⁵6>Yy7pQ∔I%SIŗ+T^≤?↔↖¶8^`O‾+O│≤n≡j↶82„2┬{ #@]∑‾+n
Try it here!
add a comment |
up vote
8
down vote
T-SQL, 341 338 bytes
DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4
*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&
*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)
The first 4 line breaks are for readability only, the final line break is part of a string literal.
Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:
*7
gets replaced by+REPLICATE('#',7)
$4
gets replaced by+SPACE(4)
&
gets replaced by a line break inside quotes
This results in a massive SQL command string:
PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)
Which, when run, produces the necessary output.
Long, but still better than my best set-based solution (463 bytes):
SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
+SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
(1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
(0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
(0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
(6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
yesterday
1
Thanks, @Shameen. I tried to save one more and useCHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead ofCHAR(13)
.
– BradC
yesterday
add a comment |
up vote
8
down vote
Bubblegum, 71 66 65 64 bytes
0000000: 95 91 21 12 00 20 08 c0 3a af 90 ff 7f 52 4e 58 ..!.. ..:....RNX
0000010: 58 93 25 d8 8a 27 47 e4 23 66 01 2c ce b1 3c 12 X.%..'G.#f.,..<.
0000020: 5f 5b 17 7c 81 ed 31 28 4e 6e a4 6d 23 ad 5b c2 _[.|..1(Nn.m#.[.
0000030: ae 25 83 9a 94 1a 2f 6f 05 fc e5 f0 73 13 f9 0b .%..../o....s...
Thanks to @ovs for golfing off 1 byte!
Try it online!
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
add a comment |
up vote
7
down vote
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
add a comment |
up vote
7
down vote
JavaScript (ES6), 173 170 bytes
_=>`tc
du
9a9k
58fe38
36h83676
6j83!h85!h85!f87!f87!dm96
6dm96
6b8b!b6d696
3858n8
5gjc
dy
d6`.split`!`.join`696
6`.replace(/./g,c=>'# '[(k=parseInt(c,36))&1].repeat(k/2))
Try it online!
Node.js, 163 bytes
Provided that an array of strings is a valid output:
_=>Buffer(`.&-/*%$*&$''!$##($!###!#)$!#$&($"#$&($"#$&'$##$&'$##$&&+$&&+$&%$%#$&%#&#$#!$"$+$#()&(1*#2`).map(c=>s+='# '[x^=1].repeat(c-32),s=x='')&&s.match(/.{27}/g)
Try it online!
add a comment |
up vote
7
down vote
Charcoal, 71 bytes
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶↘‖OM←←¹⁷↘F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»↘→UO³¦¹⁴UMKA#
Try it online! Link is to verbose version of code. Explanation:
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶
Output half of the circle.
↘‖OM←←¹⁷↘
Reflect it and draw in the bottom.
F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»
Draw the left arm and crossbar of the A.
↘→UO³¦¹⁴
Draw the right arm of the A.
UMKA#
Change all the characters to #
s.
add a comment |
up vote
7
down vote
C (gcc), 174 168 164 bytes
-6 bytes thanks to Dennis.
i,j=88;main(l){while(j--)for(i="CJQHFIHCDKDBDACDCFCEFDCEDEFDKFFDKFFDCCDGFDCCDGFDCBDHFDCBDHFDCADICACCCADHCCDAGGDFJDEJOMFN"[j]-64;i;)putchar(l++%28?--i,35-j%2*3:10);}
Try it online!
add a comment |
up vote
7
down vote
Python 2, 129 bytes
00000000: 2363 6f64 696e 673a 4c31 0a70 7269 6e74 #coding:L1.print
00000010: 2778 da95 9141 0e5c 3021 0803 ef7d 4593 'x...A.!...}E.
00000020: feff 8f9b 5d14 5c6e f1b0 f622 7422 2890 ....].n..."t"(.
00000030: 2e7d 5a09 dc4b 19cb bc53 84d1 4a6a 5960 .}Z..K...S..JjY`
00000040: 116e 3f42 c290 b3f7 c0bc 76cf 549d 6ed8 .n?B......v.T.n.
00000050: f8fa 5f26 0b0e 8c93 d5cb 35f6 b1e7 a939 .._&......5....9
00000060: 9e98 e769 47b9 87d6 cdf5 5c30 3030 32c0 ...iG.....002.
00000070: 4029 272e 6465 636f 6465 2827 7a69 7027 @)'.decode('zip'
00000080: 29 )
Try it online!
129 bytes, I removed the trailingn
from the compressed string.
– ovs
22 hours ago
add a comment |
up vote
6
down vote
Haskell, 170 163 bytes
Edit: -7 bytes thanks to @Ørjan Johansen
m=<<"Mc Ul WeWg YdTgZa ZcSdZcX cRdZcW cSdYcW cSdYcW cTdXcW cTdXcW cUkW cUkW cVdVcW cVcUcW ZdYdPa YhRc Un U "
m ' '="###n"
m c=(' '<$['Z','Y'..c])++('#'<$['a'..c])
Try it online!
Spaces are encoded as uppercase characters (length: Z
down to char), hash signs as lowercase characters (length: a
to char) and the last three #
of each line plus newline as a space. Function m
decodes it.
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
yesterday
add a comment |
up vote
6
down vote
05AB1E, 101 88 64 bytes
„# •∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•12вεN>yи}˜èJ27ô»
-24 bytes by creating a port of @Dennis♦' Jelly answer.
Try it online.
Explanation:
„# # Push string "# "
•∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•
'# Push compressed integer 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163
12в # Convert to Base-12 as list: [3,0,11,6,2,0,11,4,0,11,10,5,4,10,6,4,7,7,1,4,3,3,8,4,1,3,3,3,1,3,9,4,1,3,4,6,8,4,2,3,4,6,8,4,2,3,4,6,7,4,3,3,4,6,7,4,3,3,4,6,6,11,4,6,6,11,4,6,5,4,5,3,4,6,5,3,6,3,4,3,1,4,2,4,11,4,3,8,9,6,8,6,0,11,10,3]
ε } # Map each `y` to:
N> # The index+1
yи # Repeated `y` amount of times
˜ # Flatten the list
è # Index each in the string "# " (with automatic wraparound)
J # Join everything together
27ô # Split into parts of length 27
» # And join by newlines
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression of the integer and list works.
add a comment |
up vote
6
down vote
Bash, 192 176 bytes
dc<<<"16i2o81C0000 81FFFF0 9FE00FC BCF001E F070387 F078387 F03FF87 F03FF87 F01E387 F01E387 F00F387 F00F387 F007B87 B807B8E 9E03FBC 87C3FF0 81FFFC0 8001F80f"|tr 01 ' #'|cut -c2-
Try it online!
-16 thanks to manatwork
This is similar to my C answer, except it just uses a raw base-16 compression and passes it through bc, then uses tr to convert 1 to # and 0 to space. Each row has 1 appended to it and stripped off of it to maintain alignment.
Unfortunately dc
is shorter than bc
.
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
yesterday
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
yesterday
2
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
yesterday
1
134 bytes
– Dennis♦
yesterday
add a comment |
up vote
5
down vote
J, 130 128 bytes
echo' #'{~18 27$;(_243{.2#.inv 92x#._32+a.i.])&>'!TYPW.ajz i8hIhXl''3lOH8GvV.C2Z{r/=,G';'"a*2ZDxRplkh2tzRakz.?ZwVmeOT6L^lFB^eyT'
Try it online!
Initial solution
J, 164 bytes
echo' #'{~18 27$,#:849239965469633263905532594449192007713271791872263657753301928240007 12380965417202148347902847903517734495157419855048834759608223758433386496x
Try it online!
add a comment |
up vote
4
down vote
Perl 5, 181 bytes
say+(sprintf"%28b",oct"0x$_")=~y/10/# /r for"0003f0003fff800f87fe03c07f78700f71ce00f70ee01e70ee01e70ee03c70ee03c70ee07ff0ee07ff0ee0f070ee0e070e79e003c3fc01f803fffe00380000"=~/.{7}/g
Try it online!
add a comment |
up vote
4
down vote
Perl 6, 136 116 bytes
:100['> b3V$^%&!U3X/_9-D>Z(+, OD_=D,-:&3S>#OL
8C"> c H'.ords].base(2)~~TR/1/ /.comb(27)>>.say
Try it online!
Parses a base 100 number from the ordinal values of the string, converts to base 2 and replaces the 1
s with spaces. This uses zeroes as the main character.
Explanation:
:100['...'.ords] # Convert the bytes of the string to base 100
.base(2) # Convert to base 2
~~TR/1/ / # Translate 1s to spaces
# Alternatively, this could be .split(1)
.comb(27) # Split to strings of length 27
>>.say # Print each on a newline
add a comment |
up vote
3
down vote
MATLAB : 144 Bytes
reshape(repelem([repmat(' #',1,44),' '],'NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR'-64),27,)'
Try it online! (Technically in Octave)
Explanation:
This uses the same strategy as digEmAll in R, just with MATLAB syntax. The main difference is that MATLAB has automatic conversion from characters to integers.
New contributor
add a comment |
up vote
2
down vote
C# (.NET Core), 199 bytes
_=>{var r="";for(int i=0,j,k=0;i<88;i++)for(j=0;j++<"0(/1,'&,(&))#&%%*&#%%%#%+&#%&(*&$%&(*&$%&()&%%&()&%%&((-&((-&('&'%&('%(%&%#&$&-&%*+(*3,%"[i]-34;){r+=i%2<1?' ':'#';if(++k%27<1)r+='n';}return r;}
Try it online!
Uses the same approach as my solution to the tribute to Adam West.
add a comment |
up vote
1
down vote
PHP, 286 bytes
<?=preg_replace_callback('~(d*)(D)~',function($m){return str_repeat($m[2],$m[1]?:1);},str_replace(["
",'~','^',';'],["^
",'^4 ','3#','4#'],"14 ^
6 12#
4 5#4 7#
2 ; 6 7# #
^8 ; ^3
^9 ; ~
^8 ;2 ~
^8 ;2 ~
^7 ;3 ~
^7 ;3 ~
^6 11#4
^6 11#4
^5 ;5 ~
^5 ^6 ~
;2 ;11 #
2 8#9 ^
6 1;
6 ^"));
Try it online!
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to thedeflate
language, as this just looks like a base64 string
– Jo King
yesterday
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
add a comment |
21 Answers
21
active
oldest
votes
21 Answers
21
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
19
down vote
Jelly, 62 59 58 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙḂa⁶s27Y
Thanks to @JonathanAllan for golfing off 1 byte!
Try it online!
How it works
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’
is a bijective base-250 integer literal, which uses the characters in Jelly's code page as digits.
The literal encodes the integer $scriptsize 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163$, which b12
converts to duodecimal, yielding $scriptsize 30b620b40ba54a64771433841333139413468423468423467433467433466b466b465453465363431424b43896860ba3_{12}$.
There are some zeroes, because 14 spaces (e.g.) are encoded as 3 spaces, 0 hashes, and 11 spaces. This maintains the base small (the largest run consists of 17 hashes), without adding any additional logic to the decoder.
Ė
(enumerate) prefixes every base-12 digit by its 1-based index, then Œṙ
performs run-length decoding.
Now, for each integer in the resulting array, Ḃ
extracts the least significant bit, then a⁶
(AND space) replaces ones with spaces, while leaving zeroes unchanged.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
add a comment |
up vote
19
down vote
Jelly, 62 59 58 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙḂa⁶s27Y
Thanks to @JonathanAllan for golfing off 1 byte!
Try it online!
How it works
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’
is a bijective base-250 integer literal, which uses the characters in Jelly's code page as digits.
The literal encodes the integer $scriptsize 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163$, which b12
converts to duodecimal, yielding $scriptsize 30b620b40ba54a64771433841333139413468423468423467433467433466b466b465453465363431424b43896860ba3_{12}$.
There are some zeroes, because 14 spaces (e.g.) are encoded as 3 spaces, 0 hashes, and 11 spaces. This maintains the base small (the largest run consists of 17 hashes), without adding any additional logic to the decoder.
Ė
(enumerate) prefixes every base-12 digit by its 1-based index, then Œṙ
performs run-length decoding.
Now, for each integer in the resulting array, Ḃ
extracts the least significant bit, then a⁶
(AND space) replaces ones with spaces, while leaving zeroes unchanged.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
add a comment |
up vote
19
down vote
up vote
19
down vote
Jelly, 62 59 58 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙḂa⁶s27Y
Thanks to @JonathanAllan for golfing off 1 byte!
Try it online!
How it works
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’
is a bijective base-250 integer literal, which uses the characters in Jelly's code page as digits.
The literal encodes the integer $scriptsize 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163$, which b12
converts to duodecimal, yielding $scriptsize 30b620b40ba54a64771433841333139413468423468423467433467433466b466b465453465363431424b43896860ba3_{12}$.
There are some zeroes, because 14 spaces (e.g.) are encoded as 3 spaces, 0 hashes, and 11 spaces. This maintains the base small (the largest run consists of 17 hashes), without adding any additional logic to the decoder.
Ė
(enumerate) prefixes every base-12 digit by its 1-based index, then Œṙ
performs run-length decoding.
Now, for each integer in the resulting array, Ḃ
extracts the least significant bit, then a⁶
(AND space) replaces ones with spaces, while leaving zeroes unchanged.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
Jelly, 62 59 58 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙḂa⁶s27Y
Thanks to @JonathanAllan for golfing off 1 byte!
Try it online!
How it works
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’
is a bijective base-250 integer literal, which uses the characters in Jelly's code page as digits.
The literal encodes the integer $scriptsize 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163$, which b12
converts to duodecimal, yielding $scriptsize 30b620b40ba54a64771433841333139413468423468423467433467433466b466b465453465363431424b43896860ba3_{12}$.
There are some zeroes, because 14 spaces (e.g.) are encoded as 3 spaces, 0 hashes, and 11 spaces. This maintains the base small (the largest run consists of 17 hashes), without adding any additional logic to the decoder.
Ė
(enumerate) prefixes every base-12 digit by its 1-based index, then Œṙ
performs run-length decoding.
Now, for each integer in the resulting array, Ḃ
extracts the least significant bit, then a⁶
(AND space) replaces ones with spaces, while leaving zeroes unchanged.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
edited 22 hours ago
answered yesterday
Dennis♦
184k32293728
184k32293728
add a comment |
add a comment |
up vote
13
down vote
R, 198, 173, 163, 157, 144, 142 bytes
write(rep(rep(c(' ',4),44),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC")-64),1,27,,'')
Try it online!
Also R
honors to the great Stan.
Notes :
- instead of the character
#
we've used the character4
because saves 2 bytes and :
- it's a reference to the Fantastic Four and/or the next Avengers 4 movie
- it like we're repeating the logo inside the logo (since
4
seems a mini "slanted"A
)
- -15 bytes thanks to @Giuseppe
Explanation :
Applying a Run Length Encoding (rle
function) on the characters of the string (excluding 'n'
) returns 88 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 88 repetitions are all values in the range [1,17]
hence, summing 64
we get the code points of the letters [A...Q]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADC...")-64 # convert the string back to [1...17] vector
e <- rep(rep(c(' ',4),44),v) # perform the inverse of rle function obtaining an
# expanded vector of <space>'s and <four>'s
write(e,1,27,,'') # write the vector to stdout arranging it
# in rows of maximum 27 characters
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for#
, using0
in place of"#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.
– Giuseppe
22 hours ago
add a comment |
up vote
13
down vote
R, 198, 173, 163, 157, 144, 142 bytes
write(rep(rep(c(' ',4),44),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC")-64),1,27,,'')
Try it online!
Also R
honors to the great Stan.
Notes :
- instead of the character
#
we've used the character4
because saves 2 bytes and :
- it's a reference to the Fantastic Four and/or the next Avengers 4 movie
- it like we're repeating the logo inside the logo (since
4
seems a mini "slanted"A
)
- -15 bytes thanks to @Giuseppe
Explanation :
Applying a Run Length Encoding (rle
function) on the characters of the string (excluding 'n'
) returns 88 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 88 repetitions are all values in the range [1,17]
hence, summing 64
we get the code points of the letters [A...Q]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADC...")-64 # convert the string back to [1...17] vector
e <- rep(rep(c(' ',4),44),v) # perform the inverse of rle function obtaining an
# expanded vector of <space>'s and <four>'s
write(e,1,27,,'') # write the vector to stdout arranging it
# in rows of maximum 27 characters
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for#
, using0
in place of"#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.
– Giuseppe
22 hours ago
add a comment |
up vote
13
down vote
up vote
13
down vote
R, 198, 173, 163, 157, 144, 142 bytes
write(rep(rep(c(' ',4),44),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC")-64),1,27,,'')
Try it online!
Also R
honors to the great Stan.
Notes :
- instead of the character
#
we've used the character4
because saves 2 bytes and :
- it's a reference to the Fantastic Four and/or the next Avengers 4 movie
- it like we're repeating the logo inside the logo (since
4
seems a mini "slanted"A
)
- -15 bytes thanks to @Giuseppe
Explanation :
Applying a Run Length Encoding (rle
function) on the characters of the string (excluding 'n'
) returns 88 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 88 repetitions are all values in the range [1,17]
hence, summing 64
we get the code points of the letters [A...Q]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADC...")-64 # convert the string back to [1...17] vector
e <- rep(rep(c(' ',4),44),v) # perform the inverse of rle function obtaining an
# expanded vector of <space>'s and <four>'s
write(e,1,27,,'') # write the vector to stdout arranging it
# in rows of maximum 27 characters
R, 198, 173, 163, 157, 144, 142 bytes
write(rep(rep(c(' ',4),44),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC")-64),1,27,,'')
Try it online!
Also R
honors to the great Stan.
Notes :
- instead of the character
#
we've used the character4
because saves 2 bytes and :
- it's a reference to the Fantastic Four and/or the next Avengers 4 movie
- it like we're repeating the logo inside the logo (since
4
seems a mini "slanted"A
)
- -15 bytes thanks to @Giuseppe
Explanation :
Applying a Run Length Encoding (rle
function) on the characters of the string (excluding 'n'
) returns 88 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 88 repetitions are all values in the range [1,17]
hence, summing 64
we get the code points of the letters [A...Q]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJC"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADC...")-64 # convert the string back to [1...17] vector
e <- rep(rep(c(' ',4),44),v) # perform the inverse of rle function obtaining an
# expanded vector of <space>'s and <four>'s
write(e,1,27,,'') # write the vector to stdout arranging it
# in rows of maximum 27 characters
edited 11 hours ago
answered 2 days ago
digEmAll
2,18148
2,18148
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for#
, using0
in place of"#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.
– Giuseppe
22 hours ago
add a comment |
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for#
, using0
in place of"#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.
– Giuseppe
22 hours ago
1
1
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
Your solution is nicer, but your own gzip 2-parter gives 89+47 = 136 bytes.
– J.Doe
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
@J.Doe : ahah I even forgot to have used that approach! please post it as your own answer :)
– digEmAll
23 hours ago
Since we can use any character for
#
, using 0
in place of "#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.– Giuseppe
22 hours ago
Since we can use any character for
#
, using 0
in place of "#"
should save 2 more bytes. @J.Doe that may work better for your gzip as well.– Giuseppe
22 hours ago
add a comment |
up vote
9
down vote
C (gcc), 244 243 bytes
#define z <<10|117441415
x={8064,2097088,8142832,31473596,58751886,30 z,60 z,60 z,120 z,120 z,255 z,255 z,480 z,448 z,63897630,33423612,2097136,1835008};b(_,i){i&&b(_/2,i-1),putchar(" #"[_%2]);}main(_){_<19&&b(x[_-1],27)&puts("")&main(_+1);}
Try it online!
-1 Thanks to Peter Cordes
Uses bit compression.
Explanation:
The goal is to print a set of numbers in binary using space and # as digits which represent the logo. A bit of bash magic converts the logo to binary masks:
echo "ibase=2;$(<code which echoes the logo [see my bash solution for example]> | tr ' #' 01)" | bc
This results in the binary 'numbers' being:
8064,2097088,8142832,31473596,58751886,117472135,117502855,117502855,117564295,117564295,117702535,117702535,117932935,117900167,63897630,33423612,2097136,1835008
There is an obvious pattern in the middle where every line contains ### ### ###
We can save some space by compressing that middle section based on saving that pattern and OR-ing against it. In addition, all of those lines merely add some stuff to the left of the middle section, so we make the z
macro which takes ??????????????
and converts it into ###??????????????### ###
. This involves bitshifting left by 10 and OR-ing with the binary of that pattern, which is 117441415.
Now we can more easily understand the code:
#define z <<10|117441415 // Define z to be the compression defined above
x={ // Define x to be an array storing each line's number
8064,2097088,8142832, // The first 5 lines are uncompressed
31473596,58751886,
30 z,60 z,60 z,120 z, // The middle 9 lines are z-compressed
120 z,255 z,255 z,480 z,
448 z,
63897630,33423612, // The last 4 lines are uncompressed
2097136,1835008};
b(_,i){ // we also need a function to print n-bit binary numbers
i&& // i is the bit counter, we recurse until its zero
b(_/2,i-1), // each recursive call halves the input and decrements i
putchar(" #"[_%2]);} // this just prints the correct character
main(_){ // this is the main function, called as ./? will have 1 in _ (argc)
_<19? // if _ is less than 19 then...
b(x[_-1],27), // print the binary expansion of x[_-1]
puts(""), // print a new line
main(_+1) // recurse with _++
:0;}
Canx?y:0
be replaced withx&&y
, or does operator precedence not work? Maybe with&
instead of,
separating the 3 function calls because&
has higher precedence than&&
or,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.
– Peter Cordes
yesterday
It doesn't work with&&
indeed because of the precedence, while&
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.
– LambdaBeta
yesterday
I meant with&
or|
or^
replacing,
(because they don't short-circuit) and&&
replacing?
(because it does). Like_<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects onstdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.
– Peter Cordes
yesterday
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
add a comment |
up vote
9
down vote
C (gcc), 244 243 bytes
#define z <<10|117441415
x={8064,2097088,8142832,31473596,58751886,30 z,60 z,60 z,120 z,120 z,255 z,255 z,480 z,448 z,63897630,33423612,2097136,1835008};b(_,i){i&&b(_/2,i-1),putchar(" #"[_%2]);}main(_){_<19&&b(x[_-1],27)&puts("")&main(_+1);}
Try it online!
-1 Thanks to Peter Cordes
Uses bit compression.
Explanation:
The goal is to print a set of numbers in binary using space and # as digits which represent the logo. A bit of bash magic converts the logo to binary masks:
echo "ibase=2;$(<code which echoes the logo [see my bash solution for example]> | tr ' #' 01)" | bc
This results in the binary 'numbers' being:
8064,2097088,8142832,31473596,58751886,117472135,117502855,117502855,117564295,117564295,117702535,117702535,117932935,117900167,63897630,33423612,2097136,1835008
There is an obvious pattern in the middle where every line contains ### ### ###
We can save some space by compressing that middle section based on saving that pattern and OR-ing against it. In addition, all of those lines merely add some stuff to the left of the middle section, so we make the z
macro which takes ??????????????
and converts it into ###??????????????### ###
. This involves bitshifting left by 10 and OR-ing with the binary of that pattern, which is 117441415.
Now we can more easily understand the code:
#define z <<10|117441415 // Define z to be the compression defined above
x={ // Define x to be an array storing each line's number
8064,2097088,8142832, // The first 5 lines are uncompressed
31473596,58751886,
30 z,60 z,60 z,120 z, // The middle 9 lines are z-compressed
120 z,255 z,255 z,480 z,
448 z,
63897630,33423612, // The last 4 lines are uncompressed
2097136,1835008};
b(_,i){ // we also need a function to print n-bit binary numbers
i&& // i is the bit counter, we recurse until its zero
b(_/2,i-1), // each recursive call halves the input and decrements i
putchar(" #"[_%2]);} // this just prints the correct character
main(_){ // this is the main function, called as ./? will have 1 in _ (argc)
_<19? // if _ is less than 19 then...
b(x[_-1],27), // print the binary expansion of x[_-1]
puts(""), // print a new line
main(_+1) // recurse with _++
:0;}
Canx?y:0
be replaced withx&&y
, or does operator precedence not work? Maybe with&
instead of,
separating the 3 function calls because&
has higher precedence than&&
or,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.
– Peter Cordes
yesterday
It doesn't work with&&
indeed because of the precedence, while&
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.
– LambdaBeta
yesterday
I meant with&
or|
or^
replacing,
(because they don't short-circuit) and&&
replacing?
(because it does). Like_<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects onstdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.
– Peter Cordes
yesterday
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
add a comment |
up vote
9
down vote
up vote
9
down vote
C (gcc), 244 243 bytes
#define z <<10|117441415
x={8064,2097088,8142832,31473596,58751886,30 z,60 z,60 z,120 z,120 z,255 z,255 z,480 z,448 z,63897630,33423612,2097136,1835008};b(_,i){i&&b(_/2,i-1),putchar(" #"[_%2]);}main(_){_<19&&b(x[_-1],27)&puts("")&main(_+1);}
Try it online!
-1 Thanks to Peter Cordes
Uses bit compression.
Explanation:
The goal is to print a set of numbers in binary using space and # as digits which represent the logo. A bit of bash magic converts the logo to binary masks:
echo "ibase=2;$(<code which echoes the logo [see my bash solution for example]> | tr ' #' 01)" | bc
This results in the binary 'numbers' being:
8064,2097088,8142832,31473596,58751886,117472135,117502855,117502855,117564295,117564295,117702535,117702535,117932935,117900167,63897630,33423612,2097136,1835008
There is an obvious pattern in the middle where every line contains ### ### ###
We can save some space by compressing that middle section based on saving that pattern and OR-ing against it. In addition, all of those lines merely add some stuff to the left of the middle section, so we make the z
macro which takes ??????????????
and converts it into ###??????????????### ###
. This involves bitshifting left by 10 and OR-ing with the binary of that pattern, which is 117441415.
Now we can more easily understand the code:
#define z <<10|117441415 // Define z to be the compression defined above
x={ // Define x to be an array storing each line's number
8064,2097088,8142832, // The first 5 lines are uncompressed
31473596,58751886,
30 z,60 z,60 z,120 z, // The middle 9 lines are z-compressed
120 z,255 z,255 z,480 z,
448 z,
63897630,33423612, // The last 4 lines are uncompressed
2097136,1835008};
b(_,i){ // we also need a function to print n-bit binary numbers
i&& // i is the bit counter, we recurse until its zero
b(_/2,i-1), // each recursive call halves the input and decrements i
putchar(" #"[_%2]);} // this just prints the correct character
main(_){ // this is the main function, called as ./? will have 1 in _ (argc)
_<19? // if _ is less than 19 then...
b(x[_-1],27), // print the binary expansion of x[_-1]
puts(""), // print a new line
main(_+1) // recurse with _++
:0;}
C (gcc), 244 243 bytes
#define z <<10|117441415
x={8064,2097088,8142832,31473596,58751886,30 z,60 z,60 z,120 z,120 z,255 z,255 z,480 z,448 z,63897630,33423612,2097136,1835008};b(_,i){i&&b(_/2,i-1),putchar(" #"[_%2]);}main(_){_<19&&b(x[_-1],27)&puts("")&main(_+1);}
Try it online!
-1 Thanks to Peter Cordes
Uses bit compression.
Explanation:
The goal is to print a set of numbers in binary using space and # as digits which represent the logo. A bit of bash magic converts the logo to binary masks:
echo "ibase=2;$(<code which echoes the logo [see my bash solution for example]> | tr ' #' 01)" | bc
This results in the binary 'numbers' being:
8064,2097088,8142832,31473596,58751886,117472135,117502855,117502855,117564295,117564295,117702535,117702535,117932935,117900167,63897630,33423612,2097136,1835008
There is an obvious pattern in the middle where every line contains ### ### ###
We can save some space by compressing that middle section based on saving that pattern and OR-ing against it. In addition, all of those lines merely add some stuff to the left of the middle section, so we make the z
macro which takes ??????????????
and converts it into ###??????????????### ###
. This involves bitshifting left by 10 and OR-ing with the binary of that pattern, which is 117441415.
Now we can more easily understand the code:
#define z <<10|117441415 // Define z to be the compression defined above
x={ // Define x to be an array storing each line's number
8064,2097088,8142832, // The first 5 lines are uncompressed
31473596,58751886,
30 z,60 z,60 z,120 z, // The middle 9 lines are z-compressed
120 z,255 z,255 z,480 z,
448 z,
63897630,33423612, // The last 4 lines are uncompressed
2097136,1835008};
b(_,i){ // we also need a function to print n-bit binary numbers
i&& // i is the bit counter, we recurse until its zero
b(_/2,i-1), // each recursive call halves the input and decrements i
putchar(" #"[_%2]);} // this just prints the correct character
main(_){ // this is the main function, called as ./? will have 1 in _ (argc)
_<19? // if _ is less than 19 then...
b(x[_-1],27), // print the binary expansion of x[_-1]
puts(""), // print a new line
main(_+1) // recurse with _++
:0;}
edited yesterday
answered yesterday
LambdaBeta
1,989416
1,989416
Canx?y:0
be replaced withx&&y
, or does operator precedence not work? Maybe with&
instead of,
separating the 3 function calls because&
has higher precedence than&&
or,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.
– Peter Cordes
yesterday
It doesn't work with&&
indeed because of the precedence, while&
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.
– LambdaBeta
yesterday
I meant with&
or|
or^
replacing,
(because they don't short-circuit) and&&
replacing?
(because it does). Like_<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects onstdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.
– Peter Cordes
yesterday
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
add a comment |
Canx?y:0
be replaced withx&&y
, or does operator precedence not work? Maybe with&
instead of,
separating the 3 function calls because&
has higher precedence than&&
or,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.
– Peter Cordes
yesterday
It doesn't work with&&
indeed because of the precedence, while&
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.
– LambdaBeta
yesterday
I meant with&
or|
or^
replacing,
(because they don't short-circuit) and&&
replacing?
(because it does). Like_<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects onstdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.
– Peter Cordes
yesterday
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
Can
x?y:0
be replaced with x&&y
, or does operator precedence not work? Maybe with &
instead of ,
separating the 3 function calls because &
has higher precedence than &&
or ,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only ,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.– Peter Cordes
yesterday
Can
x?y:0
be replaced with x&&y
, or does operator precedence not work? Maybe with &
instead of ,
separating the 3 function calls because &
has higher precedence than &&
or ,
(en.cppreference.com/w/c/language/operator_precedence). Or not because only ,
provides a sequence point for the printing vs. recursion to avoid undefined behaviour.– Peter Cordes
yesterday
It doesn't work with
&&
indeed because of the precedence, while &
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.– LambdaBeta
yesterday
It doesn't work with
&&
indeed because of the precedence, while &
doesn't short-circuit. As of yet I haven't found a shorter alternative, though I wouldn't rule one out.– LambdaBeta
yesterday
I meant with
&
or |
or ^
replacing ,
(because they don't short-circuit) and &&
replacing ?
(because it does). Like _<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects on stdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.– Peter Cordes
yesterday
I meant with
&
or |
or ^
replacing ,
(because they don't short-circuit) and &&
replacing ?
(because it does). Like _<19 && b() & puts() & main(_+1);
(spaces added for readability). The order of evaluation is undefined, which may actually undefined behaviour because of unsequenced side-effects on stdout
en.cppreference.com/w/c/language/eval_order, but in practice any given compiler will pick some order for a given set of target + options.– Peter Cordes
yesterday
1
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
yesterday
add a comment |
up vote
8
down vote
Canvas, 74 73 71 bytes
qc2-Az↓n⁴╫m┬ff╷\_↘Tt)%⁵6>Yy7pQ∔I%SIŗ+T^≤?↔↖¶8^`O‾+O│≤n≡j↶82„2┬{ #@]∑‾+n
Try it here!
add a comment |
up vote
8
down vote
Canvas, 74 73 71 bytes
qc2-Az↓n⁴╫m┬ff╷\_↘Tt)%⁵6>Yy7pQ∔I%SIŗ+T^≤?↔↖¶8^`O‾+O│≤n≡j↶82„2┬{ #@]∑‾+n
Try it here!
add a comment |
up vote
8
down vote
up vote
8
down vote
Canvas, 74 73 71 bytes
qc2-Az↓n⁴╫m┬ff╷\_↘Tt)%⁵6>Yy7pQ∔I%SIŗ+T^≤?↔↖¶8^`O‾+O│≤n≡j↶82„2┬{ #@]∑‾+n
Try it here!
Canvas, 74 73 71 bytes
qc2-Az↓n⁴╫m┬ff╷\_↘Tt)%⁵6>Yy7pQ∔I%SIŗ+T^≤?↔↖¶8^`O‾+O│≤n≡j↶82„2┬{ #@]∑‾+n
Try it here!
edited 2 days ago
answered 2 days ago
dzaima
14k21653
14k21653
add a comment |
add a comment |
up vote
8
down vote
T-SQL, 341 338 bytes
DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4
*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&
*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)
The first 4 line breaks are for readability only, the final line break is part of a string literal.
Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:
*7
gets replaced by+REPLICATE('#',7)
$4
gets replaced by+SPACE(4)
&
gets replaced by a line break inside quotes
This results in a massive SQL command string:
PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)
Which, when run, produces the necessary output.
Long, but still better than my best set-based solution (463 bytes):
SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
+SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
(1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
(0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
(0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
(6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
yesterday
1
Thanks, @Shameen. I tried to save one more and useCHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead ofCHAR(13)
.
– BradC
yesterday
add a comment |
up vote
8
down vote
T-SQL, 341 338 bytes
DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4
*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&
*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)
The first 4 line breaks are for readability only, the final line break is part of a string literal.
Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:
*7
gets replaced by+REPLICATE('#',7)
$4
gets replaced by+SPACE(4)
&
gets replaced by a line break inside quotes
This results in a massive SQL command string:
PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)
Which, when run, produces the necessary output.
Long, but still better than my best set-based solution (463 bytes):
SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
+SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
(1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
(0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
(0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
(6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
yesterday
1
Thanks, @Shameen. I tried to save one more and useCHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead ofCHAR(13)
.
– BradC
yesterday
add a comment |
up vote
8
down vote
up vote
8
down vote
T-SQL, 341 338 bytes
DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4
*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&
*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)
The first 4 line breaks are for readability only, the final line break is part of a string literal.
Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:
*7
gets replaced by+REPLICATE('#',7)
$4
gets replaced by+SPACE(4)
&
gets replaced by a line break inside quotes
This results in a massive SQL command string:
PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)
Which, when run, produces the necessary output.
Long, but still better than my best set-based solution (463 bytes):
SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
+SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
(1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
(0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
(0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
(6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
T-SQL, 341 338 bytes
DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4
*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&
*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)
The first 4 line breaks are for readability only, the final line break is part of a string literal.
Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:
*7
gets replaced by+REPLICATE('#',7)
$4
gets replaced by+SPACE(4)
&
gets replaced by a line break inside quotes
This results in a massive SQL command string:
PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)
Which, when run, produces the necessary output.
Long, but still better than my best set-based solution (463 bytes):
SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
+SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
(1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
(0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
(0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
(6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
edited yesterday
answered yesterday
BradC
3,519521
3,519521
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
yesterday
1
Thanks, @Shameen. I tried to save one more and useCHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead ofCHAR(13)
.
– BradC
yesterday
add a comment |
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
yesterday
1
Thanks, @Shameen. I tried to save one more and useCHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead ofCHAR(13)
.
– BradC
yesterday
can drop 2 chars using
CHAR(8000)
instead of VARCHAR(max)
(the huge command is 1453 bytes)– Shameen
yesterday
can drop 2 chars using
CHAR(8000)
instead of VARCHAR(max)
(the huge command is 1453 bytes)– Shameen
yesterday
1
1
Thanks, @Shameen. I tried to save one more and use
CHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead of CHAR(13)
.– BradC
yesterday
Thanks, @Shameen. I tried to save one more and use
CHAR(2E3)
but it didn't seem to like that. I also saved a byte by using a line break literal instead of CHAR(13)
.– BradC
yesterday
add a comment |
up vote
8
down vote
Bubblegum, 71 66 65 64 bytes
0000000: 95 91 21 12 00 20 08 c0 3a af 90 ff 7f 52 4e 58 ..!.. ..:....RNX
0000010: 58 93 25 d8 8a 27 47 e4 23 66 01 2c ce b1 3c 12 X.%..'G.#f.,..<.
0000020: 5f 5b 17 7c 81 ed 31 28 4e 6e a4 6d 23 ad 5b c2 _[.|..1(Nn.m#.[.
0000030: ae 25 83 9a 94 1a 2f 6f 05 fc e5 f0 73 13 f9 0b .%..../o....s...
Thanks to @ovs for golfing off 1 byte!
Try it online!
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
add a comment |
up vote
8
down vote
Bubblegum, 71 66 65 64 bytes
0000000: 95 91 21 12 00 20 08 c0 3a af 90 ff 7f 52 4e 58 ..!.. ..:....RNX
0000010: 58 93 25 d8 8a 27 47 e4 23 66 01 2c ce b1 3c 12 X.%..'G.#f.,..<.
0000020: 5f 5b 17 7c 81 ed 31 28 4e 6e a4 6d 23 ad 5b c2 _[.|..1(Nn.m#.[.
0000030: ae 25 83 9a 94 1a 2f 6f 05 fc e5 f0 73 13 f9 0b .%..../o....s...
Thanks to @ovs for golfing off 1 byte!
Try it online!
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
add a comment |
up vote
8
down vote
up vote
8
down vote
Bubblegum, 71 66 65 64 bytes
0000000: 95 91 21 12 00 20 08 c0 3a af 90 ff 7f 52 4e 58 ..!.. ..:....RNX
0000010: 58 93 25 d8 8a 27 47 e4 23 66 01 2c ce b1 3c 12 X.%..'G.#f.,..<.
0000020: 5f 5b 17 7c 81 ed 31 28 4e 6e a4 6d 23 ad 5b c2 _[.|..1(Nn.m#.[.
0000030: ae 25 83 9a 94 1a 2f 6f 05 fc e5 f0 73 13 f9 0b .%..../o....s...
Thanks to @ovs for golfing off 1 byte!
Try it online!
Bubblegum, 71 66 65 64 bytes
0000000: 95 91 21 12 00 20 08 c0 3a af 90 ff 7f 52 4e 58 ..!.. ..:....RNX
0000010: 58 93 25 d8 8a 27 47 e4 23 66 01 2c ce b1 3c 12 X.%..'G.#f.,..<.
0000020: 5f 5b 17 7c 81 ed 31 28 4e 6e a4 6d 23 ad 5b c2 _[.|..1(Nn.m#.[.
0000030: ae 25 83 9a 94 1a 2f 6f 05 fc e5 f0 73 13 f9 0b .%..../o....s...
Thanks to @ovs for golfing off 1 byte!
Try it online!
edited 20 hours ago
answered yesterday
Dennis♦
184k32293728
184k32293728
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
add a comment |
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
65 bytes. (zopfli with 120000 iterations)
– ovs
21 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
@ovs Thanks! I had never tried so many iterations before.
– Dennis♦
20 hours ago
add a comment |
up vote
7
down vote
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
add a comment |
up vote
7
down vote
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
add a comment |
up vote
7
down vote
up vote
7
down vote
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
answered yesterday
Conor O'Brien
28.8k263160
28.8k263160
add a comment |
add a comment |
up vote
7
down vote
JavaScript (ES6), 173 170 bytes
_=>`tc
du
9a9k
58fe38
36h83676
6j83!h85!h85!f87!f87!dm96
6dm96
6b8b!b6d696
3858n8
5gjc
dy
d6`.split`!`.join`696
6`.replace(/./g,c=>'# '[(k=parseInt(c,36))&1].repeat(k/2))
Try it online!
Node.js, 163 bytes
Provided that an array of strings is a valid output:
_=>Buffer(`.&-/*%$*&$''!$##($!###!#)$!#$&($"#$&($"#$&'$##$&'$##$&&+$&&+$&%$%#$&%#&#$#!$"$+$#()&(1*#2`).map(c=>s+='# '[x^=1].repeat(c-32),s=x='')&&s.match(/.{27}/g)
Try it online!
add a comment |
up vote
7
down vote
JavaScript (ES6), 173 170 bytes
_=>`tc
du
9a9k
58fe38
36h83676
6j83!h85!h85!f87!f87!dm96
6dm96
6b8b!b6d696
3858n8
5gjc
dy
d6`.split`!`.join`696
6`.replace(/./g,c=>'# '[(k=parseInt(c,36))&1].repeat(k/2))
Try it online!
Node.js, 163 bytes
Provided that an array of strings is a valid output:
_=>Buffer(`.&-/*%$*&$''!$##($!###!#)$!#$&($"#$&($"#$&'$##$&'$##$&&+$&&+$&%$%#$&%#&#$#!$"$+$#()&(1*#2`).map(c=>s+='# '[x^=1].repeat(c-32),s=x='')&&s.match(/.{27}/g)
Try it online!
add a comment |
up vote
7
down vote
up vote
7
down vote
JavaScript (ES6), 173 170 bytes
_=>`tc
du
9a9k
58fe38
36h83676
6j83!h85!h85!f87!f87!dm96
6dm96
6b8b!b6d696
3858n8
5gjc
dy
d6`.split`!`.join`696
6`.replace(/./g,c=>'# '[(k=parseInt(c,36))&1].repeat(k/2))
Try it online!
Node.js, 163 bytes
Provided that an array of strings is a valid output:
_=>Buffer(`.&-/*%$*&$''!$##($!###!#)$!#$&($"#$&($"#$&'$##$&'$##$&&+$&&+$&%$%#$&%#&#$#!$"$+$#()&(1*#2`).map(c=>s+='# '[x^=1].repeat(c-32),s=x='')&&s.match(/.{27}/g)
Try it online!
JavaScript (ES6), 173 170 bytes
_=>`tc
du
9a9k
58fe38
36h83676
6j83!h85!h85!f87!f87!dm96
6dm96
6b8b!b6d696
3858n8
5gjc
dy
d6`.split`!`.join`696
6`.replace(/./g,c=>'# '[(k=parseInt(c,36))&1].repeat(k/2))
Try it online!
Node.js, 163 bytes
Provided that an array of strings is a valid output:
_=>Buffer(`.&-/*%$*&$''!$##($!###!#)$!#$&($"#$&($"#$&'$##$&'$##$&&+$&&+$&%$%#$&%#&#$#!$"$+$#()&(1*#2`).map(c=>s+='# '[x^=1].repeat(c-32),s=x='')&&s.match(/.{27}/g)
Try it online!
edited yesterday
answered 2 days ago
Arnauld
68.5k584289
68.5k584289
add a comment |
add a comment |
up vote
7
down vote
Charcoal, 71 bytes
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶↘‖OM←←¹⁷↘F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»↘→UO³¦¹⁴UMKA#
Try it online! Link is to verbose version of code. Explanation:
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶
Output half of the circle.
↘‖OM←←¹⁷↘
Reflect it and draw in the bottom.
F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»
Draw the left arm and crossbar of the A.
↘→UO³¦¹⁴
Draw the right arm of the A.
UMKA#
Change all the characters to #
s.
add a comment |
up vote
7
down vote
Charcoal, 71 bytes
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶↘‖OM←←¹⁷↘F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»↘→UO³¦¹⁴UMKA#
Try it online! Link is to verbose version of code. Explanation:
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶
Output half of the circle.
↘‖OM←←¹⁷↘
Reflect it and draw in the bottom.
F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»
Draw the left arm and crossbar of the A.
↘→UO³¦¹⁴
Draw the right arm of the A.
UMKA#
Change all the characters to #
s.
add a comment |
up vote
7
down vote
up vote
7
down vote
Charcoal, 71 bytes
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶↘‖OM←←¹⁷↘F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»↘→UO³¦¹⁴UMKA#
Try it online! Link is to verbose version of code. Explanation:
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶
Output half of the circle.
↘‖OM←←¹⁷↘
Reflect it and draw in the bottom.
F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»
Draw the left arm and crossbar of the A.
↘→UO³¦¹⁴
Draw the right arm of the A.
UMKA#
Change all the characters to #
s.
Charcoal, 71 bytes
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶↘‖OM←←¹⁷↘F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»↘→UO³¦¹⁴UMKA#
Try it online! Link is to verbose version of code. Explanation:
P⁸↓P-³↙←⁴↓P³↙G→³↓⁹←³#↘P⁴↘P⁶
Output half of the circle.
↘‖OM←←¹⁷↘
Reflect it and draw in the bottom.
F⁹«P⁺³›ι³↑P⁴↗¿⁼ι²B⁸±²»
Draw the left arm and crossbar of the A.
↘→UO³¦¹⁴
Draw the right arm of the A.
UMKA#
Change all the characters to #
s.
answered yesterday
Neil
77.8k744174
77.8k744174
add a comment |
add a comment |
up vote
7
down vote
C (gcc), 174 168 164 bytes
-6 bytes thanks to Dennis.
i,j=88;main(l){while(j--)for(i="CJQHFIHCDKDBDACDCFCEFDCEDEFDKFFDKFFDCCDGFDCCDGFDCBDHFDCBDHFDCADICACCCADHCCDAGGDFJDEJOMFN"[j]-64;i;)putchar(l++%28?--i,35-j%2*3:10);}
Try it online!
add a comment |
up vote
7
down vote
C (gcc), 174 168 164 bytes
-6 bytes thanks to Dennis.
i,j=88;main(l){while(j--)for(i="CJQHFIHCDKDBDACDCFCEFDCEDEFDKFFDKFFDCCDGFDCCDGFDCBDHFDCBDHFDCADICACCCADHCCDAGGDFJDEJOMFN"[j]-64;i;)putchar(l++%28?--i,35-j%2*3:10);}
Try it online!
add a comment |
up vote
7
down vote
up vote
7
down vote
C (gcc), 174 168 164 bytes
-6 bytes thanks to Dennis.
i,j=88;main(l){while(j--)for(i="CJQHFIHCDKDBDACDCFCEFDCEDEFDKFFDKFFDCCDGFDCCDGFDCBDHFDCBDHFDCADICACCCADHCCDAGGDFJDEJOMFN"[j]-64;i;)putchar(l++%28?--i,35-j%2*3:10);}
Try it online!
C (gcc), 174 168 164 bytes
-6 bytes thanks to Dennis.
i,j=88;main(l){while(j--)for(i="CJQHFIHCDKDBDACDCFCEFDCEDEFDKFFDKFFDCCDGFDCCDGFDCBDHFDCBDHFDCADICACCCADHCCDAGGDFJDEJOMFN"[j]-64;i;)putchar(l++%28?--i,35-j%2*3:10);}
Try it online!
edited yesterday
answered yesterday
gastropner
1,7901410
1,7901410
add a comment |
add a comment |
up vote
7
down vote
Python 2, 129 bytes
00000000: 2363 6f64 696e 673a 4c31 0a70 7269 6e74 #coding:L1.print
00000010: 2778 da95 9141 0e5c 3021 0803 ef7d 4593 'x...A.!...}E.
00000020: feff 8f9b 5d14 5c6e f1b0 f622 7422 2890 ....].n..."t"(.
00000030: 2e7d 5a09 dc4b 19cb bc53 84d1 4a6a 5960 .}Z..K...S..JjY`
00000040: 116e 3f42 c290 b3f7 c0bc 76cf 549d 6ed8 .n?B......v.T.n.
00000050: f8fa 5f26 0b0e 8c93 d5cb 35f6 b1e7 a939 .._&......5....9
00000060: 9e98 e769 47b9 87d6 cdf5 5c30 3030 32c0 ...iG.....002.
00000070: 4029 272e 6465 636f 6465 2827 7a69 7027 @)'.decode('zip'
00000080: 29 )
Try it online!
129 bytes, I removed the trailingn
from the compressed string.
– ovs
22 hours ago
add a comment |
up vote
7
down vote
Python 2, 129 bytes
00000000: 2363 6f64 696e 673a 4c31 0a70 7269 6e74 #coding:L1.print
00000010: 2778 da95 9141 0e5c 3021 0803 ef7d 4593 'x...A.!...}E.
00000020: feff 8f9b 5d14 5c6e f1b0 f622 7422 2890 ....].n..."t"(.
00000030: 2e7d 5a09 dc4b 19cb bc53 84d1 4a6a 5960 .}Z..K...S..JjY`
00000040: 116e 3f42 c290 b3f7 c0bc 76cf 549d 6ed8 .n?B......v.T.n.
00000050: f8fa 5f26 0b0e 8c93 d5cb 35f6 b1e7 a939 .._&......5....9
00000060: 9e98 e769 47b9 87d6 cdf5 5c30 3030 32c0 ...iG.....002.
00000070: 4029 272e 6465 636f 6465 2827 7a69 7027 @)'.decode('zip'
00000080: 29 )
Try it online!
129 bytes, I removed the trailingn
from the compressed string.
– ovs
22 hours ago
add a comment |
up vote
7
down vote
up vote
7
down vote
Python 2, 129 bytes
00000000: 2363 6f64 696e 673a 4c31 0a70 7269 6e74 #coding:L1.print
00000010: 2778 da95 9141 0e5c 3021 0803 ef7d 4593 'x...A.!...}E.
00000020: feff 8f9b 5d14 5c6e f1b0 f622 7422 2890 ....].n..."t"(.
00000030: 2e7d 5a09 dc4b 19cb bc53 84d1 4a6a 5960 .}Z..K...S..JjY`
00000040: 116e 3f42 c290 b3f7 c0bc 76cf 549d 6ed8 .n?B......v.T.n.
00000050: f8fa 5f26 0b0e 8c93 d5cb 35f6 b1e7 a939 .._&......5....9
00000060: 9e98 e769 47b9 87d6 cdf5 5c30 3030 32c0 ...iG.....002.
00000070: 4029 272e 6465 636f 6465 2827 7a69 7027 @)'.decode('zip'
00000080: 29 )
Try it online!
Python 2, 129 bytes
00000000: 2363 6f64 696e 673a 4c31 0a70 7269 6e74 #coding:L1.print
00000010: 2778 da95 9141 0e5c 3021 0803 ef7d 4593 'x...A.!...}E.
00000020: feff 8f9b 5d14 5c6e f1b0 f622 7422 2890 ....].n..."t"(.
00000030: 2e7d 5a09 dc4b 19cb bc53 84d1 4a6a 5960 .}Z..K...S..JjY`
00000040: 116e 3f42 c290 b3f7 c0bc 76cf 549d 6ed8 .n?B......v.T.n.
00000050: f8fa 5f26 0b0e 8c93 d5cb 35f6 b1e7 a939 .._&......5....9
00000060: 9e98 e769 47b9 87d6 cdf5 5c30 3030 32c0 ...iG.....002.
00000070: 4029 272e 6465 636f 6465 2827 7a69 7027 @)'.decode('zip'
00000080: 29 )
Try it online!
edited 20 hours ago
answered yesterday
Lynn
49.1k694223
49.1k694223
129 bytes, I removed the trailingn
from the compressed string.
– ovs
22 hours ago
add a comment |
129 bytes, I removed the trailingn
from the compressed string.
– ovs
22 hours ago
129 bytes, I removed the trailing
n
from the compressed string.– ovs
22 hours ago
129 bytes, I removed the trailing
n
from the compressed string.– ovs
22 hours ago
add a comment |
up vote
6
down vote
Haskell, 170 163 bytes
Edit: -7 bytes thanks to @Ørjan Johansen
m=<<"Mc Ul WeWg YdTgZa ZcSdZcX cRdZcW cSdYcW cSdYcW cTdXcW cTdXcW cUkW cUkW cVdVcW cVcUcW ZdYdPa YhRc Un U "
m ' '="###n"
m c=(' '<$['Z','Y'..c])++('#'<$['a'..c])
Try it online!
Spaces are encoded as uppercase characters (length: Z
down to char), hash signs as lowercase characters (length: a
to char) and the last three #
of each line plus newline as a space. Function m
decodes it.
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
yesterday
add a comment |
up vote
6
down vote
Haskell, 170 163 bytes
Edit: -7 bytes thanks to @Ørjan Johansen
m=<<"Mc Ul WeWg YdTgZa ZcSdZcX cRdZcW cSdYcW cSdYcW cTdXcW cTdXcW cUkW cUkW cVdVcW cVcUcW ZdYdPa YhRc Un U "
m ' '="###n"
m c=(' '<$['Z','Y'..c])++('#'<$['a'..c])
Try it online!
Spaces are encoded as uppercase characters (length: Z
down to char), hash signs as lowercase characters (length: a
to char) and the last three #
of each line plus newline as a space. Function m
decodes it.
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
yesterday
add a comment |
up vote
6
down vote
up vote
6
down vote
Haskell, 170 163 bytes
Edit: -7 bytes thanks to @Ørjan Johansen
m=<<"Mc Ul WeWg YdTgZa ZcSdZcX cRdZcW cSdYcW cSdYcW cTdXcW cTdXcW cUkW cUkW cVdVcW cVcUcW ZdYdPa YhRc Un U "
m ' '="###n"
m c=(' '<$['Z','Y'..c])++('#'<$['a'..c])
Try it online!
Spaces are encoded as uppercase characters (length: Z
down to char), hash signs as lowercase characters (length: a
to char) and the last three #
of each line plus newline as a space. Function m
decodes it.
Haskell, 170 163 bytes
Edit: -7 bytes thanks to @Ørjan Johansen
m=<<"Mc Ul WeWg YdTgZa ZcSdZcX cRdZcW cSdYcW cSdYcW cTdXcW cTdXcW cUkW cUkW cVdVcW cVcUcW ZdYdPa YhRc Un U "
m ' '="###n"
m c=(' '<$['Z','Y'..c])++('#'<$['a'..c])
Try it online!
Spaces are encoded as uppercase characters (length: Z
down to char), hash signs as lowercase characters (length: a
to char) and the last three #
of each line plus newline as a space. Function m
decodes it.
edited yesterday
answered yesterday
nimi
30.7k31985
30.7k31985
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
yesterday
add a comment |
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
yesterday
1
1
I think you can save some by letting space encode
"###n"
.– Ørjan Johansen
yesterday
I think you can save some by letting space encode
"###n"
.– Ørjan Johansen
yesterday
add a comment |
up vote
6
down vote
05AB1E, 101 88 64 bytes
„# •∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•12вεN>yи}˜èJ27ô»
-24 bytes by creating a port of @Dennis♦' Jelly answer.
Try it online.
Explanation:
„# # Push string "# "
•∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•
'# Push compressed integer 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163
12в # Convert to Base-12 as list: [3,0,11,6,2,0,11,4,0,11,10,5,4,10,6,4,7,7,1,4,3,3,8,4,1,3,3,3,1,3,9,4,1,3,4,6,8,4,2,3,4,6,8,4,2,3,4,6,7,4,3,3,4,6,7,4,3,3,4,6,6,11,4,6,6,11,4,6,5,4,5,3,4,6,5,3,6,3,4,3,1,4,2,4,11,4,3,8,9,6,8,6,0,11,10,3]
ε } # Map each `y` to:
N> # The index+1
yи # Repeated `y` amount of times
˜ # Flatten the list
è # Index each in the string "# " (with automatic wraparound)
J # Join everything together
27ô # Split into parts of length 27
» # And join by newlines
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression of the integer and list works.
add a comment |
up vote
6
down vote
05AB1E, 101 88 64 bytes
„# •∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•12вεN>yи}˜èJ27ô»
-24 bytes by creating a port of @Dennis♦' Jelly answer.
Try it online.
Explanation:
„# # Push string "# "
•∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•
'# Push compressed integer 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163
12в # Convert to Base-12 as list: [3,0,11,6,2,0,11,4,0,11,10,5,4,10,6,4,7,7,1,4,3,3,8,4,1,3,3,3,1,3,9,4,1,3,4,6,8,4,2,3,4,6,8,4,2,3,4,6,7,4,3,3,4,6,7,4,3,3,4,6,6,11,4,6,6,11,4,6,5,4,5,3,4,6,5,3,6,3,4,3,1,4,2,4,11,4,3,8,9,6,8,6,0,11,10,3]
ε } # Map each `y` to:
N> # The index+1
yи # Repeated `y` amount of times
˜ # Flatten the list
è # Index each in the string "# " (with automatic wraparound)
J # Join everything together
27ô # Split into parts of length 27
» # And join by newlines
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression of the integer and list works.
add a comment |
up vote
6
down vote
up vote
6
down vote
05AB1E, 101 88 64 bytes
„# •∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•12вεN>yи}˜èJ27ô»
-24 bytes by creating a port of @Dennis♦' Jelly answer.
Try it online.
Explanation:
„# # Push string "# "
•∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•
'# Push compressed integer 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163
12в # Convert to Base-12 as list: [3,0,11,6,2,0,11,4,0,11,10,5,4,10,6,4,7,7,1,4,3,3,8,4,1,3,3,3,1,3,9,4,1,3,4,6,8,4,2,3,4,6,8,4,2,3,4,6,7,4,3,3,4,6,7,4,3,3,4,6,6,11,4,6,6,11,4,6,5,4,5,3,4,6,5,3,6,3,4,3,1,4,2,4,11,4,3,8,9,6,8,6,0,11,10,3]
ε } # Map each `y` to:
N> # The index+1
yи # Repeated `y` amount of times
˜ # Flatten the list
è # Index each in the string "# " (with automatic wraparound)
J # Join everything together
27ô # Split into parts of length 27
» # And join by newlines
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression of the integer and list works.
05AB1E, 101 88 64 bytes
„# •∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•12вεN>yи}˜èJ27ô»
-24 bytes by creating a port of @Dennis♦' Jelly answer.
Try it online.
Explanation:
„# # Push string "# "
•∍ΔÎë,½=bOÅ.âαUΔ'òõƶαÔγλ#xÆ]~”FbćÁ˜Ð”wнQ_wā©•
'# Push compressed integer 10250938842396786963034911279002199266186481794751691439873548591280332406943905758890346943197901909163
12в # Convert to Base-12 as list: [3,0,11,6,2,0,11,4,0,11,10,5,4,10,6,4,7,7,1,4,3,3,8,4,1,3,3,3,1,3,9,4,1,3,4,6,8,4,2,3,4,6,8,4,2,3,4,6,7,4,3,3,4,6,7,4,3,3,4,6,6,11,4,6,6,11,4,6,5,4,5,3,4,6,5,3,6,3,4,3,1,4,2,4,11,4,3,8,9,6,8,6,0,11,10,3]
ε } # Map each `y` to:
N> # The index+1
yи # Repeated `y` amount of times
˜ # Flatten the list
è # Index each in the string "# " (with automatic wraparound)
J # Join everything together
27ô # Split into parts of length 27
» # And join by newlines
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression of the integer and list works.
edited yesterday
answered yesterday
Kevin Cruijssen
33.8k554180
33.8k554180
add a comment |
add a comment |
up vote
6
down vote
Bash, 192 176 bytes
dc<<<"16i2o81C0000 81FFFF0 9FE00FC BCF001E F070387 F078387 F03FF87 F03FF87 F01E387 F01E387 F00F387 F00F387 F007B87 B807B8E 9E03FBC 87C3FF0 81FFFC0 8001F80f"|tr 01 ' #'|cut -c2-
Try it online!
-16 thanks to manatwork
This is similar to my C answer, except it just uses a raw base-16 compression and passes it through bc, then uses tr to convert 1 to # and 0 to space. Each row has 1 appended to it and stripped off of it to maintain alignment.
Unfortunately dc
is shorter than bc
.
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
yesterday
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
yesterday
2
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
yesterday
1
134 bytes
– Dennis♦
yesterday
add a comment |
up vote
6
down vote
Bash, 192 176 bytes
dc<<<"16i2o81C0000 81FFFF0 9FE00FC BCF001E F070387 F078387 F03FF87 F03FF87 F01E387 F01E387 F00F387 F00F387 F007B87 B807B8E 9E03FBC 87C3FF0 81FFFC0 8001F80f"|tr 01 ' #'|cut -c2-
Try it online!
-16 thanks to manatwork
This is similar to my C answer, except it just uses a raw base-16 compression and passes it through bc, then uses tr to convert 1 to # and 0 to space. Each row has 1 appended to it and stripped off of it to maintain alignment.
Unfortunately dc
is shorter than bc
.
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
yesterday
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
yesterday
2
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
yesterday
1
134 bytes
– Dennis♦
yesterday
add a comment |
up vote
6
down vote
up vote
6
down vote
Bash, 192 176 bytes
dc<<<"16i2o81C0000 81FFFF0 9FE00FC BCF001E F070387 F078387 F03FF87 F03FF87 F01E387 F01E387 F00F387 F00F387 F007B87 B807B8E 9E03FBC 87C3FF0 81FFFC0 8001F80f"|tr 01 ' #'|cut -c2-
Try it online!
-16 thanks to manatwork
This is similar to my C answer, except it just uses a raw base-16 compression and passes it through bc, then uses tr to convert 1 to # and 0 to space. Each row has 1 appended to it and stripped off of it to maintain alignment.
Unfortunately dc
is shorter than bc
.
Bash, 192 176 bytes
dc<<<"16i2o81C0000 81FFFF0 9FE00FC BCF001E F070387 F078387 F03FF87 F03FF87 F01E387 F01E387 F00F387 F00F387 F007B87 B807B8E 9E03FBC 87C3FF0 81FFFC0 8001F80f"|tr 01 ' #'|cut -c2-
Try it online!
-16 thanks to manatwork
This is similar to my C answer, except it just uses a raw base-16 compression and passes it through bc, then uses tr to convert 1 to # and 0 to space. Each row has 1 appended to it and stripped off of it to maintain alignment.
Unfortunately dc
is shorter than bc
.
edited yesterday
answered yesterday
LambdaBeta
1,989416
1,989416
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
yesterday
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
yesterday
2
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
yesterday
1
134 bytes
– Dennis♦
yesterday
add a comment |
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
yesterday
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
yesterday
2
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
yesterday
1
134 bytes
– Dennis♦
yesterday
No need for
^
. But even better, use cut -c2-
instead of the sed
part.– manatwork
yesterday
No need for
^
. But even better, use cut -c2-
instead of the sed
part.– manatwork
yesterday
And also shorter with here-string instead of
echo
and even shorter with dc
instead of bc
: Try it online!– manatwork
yesterday
And also shorter with here-string instead of
echo
and even shorter with dc
instead of bc
: Try it online!– manatwork
yesterday
2
2
I'll give you the
echo
, but come on - dc
for Stan Lee... you must be joking ;)– LambdaBeta
yesterday
I'll give you the
echo
, but come on - dc
for Stan Lee... you must be joking ;)– LambdaBeta
yesterday
1
1
134 bytes
– Dennis♦
yesterday
134 bytes
– Dennis♦
yesterday
add a comment |
up vote
5
down vote
J, 130 128 bytes
echo' #'{~18 27$;(_243{.2#.inv 92x#._32+a.i.])&>'!TYPW.ajz i8hIhXl''3lOH8GvV.C2Z{r/=,G';'"a*2ZDxRplkh2tzRakz.?ZwVmeOT6L^lFB^eyT'
Try it online!
Initial solution
J, 164 bytes
echo' #'{~18 27$,#:849239965469633263905532594449192007713271791872263657753301928240007 12380965417202148347902847903517734495157419855048834759608223758433386496x
Try it online!
add a comment |
up vote
5
down vote
J, 130 128 bytes
echo' #'{~18 27$;(_243{.2#.inv 92x#._32+a.i.])&>'!TYPW.ajz i8hIhXl''3lOH8GvV.C2Z{r/=,G';'"a*2ZDxRplkh2tzRakz.?ZwVmeOT6L^lFB^eyT'
Try it online!
Initial solution
J, 164 bytes
echo' #'{~18 27$,#:849239965469633263905532594449192007713271791872263657753301928240007 12380965417202148347902847903517734495157419855048834759608223758433386496x
Try it online!
add a comment |
up vote
5
down vote
up vote
5
down vote
J, 130 128 bytes
echo' #'{~18 27$;(_243{.2#.inv 92x#._32+a.i.])&>'!TYPW.ajz i8hIhXl''3lOH8GvV.C2Z{r/=,G';'"a*2ZDxRplkh2tzRakz.?ZwVmeOT6L^lFB^eyT'
Try it online!
Initial solution
J, 164 bytes
echo' #'{~18 27$,#:849239965469633263905532594449192007713271791872263657753301928240007 12380965417202148347902847903517734495157419855048834759608223758433386496x
Try it online!
J, 130 128 bytes
echo' #'{~18 27$;(_243{.2#.inv 92x#._32+a.i.])&>'!TYPW.ajz i8hIhXl''3lOH8GvV.C2Z{r/=,G';'"a*2ZDxRplkh2tzRakz.?ZwVmeOT6L^lFB^eyT'
Try it online!
Initial solution
J, 164 bytes
echo' #'{~18 27$,#:849239965469633263905532594449192007713271791872263657753301928240007 12380965417202148347902847903517734495157419855048834759608223758433386496x
Try it online!
edited yesterday
answered yesterday
Galen Ivanov
5,87711032
5,87711032
add a comment |
add a comment |
up vote
4
down vote
Perl 5, 181 bytes
say+(sprintf"%28b",oct"0x$_")=~y/10/# /r for"0003f0003fff800f87fe03c07f78700f71ce00f70ee01e70ee01e70ee03c70ee03c70ee07ff0ee07ff0ee0f070ee0e070e79e003c3fc01f803fffe00380000"=~/.{7}/g
Try it online!
add a comment |
up vote
4
down vote
Perl 5, 181 bytes
say+(sprintf"%28b",oct"0x$_")=~y/10/# /r for"0003f0003fff800f87fe03c07f78700f71ce00f70ee01e70ee01e70ee03c70ee03c70ee07ff0ee07ff0ee0f070ee0e070e79e003c3fc01f803fffe00380000"=~/.{7}/g
Try it online!
add a comment |
up vote
4
down vote
up vote
4
down vote
Perl 5, 181 bytes
say+(sprintf"%28b",oct"0x$_")=~y/10/# /r for"0003f0003fff800f87fe03c07f78700f71ce00f70ee01e70ee01e70ee03c70ee03c70ee07ff0ee07ff0ee0f070ee0e070e79e003c3fc01f803fffe00380000"=~/.{7}/g
Try it online!
Perl 5, 181 bytes
say+(sprintf"%28b",oct"0x$_")=~y/10/# /r for"0003f0003fff800f87fe03c07f78700f71ce00f70ee01e70ee01e70ee03c70ee03c70ee07ff0ee07ff0ee0f070ee0e070e79e003c3fc01f803fffe00380000"=~/.{7}/g
Try it online!
answered yesterday
Xcali
4,960520
4,960520
add a comment |
add a comment |
up vote
4
down vote
Perl 6, 136 116 bytes
:100['> b3V$^%&!U3X/_9-D>Z(+, OD_=D,-:&3S>#OL
8C"> c H'.ords].base(2)~~TR/1/ /.comb(27)>>.say
Try it online!
Parses a base 100 number from the ordinal values of the string, converts to base 2 and replaces the 1
s with spaces. This uses zeroes as the main character.
Explanation:
:100['...'.ords] # Convert the bytes of the string to base 100
.base(2) # Convert to base 2
~~TR/1/ / # Translate 1s to spaces
# Alternatively, this could be .split(1)
.comb(27) # Split to strings of length 27
>>.say # Print each on a newline
add a comment |
up vote
4
down vote
Perl 6, 136 116 bytes
:100['> b3V$^%&!U3X/_9-D>Z(+, OD_=D,-:&3S>#OL
8C"> c H'.ords].base(2)~~TR/1/ /.comb(27)>>.say
Try it online!
Parses a base 100 number from the ordinal values of the string, converts to base 2 and replaces the 1
s with spaces. This uses zeroes as the main character.
Explanation:
:100['...'.ords] # Convert the bytes of the string to base 100
.base(2) # Convert to base 2
~~TR/1/ / # Translate 1s to spaces
# Alternatively, this could be .split(1)
.comb(27) # Split to strings of length 27
>>.say # Print each on a newline
add a comment |
up vote
4
down vote
up vote
4
down vote
Perl 6, 136 116 bytes
:100['> b3V$^%&!U3X/_9-D>Z(+, OD_=D,-:&3S>#OL
8C"> c H'.ords].base(2)~~TR/1/ /.comb(27)>>.say
Try it online!
Parses a base 100 number from the ordinal values of the string, converts to base 2 and replaces the 1
s with spaces. This uses zeroes as the main character.
Explanation:
:100['...'.ords] # Convert the bytes of the string to base 100
.base(2) # Convert to base 2
~~TR/1/ / # Translate 1s to spaces
# Alternatively, this could be .split(1)
.comb(27) # Split to strings of length 27
>>.say # Print each on a newline
Perl 6, 136 116 bytes
:100['> b3V$^%&!U3X/_9-D>Z(+, OD_=D,-:&3S>#OL
8C"> c H'.ords].base(2)~~TR/1/ /.comb(27)>>.say
Try it online!
Parses a base 100 number from the ordinal values of the string, converts to base 2 and replaces the 1
s with spaces. This uses zeroes as the main character.
Explanation:
:100['...'.ords] # Convert the bytes of the string to base 100
.base(2) # Convert to base 2
~~TR/1/ / # Translate 1s to spaces
# Alternatively, this could be .split(1)
.comb(27) # Split to strings of length 27
>>.say # Print each on a newline
edited yesterday
answered yesterday
Jo King
19k242101
19k242101
add a comment |
add a comment |
up vote
3
down vote
MATLAB : 144 Bytes
reshape(repelem([repmat(' #',1,44),' '],'NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR'-64),27,)'
Try it online! (Technically in Octave)
Explanation:
This uses the same strategy as digEmAll in R, just with MATLAB syntax. The main difference is that MATLAB has automatic conversion from characters to integers.
New contributor
add a comment |
up vote
3
down vote
MATLAB : 144 Bytes
reshape(repelem([repmat(' #',1,44),' '],'NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR'-64),27,)'
Try it online! (Technically in Octave)
Explanation:
This uses the same strategy as digEmAll in R, just with MATLAB syntax. The main difference is that MATLAB has automatic conversion from characters to integers.
New contributor
add a comment |
up vote
3
down vote
up vote
3
down vote
MATLAB : 144 Bytes
reshape(repelem([repmat(' #',1,44),' '],'NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR'-64),27,)'
Try it online! (Technically in Octave)
Explanation:
This uses the same strategy as digEmAll in R, just with MATLAB syntax. The main difference is that MATLAB has automatic conversion from characters to integers.
New contributor
MATLAB : 144 Bytes
reshape(repelem([repmat(' #',1,44),' '],'NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR'-64),27,)'
Try it online! (Technically in Octave)
Explanation:
This uses the same strategy as digEmAll in R, just with MATLAB syntax. The main difference is that MATLAB has automatic conversion from characters to integers.
New contributor
edited 23 hours ago
New contributor
answered yesterday
Nicky Mattsson
1314
1314
New contributor
New contributor
add a comment |
add a comment |
up vote
2
down vote
C# (.NET Core), 199 bytes
_=>{var r="";for(int i=0,j,k=0;i<88;i++)for(j=0;j++<"0(/1,'&,(&))#&%%*&#%%%#%+&#%&(*&$%&(*&$%&()&%%&()&%%&((-&((-&('&'%&('%(%&%#&$&-&%*+(*3,%"[i]-34;){r+=i%2<1?' ':'#';if(++k%27<1)r+='n';}return r;}
Try it online!
Uses the same approach as my solution to the tribute to Adam West.
add a comment |
up vote
2
down vote
C# (.NET Core), 199 bytes
_=>{var r="";for(int i=0,j,k=0;i<88;i++)for(j=0;j++<"0(/1,'&,(&))#&%%*&#%%%#%+&#%&(*&$%&(*&$%&()&%%&()&%%&((-&((-&('&'%&('%(%&%#&$&-&%*+(*3,%"[i]-34;){r+=i%2<1?' ':'#';if(++k%27<1)r+='n';}return r;}
Try it online!
Uses the same approach as my solution to the tribute to Adam West.
add a comment |
up vote
2
down vote
up vote
2
down vote
C# (.NET Core), 199 bytes
_=>{var r="";for(int i=0,j,k=0;i<88;i++)for(j=0;j++<"0(/1,'&,(&))#&%%*&#%%%#%+&#%&(*&$%&(*&$%&()&%%&()&%%&((-&((-&('&'%&('%(%&%#&$&-&%*+(*3,%"[i]-34;){r+=i%2<1?' ':'#';if(++k%27<1)r+='n';}return r;}
Try it online!
Uses the same approach as my solution to the tribute to Adam West.
C# (.NET Core), 199 bytes
_=>{var r="";for(int i=0,j,k=0;i<88;i++)for(j=0;j++<"0(/1,'&,(&))#&%%*&#%%%#%+&#%&(*&$%&(*&$%&()&%%&()&%%&((-&((-&('&'%&('%(%&%#&$&-&%*+(*3,%"[i]-34;){r+=i%2<1?' ':'#';if(++k%27<1)r+='n';}return r;}
Try it online!
Uses the same approach as my solution to the tribute to Adam West.
answered yesterday
Charlie
7,2782388
7,2782388
add a comment |
add a comment |
up vote
1
down vote
PHP, 286 bytes
<?=preg_replace_callback('~(d*)(D)~',function($m){return str_repeat($m[2],$m[1]?:1);},str_replace(["
",'~','^',';'],["^
",'^4 ','3#','4#'],"14 ^
6 12#
4 5#4 7#
2 ; 6 7# #
^8 ; ^3
^9 ; ~
^8 ;2 ~
^8 ;2 ~
^7 ;3 ~
^7 ;3 ~
^6 11#4
^6 11#4
^5 ;5 ~
^5 ^6 ~
;2 ;11 #
2 8#9 ^
6 1;
6 ^"));
Try it online!
add a comment |
up vote
1
down vote
PHP, 286 bytes
<?=preg_replace_callback('~(d*)(D)~',function($m){return str_repeat($m[2],$m[1]?:1);},str_replace(["
",'~','^',';'],["^
",'^4 ','3#','4#'],"14 ^
6 12#
4 5#4 7#
2 ; 6 7# #
^8 ; ^3
^9 ; ~
^8 ;2 ~
^8 ;2 ~
^7 ;3 ~
^7 ;3 ~
^6 11#4
^6 11#4
^5 ;5 ~
^5 ^6 ~
;2 ;11 #
2 8#9 ^
6 1;
6 ^"));
Try it online!
add a comment |
up vote
1
down vote
up vote
1
down vote
PHP, 286 bytes
<?=preg_replace_callback('~(d*)(D)~',function($m){return str_repeat($m[2],$m[1]?:1);},str_replace(["
",'~','^',';'],["^
",'^4 ','3#','4#'],"14 ^
6 12#
4 5#4 7#
2 ; 6 7# #
^8 ; ^3
^9 ; ~
^8 ;2 ~
^8 ;2 ~
^7 ;3 ~
^7 ;3 ~
^6 11#4
^6 11#4
^5 ;5 ~
^5 ^6 ~
;2 ;11 #
2 8#9 ^
6 1;
6 ^"));
Try it online!
PHP, 286 bytes
<?=preg_replace_callback('~(d*)(D)~',function($m){return str_repeat($m[2],$m[1]?:1);},str_replace(["
",'~','^',';'],["^
",'^4 ','3#','4#'],"14 ^
6 12#
4 5#4 7#
2 ; 6 7# #
^8 ; ^3
^9 ; ~
^8 ;2 ~
^8 ;2 ~
^7 ;3 ~
^7 ;3 ~
^6 11#4
^6 11#4
^5 ;5 ~
^5 ^6 ~
;2 ;11 #
2 8#9 ^
6 1;
6 ^"));
Try it online!
answered yesterday
Scoots
354311
354311
add a comment |
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to thedeflate
language, as this just looks like a base64 string
– Jo King
yesterday
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to thedeflate
language, as this just looks like a base64 string
– Jo King
yesterday
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
add a comment |
up vote
-1
down vote
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
New contributor
answered yesterday
Whale
1
1
New contributor
New contributor
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to thedeflate
language, as this just looks like a base64 string
– Jo King
yesterday
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
add a comment |
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to thedeflate
language, as this just looks like a base64 string
– Jo King
yesterday
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
5
5
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to the
deflate
language, as this just looks like a base64 string– Jo King
yesterday
You appear to have posted two answers in the same language. If you make an improvement to your submission it is better to edit your existing answer. Additionally, could you provide a link to the
deflate
language, as this just looks like a base64 string– Jo King
yesterday
3
3
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
yesterday
2
2
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
This is not DEFLATE, but zlib, which is DEFLATE plus a 2 byte header and a 4 byte checksum. By stripping those, you can use the Bubblegum interpreter.
– Dennis♦
yesterday
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
@NobodyNada deflate is not a programming language but we do not require that submissions be in programming languages.
– Post Left Garf Hunter
19 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f175873%2ftribute-to-stan-lee%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
What happened to the → in Ⓐ?
– Adám
yesterday
3
@Adám 2 Reasons. I believe that the arrow means the continuation of the series (in this case the comics about avengers). Since Stan passed away there wont be a continuation of it (In my opinion, it is not the same without Stan). That is one of the reasons
– Luis felipe De jesus Munoz
yesterday
33
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
yesterday
Can we use other characters instead of
#
and space?– Jo King
yesterday
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
yesterday