# ASCII art “Hello-World!” [closed]

Your goal is to write the shortest program that outputs "Hello-World!" as ASCII art.

Rules :

• It must be human readable, I don't care about it's size (cols/rows)
• Output must contain only spaces (" "), sharps ("#") and newlines
• The output must work with a monospaced font (but the letters doesn't necessary use a monospaced font)
• In the result, each character must be separated from each other by at least one space

• bash: 33 characters – pastebin.com/HZ1w8z8g Is this acceptable? – manatwork Feb 6 '14 at 13:51
• Why the hyphen though?... – Timwi Feb 6 '14 at 14:16
• I suppose to make impossible or unfeasibly hard the use of something predefined like HQ9+. – manatwork Feb 6 '14 at 14:23
• @PeterTaylor: The output consisting of spaces and hashes must work with a monospaced font, but the letters represented by the plethora of hashes need not all have the same width. – Timwi Feb 6 '14 at 14:39
• Related, but different: Say “Hello” to the world in ASCII art – Ilmari Karonen Feb 6 '14 at 15:58

I absolutely enjoyed this one

# Perl, 126 116 114 102 98  87 (69) chars (ascii only & no external fonts)

## As of now shortest ascii solution which doesn't use any external fonts.

Well, I wanted to present some elegant solution but @Ilmari Karonen challenged me with unpack... shouldn't have done that :-)

Well, this 92 88 69 chars code generates the uglish unreadable output identical to @Ilmari Karonen's:

say map{y/01/ #/r}unpack"((b6)7a)*",'eT@j@DE
UUBjdeE
wTujjTA
eUBTddE'


More elegant variant without unpack (88 chars):

map{print$"x$_,$/x/4/,"#"x!/7/}7&ord,7&ord>>3for'HRyYOKLIIjIRHBa@AJIAIIIJaQHQNSRH'=~/./g  But I think such |.|e||.-|||.,d! thing is nothing which resembles Hello-World! and shouldn't be allowed, so real solution goes here - unpack variant, 87 chars: say map{y/01/ #/r}unpack"((b6)9a)*",'ED@HB@Hd EcD@HB@Hd ggDsIbaIf edDhRRHE ECICPaQPf'  Output: More elegant variant at 98 chars: map{print$"x$_,$/x/1/,"#"x!/7/}7&ord,7&ord>>3for'PW{nw^QD[w}vK@X@PcP@jCDjXQk[rRRbSQD\CWbXeX'=~/./g


Output:

Older solution (114 chars), different type of coding:

print'#'x(3&ord),$"x($:=15&ord>>2),$/x!$:for'EmM}U}]MBEQSM}U}]MBOFNMQOKUMSKUOBEM]MMM]IIIMIUQIAEQWMMgFROYQOB'=~/./g


Output:

• Forgot the exclamation at the end, i.e. Hello-World! Also, should be lower-case e, but I know you did upper-case to make it readable as a five pixel high font... – user15259 Feb 6 '14 at 17:25

# JavaScript, 178 bytes

c=document.createElement("canvas").getContext("2d");c.fillText("Hello-World!",0,7);d=c.getImageData(1,0,56,7).data;s="";for(i=3;i<1568;i+=4){s+=d[i]?"#":" ";s+=(i+1)%224?"":"\n"}


That works in Firefox 27 Scratchpad.

#   #        #  #          #   #   #          #     #  #
#   #        #  #          #  # #  #          #     #  #
#   #   ##   #  #   ##      # # # #   ##   ## #   ###  #
#####  #  #  #  #  #  #     # # # #  #  #  #  #  #  #  #
#   #  ####  #  #  #  # ##  # # # #  #  #  #  #  #  #  #
#   #  #     #  #  #  #     # # # #  #  #  #  #  #  #
#   #   ###  #  #   ##       #   #    ##   #  #   ###  #

• I recognise Arial :-D – Timwi Feb 6 '14 at 14:35
• This is my favourite. You've used an interesting method to arrive at the solution. Wonderful! – Darth Egregious Feb 6 '14 at 18:24
• Ingenious, I do believe you've just created Figlet for JavaScript ;) – WallyWest Feb 6 '14 at 21:06
• Dagnammit, this was my first thought too! Here's an upvote instead. :) – Jordan Gray Feb 17 '14 at 16:33

# Mathematica 101 99 98

This rasterizes the expression, obtains the binary image data, converts each 1 to "#", each 0 to "" (empty space) and displays output in a 12 by 130 character grid.

GraphicsGrid[ImageData@ImageResize[Binarize@Rasterize@Style["Hello-World!",99],130]
/.{1→"",0→"#"}]


One character economized thanks to Jonathan Van Matre.

• Why does the thickness vary between the l's? – MrZander Feb 7 '14 at 1:26
• I did the rasterization on the expression as a single image. If I had done it letter by letter, the l's would have been identical. Also, by increasing the rasterization grid size, the output tends to approach the quality of the printed characters. But a larger grid results in relatively smaller "#", to the point that they appear to be mere pixels. The question remains: why do 2 l's in an image receive different weights? – DavidC Feb 7 '14 at 1:41
• @MrZander, that's the very reason fonts have hinting: When trying to fit fonts into a low-resolution pixel grid, like in ASCII art or on screen stem width is never really uniform because the font cannot have integral-pixel wide stems at all sizes. Here is a nice explanation with pictures. – Joey Feb 7 '14 at 8:50
• prbably the best looking – Rami Dabain Feb 9 '14 at 15:05
• Jonathan Van Matre, Thanks. The first parameter could be reduced to 99 but I wouldn't want to reduce the second, due to output quality. (I realize that this is a code-golf challenge, but I do have my pride.) – DavidC Feb 12 '14 at 17:33

## Delphi 85 bytes

var s:tstringlist;begin s:=tstringlist.Create;s.LoadFromFile('\a');Write(s.Text);end.


I know, its not the prettiest solution but there was no rule that said you couldnt use external resources.
Result:

• +1 for the creativity of using # as background rather than foreground. – gerrit Feb 7 '14 at 12:32
• You can declare s as TStrings instead. (But keep the instantiation with TStringList.) – manatwork Feb 7 '14 at 19:58
• Is the file you're loading from something that actually ships with Delphi, or did you write it yourself? If the latter, I think you'd need to count its length as part of your score. – Ilmari Karonen Feb 8 '14 at 2:36
• @Ilmari, I'm sure Delphi doesn't ship with a file with "Hello-World" ASCII art :) Moreover, it's described in the answer, that it uses external resources. – TLama Feb 9 '14 at 7:24
• @TLama: I assumed so, too, I was just trying to phrase it politely. My point is that, even if external resources were allowed, this program would still fail on anyone's computer except its author's (and, in fact, we have no proof that it even works on his computer). Also, I can beat his score with the following Perl script: do X. The content of the "external resource" X is left unspecified (it works for me, isn't that enough?), but I've provided a couple of possible suggestions below... – Ilmari Karonen Feb 9 '14 at 7:44

# Perl 5, 54 bytes / 71 printable ASCII chars

Note: This is the second version of this answer. For the original 64-byte / 95-char version using PHP and gzinflate(), see the history of this answer.

Here's the 71-char printable ASCII version:

y/01/ #/,say for unpack'(B40)4',unpack u,'4I*1(JJI!$FFNRJU52HIJ0*))H'  The 54-byte version contains non-printable characters, so I'm providing it as a hex dump. On Unixish systems, you can use xxd -r to turn the hex dump back into an executable Perl script: 0000000: 792f 3031 2f20 232f 2c73 6179 2066 6f72 y/01/ #/,say for 0000010: 2075 6e70 6163 6b27 2842 3430 2934 272c unpack'(B40)4', 0000020: 27a4 a011 008a aaa4 1126 9aec aad5 54a8 '........&....T. 0000030: a6a4 0a24 9a27 ...$.'


Both need to be run with perl -M5.010 to enable the Perl 5.10+ say feature. They will produce the following output:

(Shown as a screenshot, because the huge line-height on SE makes ASCII art ugly and hard to read. The lower case "e" is kind of awkward, but I believe this qualifies as readable, if only barely so.)

Ps. If the output of the solution above feels too minimalistic for you, here's a 92-character variant that produces output similar to Tomas's solution:

y/01/ #/,say for unpack'(B56)*',unpack u,'CH!("("":,2B@GGDC\'(C#(YI!)("I)"2*,),4,03D'


Here's a screenshot:

Pps. I'm pretty sure this (GolfScript, 51 chars) is the shortest printable-ASCII solution, if you don't count the ones that just call banner / FIGLet or that cheat in some other way:

'iJ@Q@HmURBIMM{JkUUJeMRAQIM'{2base(;{' #'=}/}%39/n*


The output is the same as for my 71-char Perl solution above.

• I'd say you have just crossed the border of readability :-) – Tomas Feb 6 '14 at 22:47
• It's considerably more readable in my terminal than here on SE, because of the huge line spacing here. – Ilmari Karonen Feb 6 '14 at 23:09
• I mean, it is unreadable anyway. BTW I can produce your output in 92 chars, with no external compression algorithm :-) – Tomas Feb 7 '14 at 10:24
• @Tomas: You're right, zipping does not seem to be the winning answer here. I'd give you a +1 for that if I hadn't already. BTW, I can do it in 71 chars; see above. :-) – Ilmari Karonen Feb 7 '14 at 13:29
• Ilmari, you shouldn't have challenged me with unpack :-) Found a solution of 69 chars (87 with the nice output of mine). – Tomas Feb 9 '14 at 16:55

# Shell + Figlet (35)

$figlet -w 90 -f banner Hello-World! # # # # ### # # ###### # # #### # # # #### ##### # ##### ### # # # # # # # # # # # # # # # # # ### ####### ##### # # # # ##### # # # # # # # # # # # # # # # # # # # # # # # ##### # # # # # # # # # # # # # # # # # # # # ### # # ###### ###### ###### #### ## ## #### # # ###### ##### ###  • What kind of font is this? Those just look like smaller upper-case characters. – Cruncher Feb 6 '14 at 19:14 • it's banner -f banner It was the first font I found that used # instead of * or | and _. – grim Feb 6 '14 at 19:39 • here's the same in pure Python – jfs Feb 7 '14 at 8:03 • Changing "90" to "9" yields a tall and skinny hello world, however because the OP does not care about columns or rows, it should be acceptable. – alexyorke Feb 7 '14 at 11:42 • Sometimes voters baffle me. How come this gets a net score of +8, but the other figlet answer gets a net score of -3? – Digital Trauma Apr 18 '14 at 20:28 ## Python 260 215 186 152 >>> print'eJyNkFEKwDAIQ/93isC7/x3LyIJullHrR1BfJSIJPUHTlmiUPHbxC7L56wNCgZAxv3SjDWIxsoOb\nzMaBwyHYPJ5sVPNYxXism74vcIsFZlYyrg=='.decode('base64').decode('zip') # # # # # # # # # # # # # # # # # # # # # # # ## # # ## # # # # ## ## # ### # ##### # # # # # # # # # # # # # # # # # # # #### # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ### # # ## # # ## # # ### #  ## Python 196 183 130 114 (but uglyer) >>> print'eJxTVlBWgCAgAQHKqBywAJeyAgJCZREcZWUYyaUMIpUVEKqRNcLEueDqEaZBLVVWQDITADIdFBw='.decode('base64').decode('zip') # # # # # # # # # # # # # # # # # # # # # # ## # ## # ### ## # # # # ## # # # # # # # # # # # ## # # # # # # # # ## #  I used zipped data in base64 encoding. and the code decode it from base64 encoding and then unzipping it. • Wow, that's really stretching legibility! – user15259 Feb 7 '14 at 16:19 # PHP — 183 bytes Using sebcap26's ASCII art as the source... foreach(str_split(base64_decode('iASAERACCYgEgBKQAgmIxIwKoxo5+SSSCqSSSYnkksqkkkmJBJIKpJJIiOSMBEMSOQ'))as$i=>$j)echo strtr(sprintf("%8s%s",decbin(ord($j)),($i+1)%7?"":"\n"),'01',' #'); # # # # # # # # # # # # # # # # # # # # # # # ## # # ## # # # # ## ## # ### # ##### # # # # # # # # # # # # # # # # # # # #### # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ### # # ## # # ## # # ### #  ## Brainfuck, 372 Byte (I know. but just for completeness, there has to be brainfuck ^^ It'S not going to get much shorter, as there are little repetitions. First and second line loop already...) ++++++++[>++++>++++<<-]>+++>>++++++++++>>+>++[-<<<<<.>.<.>..>>>[-<<<.>>>]<[-<<<.>>>]<<..<.>>>++[-<<.<.>..........<.>....>>]<<<.>.<.>>.>+>>]<<<<<...>.<.>.<.>.<.>.<.>..<..>..<...>.<.>..<.>..<.>..<..>...<..>.<.>..<...>.<.>>.<<.>.<.>.<.>...<.>.<.>.<.>..<.>.....<.>.<...>.<.>.<.>..<.>.<.>...<.>.<.>..<.>>.<<.>.<.>.<...>.<.>.<.>..<..>.......<..>.<..>...<..>..<.>...<.>..<..>..<.  Interpreter here: http://koti.mbnet.fi/villes/php/bf.php # # # # # # # # # # # # # # # # # # # ### # # # # ## ### # # # ## ## # ### # # # # # # # # # ### # # # # # # # # # ### # # ## ## ## ## # # ## #  Combining @ASKASK's number generator and image with my loops and some additional tuning, we get: ## Brainfuck, 343 339 336 334 Bytes Looks uglier than my original version though. +++++[->++++++>+++++++>++<<<]>++>>>+>>++[-<<<<.<.>.<..>>>[-<<<.>>>]>[-<<<.>>>]<<<<..>.<.>>>++[-<<.<.........>.<...>>>]<<.<.>.>.>>+>]<<<<..<<+++++[->>.<.<]>.>.<..>...<.>.<.>.<.>.<..>.<...>..<.>.<..>..<.>.>.<.<.>.<.>.<...>.<.>.<.>.<.>.<.....<++++++[->>.<.<]>..>.<.>.<.>.>.<.<.>.<..>.<..>.<.>.<..>.<.......>...<...>.<..>.<...>.<..>.<..>.  (image see @ASKASK's Answer) # EcmaScript 6, 172 161 '¡I%e!c0ĄJ¥eìo0¸ËefMs0µKcÊIs0´Ê¢1éo'.split(0).map(s=>s.split('').map(c=>{for(i=8,s='';i--;)s+=(c.charCodeAt(0)-33)&(1<<i)?'#':' ';return s;}).join('')).join('\n')  Output: # # # # # # # # ### ## # # ## # # # ## # ## # ### # # #### # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # ### # # ## # # ## # # ###  Explanation: The ASCII text is compacted into a string where each bit represent a pixel: • 0 for SPACE • 1 for # An offset of 33 is applied in order to get only printable characters. • The first fat arrow function's brackets and return statement are not necessary. – manatwork Feb 7 '14 at 8:10 • @manatwork I tried to removed it but then it was no longer compiling. Are you sure about that? – Florent Feb 7 '14 at 8:37 • Firefox 27.0: i.stack.imgur.com/VyqnC.png – manatwork Feb 7 '14 at 8:46 • @manatwork Thanks! – Florent Feb 7 '14 at 8:50 • charCodeAt(0) can be reduced to charCodeAt(). – Chiru Aug 6 '15 at 23:34 # Sclipting, 38 characters (76 bytes) 갦륈똄릵꺕녔꺒녪냕녪낷뚕년꺒녦냉괄낵要감嚙긂밃⓶掘⓶終丟併껧뜴꼧밍替現겠合終  ## Output: # # ## # # # # # # ## # ## # # # # # # # # # # # # # # # # # # ### ## # # # # ## # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # ## ## ## # # # # # # ## ## #  • The code-golf info page says "If you use Unicode, byte count should use UTF-8." If I'm not mistaken, that makes your program-length 114 bytes. (The 76 bytes you mention would be for UTF-16 without a BOM.) – r.e.s. Feb 6 '14 at 14:52 • @r.e.s.: I changed that, as it makes no sense to require that. My Sclipting interpreter understands UTF-16 just fine, so it’s a valid program encoded as UTF-16. – Timwi Feb 6 '14 at 16:28 • Timwi, case matters – Tomas Feb 6 '14 at 18:29 • @user689 - actually "Hello-World!" with an exclamation point at the end... – user15259 Feb 6 '14 at 19:57 • I suppose "accepted by the community" means "accepted, without community discussion, by a small number of people with the power to do so." – r.e.s. Feb 7 '14 at 12:07 # Brainfuck, 362 bytes Sorry @johannes-h, I saw yours and was inspired to make my own. It uses a combination of faster number generation at the beginning and a simpler picture to generate the result in less bytes. It does not however use loops anywhere else so it is up for optimization. +++++[->++++++>+++++++>++<<<]>++>.<.>.<.....>.<.>.<.........>.<...>.<.........>.<...>.<.>.>.<.<.>.<..>.<..>.<.>.<.........>.<...>.<.........>.<...>.<.>.>.<...<.>.<.>.<.>.<.>.<..>.<..>...<.>.<.>.<.>.<..>.<...>..<.>.<..>..<.>.>.<.<.>.<.>.<...>.<.>.<.>.<.>.<.....>.<.>.<.>.<.>.<.>.<.>.<...>.<.>.<.>.>.<.<.>.<..>.<..>.<.>.<..>.<.......>...<...>.<..>.<...>.<..>.<..>.  which generates: • Hm. How much shorter is the number generation? 'cause changing the image looks like cheating to me (at least when directly comparing our solutions - perfectly valid in this contest of course) ^^ BUt I'm going to look into yours later on :) You can take my loop for the first two lines however. It's a lot shorter (was about 10-20 bytes if I remember correctly) – Johannes H. Feb 7 '14 at 6:29 • got your version down to 343 Byte, see my answer – Johannes H. Feb 7 '14 at 7:11 • and even shorter, replacing more repetitions by loops. 339 now. – Johannes H. Feb 7 '14 at 7:31 • I dont have neough reputation to comment on yours but if you look closely at your new version you will find a "><" in there that can be deleted to take away two bytes :) – ASKASK Feb 8 '14 at 2:41 # ImageMagick + sed, 71 bytes I don't see any other ImageMagick entries, so here's my late stake in the ground: convert +antialias label:Hello-World! xpm:-|sed '8,+9y/ /#/;s/[^#]/ /g'  I think the sed portion can probably be golfed some more. Output:  # # # # ## # # # # # # # # # # ## ## # # # # # # # # ### # # # # # # #### # # #### # # # # #### # # # ### # # ###### # # # # ## ## # # # # ## ## ## # ## ## # # # ###### # # # # ### # # # # # # # # # # # # # # # # # # ## ## # # # # # # # # # ## ## # # ## ## ## ## ## ## # # ## ## # # #### # # #### ## ## #### # # ### # #  ## Postscript, 154 133 <~GasbQ8I>GO#QsOD7:?,pa&5XCgo@jeLPX:a4F9kN1nu1B@8KjD"^]WgY[MA.2VBjpTNo5$Pi%uI9Lr>,9~>/FlateDecode filter 999 string readstring pop =


i.e.

    <~GasbQ8I>GO#QsOD7:?,pa&5XCgo@jeLPX:a4F9kN1nu1B@8KjD"^]WgY[MA.2VBjpTNo5$Pi%uI 9Lr>,9~> /FlateDecode filter 999 string readstring pop =  ASCII-only source, inspiration for ASCII-art was Johannes H.'s answer :-) # # # # # # # # # # # # # # # # # # # ### # # # # ## ## # # ## ## # ### # # # # # # # # # ## # # # # # # # # # ### # # ## # # ## # # ## #  (more readable in terminal) ## Perl, 102 print$-%44?'':"\n",vec(unpack(u,'<!040A!:4@A*%7918REEM1":T4)75E(#&1"0'),$-++,1)?'#':' 'for 0..219  Same output as above. I know I lost to both Perl answers above, but I publish it anyway. At least I tried and was moving in the right direction (and hadn't seen shortest answer) :-). # Pure Bash, no external utilities - 133 characters: c=" #";for x in 0x{5250088045,55520A914D,74556AAA54,535205124D};do while((s=(t=x)^(x/=2)*2,t));do L=${c:s:1}$L;done;echo "$L";L=;done


Uses right and left shift (divide and multiply by 2) and xor to find the one bits.

Font data stolen from Blender/Ilmari Karonen.

Tested in Bash 3.2 and 4.2

By the way, this is only 166 characters:

echo "# #  #  # #        #   #        #   # #
# # # # # #  #     # # #  #   # #  ## #
### #   # # # # ## # # # # # #  # # #
# #  ## # #  #      # #   #  #  #  ## #"


# Python 3, 114

print('\n'.join(bin(x)[2:]for x in[353530052677,366448644429,499649260116,357858349645]).translate({48:32,49:35}))


Output (4-character tall e and W stolen from @Ilmari Karonen):

# #  #  # #        #   #        #   # #
# # # # # #  #     # # #  #   # #  ## #
### #   # # # # ## # # # # # #  # # #
# #  ## # #  #      # #   #  #  #  ## #


And a shorter one (107):

print('\n'.join(bin(x)[2:]for x in[11993933918769,16391913257513,12021315382193]).translate({48:32,49:35}))


Output:

# # ### #   #   ###   # # ### ##  #   ##   #
### ### #   #   # #   # # # # ### #   # #  #
# # ### ### ### ###   ### ### # # ### ##   #

• It's mostly unreadable. Your World from 2nd output is actually Uorld. – Silviu Burcea Feb 7 '14 at 13:39
• @SilviuBurcea: It looks better on an actual terminal emulator. Also, "Human-readable" gives you a bit of wiggle room. I'm sure you can guess what "HELLO ⊔ORLD!" means. – Blender Feb 7 '14 at 17:35
• Use hex constants and shave a few characters off – Floris Feb 8 '14 at 13:08
• @Floris: I tried that. The two-character prefix makes them just as long up until around 20 digits. – Blender Feb 9 '14 at 0:15

## Python 154 Characters, (Char 5X7 in size)

print'\n'.join(map(''.join,zip(*(''.join("# "[int(e)]for e in"{:07b}".format(ord(c))[1:])for c in"€÷÷÷€ÿñêêòÿ€ÿ€ÿñîîñÿûûÿŸáþÁ¿ÁþáŸÿñîîñÿàïÿ€ÿÿñîî€ÿ‚"))))


Output

#   #      # #         #   #   #         #     # #
#   #      # #         #  # #  #         #     # #
#   #  ##  # #  ##      # # # #   ##  ## #   ### #
##### #  # # # #  #     # # # #  #  # #  #  #  # #
#   # #### # # #  # ##  # # # #  #  # #  #  #  # #
#   # #    # # #  #     # # # #  #  # #  #  #  #
#   #  ### # #  ##       #   #    ##  #  #   ### #


# Bash:

## (103 89 Bytes)

### Code:

base64 -d<<<rohBEmRiqIihFVRS7IitVWRSqIihVVRQru5Aoldi|xxd -b|sed -e's/ //g;s/1/#/g;s/0/ /g'|cut -b'9-55'


### Output:

# # ### #   #    #     #   #  #  ##  #   ##   #
# # #   #   #   # #    #   # # # # # #   # #  #
### ##  #   #   # # ## # # # # # ##  #   # #  #
# # #   #   #   # #    # # # # # # # #   # #
# # ### ### ###  #      # #   #  # # ### ##   #


Smaller, but less readable (Based on http://mckgyver.pbworks.com/f/1240440791/3PixelFont.jpg):

### Code:

base64 -d<<<V0nCLsmQdklaqslQV23BTq2Q|xxd -b|sed -e's/ //g;s/1/#/g;s/0/ /g;'|cut -c'9-52'


### Output:

 # # ### #  #  ###    #   # ### ##  #  ##  #
### ##  #  #  # # ## # # # # # ##  #  # # #
# # ### ## ## ###     # #  ### # # ## ##  #


# Javascript / ES6 (108 bytes)

Copy into console:

[,0xa0a028045,0xeeae2bb5d,0xacaabaa54,0xaeae2ba5d].map(a=>a.toString(2).replace(/./g,b=>' #'[b])).join('\n')


Output:

"
# #     # #       # #        #   # #
### ### # # ###   # # ### ## # ### #
# # ##  # # # # # ### # # #  # # #
# # ### # # ###   # # ### #  # ### #"


(Needs ECMAScript6 compatible browser ie. Firefox 22+)

Inspired by @maximeeuziere, @p01, @aemkei

• .join('\n') can be reduced to .join( ) where the space is an actual new line character. – Chiru Aug 6 '15 at 23:36

Authors: xem, aemkei, p01, jonas

Execute this in the JS console.

## JavaScript, cross-browser,133132126 117 bytes

for(i=s="";l=[43117609029,64070269789,46349920852,46890400349][i++];)for(j=0,s+="\n";c=l.toString(2)[j++];)s+=" #"[c]


## JavaScript, ES6, works on Firefox, 108 bytes

[,0xa0a028045,0xeeae2bb5d,0xacaabaa54,0xaeae2ba5d].map(a=>a.toString(2).replace(/./g,b=>' #'[b])).join('\n')


## Result:

>
# #     # #       # #        #   # #
### ### # # ###   # # ### ## # ### #
# # ##  # # # # # ### # # #  # # #
# # ### # # ###   # # ### #  # ### #


# HTML, 209 characters

<pre># #     # #                      #   # #
# #     # #        # # #         #   # #
###  ## # #  #     # # #  #  ##  #  ## #
# # ##  # # # # ## # # # # # # # # # #
# # ### # #  #      # #   #  #   # ### #</pre>

Does this count? :)

Shell, 20 characters:

banner Hello-world\!


For this to work, of course you need the banner program. On Debian, you can get it by installing the bsdmainutils package.

This prints a beautifully rendered version of your message, designed to be printed on one of the old continuous-feed printers, so the output of the above text is 322 lines long by 123 columns wide, and you turn the printout on its side to read the message. You could hang the resulting paper on the wall as a banner, hence the name.

http://en.wikipedia.org/wiki/Banner_%28Unix%29

EDIT: Looks like Debian also has the sysvbanner package, which installs a banner program that prints the text horizontally for display on a terminal. However, this only prints the first 10 characters of the message, so it is kind of annoying for this code-golf problem!

• I believe you meant to write banner hello-world. – Floris Feb 8 '14 at 13:01
• @Floris, thanks for the heads-up. Fixed. – steveha Feb 8 '14 at 23:00
• Note that banner appeared on Unix v7 in 1979 and is found on virtually every Unix. – sch Feb 9 '14 at 16:33
• @sch, I agree that banner is available for virtually every UNIX. I just put the Debian package as a convenient proof that I wasn't just making something up, for people who didn't know about it. These days I wouldn't expect to find banner installed by default on a UNIX, any more than I would expect to find a continuous-feed printer in a computer lab anymore. But any code golf on making banner text really ought to have the banner program in it somewhere. It's part of our rich cultural history as computer geeks. :-) – steveha Feb 9 '14 at 21:46

# bash, 175 170 bytes

You need to waste quite a few characters in order to produce a pretty output!

base64 -d<<<H4sICKaT9FICAzAxAK2RQQ7AIAgE776CZP7/x1ZjERebcJAL0QybhcV6YdWizAPNaUatQQLFpj6h+c/XA05WF9Wtk9WJcxz4oe6e1YPQa7Wiut2wfjJ16STY30lSnNIlzvdpHhd6MiTOB65NYc+LAgAA|zcat


Output:

#     #                                         #     #                                   ###
#     #  ######  #       #        ####          #  #  #   ####   #####   #       #####    ###
#     #  #       #       #       #    #         #  #  #  #    #  #    #  #       #    #   ###
#######  #####   #       #       #    #  #####  #  #  #  #    #  #    #  #       #    #    #
#     #  #       #       #       #    #         #  #  #  #    #  #####   #       #    #
#     #  #       #       #       #    #         #  #  #  #    #  #   #   #       #    #   ###
#     #  ######  ######  ######   ####           ## ##    ####   #    #  ######  #####    ###

• You can make it smaller with lzma/unlzma – Emmanuel Aug 8 '14 at 16:02

F# - 204 characters

for s in(Seq.map(Seq.unfold(function|0L->None|i->Some(" #".[int(i%2L)],i/2L)))[173948798213L;174770890021L;191304848727L;182715110773L;45277009173L;191279670629L])do printfn"%s"(new string(Seq.toArray s))


Output:

# #     # #        # #         #   # #
# #  #  # #  #     # #  #   ## #   # #
### # # # # # #    # # # # #   #  ## #
# # ### # # # # ## # # # # #   # # # #
# # #   # # # #    ### # # #   # # #
# #  ## # #  #     # #  #  #   #  ## #


# Python + pyfiglet -- 87 characters

from pyfiglet import figlet_format
print(figlet_format('Hello-World!', font='banner'))


### Output

#     #                                   #     #                             ###
#     # ###### #      #       ####        #  #  #  ####  #####  #      #####  ###
#     # #      #      #      #    #       #  #  # #    # #    # #      #    # ###
####### #####  #      #      #    # ##### #  #  # #    # #    # #      #    #  #
#     # #      #      #      #    #       #  #  # #    # #####  #      #    #
#     # #      #      #      #    #       #  #  # #    # #   #  #      #    # ###
#     # ###### ###### ######  ####         ## ##   ####  #    # ###### #####  ###


To install pyfiglet, run: