text:
Numbers for Letters
There exists a very simple cipher that replaces a letter with it's position in the alphabet. For example, abc would become 1 2 3 in this cipher.
This challenge is an alternative take on this cipher.

The Challenge
Create a program that takes an input of ASCII characters, and outputs a space-separated string of:

integers -26 through 26
letters a through j

The output should come through STDOUT or your language's closest alternative.

Specifications

Capital letters should be negated. A capital D for example would be -4, while a lowercase d would be 4.
Digits should be changed to their alpha counterparts. 1 being a, and so on. Any zeroes in the input will be j.
All non-alphanumeric characters (except spaces) should be ignored.
Spaces are 0.
Adjacent spaces in the output should be reduced to a single space.
Input: You + Me
Correct Output: -25 15 21 0 -13 5
Incorrect Output: -25 15 21 0 0 0 -13 5

A single trailing space or newline is allowed.

Examples
Input: programming puzzles
Output: 16 18 15 7 18 1 13 13 9 14 7 0 16 21 26 26 12 5 19

Input: Code Golf
Output: -3 15 4 5 0 -7 15 12 6

Input: Programming Puzzles & Code Golf
Output: -16 18 15 7 18 1 13 13 9 14 7 0 -16 21 26 26 12 5 19 0 -3 15 4 5 0 -7 15 12 6

Input: C0d3 G0lf
Output: -3 j 4 c 0 -7 j 12 6

Input: abc_ABC
Output: 1 2 3 -1 -2 -3

Scoreboard
For your score to appear on the board, it should be in this format:
# Language, Bytes

Strikethroughs shouldn't cause a problem.

function getURL(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function getAnswers(){$.ajax({url:getURL(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),useData(answers)}})}function getOwnerName(e){return e.owner.display_name}function useData(e){var s=[];e.forEach(function(e){var a=e.body.replace(/<s>.*<\/s>/,"").replace(/.*<\/strike>/,"");console.log(a),VALID_HEAD.test(a)&&s.push({user:getOwnerName(e),language:a.match(VALID_HEAD)[1],score:+a.match(VALID_HEAD)[2],link:e.share_link})}),s.sort(function(e,s){var a=e.score,r=s.score;return a-r}),s.forEach(function(e,s){var a=$("#score-template").html();a=a.replace("{{RANK}}",s+1+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SCORE}}",e.score),a=$(a),$("#scores").append(a)})}var QUESTION_ID=58107,ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",answers=[],answer_ids,answers_hash,answer_page=1;getAnswers();var VALID_HEAD=/<h\d>([^\n,]*)[, ]*(\d+).*<\/h\d>/;
body{text-align:left!important}table thead{font-weight:700}table td{padding:10px 0 0 10px}#scores-cont{padding:10px;width:600px}#scores tr td:first-of-type{padding-left:0}
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Scores

	User	Language	Score

{{RANK}}	{{NAME}}	{{LANGUAGE}}	{{SCORE}}

Related: http://codegolf.stackexchange.com/q/12253/4372

Can the output have a trailing space?

Yes. A single trailing space or newline is allowed. @Dennis

Is a function returning/printing a string a valid answer? Also can you add a test case like "abc_ABC" to rule out all the [^\w] and [\W] regex?

I wasn't entirely sure what you were asking, but I've added that test case. I hope that's what you were looking for; if not, let me know. @Max

CJam, 58 57 54 51 50 49 bytes
Just when I wrote up the explanation, I noticed that one of the alternative 50 byte versions can be shortened by a byte...
q_el_eu&S-A,s--S%S*{i_32md\2*5-*48md@)A%'a+\?}%S*

Test it here.
50 byte solutions:
q_el_eu&S-A,s--S%S*{_A,s&\i_)A%'a+\32md\2*5-*?}%S*
q_el_eu&S-A,s--S%'`*{i32md:D;(_(2*(D*D3+A%'a+?}%S*
q_el_eu&S-A,s--S%'`*{i32md\(_@_@(2*(*\3+A%'a+?}%S*
q_el_eu&S-A,s--S%'`*{i32md\(_(2*(g@*_z3+A%'a+?}%S*

Explanation
q         e# Read input.
_el_eu&   e# Intersect a lower-case version with an upper-case version to remove
          e# all letters.
S-        e# Remove spaces from that string.
A,s-      e# Remove digit characters from that string. It now contains all the
          e# the characters from the input we should ignore.
-         e# Remove these characters from the input.
S%S*      e# Split on runs of spaces and join by spaces, collapsing multiple into one.
{         e# Map this block onto each character...
  i_      e#   Convert to character code and make a copy.
  32md    e#   Get divmod 32. Note that digits have character codes 32 + something,
          e#   the upper case letters have character codes 64 + n (where n is the
          e#   absolute value we want), while lower case letters have codes 96 + n.
          e#   So the div gives 2 or 3 to distinguish capitalisation (and 1 for digits)
          e#   and the mod gives the correct absolute value for letters.
          e#   As it happens, the mod also gives 0 for spaces.
  \2*5-   e#   Pull up the div, duplicate, subtract 5. Turns 2 into -1 and 3 into 1.
          e#   It also turns 1 (digits) into -3.
  *       e#   Multiply the mod by this sign.
          e#   We now have the correct result for everything but digits. Note that
          e#   the absolute value for digits is more than 26, and for everything
          e#   else it's less than 27.
  48md    e#   Get divmod 48. This gives div 0 and mod n for all correct results n.
          e#   For digits it gives div -1 and we don't care about the mod. We'll
          e#   use the div as a truthy/falsy value to select the right result.
  @)A%    e#   Pull up the other copy of the character code, increment
          e#   (range 49..58), take modulo 10.
          e#   This gives 9 for 0 and n-1 for any other digit n.
  'a+     e#   Add to the character a.
  \?      e#   Select the correct result based on the div 48.
}%
S*        e# Join the resulting values by spaces.

This must be the first time, that CJam's modulo behaviour for negative values was useful for me.

JavaScript (ES6), 110 107 133 120 bytes
Take that, old me!
a=>[...a.replace(/[\W_]*?( ?)[\W_]*/g,'$1')].map(x=>(c=x.charCodeAt())<40?0:c<60?'jabcdefghi'[x]:c<91?64-c:c-96).join` `

There's potentially a lot more room for golfing, especially in the regexes nope, got that one down pretty well. Ungolfed version:
function f(a) {
  // Replaces each run of bad chars and spaces with
  // a space if it contained one, nothing otherwise:
  a = a.replace(/[\W_]*?( ?)[\W_]*/g, '$1');

  var b = a.split('');
  b = b.map(function(x) {
    var c = x.charCodeAt();
    if (c == 32)     // space
      return 0;
    else if (c < 60) // numbers
      return 'jabcdefghi'.charAt(x);
    else if (c < 91)
      return 64 - c; // uppercase
    else
      return c - 96; // lowercase
  });
  b = b.join(' ');
  return b;
}

Suggestions welcome!

Test '123___abc'. Hint: you need to handle underscores

Another problem:All non-alphanumeric characters should be ignored.. Test: 'A$b' should be -1 2

@edc65 Aw, man, I thought I had it done... But thanks for letting me know!

Pyth, 50 49 bytes
jdm?>d26C+70ddm-xZd26:-z-z=Zs[_rG1dGjk.<UT1)" +"d

Try it out here.
Edit: restructured string sanitisation to ensure underscores are handled correctly. It even saved a byte too, yay!
This program creates a lookup string, which is used to sanitise the input. This is then mapped to the corresponding index in that string. Finally, any index greater than 26 is converted to the correct ASCII character.
                                                     Implicit: z=input(), d=' ', ,
                                                       k='', G=[a-z]
                              _rG1                   Reversed, capitalised alphabet
                                  d                  Single space
                                   G                 Lower case alphabet
                                    jk.<UT1          '1234567890'
                            s[             )         Concatenate the 4 previous statements
                          =Z                         Store in Z
                        -z                           Setwise difference of input and above
                                                       (to get all illegal characters)
                      -z                             Setwise difference of input and illegal chars
                     :                      " +"d    Regex replace to lose multiple spaces
              m                                      Map the above over d:
                xZd                                    Get index of d in Z
               -   26                                  Subtract 26
  m                                                  Map the above over d:
   ?>d26                                               If d > 26
        C+70d                                            Convert (d+70) to ASCII
             d                                         Otherwise, select d
jd                                                   Join on spaces and print

Previous version, which made use of \W regex, at 50 bytes:
jdm?>d26C+70ddm-xs[_rG1\ Gjk.<UT1)d26::z"\W"d" +"d

Julia, 145 136 bytes
r=replace;print(join([47<x<58?x+58-10(x>48):x==32?0:cmp(x,96)*(lowercase(x)-96)for x=r(r(readline(),r"[^a-z0-9 ]"i,""),r" +"," ")]," "))

Ungolfed:
# Read a string from STDIN
input = readline()

# Remove non-alphanumeric characters and replace duplicated spaces
r = replace(replace(input, r"[^a-z0-9 ]"i, ""), r" +", " ")

# Construct an array using comprehension over the replaced input string
A = [47 < x < 58 ? x + 58 - 10(x > 48) : x == 32 ? 0 : cmp(x, 96) * (lowercase(x) - 96) for x = r]

# Join the array elements with spaces
j = join(A, " ")

# Print to STDOUT
print(j)

To get the digits as letters we add 58 to the ASCII value and subtract 10 if the current character isn't 0. That ensures that 0 maps to j and the other digits map to a-i.
Negating uppercase letters is done using cmp. This will return -1 for uppercase letters and 1 for lowercase.
Try it online

><> (fish), 219 209 bytes
>i:84*=?v:86*1-)?!^:f4*2-(?v:88*)?!v:a9*1+(?v:c8*)?!^:ca*3+  (?v~
>4*(?vov>~86*$:@=?v86*00.  >:86*=?v77*1-+00.>88*-::-$-00.01-*8c<
 >.! ! ! 00~v?( 0:\00. >.!00+6*aa~<>~    92*2!.<2*29<
^7:;?=0:<r0~<
*o73.>n>84

Try it out here
This is my first code golf answer! Finally been able to use the language I wanted to use for a code golf challenge, and this seemed like the perfect one given that characters are automatically converted to decimals.
I expected my result to be way shorter, but apparently not. Though, I haven't golfed this one too much. There are a few places the code could be cleaner/make more sense, but won't save any bytes since they're in places where whitespace is needed anyway. There might be a way to save some bytes on the last bit on the second line, making it go the opposite direction and mashing up with the 00 already there, I'll have to play with it more later
Basically, this checks to see whether the current char is a space, number, uppercase letter, or lowercase letter, by checking if it's in range of the highest/lowest values of that group. If it isn't any of those, it gets discarded. If it is in one of those, it gets converted to a number if it's a letter, and a letter if it's a number (or rather, a number from 97-106 which are the values for letters a-j). Then it checks if the top value is less than 28, in which case it's a number and outputs a number, otherwise it's a letter and outputs the letter that number represents, outputs a space, then loops until the stack is empty.

Perl 5, 120 116 113 105 Bytes
First cleans up the unwanted characters & extra spaces.
Then climbs down the ascii table for each character.
$_=pop;s/[^\w ]|_//g;s/ +/ /g;map{$n=ord;say$".($n>96?$n-96:$n>64?64-$n:$n>48?chr$n+48:$n>47?j:0)}split//

Test
$ perl -M5.01 numbers4letters.pl "zZaA _ 190"
 26 -26 1 -1 0 a i j
$ perl -M5.01 numbers4letters.pl "PrOgr4mm1n9 Puz2l3s & C0d3_G0lf!"
-16 18 -15 7 18 d 13 13 a 14 i 0 -16 21 26 b 12 c 19 0 -3 j 4 c -7 j 12 6

You can golf one character with a single space in regex in place of \s and the second regex can be golfed with s/ +/ /g, the first regex is wrong because \w matches the underscore character

Another two characters out with s/[^\w ]|_//g

Nice, even better than with the ignore case flag.

@Max nice hint. 2 bytes saved in my answer, thank you.

JavaScript (ES6), 108 122 124
Edit Using the regexp from @Max's comment
Edit2 14 bytes saved thanks ETHProductions
EcmaScript 6 just for the arrow functions, so it should work in Firefox and latest Chrome.
Test running the snippet below

F=
t=>t[R='replace'](/[^\w ]|_/g,'')[R](/ +|./g,c=>((v=parseInt(c,36))>9?c>'Z'?v-9:9-v:'jabcdefghi'[v]||0)+' ')

// Less golfed
U=t=>
  t.replace(/[^\w ]|_/g,'') // remove invalid characters
  .replace(/ +/g,' ') // collapse spaces
  .replace(/./g, c => ( // valid character replacing
    v = parseInt(c,36), // '0'..'9'-> 0..9, 'a'..'z' -> 10..25, ' ' -> NaN
    (
      v > 9
      ? c > 'Z' ? v-9 : 9-v // manage upper vs lower
      : 'jabcdefghi'[v] || 0 // digits, NaN as an index gives undefined, substituted with 0
    ) + ' ' // separator space
  ))

// TEST
out=x=>O.textContent=x+'\n'+O.textContent;

function go() { out(I.value + ' --> ' + F(I.value) +'\n')}

// test cases, a trailing blank added to the expected output as ...
// "A single trailing space or newline is allowed."

;[
  ['A$b','-1 2 ']
, ['123___abc', 'a b c 1 2 3 ']
, ['You + Me','-25 15 21 0 -13 5 ']
, ['programming puzzles', '16 18 15 7 18 1 13 13 9 14 7 0 16 21 26 26 12 5 19 ']
, ['Code Golf', '-3 15 4 5 0 -7 15 12 6 ']
, ['Programming Puzzles & Code Golf', '-16 18 15 7 18 1 13 13 9 14 7 0 -16 21 26 26 12 5 19 0 -3 15 4 5 0 -7 15 12 6 ']
, ['C0d3 G0lf', '-3 j 4 c 0 -7 j 12 6 ']
].forEach(t=>{
  k=t[1],r=F(t[0]),
  out('Test '+(k==r?'OK':'Fail')+'\nInput:  '+t[0]+'\nResult: '+r+'\nCheck:  '+k+'\n')
})
Custom test: <input id=I><button onclick='go()'>-></button>

I may be mistaken, but I think you can save a whole bunch by changing [R](/ +/g,' ')[R](/./g, to [R](/ +|./g,. (Sorry for bringing up an old post, btw)

@ETHproductions seems good. Thanks

C, 142 138 135
c,d;main(s){while(c=getchar()+1)d=c|32,c=d-98<26u?s=(d-97)*(c/32*2-5),0:c-48<11u?s='a'+c%10,4:c==33&&s?s=0,0:3,printf("%d \0%c "+c,s);}

Ungolfed a bit:
int c,d;
int main(int s)                     // s initially non-zero, meaning spaces are allowed
{
    while(c=getchar()+1)            // getchar until EOF (-1) encountered
    {
        d=c|32;                     // d becomes lowercase c (both incremented by 1)
        if (d-98<26u)               // check for letter
        {
            s=(d-97)*(c/32*2-5);    // print this number and allow subsequent spaces
            c=0;                    // format string will be "%d "
        }
        else if (c-48<11u)          // check for digit
        {
            s='a'+c%10;             // print this letter and allow subsequent spaces
            c=4;                    // format string will be "%c "
        }
        else if (c==33&&s)          // else if space and allowed to output spaces
        {
            s=0;                    // print 0 and disallow subsequent spaces
            c=0;                    // format string will be "%c "
        }
        else
        {
            c=3;                    // format string will be "", prints nothing
        }
        printf("%d \0%c "+c,s);     // final c is treated as index into string literal
    }
}

Passes the given tests in GCC 4.9.3 & Clang 3.5.2.

Python 2, 191 179 177 173 172 168 160 bytes
import re
print" ".join([[[chr(x+48),"j"][x<49],[`[x-96,-x+64][x<96]`,"0"][x<65]][x>57or x<33]for x in map(ord,re.sub(" +"," ",re.sub("[^\w ]|_","",input())))])

Test
"programming puzzles"
16 18 15 7 18 1 13 13 9 14 7 0 16 21 26 26 12 5 19

"Code Golf"
-3 15 4 5 0 -7 15 12 6

"Programming Puzzles & Code Golf"
-16 18 15 7 18 1 13 13 9 14 7 0 -16 21 26 26 12 5 19 0 -3 15 4 5 0 -7 15 12 6

"C0d3 G0lf"
-3 j 4 c 0 -7 j 12 6

"You + Me"
-25 15 21 0 -13 5

Pyth, 57 bytes
:jdm@s[r_26Zr1 27Zc<GT1"")xs[_rG1G\ jkr1TZ)dz"0[0 ]+""0 "

Live demo and test cases.

CJam, 52 bytes
'{,97>:L_eu+A,s(++S+l{1$&},S%S*\26,:)_Wf*+LA<+0+erS*

Try it online
The key part with the solution is that it uses the CJam er (transliteration) operator. As arguments to the operator, it needs the list of all characters, and a list of the corresponding values.
As a pre-processing step on the input, it removes characters that are not part of the translation table (special characters), and reduces repeated spaces to a single space.
Explanation:
'{,97>  Build list of all lower case letters.
:L      Save it in variable L for later reuse.
_eu+    Add list of upper case letters.
A,s     Build digits "0123456789".
(+      Pop off first digit and append it at the end, to get "1234567890".
+       Add digits to list of characters.
S+      Add a space. List of characters that have values is now complete.
l       Get input.
{1$&},  Filter out all input characters that are not in list.
S%      Split input at spaces.
S*      And re-assemble it with spaces. This reduces multiple spaces to one space.
\       Swap input and character list.
26,     Start building list of values. Start with [0 ... 25].
:)      Use "smilie operator" to increment all values, to get [1 ... 26].
        These are the values for the lower case letters.
_Wf*    Copy the list and negate the values to get [-1 ... -26] for upper case.
+       Concatenate the two lists.
L       Retrieve the list of lower case letters we saved away earlier.
A<      Keep the first 10, which are the values for the digits.
+       Concatenate to list of values.
0+      Add 0 to list, as value for space.
er      Transliterate input string to corresponding values.
S*      Join with spaces for output.

PHP, 116 bytes
while($c=ord(preg_replace(["#[^\w ]|_#","# +#"],["","@"],$argn))[$i++])echo$c<96?jabcdefghi[$c-48]?:64-$c:$c-96," ";

takes input from STDIN; run with -nR.
breakdown
while($c=ord(preg_replace(["#[^\w ]|_#","# +#"],["","@"],$argn) # sanitize input
    [$i++]))echo            # loop through string and print ...
    $c<96                       # if not lowercase:
        ?jabcdefghi[$c-48]          # digit -> letter
        ?:                          # if that turned out falsy (=empty):
        64-$c                       # uppercase (or former spaces) -> negative (or 0)
    :$c-96                      # else -> positive
," ";                           # append space

You can replace the @ with a backtick to handle spaces in the lowercase part.
With jabcdefghi0 for the digits, you could also use :.

I believe that you must change the order "#_|[^\w ]#" instead of "#[^\w ]|_#" .

Hassium, 1156 Bytes
func main() {s = input();c="";for(x=0;x<s.length;x++){c=s[Convert.toNumber(Convert.toString(x))].toString();if (c.toLower()!=c)print(r(c.toLower())*-1);else if(r(c)=="")continue;else print(r(c));print(" ");}}func r(c) {if(c=="a")return 1;else if(c=="b")return 2;else if(c=="c")return 3;else if(c=="d")return 4;else if(c=="e")return 5;else if(c=="f")return 6;else if(c=="g")return 7;else if(c=="h")return 8;else if(c=="i")return 9;else if(c=="j")return 10;else if(c=="k")return 11;else if(c=="l")return 12;else if(c=="m")return 13;else if(c=="n")return 14;else if(c=="o")return 15;else if(c=="p")return 16;else if(c=="q")return 17;else if(c=="r")return 18;else if(c=="s")return 19;else if(c=="t")return 20;else if(c=="u")return 21;else if(c=="v")return 22;else if(c=="w")return 23;else if(c=="x")return 24;else if(c=="y")return 25;else if(c=="z")return 26;else if(c==" ")return 0;else if(c=="1")return "a";else if(c=="2")return "b";else if(c=="3")return "c";else if(c=="4")return "d";else if(c=="5")return "e";else if(c=="6")return "f";else if(c=="7")return "g";else if(c=="8")return "h";else if(c=="9")return "i";else if(c=="0")return "j";else return"";}

Very long answer

Collapsing spaces doesn't quite seem to work. You + Me produces the output -25 15 21 0 0 -13 5.

Interesting language, sort of like C/Java/[another language I can't remember the name of]. Is there an easier way to convert each character into a number, i.e. a function to retrieve a char code? (Scroll down to the table and look at the Dec column.)

Java 7, 257 254 bytes
class M{public static void main(String[]a){String r="",x;for(int c:a[0].getBytes()){x=(c>96&c<123?c-96:c>64&c<91?"-"+(c-64):c>48&c<58?(char)(c+48):c==48?"j":c<33?0:"")+"";r+=!x.isEmpty()&&!(r.endsWith("0 ")&x.equals("0"))?x+" ":"";}System.out.print(r);}}

Try it here.
Explanation:
class M{                               // Class
  public static void main(String[]a){  //  Required main-method
    String r="",                       //   Result-String
      x;                               //   Temp String
    for(int c:a[0].getBytes()){        //   Loop over the characters of the input-String
      x=(                              //    Set the temp String to:
        c>96&c<123?                    //     If it's a lowercase letter:
          c-96                         //      Set `x` to the 1-indexed alphabetic index
        :c>64&c<91?                    //     Else-if it's a uppercase letter:
          "-"+(c-64)                   //      Set `x` to the 1-indexed alphabetic index as negative
        :c>48&c<58?                    //     Else-if it's a digit 1-9:
          (char)(c+48)                 //      Set `x` to the 1-indexed alphabetic character
        :c==48?                        //     Else if it's a zero:
          "j"                          //      Set `x` to "j"
        :c<33?                         //     Else if it's a space:
          0                            //      Set `x` to "0"
        :                              //     Else:
          ""                           //      Set `x` to an empty String
       )+"";                           //     Required `+""` because `(char)` and `0` aren't Strings
      r+=                              //    Append the result-String with:
        !x.isEmpty()                   //     If `x` has a value
        &&!(r.endsWith("0 ")&x.equals("0"))?
                                       //     and it's not "0" with the previous value also being a zero
          x+" "                        //      Append the value of `x`, plus a space
        :                              //     Else:
          "";                          //      Append nothing
    }                                  //   End of loop
    System.out.print(r);               //   Print the result to STDOUT
  }                                    //  End of main-method
}                                      // End of class

Example input & output:
Input:
Programming Puzzles & C0d3 G0lf

Output:
-16 18 15 7 18 1 13 13 9 14 7 0 -16 21 26 26 12 5 19 0 -3 j 4 c 0 -7 j 12 6

Jelly, 32 bytes, language postdates challenge
⁶ØB;µ³fi@€
Øaḣ⁵ṙ9
26RµN;;0¢;ị@ÑK

Try it online!
Explanation
Helper function 1Ŀ (translates each alphanumeric/space in the input into a number)
⁶ØB;µ³fi@€
⁶           space
 ØB;        append all digits, uppercase and lowercase letters (in that order)
    µ       set as the new default for missing arguments
     ³      first command-line argument
      f     delete all characters not in {space + alphanumerics}
       i@€  take index of each element within {space + alphanumerics}

Helper function 2£ (returns the constant string “jabcdefghi”)
Øaḣ⁵ṙ9
Øa      lowercase alphabet
  ḣ⁵    take first 10 elements
    ṙ9  rotate 9 elements to the left

Main program
26RµN;;0¢;ị@ÑK
26R             Range from 1 to 26
   µ            set as default for missing arguments
    N           Minus {each element of the range from 1 to 26}
     ;          with {the range from 1 to 26} appended
      ;0        with a 0 appended
        ¢;      with the result of 2£ prepended
          ị@    index into this using
            Ñ   the result of 1Ŀ
             K  separate by spaces

Retina, 74 70 bytes
Note the leading space on line 3, the trailing space on line 6, and the empty second line.

[^\w ]|_

 +
~
.
$+
[A-Z]
-$+
T`L`l
[j-s]
a$+
[t-z]
b$+
T`~ld`dd0-6jl

Try it Online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Primes, as efficiently inefficient as possible
Write a program that tests if a number n is prime by checking that none of the integers between 2 and n-1 (inclusive) divide n (you must use this algorithm!). The input to STDIN should be an integer n (strictly) greater than 1. The output to STDOUT should be prime if n is prime and not prime if n is not prime.
Even though you are intentionally writing an inefficient program, this is still code golf, fellas. Standard CG rules apply. Shortest code in bytes wins.

Define inefficient. Is O(n) inefficient enough? Or do you just mean by following your specific algorithm?

The specific algorithm of iterating from 2 to n-1.

Naïve implementations of Wilson's Theorem are a lot less efficient...

There are already many answers on this question that use this method (or one with very trivial changes).

CJam, 25 bytes
li_,2>f%:*!"not "*"prime"

Try it online
Explanation:
li    Get input and convert to integer.
_,    Create range [0 ... n-1].
2>    Slice off first two elements, to get [2 ... n-1].
f%    Apply modulo with all range members to input.
:*    Calculate product of the results. This will be 0 if one of the modulo
      results was 0, non-zero if the input is prime.
!     Negate. We now have 0 for primes, 1 for non-primes.
"not "*
      Push "not " 0/1 times based on value.
"prime"
      Push "prime".

Pyth - 25 23 bytes
Heavily golfable, uses filter.
+?f!%QTr2Q"not "k"prime

Test Suite.

Pyth, 22 bytes
+*}0%LQr2Q"not ""prime

Try it online.

Python 2, 59
i=input()
print"not "*any(i%n<1for n in range(2,i))+"prime"

Thanks Alex! One day I will remember.

Python 2, way too many bytes (95, to be exact)
n=input();x=0
for i in range(2,n):
 if n%i==0:x+=1;print'not prime';break
if x==0:print'prime'

Heavily golfable for sure.

R, 59 bytes
n=scan();cat(if(n>2&sum(!n%%2:(n-1)))"not ","prime",sep="")

Ungolfed:
# Read n from STDIN
n <- scan()

# Test primality and write to STDOUT
if (n > 2 & sum(!(n %% 2:(n-1)))
    cat("not prime")
else
    cat("prime")

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Literally code golf
In modern day standards Golfing translates to playing a game of golf, while golf itself translates to a car manufactured by Volkswagen.
So instead of the usual golfing of code, you will today be coding a golf.
Challenge
Write a program (A) in language A which will output the source code of another program (B) of language B, which in it's turn will output Vroom vrooom! when executed.
Rules

The source code of program A is formatted into a nice ASCII car (not necessarily a volkswagen).
Program A must be executable in the format you posted it in.
Language A is NOT the same language as language B.
The output of program B may or may not end with a new line.
Program A takes no input.
In non-obvious languages (esoteric) please explain program A.
You must start your answer with # Language A, Language B eg. # Brainfuck, Python.
Valid languages must have either an English Wikipedia article, an esolangs article or a Rosetta Code article at the time this challenge was posted.
Be creative :-)

Scoring
This is a popularity contest. Whichever answer has the most upvotes by Oct 4, will be declared the winner.
Example
Brainfuck, Python 2
                   ++++++++++[>+++>
                ++++    ++>+++    ++++
              +++<        <<        -]>>>
     ++++++++++++.        ++        .------
   ---.+++++.++++++.<<++.++.>++++++++++++++
 ++++++++++++.>--.---..--.<<--.>>+++++++++.
 ----.---...--.----------------------------
  ---------------------------------------
     \--o--/                    \--o--/
      \-_./                      \+_./

This outputs the following code, which can be executed in Python 2;
print "Vroom vrooom!"

This is my first post on codegolf, feedback is much appreciated!

I'm not sure your golf's wheels can roll properly with this shape!

Heh, you're right. I'll have myself a sliding golf then.

Does program A have to run in the car format?

Yes. Edited my post to clarify

This question is too broad and focuses more on ASCII art skills than programming skills. In many languages, whitespace can be inserted at will, so this challenge boils down to an art contest.

While I agree with Dennis' comment, I'd like to point out that, if we ignore the nature of the question for a moment, this spec is quite well written for a first post. Good job :)

Alright. Thanks for your comments and I'll try to think of a more specific challenge next time. Also thanks for the nice words :)

evil, JavaScript (ES6)
                                        aeMeeeDDDeDDDwHwwwwwwDaeeaeae;.
                                  .eu@wa04QMMM4WHHWWM#404HGV#0B4aeee0HeHa
                               .ewD&M%e       aG##a       aa a@Q%Bwaaeeuu4.
                           .uwuwW&u          e&M&e        H  wB0B&uGMVBGuuGu
                          wuu@M0Bu           wW@4Be      ueu=w#H00%V%QG@W%eGa
               ...aa+aeeweWWaee#G&G%V@B@G0@B&00V0V0%4VB4%BQGeewwB%BwwwV0%HMwae
           eaeee&BQM%M@4B%Mu%4G@BMwaeeaeeaawwaeeeuuuuwaaaeewwwuueee&QBeweaeMQ4e
      ,w#QawaHBH4Veaaaawueueeawaaeeeeuuwue&%#eeaeewaaawueewaeaeawueaQBBeeeHVewe.
    .eeuu0waaeQMQ%0Waaaawaeaeeee+u<+<=<===->::w~<+<=~-:<><uuwaeeaee&@B&&uuwawaa.
   aaaaaweaaQ#@4%@4#Veuuu~><uuw<-ewaaeueeaweeeeueweaeewaaaee-weH#V#%BBQ@0ueeawea
   aeewuuu#QB4B4B&0W%QVeuweeeaeM4M%&0W&MG@M0QV%VB0M%W0M&#QQeae4%#G#Q%4#4Q#Vwu>uuw
  wQWGuuwMHWVVuue<e%eQ4M4#@0BBWVHVVQ#4HG4%B%#&H@M#BMM0G0MVW0WQ44uwue.eueHGG#waHBe
  e&H0ueeV%Heu0wu,GQu0BGWQVH40MM4@0H0BQMMHWW%weueeaawuuuuwuu#@4Hu@&w+MVw@4M%ueeB
   %B0V&QW%MaVee>uwH%BW%4aeeeeueeuweaeeeeBMBGM&%H0QG&44#Mwe&#%VaWeeee~&Qw#V%G&wu.
   eaeDD&WQ&eGu,.&&0H%04ewaeeaDeB%#HG&#H#BQQ#&#@0Vuw0HBMaD4H#G#eWDee%DaD.Ww
         .u%.ue.4aaa.@Mw                                    ,w&wDwwDwwue@a
           eeHueMwa@Ge                                       .uV&.eeDw.4u
            "ee00V0e'                                          "a@HB4wP

For the evil program, I used a similar method as I did for this answer. In summary, I generated an optimally short program (limited to these four commands) that produced the desired JS, before mixing it with ignored characters to make a Volkswagen golf.
It prints out the following JS program, which in turn prints out Vroom vrooom! to the console:
       c=console
      o  =   x=>c
.log(x+"om!");O=o
Q="Vroom\x20vroo";
  (O)       (Q)

Common Lisp, BASIC (and Python)
I took inspiration from some nice ASCII cars.
Mine is a pickup truck seen from behind:
         (if'(
      (-----------------)
    _(  _______________  )_
   (_( (               ) )_)
     ( (_______________) )
     (                   )
   (=======================)
   (( MY OTHER CAR        ))
   (( IS A CDR            ))
   (-----------------------)
    (  )               (  )
    (__)               (__))
(lambda()(format t"~&PRINT ~S~%""Vroom vroom!")))

+1 for the bumper sticker ;)

@ETHproductions It is an old joke, not mine, btw. It is attributed to Erik Naggum.

nice one. Liked the rear window

CJam, C++
My car is a 1988 Pontiac Trans Am. (I tried my best. :P)
                                 "#"e####===========_
                            "inclu"+               e#\
                          "de "   +           "<iostream>"+e#+--.____    __..
             N+N+"using"+" namespace "+"std;"+Ne#---" """""       """""  __'
      +N+"int "                                                    +"main()"+
 N+"{"+N+" "4*+"c"   +"out << \"Vr"+e#====================.--""  ""--.=======:
e#      [w] : /        \ : |========================|    : /        \ :  [w] :
"oom"+" vro"+            "oom!\";"+e#===============|    :|          |:   _-"
 N+"}"+e#___: \        / :_|=======================/_____: \        / :__-"
  e#--------'  ""____""  `-------------------------------'  ""____""

You can test this here.
CJam
"#include <iostream>"N+N+"using namespace std;"+N+N+"int main()"N+"{"+N+" "4*+"cout << \"Vroom vrooom!\";"+N+"}"+

And you can test that, here.
C++
#include <iostream>

using namespace std;

int main()
{
    cout << "Vroom vrooom!";
}

BrainFuck, Golf Script, Glee, JQ, Lasso, Lang5 & many more
          ++++++++++
       [>+++     >+++++
     +++>++      +++++++++<
   <<-]>++       + +.>++++++.
  <>>>>>>><<<<<<<><><><><><><>
 >++++.---..--.<<--.>>+++++++--
 ++++.----.---...--.<<+.+.-----
       --              --
      |  |            |  |
       --              --

Output

"Vroom vrooom!"

Which will be valid syntax for these language which will ouptut "Vroom vroom!"
Golf Script
Glee
J
JQ
Lasso
Lang5
m4
Ml/I
Salmon
TPP & many more
This list came from Rosetta code's Hello World Program

That source code doesn't look like any car I've ever seen!

@Fatalize. it was typo. And sorry for J

Java, Python
    public final class
Car{public static void main
(String    ...a    ){System
//CCCCC    CCCC    CCCCCCCC//
.out.println("print(\"Vroom"+
" vroom!\")");}}//HDBSKJBGIWE
      /////         /////
       ///           ///

(Sorry, the car's really bad)

That looks a lot more like a rain-cloud than a car :D

Yeah, it does. :)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Watch 'em fall like dominoes
You live inside a terminal that is 80 characters wide. You are bored, so you decide to play dominoes. No, not the boring kind that look like Scrabble, the fun kind where you spend an hour setting them to watch them fall in a second.
In terminals, dominoes look like this:
|   upright domino
\   left-tilted domino
/   right-tilted domino
__  fallen domino

As we all know, if a tilted domino touches an upright one, the second domino gets tilted as well. The only exception to this is if two tilted dominoes touch it:
|\ --> \\        /| --> //        /|\ --> /|\

Adjust your terminal's gravitational constant so this transition takes 100 ms.
If a tilted domino is supported by another domino or the terminal's walls, its journey ends.
None of the tilted dominoes in
\||||____||||/__                /|\    /\    /|\                __\||||____||||/

(80 characters) will move, since the two outmost tilted dominoes are supported by the terminal's walls and all others are supported by other dominoes.
However, if the space in the tilting direction is empty, the domino falls down:
| \\ --> |__\        // | --> /__|

Terminal. Gravitational constant. You get the point…
Finally, there's a slight wind from the left, so right-tilted dominoes fall faster than left-tilted ones:
|/ \| --> |__\|

Task
Write a program/function that shows an animation of playing dominoes in a terminal.
Your code should do the following:

Read a string from input, representing the initial state of the dominoes.
This string will contain no more than 80 characters and consist solely of the dominoes described above and empty spaces.
Print the state and wait for 100 ms.
Transform the state as explained above.
If the state changed, go back to 2.

Additional rules

The length of the input string does not affect the terminal's width; even if the string is shorter than 80 characters, the walls of the terminal are still 80 characters apart.
Each time step 2 is executed, the state should get printed to the same location, overwriting the previous state.
Since some languages are incapable of waiting exactly 100 ms, feel free to wait any amount between 50 and 1000 ms.
Standard code-golf rules apply.

Examples

For the initial state
 ||\/||

print the following (one over the other):
 ||\/||
 |\\//|
 \\\///
__\\//__

For the initial state
/||||\

print the following
/||||\
//||\\
///\\\

For the initial state
/|||\

print the following
/|||\
//|\\

For the initial state
|/ \|/ \|/ \|/ \|

print the following:
|__\|__\|__\|__\|

For the initial state (80 characters)
\||||____||||/__                /|\    /\    /|\                __\||||____||||/

print the following
\||||____||||/__                /|\    /\    /|\                __\||||____||||/

Retina, 87 86 85 bytes
Thanks to Dennis for saving 1 byte.
^.{0,79}$
$0
:`^
<ESC>c
(`/ | \\
__
/\|(?!\\)
//a
(?<!/)\|\\
\\
$
aaaaa
a
aaaa
(a+)+b|a
<empty>

<ESC> should be replaced by the actual control character (0x1B). <empty> represents an empty trailing line. You can then run the above code from a single file with the -s flag.
The code requires a terminal which supports ANSI escape codes. I can't suppress the line feed in Retina's output so I need to clear the entire console with <ESC>c each time. I've tested the code in bash using Mono to run Retina.
Explanation
^.{0,79}$
$0

We start by appending a space if the input contains fewer than 80 characters. This is so that a / at the right end does not have to be treated separately.
:`^
<ESC>c

Now we prepend <ESC>c to the string, which is the ANSI escape code for clearing the terminal. So every time the string is printed it will do so at the top of the terminal. The :` instructs Retina to print out the result of this substitution, i.e. the initial configuration.
(`/ | \\
__

(` begins a loop. Since there is no matching ), the loop is assumed to go until the last stage of the program. Each iteration will simulate one step of the dominoes falling and then "sleep" a bit. This first stage replaces / and \ next to a space into __. This automatically handles the / \ case correctly, because matches cannot overlap and are searched for from left to right. So the /<sp> would be matched and turned into __ such that the \ can't be matched, and we get the correct __\.
/\|(?!\\)
//a

This turns /| into // provided there's no \ next to it. We append an a such that this new / doesn't mess with the next stage (which shouldn't "know" about this change yet).
(?<!/)\|\\
\\

The opposite situation: turn |\ into \\ provided there's no / next to it. We don't need to put an a here, because we're done with this step of the simulation.
Now the sleeping part...
$
aaaaa

Appends 5 more as to the end of the code.
a
aaaa

Turns each a into 4 as, so we get 20 as at the end.
(a+)+b|a
<empty>

Now the fun part... we sleep for a bit with the help of catastrophic backtracking. There is an exponential amount of ways to split up a match of (a+)+ between repetitions of the group. Because the b causes the match to fail, the engine will backtrack and try every single one of those combinations before deciding that (a+)+b can't match. For the twenty as at the end that takes something like half a second.
At the same time, we allow the regex to match a single a, but only after doing the backtracking. When that matches, we replace it with an empty string, removing all the as we inserted for one reason or another from the string.
That leaves printing the string at the end of the loop iteration. Here it comes in handy that I haven't fixed the printing behaviour of loops in Retina yet. Currently, there is only one flag for each stage, which says "print" or "don't print". The default is "don't print" except for the last stage in the program, which defaults to "print". But the stage is looped, so that means it actually prints the current string on each iteration. Normally, that is really annoying, and you almost always need to include an additional empty stage at the end if you only want the final result, but here it lets me save four bytes.

Javascript (ES6), 206 148 129 158 bytes
I'd finally gotten it down to a nicely low point, but it wouldn't clear the console or append an extra space; these problems have been fixed now.
c=console;d=s=>{c.clear(s[79]||(s+=' ')),c.log(s),t=s[R='replace'](/\/ | \\/g,'__')[R](/\/\|/g,'//a')[R](/\|\\/g,'\\\\')[R](/a/g,'');t!=s&&setTimeout(d,99,t)}

Alternate 153 byte version which should work in Node.JS:
d=s=>{s[79]||(s+=' '),console.log("\033c"+s),t=s[R='replace'](/\/ | \\/g,'__')[R](/\/\|/g,'//a')[R](/\|\\/g,'\\\\')[R](/a/g,'');t!=s&&setTimeout(d,99,t)}

IMHO, it's quite fun to play with. Try an HTML version here:

output=document.getElementById("output"),console.log=a=>output.innerHTML=a;
d=s=>{s[79]||(s+=' ');console.log(s),t=s[R='replace'](/\/ | \\/g,'__')[R](/\/\|/g,'//a')[R](/\|\\/g,'\\\\')[R](/a/g,'');t!=s&&setTimeout(d,99,t)}
s=n=>{n=n||15,r='';for(i=0;i<n;i++)r+=(i%2?'|'.repeat(Math.random()*16|0):'\\ /'[Math.random()*3|0].repeat(Math.random()*3+1|0));return r} // randomizer
input=document.getElementById("input");
input.addEventListener("keydown",e=>e.keyCode==13?(e.preventDefault(),d(input.value)):0);

Enter your dominoes here:

<textarea id="input" rows="1" cols="80">|||\ |||\ /|\ /||||||||\ /|||| /|||</textarea>
<button id="random" onclick="input.value=s()">Randomize</button><button id="run" onclick="d(input.value)">Run</button>

Result:

There's probably a good bit more room for golfing. Suggestions welcome!

+1 for the runnable demo that wasted 10 minute of my time, and +1 for the randomizer function. However, as Dennis mentions, it fails for the first test case. Try / or /| and you will see the tile does not fall all the way as it should.

@Dennis Thanks for pointing out these problems. I believe I've fixed both of them now.

Node isn't happy about the fat arrow, but it works fine otherwise. You can replace \033 with a literal ESC byte, saving 3 bytes.

C#, 335 bytes
Not a great choice of language.
I abused the delay being allowed between 50 and 1000 to select a two-digit number.
New lines and indentation added for clarity:
namespace System.Threading{
    class P{
        static void Main(string[]z){
            var c=@"/|\,/|\,/|,//,|\,\\,/ ,__, \,__".Split(',');
            for(string a=z[0].PadRight(80),b="";a!=b;){
                Console.Clear();
                Console.Write(b=a);
                Thread.Sleep(99);
                a="";
                for(int i,j;(i=a.Length)<80;)
                    a+=(j=Array.FindIndex(c,d=>b.Substring(i).StartsWith(d)))%2==0
                        ?c[j+1]
                        :b.Substring(i,1);
            }
        }
    }
}

Perl 5, 154 146
Had to use a temporary character to maintain the state between 2 regexes.
To deal with the risk that something like / | | | \ would end up as / / /  \ \ instead of / / | \ \ .
$_=substr(pop.' ',0,80);$|++;while($}ne$_){print"$_\r";$}=$_;s@ \\|/ @__@g;s@/\|(?=[^\\])@/F@g;s@([^/])\|\\@$1\\\\@g;tr@F@/@;select($\,$\,$\,0.1)}

Test
$ perl dominos.pl '|\ |\/|||\/|'
|\__\//|\\/__

You can eliminate several backslashes if you use a delimiter other than slash  — e.g. s, \\|/ ,__,g instead of s/ \\|\/ /__/g.

Good tip. Forgot about that trick. And a few bytes extra were cut by using negated sets.

ES6, 220 218 195 bytes
Minified
f=d=>{var e,c=console;if(!d[79])d+=' ';c.clear();c.log(d);e=d;d=d[R='replace'](/\/\|\\/g,'a')[R](/\/ | \\/g,'__')[R](/\/\|/g,'//')[R](/\|\\/g,'\\\\')[R]('a','/|\\');if(e!=d)setTimeout(f,100,d);};

More Readable
f=d=> {
    var e,
    c=console;
    if(!d[79])
        d+=' ';
    c.clear();
    c.log(d);
    e=d;
    d = d[R='replace'](/\/\|\\/g, 'a')  //Substitute '/|\' with 'a' so it doesn't get replaced
        [R](/\/ |  \\/g, '__')     //Replace '/ ' and ' \' with '__'
        [R](/\/\|/g, '//')    //Replace '/|' with '//'
        [R](/\|\\/g, '\\\\')  //Replace '|\' with '\\'
        [R]('a', '/|\\');     //Put '/|\' back
    if(e!=d)
        setTimeout(f,100,d);
};

Welcome to Programming Puzzles & Code Golf! 1. I'm not sure why you are using the ES6 notation. () = > { and }() can simply be removed from your code. 2. I don't think alert boxes are an acceptable output format for an animation. You can either embed your JS in   HTML or make the required change so it would work from the command line. 3. In either case, your code must wait approx. 100 ms between printing one state and the next.

Welcome to PPCG! I would suggest checking out this post and this post to help improve your golfing.

Thank you for the suggestions and links to golfing tips. It is still a little long, but I shortened it a bit and added the timer. I will go through the tips more in depth and see what I can shorten.

That should work in a terminal now, but it still won't print the updated state over the old one. On Linux, you can fix this by calling console.log("^[c"+d) instead, where ^[ is the ESC character (one byte).

If you change the first .replace to [R='replace'], then each subsequent one to [R], this will cut down quite a bit. You could also save a few bytes by using setTimeout(f,100,d) in place of the current setup.

@ETHproductions - Thank you for the suggestions. I was able to shorten it quite a bit by changing the .replace function call and setTimeout. I was also able to combine the '__' replace for ' ' and '/ ' to shorten it a bit more. Console is now cleared to print over itself.

PHP, 175 bytes
$i=sprintf("%-80s",$argv[1]);$p='preg_replace';do{echo($o=$i)."\r";$i=$p('(/\|\\\\(*SKIP)(?!)|(?|(/)\||\|(\\\\)))','$1$1',$p('(/ | \\\\)','__',$i));usleep(1e5);}while($i!=$o);

Un-minified:
$input = sprintf("%-80s",$argv[1]);
do {
  echo $input."\r";
  $old = $input;
  $input = preg_replace('(/ | \\\\)','__',$input);
  $input = preg_replace('(/\|\\\\(*SKIP)(?!)|(?|(/)\||\|(\\\\)))','$1$1',$input);
  usleep(100000);
}
while( $input != $old);

Basically regex golf. First flattens any falling dominoes that have space (and due to left-to-right matching order, the "wind" blows). Then comes the ugly part (curse you slashes!)

Match /|\, then skip it.
Match (/)| and replace with //
Match |(\) and replace with \\

This makes the dominoes fall. Finally, just wait 100ms for the next step.
Using () as delimiters on the regex means the /s don't need escaping, which helps minimally!

You're allowed to wait 50ms instead of 100, saving 1 char ;) Does PHP allow  10^5 ?

POSIX shell+sed, 144
sed 's/^.\{1,79\}$/& /;s/.*/printf '"'&\\r'"';sleep .1/;h;:;s,/|\\,/:\\,g;s,\(/ \| \\\),__,g;s,/|,//,g;s,|\\,\\\\,g;H;t;x;y/:/|/;s/\\/\\\\/g'|sh

This is in two parts.  The main work of toppling the dominoes is standard sed pattern replacement, accumulating lines into hold space.  We temporarily turn /|\ into /:\ to protect it, recovering at the end.

s/^.\{0,79\}$/& /
h

:
s,/|\\,/:\\,g
s,\(/ \| \\\),__,g
s,/|,//,g
s,|\\,\\\\,g
H
t

x
y/:/|/

Since sed hasn't got any way of inserting delays (I looked into terminfo/termcap, but couldn't find any standard way), I wrap each line in printf "...\r"; sleep .1  to print a line every 100ms.  I actually do this first, when we have just one line, as the characters in the command won't be touched by any of the substitutions of toppling.
All tested using dash and GNU coreutils, with POSIXLY_CORRECT set in the environment.


text:
Loops and Loops and Loops
The Challenge
Create a function that, when given an input of ASCII art (directing a path that may eventually loop), outputs the length of the loop (if there is one) and the length of the "tail" leading into the loop in one of the forms below.

Input
Your input must be passed to a function. Below is an example of a simple input.
# --> # --> #
      ^     |
      |     |
      |     v
      # <-- #

You could visualize the above blocks like this

The "tail" is one item, while the loop is four long.
A more difficult one:
            # --> # --> #
            ^           |
            |           |
            |           v
      # --> # <-- #     # --> #
      ^           ^           |
      |           |           |
      |           |           v
# --> #           # <-- # <-- #

Output
You must output through STDOUT or your language's closest alternative.
Your two output integers should be the length of the tail and the length of the loop. This output can be in two forms.

a space-delimited string: "2 10"
an array of integers: [2, 10]

Rules

Every block, or #, will only have a single path away from itself.
Every arrow is two line segments and one head.
The starting block will always be in the leftmost column.
The input will never be just a loop.

Example
# --> # --> # --> #
^     ^           |
|     |           |
|     |           v
#     # <-- # <-- #

This one has a tail length of 2 and a loop length of 6. Below, the tail and loop are separated.
Tail
# -->
^
|
|
#

Loop
# --> # --> #
^           |
|           |
|           v
# <-- # <-- #

The correct outputs are [2, 6] and "2 6".
If the input is only a tail, the loop length is zero.
# --> # --> # --> #
                  |
                  |
                  v
        <-- # <-- #

The correct outputs for the above input are [6, 0] and "6 0"

@orlp I think you're confusing input and output.

Can the input have extra disconnected pieces of path?

I think the intro is confusing. It makes me think the problem will be about program analysis, whereas it is about path-finding in ASCII art.

I've removed the intro. It was a bit confusing/misleading. @xnor

Related: Where is the arrow pointing?

I've added that piece of information under the new "Rules" section. @Zgarb

This could be nice to solve in JavaScript (browser console). But there is not way to input a multiline string from STDIN or closest alternative (prompt). Why not a function call with the string as argument?

Good point. I hadn't thought of this. Just edited the question. @edc65

I understand the input is a single multiline string. Can we assume all lines are of equal length (padded with spaces)?

Yes. All lines are padded so that the input is rectangular. @steveverrill

JavaScript (ES6), 221 229
A function with the input as a parameter, output as a string via popup window (alert).
Scan repeatedly the input:
at each step

remove the end of the tail
count the remaining '#'

When there is not more tail to remove, the number of the steps so far is the size of the tail and the number of remaining '# is the size of the loop.
All the newlines inside backticks are significant and counted
Test running the snippet below with Firefox (not Chrome, as it does not support ...)

F=s=>{s=`

${s}

`.split`
`.map(r=>[...r]);for(t=0,f=1;f;)s.map((r,y)=>r.map((c,x)=>c=='#'&&((r[x+2]+r[x-2]+s[y-1][x]+s[y+1][x]).match`[v<>^]`?++l:t+=(f=r[x-4]=r[x+4]=s[y-3][x]=s[y+3][x]=r[x]=1))),f=l=0);alert(t+' '+l)}

// Less golfed
U=s=>{
  s=`\n\n\n${s}\n\n\n`.split`\n`.map(r=>[...r])
  t=0
  do {
    f=l=0
    s.forEach((r,y) => {
      r.forEach((c,x) => {
        if (c == '#')
        {
          if (!(r[x+2] == '<' || r[x-2] == '>' || s[y-1][x] == 'v' || s[y+1][x] == '^'))
            t+=(f=r[x-4]=r[x+4]=s[y-3][x]=s[y+3][x]=r[x]=1)
          else
            ++l
        }
      })
    })
  } while(f)
  alert(t+' '+l)
}

//Test

// Redefine console.log
alert=(...x)=>O.innerHTML+=x+'\n'

test=[`
# --> # --> #
      ^     |
      |     |
      |     v
      # <-- #`
,`
            # --> # --> #
            ^           |
            |           |
            |           v
      # --> # <-- #     # --> #
      ^           ^           |
      |           |           |
      |           |           v
# --> #           # <-- # <-- #`
,`
# --> # --> # --> #
^     ^           |
|     |           |
|     |           v
#     # <-- # <-- #`
]

test.forEach(t=>(alert(t),F(t)))

... is the spread operator right? You might want to name it this way since it exists in other languages (like groovy) by other syntaxes (*:list for groovy). Nice solution anyway !

+1 I was thinking 'There must be a smart way to do this', came up with this solution, only to scroll down to this answer.

Ruby, 287 278 bytes
->i{n={}
g=->x{n[x]||=[0,p]}
t=y=0
i.lines{|l|x=0
l.chars{|c|x+=1
'><'[c]&&(r=c.ord-61;s,d=[y,x-4*r],[y,x+2*r])
'^v'[c]&&(r=c<?_?1:-1;s,d=[y+r*3,x],[y-r,x])
s&&(g[s][1]=g[d])[0]+=1}
y+=1}
c,*_,s=n.values.sort_by{|v|v[0]}
l=n.size
s[0]>1?((t+=1;c=c[1])while c!=s):t=l-=1
[t,l-t]}

Try it here.
This builds a hash (dictionary) of nodes. For each node, the number of incoming connections and the (possibly null) next node are stored.
Finally:

If there is no node with 2 incoming connections (meaning no loop), return 0 for the tail and the number of existing nodes for the loop.
Otherwise, start iterating from the node with 0 incoming connections (start) via next->...->next until the node with 2 incoming connections (loop start) is reached. Return the appropriate counts.

The readable version of the code is available here.

Ruby, 276
->s{a=k=w=s.index(r='
')*2+2
s=r*w+s+r*w
(s.size).times{|i|s[i,2]=='
#'&&(s[3+j=i+1]+s[j+w]+s[j-w]).strip.size<2&&(a=[j]
d=0
loop{("|-|-"[d])+?#=~/#{s[k=j+[-w,3,w,-3][d]]}/?(a.include?(k)&&break;a<<(j=k);d-=1):d=(d+1)%4}
)}
u=a.size
v=a.index(k)
t=(u-v)/4*2
print u/2-t," ",t}


text:
See you in another life, brotha!
Most of us LOST fans out there remember the computer that Desmond had to type the characters "4 8 15 16 23 42" in every 108 minutes or the world would end (or would it?).
The challenge here is to create a program that would do the same thing by requiring that every 108 seconds the input 4 8 15 16 23 42 is entered or it will display the message
Sorry, the world has ended with status code -1

It should warn the user at 100 seconds that they need to enter a number with the message
Enter, Quick!

The program must be able to read input at any time and if it is the correct input it will reset the timer. If incorrect input is given nothing happens.
The program should run indefinitely. So the timeline after the last valid input looks like
From 0 to 99 seconds: no output
At 100 seconds: Enter, Quick!
At 108 seconds: Sorry, the world has ended with status code -1.
This is code golf so the shortest answer (in bytes) that accomplishes this task wins! Good Luck!

I've edited the question a bit. Feel free to rollback any changes you don't want.

There should be bonus points for outputting the correct hieroglyphics.

After re-reading the challenge, I'm not sure anymore I've interpreted it correctly. What should happen after the "the world has ended"?

As a lost-nerd, I feel obligated to point out that Desmond would be warned about entering the numbers 4 minutes (240 seconds) before the timer runs out.

bash, 160 bytes
I()($s 100&&echo Enter, Quick!&$s 108&&echo Sorry, the world has ended with status code -1&)
i()(read r;[[ $r = '4 8 15 16 23 42' ]]&&pkill $s&&I;i)
s=sleep;I;i

I'm currently uncertain what the expected behavior is after "the world has ended".
Run like this:
bash lost.sh 2>&-

2>&- is required to ignore STDERR, which is allowed by default.

Modern-browser JavaScript, 252 247 242 bytes
n=t=>Date.now()+(t?0:1e5)
d=n(i=f=0)
onkeyup=e=>{if("4 8 15 16 23 42".charCodeAt(i%15)==e.keyCode&&++i%15<1)d=n(f=0)}
setInterval('if(n(1)>d&&f<2)d=n(1)+8e3,console.log(f++?"Sorry, the world has ended with status code -1":"Enter, Quick!")',9)

Instructions: run this in the console of a blank tab, click on its document to gain focus and start repeatedly typing the string. As long as you're doing well, you'll get no feedback whatsoever. Refresh and change 1e5 to 1e4 to make things more interesting.

Groovy, 244 or 228 bytes
I wrongly remembered Java having a nextLine method that took an argument of how long to wait, so I thought this would be easy. I couldn't find a method that did that, so I implemented this with two threads. It's a bit bulky. Oh well.
t=Thread.start{while(1)try{Thread.sleep(1e5);println "Enter, Quick!";Thread.sleep(8e3);println "Sorry, the world has ended with status code -1";System.exit(-1)}catch(e){}};while(1)if(System.console().readLine()=="4 8 15 16 23 42")t.interrupt()

This assumes the proper behavior for the world ending is for the process to exit with a status code of -1. If the intended behavior is to keep looping and expect an external force to end the world (and by extension, the program), the ;System.exit(-1) portion can be omitted to save 16 bytes. Yay.
I originally wrote this to use the hashCode of the string, but that wound up longer than an exact comparison embedding the string because hashCode is long.

APL (Dyalog Unicode), 144 bytesSBCS
As it turns out, both sides are running APL…
:For t:In 100 8
:For s:In⍳t
→{1E3::⍬⋄⍳⍞≡⍕4 8 15 16 23 42}⎕RTL←1
:End
⊃'Enter, Quick!' 'Sorry, the world has ended with status code -1'⌽⍨t=8
:End

Try it online!
:For t:in 100 8 loop twice, once with t(timput) being 100 and then with t as 8:
 :For s:In⍳t for s(econds) 1 through and all the ɩndices until t
  ⎕RTL←1 set the Response Time Limit to 1 (second)
  {…} apply the following anonymous lambda to that (although this argument is unused)
   1E3:: in the following, if any exception happens:
    ⍬ return []
   ⋄ try:
    ⍕4 8 15 16 23 42 stringify the required numbers
    ⍞≡ prompt for input and compare to that (gives 0 or 1)
    ⍳ the first that many ɩndices ([] or [1]`
  → go to that line (1 if [1], continue on next line if [])
 :End end of inner loop; proceed with next second of the current timeout
 t=3 is this the second timeout (0 or 1)?
 …⌽⍨ rotate the following that many steps:
  'Enter, Quick!' 'Sorry, the world has ended with status code -1' implicitly print appropriate text
 ⊃ disclose (to print without leading and trailing space)
:End end of outer loop: after warning, loop; after printing "Sorry…", proceed to terminate program

C++ (gcc), 395 bytes
Compiling on Linux requires the -pthread switch. MinGW does without.
#import<iostream>
#import<thread>
using namespace std;auto N=chrono::steady_clock::now;auto L=N();int w;int main(){thread A([]{for(;;){auto t=chrono::duration_cast<chrono::seconds>(N()-L).count();t>99&&!w?puts("Enter, Quick!"),w=1:t>107?exit(puts("Sorry, the world has ended with status code -1")),0:0;}}),B([]{for(string s;;s=="4 8 15 16 23 42"?L=N(),w=0:0)getline(cin,s);});A.join();B.join();}

Try it online!


text:
Beatles Songs and Hexagons
Write two triangle (i.e. pyramid) shaped programs.
The first one should be an upwards pointing text triangle with a minimum base width of three characters. So it would have a structure like
 X
XXX

or
  X
 XXX
XXXXX

or
   X
  XXX
 XXXXX
XXXXXXX

or larger. Each of the X's is to be replaced with the characters of your actual code, which may be anything except line terminators (so the X's could be spaces). All the X's must be replaced and the spaces and newlines that help form the triangle shape are required to stay as is.
The second program must have the same size and shape as the first, except that the triangle will be pointing down.
So if your first program looks like
  X
 XXX
XXXXX

then your second program would look like
yyyyy
 yyy
  y

where each y is a character you need to fill in with your actual code (probably different from your X code). The spaces and newlines must stay the same here too.
Your task is to write these programs such that they each output (to stdout or closest alternative) the title of a distinct Beatles song, not taking any input. This Wikipedia article will serve as our official song list for The Beatles. The output should be one of the titles exactly as listed, e.g. I Want You (She's So Heavy).
This is pretty easy, however, even with the weird triangle program requirement. So we're going to form another program from the first two that must output yet another song title.
By combining three copies of each of the two triangular programs we can create a third program shaped like a hexagon.
If the base width of your first program was three it would look like this:
 XyyyX
XXXyXXX
yyyXyyy
 yXXXy

If the base width was five it would look like this:
  XyyyyyX
 XXXyyyXXX
XXXXXyXXXXX
yyyyyXyyyyy
 yyyXXXyyy
  yXXXXXy

This program (when run with the spaces and newlines like the others) must output another Beatles song title, just like the first two programs. Also:

Your three programs must output different song titles.
Only song titles eight characters in length or longer are allowed.
You can only choose one of Revolution, Revolution 1 and Revolution 9 because the titles are so similar.
You must choose your three favorite Beatles songs. (Well, try to.)

Note that actual programs are required. Functions are not allowed. Reading your own source code in any program is also not allowed.
Example
If your first program was
  A
 AAA
AAAAA

it could output Across the Universe.
Then your second program
bbbbb
 bbb
  b

could output Revolution.
Then combined into the hexagon program
  AbbbbbA
 AAAbbbAAA
AAAAAbAAAAA
bbbbbAbbbbb
 bbbAAAbbb
  bAAAAAb

the output might be Get Back.
Scoring
The submission with the smallest triangle base width wins. In the likely case of ties the submission with the largest summed length of its three song titles wins.

Surely the tiebreaker should be the best choice of three songs? ;)

I'm having difficulty writing a Python entry without just copying Sp3000's method (never thought I'd be complaining about syntactic whitespace!), but I wrote a script to assemble two triangles into a hexagon. In case it's useful to anyone else, here it is in a Gist.

@mbomb007 Trailing spaces not part of the triangle pattern are not ok.

@TimPederick Since I couldn't get your hexagon-ifier to work, I wrote a Python script to do it starting with 2 multi-line strings. See here if anyone wants to use it.

@mbomb007 Sorry but a trailing space isn't allowed since it's not part of the title. (I'd allow a trailing newline since lots of print statements add one.) I'm not sure about the usual backspace policy but they're ok with me.

@Calvin'sHobbies I fixed it, but it requires a specific terminal for the ANSI escape sequence.

A hexagon challenge on Beatles songs and not a single solution containing Honey Pie or A Taste of Honey? Come on!

GolfScript, width = 9 chars, titles = 33 chars
Hexagon
    "Let It Be"
   }";"Yeste"}";
  "Twi""rda""Twi"
 "st an""y""st an"
"d Shout"}"d Shout"
Let It Be"Let It Be
 "Yeste"}";"Yeste"
  "rda""Twi""rda"
   "y""st an""y"
    }"d Shout"}

Prints Let It Be. (9 characters)
Try it online.
How it works
The token "Let It Be" on the first line pushes the string Let It Be on the stack.
The second line begins with }, an undocumented "super comment" that aborts execution immediately.
Before exiting, GolfScript prints the contents of the stack.
X triangle
    "
   }";
  "Twi"
 "st an"
"d Shout"

Prints Twist and Shout. (15 characters)
Try it online.
How it works
The first two lines push the string "\n   }", which the command ; discards from the stack.
The remaining lines contain the tokens "Twi", "st an" and "d Shout", which push the string Twist and Shout in three pieces.
Before exiting, GolfScript prints the contents of the stack.
Y triangle
Let It Be
 "Yeste"
  "rda"
   "y"
    }

Prints Yesterday. (9 characters)
Try it online.
How it works
The tokens Let, It and Be on the first line are undefined, so they do nothing.
The three following lines contain the tokens "Yeste", "rda" and "y", which push the string Yesterday in three pieces.
The } on the last line does nothing; the program would have finished anyway.
Once more, GolfScript prints the contents of the stack before exiting.

Befunge-93, width = 13 15, titles = 31 24 chars
A power outage last night prevented me from updating this when I figured it out, but I managed to reduce the triangle width and increase the song lengths!
Pointing-up program: "Dig a Pony", 10 characters:
      v
     v>
    v#  >
   "<
  v <>"y"v>
 <v"Dig a P"
"^>:#,_@.>"no

Explanation
I REALLY took advantage of Befunge's wrap-around trick and I picked "Dig a Pony" specifically because it had a space at the 6th position. This allows program flow to move through the song name. Try it in the online interpreter to see how it works.
Pointing-down program: "If I Fell", 9 characters:
< v"f I Fell"
 v>"I">:#,_@
  "raC yM "
   v"Drive

       .

(Period is extraneous and only included to make the other lines show up.)
Explanation
The only relevant lines here are the first two. I used the wrap-around trick (the instruction pointer is sent left immediately) to squeeze in one more character. The second line prints out the song name.
Combined: "Drive My Car", 12 characters:
      v< v"f I Fell"v
     v> v>"I">:#,_@v>
    v#  >"raC yM "v#  >
   "<     v"Drive"<
  v <>"y"v>     v <>"y"v>
 <v"Dig a P"   <v"Dig a P"
"^>:#,_@.>"no "^>:#,_@.>"no
< v"f I Fell"v< v"f I Fell"
 v>"I">:#,_@v> v>"I">:#,_@
  "raC yM "v#  >"raC yM "
   v"Drive"<     v"Drive
         v <>"y"v>
        <v"Dig a P"
       "^>:#,_@.>"no

Here's the same thing, but with lines added to show the hexagon and triangles.
       -----------------
      /v\< v"f I Fell"/v\
     /v> \v>"I">:#,_@/v> \
    /v#  >\"raC yM "/v#  >\
   /"<     \v"Drive/"<     \
  /v <>"y"v>\     /v <>"y"v>\
 /<v"Dig a P"\   /<v"Dig a P"\
/"^>:#,_@.>"no\ /"^>:#,_@.>"no\
-------------------------------
\< v"f I Fell"/v\< v"f I Fell"/
 \v>"I">:#,_@/v> \v>"I">:#,_@/
  \"raC yM "/v#  >\"raC yM "/
   \v"Drive/"<     \v"Drive/
    \     /v <>"y"v>\     /
     \   /<v"Dig a P"\   /
      \ /"^>:#,_@.>"no\ /
       -----------------

Explanation
This is where the third and fourth lines of the pointing-down triangle come into play. There are several redirects at the edge of both triangles that serve to move the instruction pointer through those two lines and push "Drive My Car" onto the stack. Then it is printed out using the >:#,_@ bit in the pointing-up triangle. Incidentally, both the left and the right pointing-up triangles are used.
There might be a way to use more of the empty space, but I think my time is better spent on other questions. :P

Hmm. The rules of PPCG are that if a program works in at least one interpreter, then it's valid. Good spot, though.

Another "rule" of PPCG is that the interpreter defines the language, not the specification. Thus, my Befunge code is, essentially, valid.

Python 2, width = 51
                         #print "Yellow Submarine" if id else "(Reprise)"   ##
                        #.##...............................................##.#
                       #...##.............................................##...#
                      #.....##...........................................##.....#
                     #.......##.........................................##.......#
                    #.........##.......................................##.........#
                   #...........##.....................................##...........#
                  #.............##...................................##.............#
                 #...............##.................................##...............#
                #.................##...............................##.................#
               #...................##.............................##...................#
              #.....................##...........................##.....................#
             #.......................##.........................##.......................#
            #.........................##.......................##.........................#
           #...........................##.....................##...........................#
          #.............................##...................##.............................#
         #...............................##.................##...............................#
        #.................................##...............##.................................#
       #...................................##.............##...................................#
      #.....................................##...........##.....................................#
     #.......................................##.........##.......................................#
    #.........................................##.......##.........................................#
   #...........................................##.....##...........................................#
  #.............................................##...##.............................................#
 #...............................................##.##...............................................#
print "Sgt. Pepper's Lonely Hearts Club Band",;id=0#print "Sgt. Pepper's Lonely Hearts Club Band",;id=0
print "Yellow Submarine" if id else "(Reprise)"   ##print "Yellow Submarine" if id else "(Reprise)"   #
 #...............................................##.##...............................................#
  #.............................................##...##.............................................#
   #...........................................##.....##...........................................#
    #.........................................##.......##.........................................#
     #.......................................##.........##.......................................#
      #.....................................##...........##.....................................#
       #...................................##.............##...................................#
        #.................................##...............##.................................#
         #...............................##.................##...............................#
          #.............................##...................##.............................#
           #...........................##.....................##...........................#
            #.........................##.......................##.........................#
             #.......................##.........................##.......................#
              #.....................##...........................##.....................#
               #...................##.............................##...................#
                #.................##...............................##.................#
                 #...............##.................................##...............#
                  #.............##...................................##.............#
                   #...........##.....................................##...........#
                    #.........##.......................................##.........#
                     #.......##.........................................##.......#
                      #.....##...........................................##.....#
                       #...##.............................................##...#
                        #.##...............................................##.#
                         #print "Sgt. Pepper's Lonely Hearts Club Band",;id=0#

Yeah, well... Python.
Python comments begin with #, so the majority of lines is just comments. For the upwards facing triangle, the only thing that executes is
print "Sgt. Pepper's Lonely Hearts Club Band",;id=0

which prints Sgt. Pepper's Lonely Hearts Club Band.
For the downwards facing triangle, we execute
print "Yellow Submarine" if id else "(Reprise)"

which prints Yellow Submarine, since the function id is truthy.
When we combine the programs however, all that happens is the above two lines in sequence. Since the end of the first line sets id=0, which is now falsy, the end result is that we tack a (Reprise) to the end, getting Sgt. Pepper's Lonely Hearts Club Band (Reprise) as our output (Calvin said this is okay).

This makes me think of the Imperial March more than any Beatles song...

I can hear the TIE-fighter sound effect just by seeing this shape

@Calvin'sHobbies Hahaha. Indeed!

Snowman 1.0.2, width = 13
      }?}///////////}
     ///"Get Back"////
    ///////////////////
   /////////////////////
  "Sun King//"[["Sun King
 "*"BirthdaysP/"*"Birthday
"]]8AaLsP[[///"]]8AaLsP[[//
?}///////////}?}///////////
 "Get Back"////"Get Back"/
  ///////////////////////
   /////////////////////
    //"[["Sun King//"[[
     sP/"*"BirthdaysP/
      /"]]8AaLsP[[///

Finally! A challenge where Snowman can thrive! :D :D
The slashes are mostly for aesthetic purposes, and the majority of them can be replaced with spaces (but that would make it look a whole lot more boring). Some slashes are necessary, for comments.
Program A (output: Birthday):
      }
     ///
    /////
   ///////
  "Sun King
 "*"Birthday
"]]8AaLsP[[//

This one's pretty simple. The first character (}) sets up our active variables, then there's a bunch of comments / no-ops. It then stores the string "Sun King\n " and immediately discards it (via *, storing it in a permavar which we never use). Then it stores "Birthday\n".
]] is a no-op here, since [[ foo ]] is a block comment in Snowman, but since there's no matching [[ before this ]] (within program A itself), it simply does nothing. Then 8AaL grabs the first 8 characters of the string, sP prints it, and [[ comments out the rest of the program (because again, there's no matching ]].
Program B (output: Get Back):
?}///////////
 "Get Back"/
  /////////
   ///////
    //"[[
     sP/
      /

This one's also pretty straightforward. ?} is equivalent to } (? simply sets all variables to inactive, which is a no-op here but again, important later). Then it stores the string "Get Back", does a bunch of no-ops (// to end of line is always a comment), and prints via sP.
Full program
Output is, you guessed it, Sun King1.
Let's look at this line by line:

Line 1
      }?}///////////}

This sets our active variables, just like the previous programs (we can see now that the ? is needed so as to not simply toggle them on and then back off with }}). The rest of the line is commented out.
Lines 2-4
     ///"Get Back"////
    ///////////////////
   /////////////////////

Comments...
Line 5
  "Sun King//"[["Sun King

Here we store the string "Sun King//", and then start a block comment. This essentially skips everything until the next ]].
Line 6
 "*"BirthdaysP/"*"Birthday

Still inside the block comment...
Line 7
"]]8AaLsP[[///"]]8AaLsP[[//

Here we break out of the block comment for a short period of time, to execute the code 8AaLsP. This is actually reused from program A. Since I chose all songs that are 8 letters long, I can simply use the same code for the combined program.
Then it gets a little tricky. The next time we emerge from the block comment, we see 8AaLsP again. This time, however, all variables are undefined (we called sp, print, in consume mode, which gets rid of the variables). Since aal requires two arguments, and this time it only has one (8), it errors and leaves the variables unchanged.
Similarly, sp encounters the 8, realizes it's the wrong type to be printed, and leaves the variables as is.
Lines 8-13
?}///////////}?}///////////
 "Get Back"////"Get Back"/
  ///////////////////////
   /////////////////////
    //"[["Sun King//"[[
     sP/"*"BirthdaysP/

Still stuck in that block comment...
Line 14
      /"]]8AaLsP[[///

Finally, we try calling that same print-first-8-chars sequence once again, and it fails once again, producing another two errors. (The 8 means that the variables are now 8 8, which is the correct number of variables for aal now, but still not the right types.)

1: as well as four runtime errors (SnowmanExceptions) to STDERR, but as per meta that doesn't matter.

The slashes are mostly for aesthetic purposes, and the majority of them can be replaced with spaces (but that would make it look a whole lot more boring) But it does make it a bit harder to grasp what's going on...

><>, width = 11
     /"yadhtri"\ /
           v"B"/
        ?!;>ol
  duJ yeH" /"eduJ yeH
 o   >l?!;   o   >l?!;
staC"/"klaw staC"/"klaw
"yadhtri"\ /"yadhtri"\
     v"B"/       v"B"/
  ?!;>ol      ?!;>ol
   " /"eduJ yeH" /"e
       o   >l?!;
      staC"/"klaw

2D languages have a pretty good time with this challenge.
Upwards arrow
     /

  duJ yeH
 o   >l?!;
staC"/"klaw

Program flow starts from the top-left, moving rightward. The / reflects up, and since ><> is toroidal we reappear from the bottom. We then hit another / and reflect again, and push the characters klawstaC one-by-one to the stack in string "" mode. Finally, we reflect upwards and hit a >l?!;o loop, which is the idiomatic way of printing the entire stack in ><>.
This prints Catswalk.
Downwards arrow
"yadhtri"\
     v"B"/
  ?!;>ol
   " /"e

Basically the same thing, pushing the characters from the get go and using mirrors and arrows to direct program flow. This prints Birthday.
Combined
     /

  ?!;>ol      ?!;>ol
     /"eduJ yeH" /

The relevant parts are above (I've cut out a lot of lines in the middle). Using the / from the upwards arrow, we reflect upwards and wrap around, but since we now have the downwards arrow underneath, part of that code is executed instead. We then push the relevant characters to the stack, and reuse the output loop from the downwards arrow.
This prints Hey Jude.

Python 2, size 21
This program requires an ANSI-compatible terminal (DOS ANSI.SYS to be specific), since I use \x1b[2J to clear the console AND move the cursor to top-left. To make this compatible with other ANSI terminals, print \x1b[1J\x1b[H (this can still fit in a size 21 hexagon). I wasn't able to test this part, because I don't have a terminal that prints ANSI escape codes.
I think the program looks pretty cool, similar to the radioactive symbol (though the ASCII shading implies the colors are backwards) or the icon of the sniper weapon from Metroid Prime: Hunters.
It did fit in size 17, but I'd forgotten id=0 in the up arrow. I don't think I can shrink it back down, since that has to all be on one line...
Also, credit goes to Sp3000 for the idea to use id.
          #exec('print"'       ##
         ###'\x1b[2J"+(id '   ####
        #####'and"Hey Ju'    ######
       #######'de"or"Ca'    ########
      #########'tswalk'    ##########
     ###########'")')     ############
    ##############       ##############
   ################     ################
  ##################   ##################
 #################### ####################
id=0;print"Birthday"##id=0;print"Birthday"#
exec('print"'       ##exec('print"'       #
 '\x1b[2J"+(id '   ####'\x1b[2J"+(id '   #
  'and"Hey Ju'    ######'and"Hey Ju'    #
   'de"or"Ca'    ########'de"or"Ca'    #
    'tswalk'    ##########'tswalk'    #
     '")')     ############'")')     #
      #       ###############       #
       #     #################     #
        #   ###################   #
         # ##################### #
          #id=0;print"Birthday"##

Up Arrow:
          #
         ###
        #####
       #######
      #########
     ###########
    #############
   ###############
  #################
 ###################
id=0;print"Birthday",

Down Arrow:
exec('print"'       #
 '\x1b[2J"+(id '   #
  'and"Hey Ju'    #
   'de"or"Ca'    #
    'tswalk'    #
     '")')     #
      #       #
       #     #
        #   #
         # #
          #

"Hey Jude" is one of my favorite Beatles songs, but I really don't know that many. I've never heard the other two songs I'm using. It's not a genre I listen to often.

\x1b[2J works only with ANSI.SYS; it shouldn't do anything in other terminals. Also, \x1b[;H expects an integer after the semicolon. To make both row and column default to 1, use \x1b[H. 2. \x1b[1J\x1b[H and \x1b[H\x1b[J should work on all ANSI terminals. 3. On Linux terminals, you can simply use \x1bc to reset the terminal. 4. \x1b can be replaced with a literal ESC byte, in case that helps improving your score.

@Dennis Thanks for clearing that up. I still won't be able to improve my score, since I can't figure out a way to break the up-arrow's code onto multiple lines.

C (gcc), base width = 17
Top, "Hey Jude"
        s
       ;//
      s;///
     main(//
    ){puts(//
   #define T//
  s?"Michell"//
 "e":"Hey Jud"//
"e");}///////////

Try it online!
Bottom, "Matchbox"
s=1;/////////////
 #ifndef T//////
  main(){puts//
   ("Matchb"//
    "ox");}//
     # endif
      /////
       //\
        ;

Try it online!
Hexagon, "Michelle"
        ss=1;/////////////s
       ;//#ifndef T//////;//
      s;///main(){puts//s;///
     main(//("Matchb"//main(//
    ){puts(//"ox");}//){puts(//
   #define T//# endif#define T//
  s?"Michell"///////s?"Michell"//
 "e":"Hey Jud"////\"e":"Hey Jud"//
"e");}///////////;"e");}///////////
s=1;/////////////ss=1;/////////////
 #ifndef T//////;//#ifndef T//////
  main(){puts//s;///main(){puts//
   ("Matchb"//main(//("Matchb"//
    "ox");}//){puts(//"ox");}//
     # endif#define T//# endif
      /////s?"Michell"///////
       //\"e":"Hey Jud"////\
        ;"e");}///////////;

Try it online!

gawk, base length 15
Just found out it doesn't work with mawk :/
It's not too tricky, but being grown up in the 70s, with The Beatles still omnipresent on air, I had to answer this. First I thought awk wasn't suited, but then it came to me.
Since these scripts contain BEGIN- and/or END-blocks, they need to be told that there will be no input to execute the END-block. This can be achieved by either pressing Ctrl-D after starting them, or starting them like this:
awk -f script.awk </dev/null

which I think is more convenient. echo | awk -f script.awk will also work, but if I would have used an empty line as input I would have done this completely different.
Pointing up, prints For No One (Youtube link)
       #
      # #
     #   #
    BEGIN {
   print n?#
  #         #
 n"So Tired":#
n="For No One"}

The essential code without comments is this. Since n isn't defined it prints "For No One" if called by itself.
    BEGIN {
   print n?

 n"So Tired":
n="For No One"}

Pointing down, prints Blackbird
END{a="Blackb"#
 a=n?_:a"ird"#
  printf a  #
   n="I'm "#
    if(a) #
     print
      } #
       #

The essential code is this. If n was defined before it doesn't print anything. I enforced the nice output with a newline after every track name, because I had the room to do that and it looks nicer in the console. n is defined in the process; that's needed for the Hexagon.
END{a="Blackb"
 a=n?_:a"ird"
  printf a
   n="I'm "
    if(a)
     print
      }

Hexagon, prints I'm So Tired
       #END{a="Blackb"##
      # #a=n?_:a"ird"## #
     #   #printf a  ##   #
    BEGIN {n="I'm "#BEGIN {
   print n?#if(a) #print n?#
  #         #print#         #
 n"So Tired":#} #n"So Tired":#
n="For No One"}#n="For No One"}
END{a="Blackb"##END{a="Blackb"#
 a=n?_:a"ird"## #a=n?_:a"ird"#
  printf a  ##   #printf a  #
   n="I'm "#BEGIN {n="I'm "#
    if(a) #print n?#if(a) #
     print#         #print
      } #n"So Tired":#} #
       #n="For No One"}#

The essential code. Now finally that mysterious n is used. Because n is defined in the first line, the upwards pointing triangle prints the alternative output, and the downwards pointing triangle prints emptiness.
    BEGIN {n="I'm "
   print n?

 n"So Tired":
n="For No One"}
END{a="Blackb"
 a=n?_:a"ird"
  printf a
   n="I'm "
    if(a)
     print
      }