[Question]
  [
It's friday! Which means it's time for beer!  
Sadly though, today we will be golfing beer instead of drinking it. :(
### Challenge
Output a beer and drink it. The amount of sips you take changes your output.
### Sips
Your program should take one input string. This string can solely consist out of concatenated `sip`s.  
If the input is an empty string, you should output a full beer glass, including foam.
The more sips you take, the emptier your beer glass will be. 
If you take 0 sips, your beer still has foam. The output of this foam is always the same (see examples).
If you take 1 sip, you should output the beer glass, followed by a new line and the string `Yuck, foam.`.
If you take 1 or more sips, your beerglass should not contain anymore foam, but should show the top of your glass. Drinking the foam counts as one sip.
If you take 6 or more sips, you should output an empty beer glass, followed by a new line and the string `Burp`.
For each sip you take, your beer glass should become emptier. How full your beerglass is depends on the amount of bubbles `°` (`&#176;`) in your beer. For each sip you take after the foam, a line of bubbles should be removed. Each line of beer can contain a minimum of `1` and a maximum of `5` bubbles. The position of these bubbles should be 100% random.
### Examples
**input**
`empty input string, or no input at all`
**output**
```
  oo  o oo 
 oooooooooooo
o|  °     ° |\
 |     °    | \
 | °°    °  |} |
 |  °    °  | /
 |     °   °|/
 \__________/
```
**input**
`sip sip sip`
**output**
```
 ____________
 |          |\
 |          | \
 |     °    |} |
 |° °     ° | /
 | °    °   |/
 \__________/
```
**input**
`sip sip sip sip sip sip sip sip sip sip`
**output**
```
 ____________
 |          |\
 |          | \
 |          |} |
 |          | /
 |          |/
 \__________/
Burp
```
[This pastebin](http://pastebin.com/AsdYR60G) contains a list of inputs and outputs. Remember that the bubbles in the beerglass should be random!
### Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest code in bytes wins!
Happy ~~drinking~~ golfing!
  
[Answer]
# [Japt](https://github.com/ETHproductions/Japt), 189 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859)
I almost went insane while trying to get this to work properly...
```
U?S+'_pC +R:"  oo  o oo\n "+'opC +"\no")+"\\, \\,} |, /,/"q', £(V=(!Y«U?"|: |" +SpA +'|+X,(1+5*Mr)o mZ=>Ul <Y*4+4©(V=Vh2+A*Mr ,'° ),V)qR +"\n \\"+'_pA +'/+R+(Ul ¥3?"Yuck, foam.":Ug22 ?`B¨p:
```
### [Try it online!](http://ethproductions.github.io/japt?v=9b914b60365b0031f09d30c79d98d504131f1328&code=VT9TKydfcEMgK1I6IiAgb28gIG8gb29cbiAiKydvcEMgKyJcbm8iKSsiXFwsIFxcLH0gfCwgLywvInEnLCCjKFY9KCFZq1U/Inw6IHwiICtTcEEgKyd8K1gsKDErNSpNcilvIG1aPT5VbCA8WSo0KzSpKFY9VmgyK0EqTXIgLCewICksVilxUiArIlxuIFxcIisnX3BBICsnLytSKyhVbCClMz8iWXVjaywgZm9hbS4iOlVnMjIgP2BCqHA6&input=InNpcCBzaXAgc2lwIg==)
(Note: This program was made for an older version of Japt, and doesn't currently work in the latest version. To get around this, the older version is specified in the URL. Unfortunately, this also means the top-right code box doesn't work.)
This is *by far* the longest program I have ever written in Japt. Here's a breakdown:
**Step 1:** Create the top of the beer mug.
```
U?S+'_pC +R:"  oo  o oo\n "+'opC +"\no")
           // Implicit: U = input string
           // Begin the ASCII art with:
U?S+       //  If U is not an empty string, a space +
'_pC +R:   //   "_".repeat(12) + a newline.
:"..."+    //  Otherwise, this string +
'opC +     //   "o".repeat(12) +
"\no")     //   a newline and an "o".
```
If U is an empty string, this makes:
```
  oo  o oo
 oooooooooooo
o
```
Otherwise, this makes:
```
 ____________
```
**Step 2:** Create the middle rows of the mug.
```
+"\\, \\,} |, /,/"q', £(V=(!Y«U?"|: |" +SpA +'|+X,
+"..."    // Add to the previous string: this string,
q', £(    // split at commas, with each item X and its index Y mapped to:
V=(       //  Set variable V to the result of concatenating:
!Y«U?     //   If Y is 0 and U is an empty string,
"|: |"    //    "|"; otherwise, " |";
+SpA      //   10 spaces,
'|+X,     //   "|", and X.
```
This results in the previous string plus:
```
 |          |\
 |          | \
 |          |} |
 |          | /
 |          |/
```
**Step 3:** Add the bubbles.
```
(1+5*Mr)o mZ=>Ul <Y*4+4©(V=Vh2+A*Mr ,'° ),V)
            // Note: We're still looping through the five rows at this point.
(1+5*Mr)    // Generate a random integer between 1 and 5.
o           // Create an array of this many integers, starting at 0.
mZ=>        // Map each item Z in this range to:
Ul <Y*4+4©  //  If the length of U is less than Y*4+4,
            //  (in other words, if there's less than Y+1 "sip"s)
(V=Vh   '°  //   Insert "°" at position
2+A*Mr      //    2 + random number between 0 and 9.
),V)qR      // Finally, return V, and join the five rows with newlines.
```
At this point, the mug looks something like this:
```
 ____________
 |          |\
 |          | \
 |     °    |} |
 |° °     ° | /
 | °    °   |/
```
**Step 4:** Add the final row and optional text.
```
+"\n \\"+'_pA +'/+R+(Ul ¥3?"Yuck, foam.":Ug22 ?`B¨p:
+"\n \\"    // Add a newline and " \".
+'_pA       // Add 10 "_"s.
+'/+R       // Add a slash and a newline.
+(Ul ¥3?    // If the length of U is 3 (i.e. 1 "sip"),
"..."       //  add the string "Yuck, foam.".
:Ug22 ?     // Otherwise, if U has a character at position 22 (six or more "sip"s),
`B¨p        //  decompress this string ("Burp") and add it.
:           // Otherwise, add nothing.
```
Now everything is ready to be sent to output, which is done automatically. If you have any questions, feel free to ask!
[Answer]
# JavaScript (ES6), ~~283~~ 281 bytes
```
s=>` `+(u=`_________`,(s=s&&s.split` `.length)?u+`___
 `:` oo  o oo
 oooooooooooo
o`)+(i=0,l=q=>`|`+[...u].map(_=>Math.random()>.8&i>=s&&b++<5?`°`:` `,b=0,i++).join``+(b|i<s?` `:`°`)+`|`+q+`
 `)`\\`+l` \\`+l`} |`+l` /`+l`/`+`\\`+u+`_/
`+(s&&s<2?`Yuck, foam.`:s>5?`Burp`:``)
```
## Explanation
```
s=>
  ` `+(u=`_________`,        // u = 9 underscores
  (s=s&&s.split` `.length)   // s = number of sips
    ?u+`_
 `:` oo  o oo
 oooooooooooo
o`)                          // print glass top or foam
  // Print glass lines
  +(i=0,                     // i = line number
    l=q=>                    // l = print glass line
      `|`+[...u].map(_=>     // iterate 9 times
        Math.random()>.8     // should we put a bubble here?
        &i>=s                // has this line already been sipped?
        &&b++<5              // have we already placed 5 bubbles?
          ?`°`:` `,          // if not, place the bubble!
        b=0,                 // reset the number of placed bubbles
        i++                  // increment the line counter
      ).join``               // put the 9 spaces and bubbles together
      +(b|i<s?` `:`°`)       // place a bubble at 10 if none were placed
      +`|`+q+`
 `                           // print the suffix of this glass line
  )`\\`
  +l` \\`
  +l`} |`
  +l` /`
  +l`/`
  +`\\`+u+`_/
`                            // print the bottom of the glass
  +(s&&s<2?`Yuck, foam.`
    :s>5?`Burp`:``)          // print the message
```
## Test
```
Input: <input type="text" id="sips" /><button onclick="result.innerHTML=(
s=>` `+(u=`_________`,(s=s&&s.split` `.length)?u+`___
 `:` oo  o oo
 oooooooooooo
o`)+(i=0,l=q=>`|`+[...u].map(_=>Math.random()>.8&i>=s&&b++<5?`°`:` `,b=0,i++).join``+(b|i<s?` `:`°`)+`|`+q+`
 `)`\\`+l` \\`+l`} |`+l` /`+l`/`+`\\`+u+`_/
`+(s&&s<2?`Yuck, foam.`:s>5?`Burp`:``)
)(sips.value)">Go</button><pre id="result"></pre>
```
[Answer]
# PHP, ~~277~~ ~~265~~ 263 bytes
Assuming 1-byte-linebreak. Add one to `14` and `17` on Windows. 
```
$r=str_pad(($i=$argc-1)?"":"  oo  o oo",16).str_pad("
 ",14,_o[!$i])."   ".($s="
 |          |")."\\  $s \\ $s} |$s / $s/
 \__________/
 ".($i<6?$i-1?"":"Yuck, foam.":burp)if(!$i){$r[34]=o;$i=1;}for(;$i++<6;)for($n=rand(1,5);$n--;)$r[17*$i+rand(2,11)]="°";echo$r;
```
Run with `-r`. line breaks may need escaping.
**breakdown**
```
// draw beer glass
$r=
    // first line: empty or foam
    str_pad(($i=$argc-1)?"":"  oo  o oo",16)
    // second line: top or foam
    .str_pad("\n ",14,_o[!$i])
    // other lines: empty glass+bottom
    ."   ".($s="\n |          |")."\\  $s \\ $s} |$s / $s/\n \__________/\n"
    // lyrics
    .($i<6?$i-1?"":"Yuck, foam.":burp)
;
// add foam left to the glass
if(!$i){$r[34]=o;$i=1;}
// add bubbles
for(;$i++<6;)
    for($n=rand(1,5);$n--;)
        $r[17*$i+rand(2,11)]="°";
// output
echo$r;
```
]