Tribute to Stan Lee
up vote
28
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
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
28
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
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
2
What happened to the → in Ⓐ?
– Adám
21 hours ago
2
@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
21 hours ago
21
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
Can we use other characters instead of#
and space?
– Jo King
14 hours ago
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
14 hours ago
|
show 2 more comments
up vote
28
down vote
favorite
up vote
28
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
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
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 21 hours ago
AdmBorkBork
25.5k362224
25.5k362224
asked 23 hours ago
Luis felipe De jesus Munoz
3,89411253
3,89411253
2
What happened to the → in Ⓐ?
– Adám
21 hours ago
2
@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
21 hours ago
21
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
Can we use other characters instead of#
and space?
– Jo King
14 hours ago
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
14 hours ago
|
show 2 more comments
2
What happened to the → in Ⓐ?
– Adám
21 hours ago
2
@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
21 hours ago
21
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
Can we use other characters instead of#
and space?
– Jo King
14 hours ago
@JoKing you can use a different char instead#
but not the space.
– Luis felipe De jesus Munoz
14 hours ago
2
2
What happened to the → in Ⓐ?
– Adám
21 hours ago
What happened to the → in Ⓐ?
– Adám
21 hours ago
2
2
@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
21 hours ago
@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
21 hours ago
21
21
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
Can we use other characters instead of
#
and space?– Jo King
14 hours ago
Can we use other characters instead of
#
and space?– Jo King
14 hours ago
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
14 hours ago
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
14 hours ago
|
show 2 more comments
21 Answers
21
active
oldest
votes
up vote
13
down vote
Jelly, 62 59 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙị⁾ #s27Y
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, ị⁾ #
indexes into the string
consisting of a space and a hash. Indexing is 1-based and modular in Jelly, so odd integers get mapped to a space, even ones to a hash.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
add a comment |
up vote
11
down vote
R, 198, 173, 163 157 bytes
write(matrix(rep(rep(c(' ','#'),,89),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR")-64),27),1,27,,'')
Try it online!
Also R
must honor the great Stan
Explanation :
Applying a run-length encoding (rle
function) on the characters of the string (excluding 'n'
) returns 89 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 89 repetitions are all values in the range [1,18]
hence, summing 64
we get the code points of the letters [A...R]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADCC...")-64 # convert the string back to [1...18] vector
e <- rep(rep(c(' ','#'),,89),v) # perform the inverse of rle function
m <- matrix(e,27) # arrange the expanded vector in a matrix of 27 rows
write(m,1,27,,'') # write each row of the matrix to stdout
146 bytes.write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually needt()
to get it in the right orientation.
– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
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
7
down vote
///, 170 bytes
/+/////*/ +)/'$# +(/"$!+'/" +&/!#+%/"!
!+$/*!+"/**+!/###/""('*
(!!!'
"&#"!!&"
$#'$& &*
!""& ! $
!"'& !%""&$%""&$%)$%)$%(&#%(&#%'&'!%'!"$"!
&$#")
$&#"'!!*
(!!&#"
"$
Try it online!
add a comment |
up vote
7
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
20 hours ago
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
19 hours ago
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
19 hours ago
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
add a comment |
up vote
7
down vote
Bubblegum, 71 66 bytes
0000000: 95 91 b7 01 c0 30 08 c0 76 9e 48 fb ff c6 54 41 .....0..v.H...TA
0000010: ac cd 68 43 4a 71 59 c5 f1 12 0c 26 ca fd 11 8f ..hCJqY....&....
0000020: 1c fc fa 15 7c 06 e6 27 55 71 72 23 b5 1b a9 dd ....|..'Uqr#....
0000030: 0e 68 36 9c bf 69 a5 96 2b 47 41 9e 25 4c dc 89 .h6..i..+GA.%L..
0000040: fd 05 ..
Try it online!
add a comment |
up vote
6
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
6
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
6
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
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
18 hours ago
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
8 hours ago
1
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
2 hours ago
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
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
4 hours ago
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
2 hours ago
add a comment |
up vote
4
down vote
Python 2, 131 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 5c6e 272e 6465 636f 6465 2827 7a69 @)n'.decode('zi
00000080: 7027 29 p')
Try it online!
add a comment |
up vote
4
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
3
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
10 hours ago
add a comment |
up vote
2
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
2
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
0
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
0
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
0
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 have automatic conversion from characters to integers.
New contributor
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
3
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
11 hours ago
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 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
13
down vote
Jelly, 62 59 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙị⁾ #s27Y
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, ị⁾ #
indexes into the string
consisting of a space and a hash. Indexing is 1-based and modular in Jelly, so odd integers get mapped to a space, even ones to a hash.
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
Jelly, 62 59 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙị⁾ #s27Y
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, ị⁾ #
indexes into the string
consisting of a space and a hash. Indexing is 1-based and modular in Jelly, so odd integers get mapped to a space, even ones to a hash.
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
up vote
13
down vote
Jelly, 62 59 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙị⁾ #s27Y
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, ị⁾ #
indexes into the string
consisting of a space and a hash. Indexing is 1-based and modular in Jelly, so odd integers get mapped to a space, even ones to a hash.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
Jelly, 62 59 bytes
“ḢE{ɠs{Ƒ0Ṇṁỵ8ỊṢṂƊeLṫfIWẈḞ'ʠJ£ṗɱçoȧ?ƒnØẆƥṂ⁷ɱ’b12ĖŒṙị⁾ #s27Y
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, ị⁾ #
indexes into the string
consisting of a space and a hash. Indexing is 1-based and modular in Jelly, so odd integers get mapped to a space, even ones to a hash.
Finally, s27
splits the unformatted character array into chunks of length 27, which Y
separates by linefeeds.
edited 18 hours ago
answered 20 hours ago
Dennis♦
184k32293728
184k32293728
add a comment |
add a comment |
up vote
11
down vote
R, 198, 173, 163 157 bytes
write(matrix(rep(rep(c(' ','#'),,89),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR")-64),27),1,27,,'')
Try it online!
Also R
must honor the great Stan
Explanation :
Applying a run-length encoding (rle
function) on the characters of the string (excluding 'n'
) returns 89 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 89 repetitions are all values in the range [1,18]
hence, summing 64
we get the code points of the letters [A...R]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADCC...")-64 # convert the string back to [1...18] vector
e <- rep(rep(c(' ','#'),,89),v) # perform the inverse of rle function
m <- matrix(e,27) # arrange the expanded vector in a matrix of 27 rows
write(m,1,27,,'') # write each row of the matrix to stdout
146 bytes.write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually needt()
to get it in the right orientation.
– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
add a comment |
up vote
11
down vote
R, 198, 173, 163 157 bytes
write(matrix(rep(rep(c(' ','#'),,89),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR")-64),27),1,27,,'')
Try it online!
Also R
must honor the great Stan
Explanation :
Applying a run-length encoding (rle
function) on the characters of the string (excluding 'n'
) returns 89 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 89 repetitions are all values in the range [1,18]
hence, summing 64
we get the code points of the letters [A...R]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADCC...")-64 # convert the string back to [1...18] vector
e <- rep(rep(c(' ','#'),,89),v) # perform the inverse of rle function
m <- matrix(e,27) # arrange the expanded vector in a matrix of 27 rows
write(m,1,27,,'') # write each row of the matrix to stdout
146 bytes.write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually needt()
to get it in the right orientation.
– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
add a comment |
up vote
11
down vote
up vote
11
down vote
R, 198, 173, 163 157 bytes
write(matrix(rep(rep(c(' ','#'),,89),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR")-64),27),1,27,,'')
Try it online!
Also R
must honor the great Stan
Explanation :
Applying a run-length encoding (rle
function) on the characters of the string (excluding 'n'
) returns 89 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 89 repetitions are all values in the range [1,18]
hence, summing 64
we get the code points of the letters [A...R]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADCC...")-64 # convert the string back to [1...18] vector
e <- rep(rep(c(' ','#'),,89),v) # perform the inverse of rle function
m <- matrix(e,27) # arrange the expanded vector in a matrix of 27 rows
write(m,1,27,,'') # write each row of the matrix to stdout
R, 198, 173, 163 157 bytes
write(matrix(rep(rep(c(' ','#'),,89),utf8ToInt("NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR")-64),27),1,27,,'')
Try it online!
Also R
must honor the great Stan
Explanation :
Applying a run-length encoding (rle
function) on the characters of the string (excluding 'n'
) returns 89 repetitions of the alternating <space>,<hash>,<space>,<hash>,<space>,<hash>...
.
The 89 repetitions are all values in the range [1,18]
hence, summing 64
we get the code points of the letters [A...R]
obtaining the string : "NFMOJEDJFDGGADCCHDACCCACIDACDFHDBCDFHDBCDFGDCCDFGDCCDFFKDFFKDFEDECDFECFCDCADBDKDCHIFHQJCR"
Hence the code basically does the opposite operations :
v <- utf8ToInt("NFMOJEDJFDGGADCC...")-64 # convert the string back to [1...18] vector
e <- rep(rep(c(' ','#'),,89),v) # perform the inverse of rle function
m <- matrix(e,27) # arrange the expanded vector in a matrix of 27 rows
write(m,1,27,,'') # write each row of the matrix to stdout
edited 4 hours ago
answered 22 hours ago
digEmAll
2,16148
2,16148
146 bytes.write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually needt()
to get it in the right orientation.
– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
add a comment |
146 bytes.write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually needt()
to get it in the right orientation.
– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
146 bytes.
write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually need t()
to get it in the right orientation.– Giuseppe
1 hour ago
146 bytes.
write
doesn't notice that it's a matrix -- it goes in vector order (down the columns), which is why you usually need t()
to get it in the right orientation.– Giuseppe
1 hour ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
144 bytes since trailing spaces on the last line aren't necessary.
– Giuseppe
10 mins ago
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 22 hours ago
answered 23 hours ago
dzaima
14k21653
14k21653
add a comment |
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 22 hours ago
Conor O'Brien
28.8k263160
28.8k263160
add a comment |
add a comment |
up vote
7
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
20 hours ago
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
19 hours ago
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
19 hours ago
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
add a comment |
up vote
7
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
20 hours ago
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
19 hours ago
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
19 hours ago
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
add a comment |
up vote
7
down vote
up vote
7
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 19 hours ago
answered 20 hours ago
LambdaBeta
1,969416
1,969416
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
20 hours ago
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
19 hours ago
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
19 hours ago
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
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
20 hours ago
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
19 hours ago
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
19 hours ago
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
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
20 hours ago
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
20 hours ago
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
19 hours ago
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
19 hours ago
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
19 hours ago
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
19 hours ago
1
1
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
Ahh, I see what you mean. You're right - that does work! -1 byte.
– LambdaBeta
19 hours ago
add a comment |
up vote
7
down vote
Bubblegum, 71 66 bytes
0000000: 95 91 b7 01 c0 30 08 c0 76 9e 48 fb ff c6 54 41 .....0..v.H...TA
0000010: ac cd 68 43 4a 71 59 c5 f1 12 0c 26 ca fd 11 8f ..hCJqY....&....
0000020: 1c fc fa 15 7c 06 e6 27 55 71 72 23 b5 1b a9 dd ....|..'Uqr#....
0000030: 0e 68 36 9c bf 69 a5 96 2b 47 41 9e 25 4c dc 89 .h6..i..+GA.%L..
0000040: fd 05 ..
Try it online!
add a comment |
up vote
7
down vote
Bubblegum, 71 66 bytes
0000000: 95 91 b7 01 c0 30 08 c0 76 9e 48 fb ff c6 54 41 .....0..v.H...TA
0000010: ac cd 68 43 4a 71 59 c5 f1 12 0c 26 ca fd 11 8f ..hCJqY....&....
0000020: 1c fc fa 15 7c 06 e6 27 55 71 72 23 b5 1b a9 dd ....|..'Uqr#....
0000030: 0e 68 36 9c bf 69 a5 96 2b 47 41 9e 25 4c dc 89 .h6..i..+GA.%L..
0000040: fd 05 ..
Try it online!
add a comment |
up vote
7
down vote
up vote
7
down vote
Bubblegum, 71 66 bytes
0000000: 95 91 b7 01 c0 30 08 c0 76 9e 48 fb ff c6 54 41 .....0..v.H...TA
0000010: ac cd 68 43 4a 71 59 c5 f1 12 0c 26 ca fd 11 8f ..hCJqY....&....
0000020: 1c fc fa 15 7c 06 e6 27 55 71 72 23 b5 1b a9 dd ....|..'Uqr#....
0000030: 0e 68 36 9c bf 69 a5 96 2b 47 41 9e 25 4c dc 89 .h6..i..+GA.%L..
0000040: fd 05 ..
Try it online!
Bubblegum, 71 66 bytes
0000000: 95 91 b7 01 c0 30 08 c0 76 9e 48 fb ff c6 54 41 .....0..v.H...TA
0000010: ac cd 68 43 4a 71 59 c5 f1 12 0c 26 ca fd 11 8f ..hCJqY....&....
0000020: 1c fc fa 15 7c 06 e6 27 55 71 72 23 b5 1b a9 dd ....|..'Uqr#....
0000030: 0e 68 36 9c bf 69 a5 96 2b 47 41 9e 25 4c dc 89 .h6..i..+GA.%L..
0000040: fd 05 ..
Try it online!
edited 14 hours ago
answered 15 hours ago
Dennis♦
184k32293728
184k32293728
add a comment |
add a comment |
up vote
6
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
6
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
6
down vote
up vote
6
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 21 hours ago
answered 23 hours ago
Arnauld
68.4k584289
68.4k584289
add a comment |
add a comment |
up vote
6
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
6
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
6
down vote
up vote
6
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 16 hours ago
Neil
77.7k744174
77.7k744174
add a comment |
add a comment |
up vote
6
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
6
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
6
down vote
up vote
6
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 11 hours ago
answered 19 hours ago
gastropner
1,7801410
1,7801410
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
18 hours ago
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
8 hours ago
1
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
2 hours ago
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
18 hours ago
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
8 hours ago
1
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
2 hours ago
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 2 hours ago
answered 20 hours ago
LambdaBeta
1,969416
1,969416
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
18 hours ago
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
8 hours ago
1
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
2 hours ago
add a comment |
No need for^
. But even better, usecut -c2-
instead of thesed
part.
– manatwork
18 hours ago
And also shorter with here-string instead ofecho
and even shorter withdc
instead ofbc
: Try it online!
– manatwork
8 hours ago
1
I'll give you theecho
, but come on -dc
for Stan Lee... you must be joking ;)
– LambdaBeta
2 hours ago
No need for
^
. But even better, use cut -c2-
instead of the sed
part.– manatwork
18 hours ago
No need for
^
. But even better, use cut -c2-
instead of the sed
part.– manatwork
18 hours ago
And also shorter with here-string instead of
echo
and even shorter with dc
instead of bc
: Try it online!– manatwork
8 hours ago
And also shorter with here-string instead of
echo
and even shorter with dc
instead of bc
: Try it online!– manatwork
8 hours ago
1
1
I'll give you the
echo
, but come on - dc
for Stan Lee... you must be joking ;)– LambdaBeta
2 hours ago
I'll give you the
echo
, but come on - dc
for Stan Lee... you must be joking ;)– LambdaBeta
2 hours ago
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 6 hours ago
answered 21 hours ago
Galen Ivanov
5,82711032
5,82711032
add a comment |
add a comment |
up vote
5
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
4 hours ago
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
2 hours ago
add a comment |
up vote
5
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
4 hours ago
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
2 hours ago
add a comment |
up vote
5
down vote
up vote
5
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 1 hour ago
answered 18 hours ago
BradC
3,489521
3,489521
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
4 hours ago
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
2 hours ago
add a comment |
can drop 2 chars usingCHAR(8000)
instead ofVARCHAR(max)
(the huge command is 1453 bytes)
– Shameen
4 hours ago
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
2 hours ago
can drop 2 chars using
CHAR(8000)
instead of VARCHAR(max)
(the huge command is 1453 bytes)– Shameen
4 hours ago
can drop 2 chars using
CHAR(8000)
instead of VARCHAR(max)
(the huge command is 1453 bytes)– Shameen
4 hours ago
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
2 hours ago
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
2 hours ago
add a comment |
up vote
4
down vote
Python 2, 131 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 5c6e 272e 6465 636f 6465 2827 7a69 @)n'.decode('zi
00000080: 7027 29 p')
Try it online!
add a comment |
up vote
4
down vote
Python 2, 131 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 5c6e 272e 6465 636f 6465 2827 7a69 @)n'.decode('zi
00000080: 7027 29 p')
Try it online!
add a comment |
up vote
4
down vote
up vote
4
down vote
Python 2, 131 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 5c6e 272e 6465 636f 6465 2827 7a69 @)n'.decode('zi
00000080: 7027 29 p')
Try it online!
Python 2, 131 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 5c6e 272e 6465 636f 6465 2827 7a69 @)n'.decode('zi
00000080: 7027 29 p')
Try it online!
answered 18 hours ago
Lynn
49.1k694223
49.1k694223
add a comment |
add a comment |
up vote
4
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
4
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
4
down vote
up vote
4
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 4 hours ago
answered 9 hours ago
Kevin Cruijssen
33.7k554179
33.7k554179
add a comment |
add a comment |
up vote
3
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
10 hours ago
add a comment |
up vote
3
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
10 hours ago
add a comment |
up vote
3
down vote
up vote
3
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 10 hours ago
answered 11 hours ago
nimi
30.6k31985
30.6k31985
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
10 hours ago
add a comment |
1
I think you can save some by letting space encode"###n"
.
– Ørjan Johansen
10 hours ago
1
1
I think you can save some by letting space encode
"###n"
.– Ørjan Johansen
10 hours ago
I think you can save some by letting space encode
"###n"
.– Ørjan Johansen
10 hours ago
add a comment |
up vote
2
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
2
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
2
down vote
up vote
2
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 19 hours ago
Xcali
4,910520
4,910520
add a comment |
add a comment |
up vote
2
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
2
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
2
down vote
up vote
2
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 13 hours ago
answered 14 hours ago
Jo King
19k242101
19k242101
add a comment |
add a comment |
up vote
0
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
0
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
0
down vote
up vote
0
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 5 hours ago
Charlie
7,2482387
7,2482387
add a comment |
add a comment |
up vote
0
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
0
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
0
down vote
up vote
0
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 3 hours ago
Scoots
344310
344310
add a comment |
add a comment |
up vote
0
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 have automatic conversion from characters to integers.
New contributor
add a comment |
up vote
0
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 have automatic conversion from characters to integers.
New contributor
add a comment |
up vote
0
down vote
up vote
0
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 have 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 have automatic conversion from characters to integers.
New contributor
edited 23 mins ago
New contributor
answered 58 mins ago
Nicky Mattsson
1013
1013
New contributor
New contributor
add a comment |
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
3
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
11 hours ago
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 hours ago
add a comment |
up vote
-1
down vote
deflate, 79 bytes
eJyVkcsJADAIQ++ZIpD9dyxUqrGUgjlpHvglXdqCJymk1yEiaRXEIOXzuBHCiKObReUxUzYaMdt2wmTBg/FmNXndgLRbNvL7ifsLfMw6iQ==
New contributor
3
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
11 hours ago
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 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 11 hours ago
Whale
1
1
New contributor
New contributor
3
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
11 hours ago
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 hours ago
add a comment |
3
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
11 hours ago
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 hours ago
3
3
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
11 hours ago
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
11 hours ago
1
1
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
I don't think deflate counts as a programming language (although I could be wrong as I don't participate on PPCG).
– NobodyNada
10 hours ago
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♦
3 hours ago
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♦
3 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
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
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
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
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
2
What happened to the → in Ⓐ?
– Adám
21 hours ago
2
@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
21 hours ago
21
The second one is that I didnt know how to draw it :c
– Luis felipe De jesus Munoz
21 hours ago
Can we use other characters instead of
#
and space?– Jo King
14 hours ago
@JoKing you can use a different char instead
#
but not the space.– Luis felipe De jesus Munoz
14 hours ago