[Question]
  [
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
 
 
---
**Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/16587/edit).
Closed 1 year ago.
[Improve this question](/posts/16587/edit) 
**Requirements**
For the sake of the challenge let's define a *unit*:
> 
> A unit is defined as any point that compose the grid in which the face is drawn (pixels for screen, characters for ASCII art, etc..). 
> 
> 
> 
The *minimal requirements* for the face are:
> 
> A smiley face is composed of a shape that resemble a circle (not necessarily perfect) of any radius. There must be at least 1 unit for each of the two eyes and at least 2 units for the mouth. Both eyes and mouth should be within the face shape. The mouth can be oriented however you want (happy, sad, indifferent, etc..).
> 
> 
> 
Here's an example of the output:
```
 0 0 0    . . .
0 . . 0  . o o .
0 --- 0  . \_/ .
 0 0 0    . . .
```
**Goals**
Of course the main goal is to come up with the shortest code possible, but *art* is also important. 
**Winner**
The winner is chosen based on the amount of votes from the users, in, at least, the next 5 days.
  
[Answer]
## Javascript, 340
```
var i=0,b=document.body,d=20,n=b.clientWidth,m=b.clientHeight,f="width=10,height=10,"
var o=new Function("f","i","t",'open("","",f+"left="+i+",top="+t)')
for(j=0;j<m/d;++j,i=j*d){
   u=Math.sqrt(i*(m-i))
   t=m/2+u*(j%2-0.5)*2
   o(f,i,t)
   i>m/5&&i<0.8*m&&j%2&&o(f,i,t-m/4);
   ((i<m/3&&i>m/4)||(i<3*m/4&&i>2*m/3))&&o(f,i,m/3)
}
```
---
## Javascript, 283
**optimized version (with some improvements & without unnecessary white spaces)**
```
var i=0,b=document.body,d=20,n=b.clientWidth,m=b.clientHeight,f="width=10,height=10,"
function o(i,t){open("","",f+"left="+i+",top="+t)}for(j=0;j<m/d;i=++j*d){u=Math.sqrt(i*(m-i));t=m/2+j%2*2*u-u;o(i,t);i>m/5&&i<0.8*m&&j%2&&o(i,t-m/4);((i<m/3&&i>m/4)||(i<3*m/4&&i>2*m/3))&&o(i,m/3)}
```
Well.. maybe it isn't as short as you would want to but it's unconventional for sure. It looks better when your browser is maximized. I really enjoyed your question!
If you want to increase the details just reduce `d` variable slightly.
edit: Unfortunately I can't run it on jsfiddle ~~but you can paste it to Javascript console in aby browser. Oh, and enable popups on the page :).~~
**edit2:** 
You can run it making a new html file and paste the code into it:
```
<body>
<script>
var i=0,b=document.body,d=20,n=b.clientWidth,m=b.clientHeight,f="width=10,height=10,"
var o=new Function("f","i","t",'open("","",f+"left="+i+",top="+t)')
for(j=0;j<m/d;++j,i=j*d){
   u=Math.sqrt(i*(m-i))
   t=m/2+u*(j%2-0.5)*2
   o(f,i,t)
   i>m/5&&i<0.8*m&&j%2&&o(f,i,t-m/4);
   ((i<m/3&&i>m/4)||(i<3*m/4&&i>2*m/3))&&o(f,i,m/3)
}
</script>
</body>
```
Then when you run it and nothing happens, just enable the popup windows and reload the page.
In addition I paste
![screenshot](https://i.stack.imgur.com/L7Vb5.png)
[Answer]
# HTML, ~~200~~ 141 characters
Thanks to [avail](https://codegolf.stackexchange.com/users/11887/avall), I've cut this down to [141 characters](http://jsfiddle.net/TdPkF/6/):
```
<fieldset><legend>\\\\\\\\\\\\ ////</legend><center><input size=1 value=o> <input size=1 value=o /><br><input type=radio><br><button>........
```
Here's the original HTML:
```
<fieldset>
<legend>\\\\\\\\\\\\ ////</legend>
<center><input type=text size=1 value=o />
<input type=text size=1 value=o /><br/>
<input type=radio /><br/>
<button>........</button></center></fieldset>
```
[Works best on small screens:](http://jsfiddle.net/R69Tw/)
![:-|](https://i.stack.imgur.com/UPJnQ.png)
[Answer]
# Brainfuck: 583 characters (without counting whitespace)
```
 >>------>->->+++++>->->---->>>>------>>>>
 >>>>---->->------->>->->->---->>-------->
 ->->------>>>>>>>>>>-->---->>-->---->>->
  -->>>------>>>>>>>>->---->---->>->->->-
  >>->---->---->>++++[-<++++>]<[-<++++
  ++<++++++++<+++<++<++++++<++++++<++++++
 <++++++<++<++++++<++++++++<+++<++<++<++<++
<++<++<++<+<++<++++<++++++++<+++<++<+++<+++
<++<++++++   <++++++++<++++<    ++<++<++<++
<++<++<++<++<+<+++<++++++<+++<++<++++++<+++
+++<++++++<+++<++<++  +<++++++<++++++<++<++
 <++<++<++<++<++<+<++<++<++<++++++<++++++
  <++++++<+++++<++++++<+++<+>>>>>>>>>>>>
    >>>>>>                       >>>>>
     >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
          >>>>>>>>>>>>>>>]<[.<]
```
**Output:**
```
\|/ ____ \|/       
 @~/ ,. \~@        
/_( \__/ )_\       
   \__U_/
```
[Answer]
# SVG
```
<svg xmlns="http://www.w3.org/2000/svg">
    <defs>
        <radialGradient id="f" fx="25%" fy="25%" r="60%">
            <stop offset="0" stop-color="#fff"/>
            <stop offset="0.6" stop-color="#ff0"/>
            <stop offset="1" stop-color="#f80"/>
        </radialGradient>
    </defs>
    <circle fill="url(#f)" stroke="#000" stroke-width="2" cx="100" cy="100" r="90"/>
    <ellipse cx="70" cy="70" rx="10" ry="20"/>
    <ellipse cx="130" cy="70" rx="10" ry="20"/>
    <path fill="none" stroke="#000" stroke-width="5" d="M 40 120 S 100 200 160 120"/>
</svg>
```
Renders like this:
![Smiley](https://i.stack.imgur.com/XQkNt.png)
[Answer]
## Ruby, 224
Douglas Adams would be horrified. :-P
```
w=?$;"^XA[_AXeMFGIAHJLjKNAEFEJJNHQHNKLAEMINJOJOHLAGKHOJOJ[AG[HQHRFJAH}IH
IGGwIIAHHGwKHAHGHrEUAGQFiGVAGQGfIPAFHKHHbJHAQII]MGASHNSOHATIdIAUJJRLIAWLIQGK
ZOFUA]ZAeSAiPAjOAkL".codepoints{|r|r-=68;$><<(r<0??\n:(w=w==?$?' ':?$)*r)}
```
Output:
```
                          $$$$$$$$$$$$$$$$$$$$
                       $$$$$$$$$$$$$$$$$$$$$$$$$$$
                    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$         $$   $$$$$
    $$$$$$        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$$$$$$$$
 $$ $$$$$$      $$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$$       $$$$$$$$
 $$$$$$$$$     $$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$$    $$$$$$$$
   $$$$$$$    $$$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$$$$$$$$$$$$$$
   $$$$$$$$$$$$$$$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$$$$$$  $$$$$$
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$
     $$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$$
    $$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$$
    $$$    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$
   $$$$$$$$$$$$$  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$
   $$$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$$$$$$$$$
  $$$$       $$$$    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$      $$$$
             $$$$$     $$$$$$$$$$$$$$$$$$$$$$$$$         $$$
               $$$$          $$$$$$$$$$$$$$$           $$$$
                $$$$$                                $$$$$
                 $$$$$$      $$$$$$$$$$$$$$        $$$$$
                   $$$$$$$$     $$$$$$$$$$$$$   $$$$$$$
                      $$$$$$$$$$$  $$$$$$$$$$$$$$$$$
                         $$$$$$$$$$$$$$$$$$$$$$
                                 $$$$$$$$$$$$$$$
                                     $$$$$$$$$$$$
                                      $$$$$$$$$$$
                                       $$$$$$$$
```
---
## Ruby, 110
Same technique. Less code. Less artful. Looks like someone melted a plastic smiley. :-}
```
w=?$;"TXANdAKQGZAHSI[AGaGRAFaIRAFPGeAGQJ_AHURQAJkANc
TX".codepoints{|r|r-=68;$><<(r<0??\n:(w=w==?$?' ':?$)*r)}
```
Output:
```
                $$$$$$$$$$$$$$$$$$$$
          $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
       $$$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$     $$$$$$$$$$$$$$$$$$$$$$$
   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$   $$$$$$$$$$$$$$
  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$$$$$$$$$$$
  $$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
   $$$$$$$$$$$$$      $$$$$$$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$$$              $$$$$$$$$$$$$
      $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
          $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
                $$$$$$$$$$$$$$$$$$$$
```
[Answer]
# QBasic ASCII, 134 (unoptimized)
```
SCREEN 1
PRINT CHR$(1)
FOR i = 0 TO 64
  x = i \ 8
  y = i MOD 8
  LOCATE y + 2, x + 1
  IF POINT(x, y) THEN PRINT "X"
NEXT
```
This answer totally cheats by using ASCII character 1 for its smiley. However, unlike the BF and "plain text" answers, it actually obeys the rules by making ASCII art based on the pixels of the smiley character, rather than just plainly printing the character as its full solution. The unoptimized version represents how QBasic's IDE saves the files. The IDE is "helpfully" fixing up the syntax for us and adding a lot of whitespace where "needed".
Output:
![QBasic ASCII smiley unoptimized](https://i.stack.imgur.com/oOvqt.png)
# QBasic ASCII, 80 (optimized)
```
SCREEN 1
?"☺"
FOR i=0TO 64
x=i\8
y=i MOD 8
LOCATE y+2,x+1
?CHR$(POINT(x,y))
NEXT
```
This is an optimized version of the first code sample, which still loads in QBasic. Things that were done:
* Removed all unnecessary whitespace. (D'uh!)
* Changed the CRLF line breaks to LF only.
* Replaced `CHR$(1)` with a string containing the actual character. (Here illustrated with a matching Unicode character. If you actually want to try the code, please replace it with a real ASCII character 1 using a hex editor.)
* Replaced `PRINT` with `?`, as the BASIC tradition allows for.
* Replaced the `IF` line with a line that prints characters based on the source pixel value. This will be be either 0 or 3. 0 is the color black. Character 0 prints a null character which is treated like a space. 3 is the color white in CGA's 4-color palette. ASCII character 3 is a heart.
Output:
![QBasic ASCII smile optimized](https://i.stack.imgur.com/oFjYs.png)
# QBasic graphical, 83 (whitespace optimized)
```
SCREEN 1
CIRCLE(50,50),50
CIRCLE(50,50),30,,4,5.4
CIRCLE(30,40),10
CIRCLE(70,40),10
```
But wait, I here you ask, can't you just use QBasic's built-in graphics commands? Sure, but that won't actually save you any bytes, because of the verbosity of the language. But it does have a built-in function to only draw a circle arc between two given angles, which is nice. The angles are given in radians, and `4` and `5.4` approximate a circle arc symmetrically centered around `π*3/2`, or if you've joined [the good side](http://tauday.com/), `τ*3/4`.
Output:
![QBasic graphical smiley optimized](https://i.stack.imgur.com/OhPYy.png)
Note: The sizes in this answer denote how big the file is in, in bytes.
[Answer]
# APL, 97 chars/bytes\*
```
(63⍴1 0)\' /%'[1+(12≥⊃+/¨2*⍨m+¨⊂6 ¯6)+((⍉18<(⍴n)⍴⍳32)∧28≥|100-n)+256≥n←⊃+/¨2*⍨m←x∘.,|x←¯16.5+⍳32]
```
It works by computing a few circle equations. Tested on [GNU APL](https://www.gnu.org/software/apl/).
**Output**
![smiley output](https://i.stack.imgur.com/4UtWG.png)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯  
\*: APL can be written in its own (legacy) single-byte charset that maps APL symbols to the upper 128 byte values. Therefore, for the purpose of scoring, a program of N chars *that only uses ASCII characters and APL symbols* can be considered to be N bytes long.
[Answer]
# Bash, 63 chars
```
echo $'$the_cow=""'>.cow;cowsay -f ./.cow $'O O\n\n\_/';rm .cow
```
Output:
```
 _____
/ O O \
|     |
\ \_/ /
 -----
```
Artistry:
Cows.
[Answer]
# Bash, 22 chars
```
wget x.co/3WG0m -q -O-
```
Sample output:
![enter image description here](https://i.stack.imgur.com/ZiTrn.png)
Edit: this could be golfed further as suggested by several people. The shortest self-contained version found so far is:
```
curl -L x.co/3WG0m
```
(thanks nitro2k01)
[Answer]
**Python 247 230 227 Characters - and a cuter version**
```
from matplotlib.pyplot import*
from numpy import*
y=x=arange(-8,11,.1)
x,y=meshgrid(x,y)
contour(x,y,(x*x*(x**2+2*y*y-y-40)+y*y*(y*y-y-40)+25*y+393)*((x+3)**2+(y-5)**2-2)*((x-3)**2+(y-5)**2-2)*(x*x+(y-2)**2-64),[0])
show()
```
![enter image description here](https://i.stack.imgur.com/Ueo6a.png)
**Python 243 Characters - Using colors**
```
from pylab import*
from numpy import*
y=x=arange(-9,11,.1)
x,y=meshgrid(x,y)
contourf(x,y,(x*x*(x**2+2*y*y-y-40)+y*y*(y*y-y-40)+25*y+393)*((x+3)**2+(y-5)**2-2)*((x-3)**2+(y-5)**2-2)*(x*x+(y-2)**2-64),1,colors=("#F0E68C",'#20B2AA'))
show()
```
![enter image description here](https://i.stack.imgur.com/GSulZ.png)
[Answer]
# C++ - 122 characters without unnecessary spaces
This is the most realistic I could come up with:
```
#include <iostream>
int main() {
  std::cout << "  |||||\n 0 . . 0\n0   ^   0\n0  \\_/  0\n 0     0\n  00000\n   888\n    8\n\n";
}
```
For those of you who are missing out, it creates this:  
  
![ASCII art image](https://i.stack.imgur.com/ulOh7.png)
[Answer]
```
cowsay -f calvin Hey, What´s up?
 _________________
< Hey, What´s up? >
 -----------------
 \                   .,
   \         .      .TR   d'
     \      k,l    .R.b  .t .Je
       \   .P q.   a|.b .f .Z%      
           .b .h  .E` # J: 2`     .
      .,.a .E  ,L.M'  ?:b `| ..J9!`.,
       q,.h.M`   `..,   ..,""` ..2"`
       .M, J8`   `:       `   3;
   .    Jk              ...,   `^7"90c.
    j,  ,!     .7"'`j,.|   .n.   ...
   j, 7'     .r`     4:      L   `...
  ..,m.      J`    ..,|..    J`  7TWi
  ..JJ,.:    %    oo      ,. ....,
    .,E      3     7`g.M:    P  41
   JT7"'      O.   .J,;     ``  V"7N.
   G.           ""Q+  .Zu.,!`      Z`
   .9.. .         J&..J!       .  ,:
      7"9a                    JM"!
         .5J.     ..        ..F`
            78a..   `    ..2'
                J9Ksaw0"'
               .EJ?A...a.
               q...g...gi
              .m...qa..,y:
              .HQFNB&...mm
               ,Z|,m.a.,dp
            .,?f` ,E?:"^7b
            `A| . .F^^7'^4,
             .MMMMMMMMMMMQzna,
         ...f"A.JdT     J:    Jp,
          `JNa..........A....af`
               `^^^^^'`
```
[Answer]
# PHP, many other languages... - 1601 characters
```
                          oooo$$$$$$$$$$$$oooo
                      oo$$$$$$$$$$$$$$$$$$$$$$$$o
                   oo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o         o$   $$ o$
   o $ oo        o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o       $$ $$ $$o$
oo $ $ "$      o$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$o       $$$o$$o$
"$$$$$$o$     o$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$o    $$$$$$$$
  $$$$$$$    $$$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$$$$$$$$$$$$$$
  $$$$$$$$$$$$$$$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$$$$$$  """$$$
   "$$$""""$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     "$$$
    $$$   o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     "$$$o
   o$$"   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$o
   $$$    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" "$$$$$$ooooo$$$$o
  o$$$oooo$$$$$  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$   o$$$$$$$$$$$$$$$$$
  $$$$$$$$"$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$""""""""
 """"       $$$$    "$$$$$$$$$$$$$$$$$$$$$$$$$$$$"      o$$$
            "$$$o     """$$$$$$$$$$$$$$$$$$"$$"         $$$
              $$$o          "$$""$$$$$$""""           o$$$
               $$$$o                                o$$$"
                "$$$$o      o$$$$$$o"$$$$o        o$$$$
                  "$$$$$oo     ""$$$$o$$$$$o   o$$$$""
                     ""$$$$$oooo  "$$$o$$$$$$$$$"""
                        ""$$$$$$$oo $$$$$$$$$$
                                """"$$$$$$$$$$$
                                    $$$$$$$$$$$$
                                     $$$$$$$$$$"
                                      "$$$""  
```
Smiley source: [Asciiworld.com : Smiley](http://www.asciiworld.com/-Smiley,20-.html)
[Answer]
# JavaScript 262 251
**Edit:** added better eyes.
Prints a smiley face into the console.
Could lose quite a few characters to make my bitmask simpler and print a less pretty face, or use a circle equation instead of an ellipse to account for character spacing - but that's not the spirit.
You can change the `r` variable to change the size and get a more or less detailed face; any number `>=7 && <=99` will give a good result and stay within the character limit.
```
function c(e,t,n){return t/2*Math.sqrt(1-e*e/(n*n))+.5|0}r=42;p=r/2;q=p/5;s="";for(y=-p;++y<p;){for(x=-r;++x<r;){d=c(y,r*2,p);e=c(y+q,r/5,q);f=e-p;g=e+p;h=c(y,r*1.3,r/3);s+=x>=d||x<=-d||x>=-g&&x<f||x<=g&&x>-f||y>q&&x>-h&&x<h?" ":0}s+="\n"}console.log(s)
```
Human readable:
```
function c(y,w,h){return w/2*Math.sqrt(1-y*y/(h*h))+0.5|0}
r = 42
p = r/2
q = p/5
s = ''
for (y = -p; ++y < p;) {
  for (x = -r; ++x < r;) {
    d = c(y,r*2,p)
    e = c(y+q,r/5,q)
    f = e - p
    g = e + p
    h = c(y,r*1.3,r/3)
    s+=(x>=d||x<=-d||(x>-g&&x<f)||(x<g&&x>-f)||(y>q&&(x>-h&&x<h)))?' ':0
  }
  s += '\n'
}
console.log(s)
```
**Output:**
![smiley in console](https://i.stack.imgur.com/Eqwwb.png)
My first game of golf so likely to be some improvements.
[Answer]
## html, css
I know it's neither short nor real coding, but I still wanted to post this
```
<head>
<style>
#a{
width:100px;
height:100px;
border-radius:50px;
border: 1px solid black; 
}
#b{
position: absolute;
top:30px;
left:30px;
width:20px;
height:20px;
border-radius:10px;
border: 1px solid black;
}
#c{
position: absolute;
top:0px;
left:40px;
width:20px;
height:20px;
border-radius:10px;
border: 1px solid black;
}#d{
position: absolute;
top:30px;
left:-30px;
width:40px;
height:20px;
border-radius:10px;
border: 1px solid black;
}
</style>
</head>
<body>
<div id="a">
<div id="b"/>
<div id="c"/>
<div id="d"/>
</div>
</body>
```
[jsFiddle](http://jsfiddle.net/97pCv/)
[Answer]
## [Rebmu](http://hostilefork.com/rebmu/), 24 chars
Oh, the [m-i-n-i-m-a-l](https://www.youtube.com/watch?v=Ywk3vA8Y8xY) humanity. :-) Least impressive Rebmu program yet, so purposefully embedding pHp as a tribute to [the blue pill in the programming world](http://www.php.net/manual/en/images/c0d23d2d6769e53e24a1b3136c064577-php_logo.png):
`H{ -- }pHp{|..|^/|\/|}pH`
**Execution:**
```
>> rebmu [H{ -- }pHp{|..|^/|\/|}pH]
 -- 
|..|
|\/|
 -- 
```
**Explanation**
Rebmu is just a dialect of [Rebol](http://en.wikipedia.org/wiki/Rebol). It inherits the parse constraints, uses abbreviated terms without spaces separated by runs of capitalization. It has a special treatment when the first run is capitalized vs uncapitalized.
*(So rather than separating terms like `AbcDefGhi` it can use the difference between `ABCdefGHI` and `abcDEFghi` to squeeze out a bit of information. Sequences whose runs start in all capitalized are separated so the first term represents a "set-word!", often contextually interpreted as a desire for an assignment. [see video](https://www.youtube.com/watch?v=iDKaz1iB9wQ))*
If you want to translate this to native Rebol, you have to accept things like that it starts with a capital H to mean that's actually an `h:` and not an `h`. The source is thus analogous to:
```
h: { -- }
print h
print {|..|^/|\/|}
print h
```
Assigns the string `--` to h (using asymmetric string delimiters because `print {"Isn't it nice," said {Dr. Rebmu}, "when you have asymmetric multi-line string delimiters with no need for escaping matched nested pairs, and that accept apostrophes and quotes too?"}`
Prints h once, prints another string where `^/` is the escape sequence for newline *(carets being less used in software than backslashes which appear often in paths)*, prints h again.
[Answer]
**Perl, 106 chars**
It is a Perl oneliner, just have to C&P it on command prompt, provided the Perl `Acme::EyeDrops` module is already installed on the machine.
```
touch temp && perl -MAcme::EyeDrops='sightly' -e 'print sightly({Shape=>"smiley", SourceFile => "temp" } );'
```
![enter image description here](https://i.stack.imgur.com/MrD3i.png)
Another way , a smiley with Pulling a face
```
     touch temp && perl -MAcme::EyeDrops='sightly' -e 'print sightly({Shape=>"smiley2",SourceFile=>"temp"});'
```
![enter image description here](https://i.stack.imgur.com/xhWCu.png)
Yet another way,a smiley with Pulling a face upside down, 
```
 touch temp && perl -MAcme::EyeDrops='sightly' -e 'print sightly({Shape=>"smiley2",SourceFile=>"temp",RotateFlip=>'true',Rotate=>'180'});'
```
![enter image description here](https://i.stack.imgur.com/wkWb3.png)
[Answer]
# Bash + ImageMagick: 137 characters
```
c=circle
convert -size 99x99 xc: -draw "fill #ff0 $c 49,49,49" -fill 0 -draw "$c 30,35,30,30 $c 70,35,70,30 ellipse 50,60,25,20,0,180" x:
```
Sample output:
![graphical smiley](https://i.stack.imgur.com/HjJQX.png)
But as this is an [ascii-art](/questions/tagged/ascii-art "show questions tagged 'ascii-art'") challenge…
# Bash + ImageMagick: 172 characters
```
d=-draw
p=-pointsize
convert -size 99x99 xc: -font times.ttf $p 140 -stroke 0 -fill \#ff0 $d 'text 0,96 O' $p 40 $d 'text 25,50 "o 0"' $p 50 $d 'rotate 95 text 50,-40 D' x:
```
Sample output:
![ASCII smiley](https://i.stack.imgur.com/t1rA9.png)
[Answer]
# GolfScript, 27
This outputs the 2nd example exactly as given.
```
' .'3*.'
. o o .
. \_/ .
'\
```
First one can be done the same way, but I think the 2nd one looks nicer :)
[Answer]
# Brainf\*\*\* - 2
```
+.
```
Prints `☺` or ascii value 1. (might not work with some platforms)
[Answer]
# Bash - one liner: 442 characters
```
c(){ e "define a(i){scale=scale(i);return(sqrt(i*i));};""$@"|bc -l;};e(){ echo "$@";};s(){ h=$1;c=$2;if [ -z $c ];then c=" ";fi;while (($((h=h-1))>0));do e -n "$c"; done; };m(){ t=`c 2*$1`;while (($((t=t-1))));do l=`c a\($1-$t\)+1`;s $l;q=`c 2*\($1-$l\)`;w=`s $q`;if (($l>$t&&$l<($t+3)&&$q>2)); then w=" "`s $((q-2)) 0`" ";elif (($t>($1+1)&&$q>3));then g=`s $(((q-1)/2)) 0`;w=" $g $g ";fi;e -n +;if [ ! -z "$w" ];then e -n "$w+";fi;e;done;};
```
Example output: (called by `m 8`)
```
       +
      + +
     +   +
    + 0 0 +
   + 00 00 +
  + 000 000 +
 +           +
+             +
 +           +
  +         +
   +       +
    + 000 +
     +   +
      + +
       +
```
Kind of crazy, but I chose to use a diamond instead of a circle. The eyes are covered by safety goggles.
# BASH - 252 characters (thanks @manatwork)
```
s(){ (($1>1))&&echo -n "${2:- }"&&s $[$1-1] $2;};m(){ ((t=2*$1));while ((t=t-1));do v=$[$1-t];l=$[${v#-}+1];s $l;q=$[2*($1-l)];w=`s $q`;((l>t&&l<t+3&&q>2))&&w=" `s $[q-2] 0` ";((t>$1+1&&q>3))&&{ g=`s $[(q-1)/2] 0`;w=" $g $g ";};echo "+${w:+$w+}";done;}
```
[Answer]
**HTML + CSS, 83**
```
<div><a>o<a>o</a><hr><hr><style>a,div{width:2em;border:2px solid;border-radius:8px
```
screenshot(using firefox):
![enter image description here](https://i.stack.imgur.com/SVzKq.png)
too bad that I'm too late with my answer
(got +10 rep also quite late ...)
[Answer]
# GolfScript, 18
This program uses some binary-encoded values which appear as weird/invalid characters in a text editor.
Here's the hex dump:
```
00000000  27 c1 94 80 a2 9c c1 27  7b 32 62 61 73 65 20 70  |'......'{2base p|
00000010  7d 25                                             |}%|
```
Note: it doesn't work in a UTF-8 locale, but works fine with ISO-8859-1 for example.
The expanded version with escaped characters:
```
"\xc1\x94\x80\xa2\x9c\xc1"{2base p}%
```
Output:
```
[1 1 0 0 0 0 0 1]
[1 0 0 1 0 1 0 0]
[1 0 0 0 0 0 0 0]
[1 0 1 0 0 0 1 0]
[1 0 0 1 1 1 0 0]
[1 1 0 0 0 0 0 1]
```
For nicer output, you can replace the block with `{2base{38+}%n}` which brings the binary version to 23 bytes. Expanded version:
```
"\xc1\x94\x80\xa2\x9c\xc1"{2base{38+}%n}%
```
Output:
```
''&&&&&'
'&&'&'&&
'&&&&&&&
'&'&&&'&
'&&'''&&
''&&&&&'
```
[Answer]
# JavaScript
This code must be run in `f12` on this page:
```
console.log(document.getElementsByTagName("code")[0].innerHTML)
```
Output:
```
 0 0 0    . . .
0 . . 0  . o o .
0 --- 0  . \_/ .
 0 0 0    . . .
```
[Answer]
# CJam, 18
I decided to go for short code... [Try it here](http://cjam.aditsu.net/).
```
" ##O#- #"2/{_(N}%
```
## Explanation
```
" ##O#- #"      "Push a string onto the stack";
2/              "Split it into an array of two-character groups";
{_(N}%          "For each item in the array, execute _(N : duplicate the element,
                 remove the first character and place it onto the stack after what's left,
                 and push a new line.";
```
This exploits the symmetry of the smiley face I designed.
## Output
```
 ## 
#OO#
#--#
 ## 
```
[Answer]
# Python
```
smileyFace = '''
       000000000000000
      00000000000000000
     000000   00   00000
    0000000 . 00 . 000000
   00000000   00   0000000
  0000000000000000000000000
 000000 . 00000000 . 0000000
  000000 . 000000 . 0000000
   0000000 ....... 0000000
    000000000000000000000
     0000000000000000000
      00000000000000000'''
print(smileyFace)
```
```
print('  _________\n /         \\\n |  /\\ /\\  |\n |    -    |\n |  \\___/  |\n \\_________/');
```
Output:
```
  _________
 /         \
 |  /\ /\  |
 |    -    |
 |  \___/  |
 \_________/
```
[Answer]
## Javascript console
a frog:
```
prompt("◉◉ ", ' '.repeat(25)+"⊂(‿)つ")  
```
table flip
```
prompt("┻━┻", ' '.repeat(24)+"ʕノ•ᴥ•ʔノ") 
```
and i am not sure what this one is
```
prompt('◕  '.repeat(24),prompt("◕              ◕", '  ▇  '.repeat(24))) 
```
[Answer]
## Python, 42
```
print ' 0 0 0 \n0 . . 0\n0 --- 0\n 0 0 0 '
```
[Answer]
HTML 5 : 321 Characters
```
<canvas id=a><script>_=document.getElementById("a"),c=_.getContext("2d"),p=Math.PI,P=2*p;C();c.arc(95,85,40,0,P);B();c.lineWidth=2;c.stroke();c.fillStyle="red";C();c.arc(75,75,5,0,P);B();C();c.arc(114,75,5,0,P);B();C();c.arc(95,90,26,p,P,true);B();function C(){c.beginPath()};function B(){c.closePath();c.fill()}</script>
```
Fiddle : <http://jsfiddle.net/wfNGx/>
![enter image description here](https://i.stack.imgur.com/R0L9C.png)
Source : <http://www.codecademy.com/courses/web-beginner-en-SWM11/0/1>
[Answer]
# Shell command or builtin
```
$ echo -e ' ,---.\n/ o o \\\n\ \\_/ /\n `---´'
 ,---.
/ o o \
\ \_/ /
 `---´
$ printf ' ,---.\n/ o o \\\n\ \\_/ /\n `---´\n'
 ,---.
/ o o \
\ \_/ /
 `---´
```
Depending on the flavour of your shell or command set, `echo` may or may not interprete control characters with or witout `-e`... (...and I demand that I may or may not be Vroomfondel!) just try... and if all else fails, using `printf` should be a safe bet...
]