text:
Reaching one's lucky numbers in reputation
A new code-golfer, Joe, just registered to the site. He has 1 reputation but determined to reach all his lucky numbers in reputation exactly. Joe believes in higher powers which will help him to achieve his goal with minimal amount of (his or others) actions. As a new user he also believes that negative reputation is possible.
You should write a program or function which helps Joe to compute how many action should he expect.
Details

The actions can change the reputation by the following amounts (all actions are available at every step regardless of stackexchange rules):
answer accepted:     +15
answer voted up:     +10
question voted up:    +5
accepts answer:       +2
votes down an answer: −1
question voted down:  −2

Other special reputation changes are disregarded.
Lucky numbers can be negative and can be reached in any order.
Your solution has to solve any example test case under a minute on my computer (I will only test close cases. I have a below-average PC.).

Input

Joe's lucky numbers as a list of integers in a common form of your language.

Output

The number of minimum actions needed as a single integer.
Output could be printed to stdout or returned as an integer.

Examples
Input => Output (Example reputation states)
1                     => 0  (1)
3 2 1                 => 2  (1 -> 3 -> 2)
2 10 50               => 7  (1 -> 3 -> 2 -> 12 -> 10 -> 25 -> 40 -> 50)
10 11 15              => 3  (1 -> 11 -> 10 -> 15)
42 -5                 => 7  (1 -> -1 -> -3 -> -5 -> 10 -> 25 -> 40 -> 42)
-10                   => 6  (1 -> -1 -> -3 -> -5 -> -7 -> -9 -> -10)
15 -65                => 39
7 2015 25 99          => 142
-99 576 42 1111 12345 => 885

This is code-golf so the shortest entry wins.

C# - 501 Bytes
Update 551 -> 501 Bytes
namespace System.Linq{class A {static void Main(){var i = c(new int[]{10,11,15});Console.WriteLine(i);Console.ReadLine();}private static int c(int[] a){var o=a.OrderBy(x => x).ToArray();int d=1,count=0;for(var i=0;i<a.Length;i++){if(o[i]==d)i++;int c=o[i],b=o.Length>=i+2?o[i+1]-o[i]:3;if(b<=2){i++;c=o[i];}while(d!=c){if(d>c){var e=d-c;if(e>1)d-=2;else d-=1;}else if(c>d){var e=c-d+2;if(e>14)d+=15;else if(e>9)d+=10;else if(e>4)d+=5;else if(e>2)d+=2;}count++;}if(b<=2){d-=b;count++;}}return count;}}}

Ungolfed code
namespace System.Linq {
    class Program {
        static void Main(){
            var i = CalculateNumbers(new int[]{10,11,15});
            Console.WriteLine(i);
            Console.ReadLine();
        }
        private static int CalculateNumbers(int[] numbers){
            var ordered = numbers.OrderBy(x => x).ToArray();
            int cur = 1, count = 0;
            for (var i = 0; i < numbers.Length; i++){
                if (ordered[i] == cur) i++;
                int val = ordered[i], next = ordered.Length >= i+2 ? ordered[i + 1] - ordered[i] : 3;
                if (next <= 2){
                    i++;
                    val = ordered[i];
                }
                while (cur != val){
                    if (cur > val){
                        var dif = cur - val;
                        if (dif > 1)
                            cur -= 2;
                        else
                            cur -= 1;
                    } else if (val > cur){
                        var dif = val - cur + 2;
                        if (dif > 14)
                            cur += 15;
                        else if (dif > 9)
                            cur += 10;
                        else if (dif > 4)
                            cur += 5;
                        else if (dif > 2)
                            cur += 2;
                    }
                    count++;
                }
                if (next <= 2){
                    cur -= next;
                    count++;
                }
            }
            return count;
        }
    }
}

Rust, 929 923 characters
use std::io;use std::str::FromStr;static C:&'static [i32]=&[-2,-1,2,5,10,15];fn main(){let mut z=String::new();io::stdin().read_line(&mut z).unwrap();let n=(&z.trim()[..]).split(' ').map(|e|i32::from_str(e).unwrap()).collect::<Vec<i32>>();let l=*n.iter().min().unwrap();let x=n.iter().max().unwrap()-if l>1{1}else{l};let s=g(x as usize);println!("{}",p(1,n,&s));}fn g(x:usize)->Vec<i32>{let mut s=vec![std::i32::MAX-9;x];for c in C{if *c>0&&(*c as usize)<=x{s[(*c-1)as usize]=1;}}let mut i=1us;while i<x{let mut k=i+1;for c in C{if(i as i32)+*c<0{continue;}let j=((i as i32)+*c)as usize;if j<x&&s[j]>s[i]+1{s[j]=s[i]+1;if k>j{k=j;}}}i=k;}s}fn p(r:i32,n:Vec<i32>,s:&Vec<i32>)->i32{if n.len()==1{h(r,n[0],&s)}else{(0..n.len()).map(|i|{let mut m=n.clone();let q=m.remove(i);p(q,m,&s)+h(r,q,&s)}).min().unwrap()}}fn h(a:i32,b:i32,s:&Vec<i32>)->i32{if a==b{0}else if a>b{((a-b)as f32/2f32).ceil()as i32}else{s[(b-a-1)as usize]}}

This was fun!

Commentary on the implementation
So I'm obviously not too happy with the size. But Rust is absolutely terrible at golfing anyway. The performance, however, is wonderful.
The code solves each of the test cases correctly in a near-instantaneous amount of time, so performance is obviously not an issue. For fun, here's a much more difficult test case:
1234567 123456 12345 1234 123 777777 77777 7777 777

for which the answer is 82317, which my program was able to solve on my (medium-performance) laptop in 1.66 seconds (!), even with the recursive brute-force Hamiltonian path algorithm.
Observations

First we should build a modified weighted graph, with the nodes being each "lucky" number and the weights being how many changes it takes to get from one reputation level to another. Each pair of nodes must be connected by two edges, since going up is not the same as going down in reputation value (you can get +10, for example, but not -10).
Now we need to figure out how to find the minimum amount of changes from one rep value to another.

For getting from a higher value to a lower value, it's simple: just take ceil((a - b) / 2) where a is the higher value and b is the lower value. Our only logical option is to use the -2 as much as possible, and then the -1 once if necessary.
A low to high value is a bit more complicated, since using the greatest possible value is not always optimal (ex. for 0 to 9, the optimal solution is +10 -1). However, this is a textbook dynamic programming problem, and simple DP is enough to solve it.

Once we have calculated the minimum changes from each number to every other number, we are essentially left with a slight variant of TSP (travelling salesman problem). Luckily, there are a small enough number of nodes (a maximum of 5 in the hardest test case) that brute force is sufficient for this step.

Ungolfed code (heavily commented)
use std::io;
use std::str::FromStr;

// all possible rep changes
static CHANGES: &'static [i32] = &[-2, -1, 2, 5, 10, 15];

fn main() {
    // read line of input, convert to i32 vec
    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let nums = (&input.trim()[..]).split(' ').map(|x| i32::from_str(x).unwrap())
        .collect::<Vec<i32>>();

    // we only need to generate as many additive solutions as max(nums) - min(nums)
    // but if one of our targets isn't 1, this will return a too-low value.
    // fortunately, this is easy to fix as a little hack
    let min = *nums.iter().min().unwrap();
    let count = nums.iter().max().unwrap() - if min > 1 { 1 } else { min };
    let solutions = generate_solutions(count as usize);

    // bruteforce!
    println!("{}", shortest_path(1, nums, &solutions));
}

fn generate_solutions(count: usize) -> Vec<i32> {
    let mut solutions = vec![std::i32::MAX - 9; count];

    // base cases
    for c in CHANGES {
        if *c > 0 && (*c as usize) <= count {
            solutions[(*c-1) as usize] = 1;
        }
    }

    // dynamic programming! \o/
    // ok so here's how the algorithm works.
    // we go through the array from start to finish, and update the array
    //   elements at i-2, i-1, i+2, i+5, ... if solutions[i]+1 is less than
    //   (the corresponding index to update)'s current value
    // however, note that we might also have to update a value at a lower index
    //   than i (-2 and -1)
    // in that case, we will have to go back that many spaces so we can be sure
    //   to update *everything*.
    // so for simplicity, we just set the new index to be the lowest changed
    //   value (and increment it if there were none changed).
    let mut i = 1us;  // (the minimum positive value in CHANGES) - 1 (ugly hardcoding)
    while i < count {
        let mut i2 = i+1;
        // update all rep-values reachable in 1 "change" from this rep-value,
        //   by setting them to (this value + 1), IF AND ONLY IF the current
        //   value is less optimal than the new value
        for c in CHANGES {
            if (i as i32) + *c < 0 { continue; }  // negative index = bad
            let idx = ((i as i32) + *c) as usize;  // the index to update
            if idx < count && solutions[idx] > solutions[i]+1 {
                // it's a better solution! :D
                solutions[idx] = solutions[i]+1;
                // if the index from which we'll start updating next is too low,
                //   we need to make sure the thing we just updated is going to,
                //   in turn, update other things from itself (tl;dr: DP)
                if i2 > idx { i2 = idx; }
            }
        }
        i = i2;  // update index (note that i2 is i+1 by default)
    }

    solutions
}

fn shortest_path(rep: i32, nums: Vec<i32>, solutions: &Vec<i32>) -> i32 {
    // mercifully, all the test cases are small enough so as to not require
    //   a full-blown optimized traveling salesman implementation
    // recursive brute force ftw! \o/
    if nums.len() == 1 { count_changes(rep, nums[0], &solutions) }  // base case
    else {
        // try going from 'rep' to each item in 'nums'
        (0..nums.len()).map(|i| {
            // grab the new rep value out of the vec...
            let mut nums2 = nums.clone();
            let new_rep = nums2.remove(i);
            // and map it to the shortest path if we use that value as our next target
            shortest_path(new_rep, nums2, &solutions) + count_changes(rep, new_rep, &solutions)
        }).min().unwrap()  // return the minimum-length path
    }
}

fn count_changes(start: i32, finish: i32, solutions: &Vec<i32>) -> i32 {
    // count the number of changes required to get from 'start' rep to 'finish' rep
    // obvious:
    if start == finish { 0 }
    // fairly intuitive (2f32 is just 2.0):
    else if start > finish { ((start - finish) as f32 / 2f32).ceil() as i32 }
    // use the pregenerated lookup table for these:
    else /* if finish > start */ { solutions[(finish - start - 1) as usize] }
}

Awesome answer! I'm interested in Rust and the explanation is actually very helpful for learning. And just as a heads up, you can get syntax highlighting with <!-- language-all: lang-rust -->. ;)

I'm working on a solution, and saw that the minimal amount of changes on the low to high weight can easily be calculated in O(1) by using a very small lookup-table, like in this C-like pseudo-code floor((a-b)/15)+{0,2,1,2,2,1,3,2,2,2,1,3,2,2,2}[(a-b)%15]. Your solution could probably benefit from this.

C++ - 863 bytes, ungolfed
This runs fairly fast, in the same ballpark as the solution written in Rust (about 6 times as fast when compiling with optimisation turned on). I will golf this later this evening (evening in Sweden, that is).
#include <iostream>
#include <vector>
#include <string>
#include <sstream>

const int lookup[] = {0, 2, 1, 2, 2, 1, 3, 2, 2, 2, 1, 3, 2, 2, 2};

int distance(int start, int end) {
    return start > end
        ? (start - end + 1) / 2
        : (end - start) / 15 + lookup[(end - start) % 15];
}

int walk(int current, std::vector<int> points) {
    int min = 0;

    if (points.size() == 0) return 0;

    for (int i = 0; i < points.size(); i++) {
        std::vector<int> new_points = points;
        new_points.erase(new_points.begin() + i);

        int d = distance(current, points[i]) + walk(points[i], new_points);

        min = min && min < d ? min : d;
    }

    return min;
}

int main() {
    std::vector<int> points;

    std::string line;
    std::getline(std::cin, line);

    std::stringstream ss(line);
    int i;

    while (ss >> i)
        points.push_back(i);

    std::cout << walk(1, points) << std::endl;

    return 0;
}


text:
The Gray area of n-ary codes
Write a program or function that takes a base n and a number x, and returns or outputs the n-ary Gray code of x.
Rules

n is an integer in the range 2 <= n <= 16.
x is an integer in the range 0 <= n < 2**32.
The inputted numbers can either be two integer arguments if you write a function, or two arguments to ARGV or a space separated pair to STDIN if you write a program.
The output should be a string, either returned or printed to STDOUT.
If n is 10 or more, use hex digits to represent digits with a value greater than 9. The case of the digits does not matter.
If the n-ary Gray code of x is zero, '0' must be printed or returned.
Code length is in bytes, and standard loopholes are not permitted.
You do not need to use the same algorithm as below, but if you use a different one, make sure it produces valid Gray codes.

Example
Example code adapted from Wikipedia:
>>> import string
>>>
>>> def nary_gray_code(base, num):
...     base_num = []
...     # Convert to num to base base
...     while num:
...         base_num.append(num % base)
...         num = num // base
...     # Convert base base number to base-ary Gray code
...     shift = 0
...     gray = []
...     for b in reversed(base_num):
...         gray.insert(0, (b + shift) % base)
...         shift += base - gray[0]
...     return "".join(string.hexdigits[i] for i in reversed(gray)) or "0"
...
>>> nary_gray_code(2, 100)
'1010110'
>>> nary_gray_code(2, 1)
'1'
>>> nary_gray_code(2, 0)
'0'
>>> nary_gray_code(10, 23)
'21'
>>> nary_gray_code(10, 100)
'190'
>>> nary_gray_code(3, 26)
'200'
>>> nary_gray_code(3, 27)
'1200'
>>> for i in range(2, 17):
...     print(i, nary_gray_code(i, 2**32 - 1))
...
2 10000000000000000000000000000000
3 122102120011102000122
4 3000000000000000
5 34020102231331
6 1401154214013
7 260241350125
8 34000000000
9 11762782617
10 4875571576
11 1824007509
12 92b627446
13 5b25a2c00
14 2ac96ab2b
15 197dde1a7
16 f0000000
>>>

Keep in mind that there are many different gray codes, so you can't test through equality with some test set.

Pyth, 20 bytes
Msme.H%dGu+G-HsGjHGY

This defines a function g which takes two integers as parameters. Take a look at this online demonstration: Pyth Compiler/Executor.
Explanation:
Msme.H%dGu+G-HsGjHGY
M                     def g(G, H): return _
                jHG      convert H to base G
         u      jHGY     reduce(lambda G, H: _, jHG, [])
          +G-HsG            G + [H - sum(G)]
  m                      map each number d to:
   e.H%dG                   hex-representation(d % G)[-1]
 s                       sum (join all digits)

This code is a little bit confusing. There are 4 function parameters in this code: two of them are called G and two of them are called H. The G in +G-HsG is different from the G in jHG or %dG.

I don't think the problem description allows newline as a separator.

@isaacg Your right. Changed it into a function, still 20 bytes.

source: Stack Exchange

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

sort: votes


text:
Getting a Highscore in Kuku Kube
First of all, this is more a challenge, than a serious programming question, I would like to share.
Some of you might know the game Kuku kube, where you have to identify a square in a grid, which has a different colour than the others and click it.
You can find it under http://kuku-kube.com/ .
As this seems to be an ideal exercise for our image processing students, I want to see, which way is the best to get the highest score.
My code so far:
from pymouse import PyMouse
import time
b=time.time()
m=PyMouse()
start=(2912,895)
tl=(2695,387)
br=(3129,814)
def click():
    m.click(start[0],start[1])
    time.sleep(0.1)
    while time.time()-b<60:
        for i in range(0,9):
            for l in range(0,9):
                m.click(2696+i*53.625,390+l*53.125)
                time.sleep(0.004)

click()

gets me to about 370-ish. Is it possible to get more? Use image processing?
High-score wins!

Since you've accepted an answer which, on the basis of the question alone, I would expect you to consider not to be a valid answer, I think you need to clarify what is and isn't acceptable.

I'm voting to close this question as off-topic because it's not a programming puzzle, but a program optimization challenge.

Javascript (Cheating), Score = limitless?
I realized that the game timer was using setInterval, which is a very unreliable way of keeping time.  With that in mind, since js is single threaded, if we simply hog the thread, the timer can't update.  As a result, you can essentially get any score you want.  If you perform 1000 clicks in a single function call without releasing the thread, you guarantee a score of at least 60000 (in fact I did this and got 180000).  This is obviously cheating because the game lasts longer than 60 seconds, though the game doesn't realize it.  For this reason, any js solution at all is really sort of cheating.  Though the time increase is minimal for code that completes quickly, you can still potentially delay the timer for as long as your code runs.
var factor = 1000;

function findAndClick() {
  var array = document.getElementById("box").children;

  for(var j = 0; j < factor; j++){
      var one = array[0].style.cssText;
      var two = array[1].style.cssText;

      var color;
      if(one != two){
        color = array[2].style.cssText;
      } else {
        color = one;
      }

      for (var i=0; i < array.length; i++) {
        if (array[i].style.cssText != color) {
          array[i].click();
          break;
        }
      }
    }
}
$(".play-btn").click();
setInterval(findAndClick, 0);

Javascript (REALLY Cheating), Score = limitless?
The game's object is actually global.  As a result, you can tweak various properties to your advantage.  The easiest of which is to just set your score to whatever you want it to be:
$(".play-btn").click();
Game.lv = 1000000;

I really like this way of thinking.

Javascript, Score ≈ 10700 14400 (Chrome)
On the home page, open your developer console (F12), copy/paste the following code and wait 60 seconds.
jQuery slow down the execution, so I used the fantastic Vanilla-JS
function findAndClick() {
  var array = document.getElementById("box").children;
  var last = "";
  for (var i=0; i < array.length; i++) {
    if (array[i].style.cssText != last) {
      array[i].click();
      last = array[i].style.cssText;
    }
  }
}
$(".play-btn").click();
setInterval(findAndClick, 0);

On my setup (ubuntu, firefox) that gives me ~2170. But nevertheless, pretty cool :)

I have also tried on Firefox, it is pretty bad on Windows too.

Firefox gives me around 4300, but Chrome reached 10701 on first try.

Just got 15977 with the new version.

Be careful when running this code to refresh the screen before executing the code again.  Otherwise the original code is still running plus the new one.  You will increasingly get better scores the more times you run the code (without refreshing) because it's delaying the game's timer.

Javascript/JQuery: 4489
I went the same route as Mig, but I think his is more efficient than mine, as my javascript skills are quite limited.
clickBox = function() {
    a = jQuery("#box span");
    if (!a.is(":visible")) {
        clearInterval(clickBox);
        return;
    };
    var colors = {};
    a.each(function(i, o) {
        var style = jQuery(this).attr("style");
        colors[style] = 1 + (colors[style] || 0)
    });
    a.each(function() {
        if (colors[jQuery(this).attr("style")] == 1) {
            jQuery(this).click()
        }
    });
};
setInterval(clickBox, 0);

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


text:
Write two single line functions to encode and decode base64
Write two functions of one line each that can encode and decode base64.

Use any language you want, but if the language can naturally be converted to a single line (e.g. javascript) then any block of code separated by an end-of-line character is counted as a line.
The functions must be self-contained. They cannot reference outside variables or imported libraries, with the exception of a single input argument.
Expanding on the previous point, you cannot define constants or variables for use inside the function. For instance, if your function references alphabet as the collection of base64 symbols, replace every instance of alphabet with a literal of the same value.
The functions must be one line each, not counting the function definition itself. For example, in languages like Visual Basic, functions are a minimum of three lines due to the beginning and end lines being a required part of the function definition. This is acceptable as long as the code that does the base64 conversion is only one line.
Do not use built in functions such as javascript's atob or btoa.

Here's my functions written in python. I can't find a way to make these smaller.
def tobase64(m):
    return ''.join(['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[int(z[::-1].zfill(6)[::-1],2)] for z in [''.join([bin(ord(x))[2:].zfill(8)for x in m])[y:y+6] for y in range(0,len(m)*8,6)]])+''.join(['=' for x in range(-len(m)%3)])

and the decoder
def fromb64(m):
    return ''.join([chr(int(w,2)) for w in [(''.join([''.join([bin('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.index(x))[2:].zfill(6) for x in m if x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'])[y:y+8] for y in range(0,len(''.join([bin('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.index(x))[2:].zfill(6) for x in m if x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'])),8)])+'a')[:-(len(m)-len(m.replace('=','')))*2-1][z:z+8] for z in range(0,len(''.join([bin('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.index(x))[2:].zfill(6) for x in m if x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'])),8)] if len(w) == 8])

JavaScript, for one, has built-in functions that do exactly that, atob and btoa. You may want to disallow builtin functions that do this task.

@NinjaBearMonkey Edited the post. Thanks!

Also, which base64 variant?

Python 2, 437 characters
As a first improvement to your Python solution, you can cut down on the references to the long string of characters 'abc...ABC...0123456789+/':
def fromb64(m):
    return (lambda A:''.join([chr(int(w,2)) for w in [(''.join([''.join([bin(A.index(x))[2:].zfill(6) for x in m if x in A])[y:y+8] for y in range(0,len(''.join([bin(A.index(x))[2:].zfill(6) for x in m if x in A])),8)])+'a')[:-(len(m)-len(m.replace('=','')))*2-1][z:z+8] for z in range(0,len(''.join([bin(A.index(x))[2:].zfill(6) for x in m if x in A])),8)] if len(w)==8]))('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')

This is just (lambda A: {{what you did, but with that string replaced by A}})(that string).

Very clever! I didn't think to use lambda functions.


text:
Produce different behaviour in all versions of your language
Write a program that:

if a compiled language is used, compiles without errors
if an interpreted language is used, runs without syntax errors

for every major release of your language, and produces different output for every major release under which it is compiled/run. (It may produce the same or different output for versions within the same major release, as long as it varies among major releases.) You may not output or use any part of the language version in your program.
A "major release" of a language is defined to be a publicly available release that added to the major version number. For example, C# has had 6 major releases, C has had 3 (K&R is not a numbered version and does not contribute to the count), and Ruby has also had 3 (due to version 0.95). What number constitutes the major version number can change over time (Java has had 8 major releases).
Any language used in this challenge must have:

At least three major releases, and
A dedicated Wikipedia article.

%put &sysver; That will be valid and produce different output in every major release of SAS. Might want to disallow version printing.

If css counts as a language, it will be so trivial.. (but probably not easy to test)

@user23013: As far as I know, CSS doesn't count as a language for the purposes of this site.

@user23013 CSS is not a programming language: http://meta.codegolf.stackexchange.com/questions/2028/what-are-programming-languages/2073#2073

Two questions: 1) Does "major release" have to be the earliest version that added to the major version number? For example, for Python 2 does it have to be Python 2.0.0, Python 2.0.1 (earliest on the releases page) or is something like Python 2.2.0 or 2.7.8 fine? 2) What happens if we can't get hold of very old interpreters/compilers or they don't work on our computers?

@Sp3000 It can be any subversion within the major release, and even vary within a major release, as long as it is different among different major releases. As for old versions, I guess you'll have to choose a different language, then.

The J language does not support or distribute versions older than J5, and even if you tried you would be extremely hard-pressed to find anything more than documentation for J4, and nothing for anything older. Further, J8 was a major release, but nothing in the engine changed, only in the IDE and window libraries. Which major releases of J (1 <= n <= 8) must be supported?

This question is basically a less well specified generalisation of this one.

The "for all major release" part makes the challenge harder for languages with many major versions. It also increases the work needed to set up the environment for testing.

How about PHP? There's no way to test PHP1-3... And it had so many versions.........

The popularity contest tag means that you should accept the most popular answer, i.e., the one with the highest vote tally.

Python
if 2 + 2 is 4:
    # Lies must be abolished

    try:
        fact = '2 + 2 = %r' % 5
        exec('True = False')
        exec('assert (2 + 2 == 5) is True')
    except ValueError:
        print('War is peace.')
    except NameError:
        print('Freedom is slavery.')
    except SyntaxError:
        print('Ignorance is strength.')

else:
    # All is good
    print('Big Brother is watching you.')

(Edit: Had to make a change because string formatting was actually introduced in... 0.9.9)
Tested on the following versions:

0.9.1: Prints Big Brother is watching you. because 2 + 2 is 5.*
1.5: Prints War is peace. since %r string formatting is unavailable, raising a ValueError,
2.1: Prints Freedom is slavery. since True is not defined, raising a NameError,
3.4: Prints Ignorance is strength. since True cannot be assigned to, raising a SyntaxError.

As a bonus, Python 2.3 to 2.7 gives no output, since the assertion passes.
Note that there are four spaces on both "blank" lines, and the file also needs to have a trailing newline.
* is checks object equality, and only from 1.0.0 onwards were small integers shared. You can still see the effect today by trying larger numbers, e.g. 999 + 1 is 1000 gives False.

"Lies must be abolished"... Why can't all program comments be like that?

@ASCIIThenANSI: Take a look at Vigil. Automatic lie abolisher.

Python
Typical sunday afternoon in a house of three brothers.
try:    # The night before the exam.
        assert(2/5 < 3/5) # Math is hard!
        print("Be quiet!")
except: # Options: 1. Play. 2. Do nothing.
        try: print(__import__("this").s)
        except: "Too afraid to snap back."

Output
$ # Older brother:
$ python3.4 123.py
Be quiet!
$
$ # Much younger brother:
$ ./python1 123.py
$
$ # Slightly younger brother:
$ python2.7 123.py
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Gur Mra bs Clguba, ol Gvz Crgref

Ornhgvshy vf orggre guna htyl.
Rkcyvpvg vf orggre guna vzcyvpvg.
Fvzcyr vf orggre guna pbzcyrk.
Pbzcyrk vf orggre guna pbzcyvpngrq.
Syng vf orggre guna arfgrq.
Fcnefr vf orggre guna qrafr.
Ernqnovyvgl pbhagf.
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.
Nygubhtu cenpgvpnyvgl orngf chevgl.
Reebef fubhyq arire cnff fvyragyl.
Hayrff rkcyvpvgyl fvyraprq.
Va gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.
Gurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.
Nygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh'er Qhgpu.
Abj vf orggre guna arire.
Nygubhtu arire vf bsgra orggre guna *evtug* abj.
Vs gur vzcyrzragngvba vf uneq gb rkcynva, vg'f n onq vqrn.
Vs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.
Anzrfcnprf ner bar ubaxvat terng vqrn -- yrg'f qb zber bs gubfr!

How it works
try:
        assert(2/5 < 3/5)

        # In Python 3, '2/5' and '3/5' are floats.
        # In lower versions, they're ints and the assertion fails.

        print("Be quiet!")

        # Python 3 prints this and exits.
        # Lower versions already caught an exception.
except:
        try: print(__import__("this").s)

        # Try importing 'this' (an easter egg which prints the Zen of
        # Python) and printing 'this.s' (same old Zen with ROT13 obfuscation).
        # The easter egg doesn't exist in Python 1 and an exception is raised.

        except: "Too afraid to snap back."

        # Bare string. Would be printed in REPL; does nothing in a program.

This C++03 C++11 and C++14 program prints old, medium or new: (C++03 is a set of technical corrections to C++98: compilers consider the two to be synonymous)
#define M(x, ...) __VA_ARGS__

int a[] = { M(1'2, 3'4, 5, 0) };
const char *b[]={ 0, "is", "the", "best", "always", "new" };
struct foo { ~foo() { throw std::string("old"); } };

void done() {
    std::cout << "medium" << std::endl;
    std::exit(0);
}
int main() {
  if (b[a[1]]) {
    std::cout << b[a[1]] << std::endl;
  } else {
    std::set_terminate(done);
    try { foo test; }
    catch( std::string c) {
      std::cout << c.c_str() << std::endl;
    }
  }
}

live example
There are a few ways to do this; I figured out ways that current versions of clang and gcc support when you tell it to compile in a particular version mode.
It relies on a few things.
To distinguish C++14 from C++11/C++03, it uses ' as an internal delimiter in integer constants.  Then I discard a leading token, which either contains a , or not depending on the C++ version.  The 2nd element of the array is now either 0 or 5.  I use this to look up in another array -- entry 0 is null, and entry 5 is "new".  If it is non-null, I print it and am finished (for C++14).
To distinguish C++03 from C++11, it throws from a destructor.  In C++11, all destructors are implicitly noexcept, which calls the std::set_terminate handler.
I install a terminate handler that prints out "medium" (for C++11), and in the catch block I print "old" (for C++03).
Breaking changes stolen from here for C++11 and here for C++14.

Invalid not because it relies on version numbers, but because it doesn't include C++98.

@emb C++03 was a bunch of bug fixes on C++98, not a major revision (according to the original language author, and me).  The standard library was extended if I recall correctly, so I guess I could do overload resolution based checking, if ya really want it.

@emb more evidence: https://gcc.gnu.org/onlinedocs/gcc/Standards.html gcc uses the same settings for -std=c++98 as c++03, and ditto for http://clang.llvm.org/cxx_status.html clang.  Both consider C++03 to be a technical correction to C++98.  While wikipedia claims there where library changes, none seem in evidence at this point.

C
Golfed, for the hell of it.
O;main(o){o=((O='\o'),O);}

It does nothing.

Fortunately.
I didn't find anything relevant, so this is just about playing with undefined behaviors again.

C89

§3.1.3.4 7 — Character constants
In addition, certain nongraphic characters are representable by escape sequences consisting of the backslash \ followed by a lower-case letter: \a , \b , \f , \n , \r , \t , and \v . If any other escape sequence is encountered, the behavior is undefined.

Yup. '\o' implies an undefined behavior in C89, while it is only implemention-defined in C99 and C11 (it gives me 'o').

C99
This is where it gets tricky.

§6.5.16 4 — Assignment operators
(...) If an attempt is made to modify the result of an assignment operator or to access it after the next sequence point, the behavior is undefined.

This is a weird wording specific to C99.
A sequence point is needed after (O='\o'): , do the trick.
Since it is necessary to access the result (i.e. "to read or modify the value of an object" as defined by the standard, whose identifier is O) to store it in o, the behavior is undefined.

C11
All of that does not apply in C11.
It should work fine while compiling in C11.
Nobody uses C11.

@ColeJohnson I believe the downvote was for a previous revision. Having said that though, I think the code needs to actually output something, as per the question... (interesting finds though)

@Sp3000 Find a compiler filling those undefined behaviors with pretty outputs. Having said that, #include <stdio.h> main(o){gets(o);} produces different warnings with gcc or clang.

authors: n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳


text:
Meta quine checker
This challenge, if you accept it, is to write three functions or programs A, B, and C:

A is a quine that outputs all of A,B and C (which is also the whole content of the code in your submission).
B takes a parameter F and checks whether it is such a quine (outputting FBC), or doing something different.
C takes a parameter G and checks whether G possibly works like B (checking whether F outputs FGC). It is impossible to decide whether a function is a quine checker, so let's do something simpler:

It must return truthy if G is valid for B.
It must return falsey if G returns falsey for all valid quines, or G returns truthy for all valid non-quines.
It can return anything, crash or not terminate, etc, if it is any of the other cases.

Note that B is possible. A and F doesn't have any input, so you can just run them and check the result.
Rules

There should be some way to tell which parts are A, B and C from the output of A. For example: each has one line, or they are recognized as three functions in the interpreter.
Each function should run with only the definition of itself, not your complete code.
You can use a function/program or its source code, or a pair of both as the input of B (or G) and C.
You can redefine truthy/falsey to a subset of those values. You can also consistently require F returning some type you choose, like a single string.
You can require A, B, F and G, if they are called with valid parameters, consistently don't have some types of other inputs or side effects you choose, such as accessing global variables, or reading stdin, etc.
You can also assume F and G, if they are called with valid parameters, always terminate.
F should work in the same condition as A. So it cannot depend on B or C or another variable's existence, unless that variable is defined in its own part in its output.
No functions or programs can read its own source code.
This is code-golf, shortest code (which is the output of A) in bytes wins.

B is still impossible in general because F might not terminate, as well as in practice in many languages because it requires combinations of abilities like temporary redirection of stdout and either function-to-string or exec. The best you can hope for is probably a half-working solution in a LISP.

How would you check G with all quines and non-quines? I'm currently working on a Mathematica solution.

@PeterTaylor "You can also assume F and G, if they are called with valid parameters, always terminate." And "output" can mean return, not necessarily print to stdout.

@LegionMammal978 It is impossible to check all quines and non-quines. But the task of C is something simpler, where you only need to check one quine and one non-quine.

@PeterTaylor Though not required, temporary redirection is possible in PHP, bash, and you can temporarily modify the console.log function in JavaScript and you can assume F never know.

For languages without built in eval, can F and G be ordered pairs of source and a function.

@PyRulez  I think this is in the spirit of this challenge, so I'm going to allow it. But the function cannot access its own source code.

CJam, 254 bytes
An example answer, not golfed.
{{['{\"_~}{{[1$'{@\"_~}"{{["_~}"2$+'{@"_~}"]s`"{{['{\\"\+"]s}_~}"+~1$~{L}@~!&}_~}_``1>W<"\"]s\~=}_~}"@]s}_~}{{[1$'{@"_~}{{[\"_~}\"2$+'{@\"_~}\"]s`\"{{['{\\\\\"\+\"]s}_~}\"+~1$~{L}@~!&}_~}"]s\~=}_~}{{["_~}"2$+'{@"_~}"]s`"{{['{\\"\+"]s}_~}"+~1$~{L}@~!&}_~}

The 3 functions are:
{{['{\"_~}{{[1$'{@\"_~}"{{["_~}"2$+'{@"_~}"]s`"{{['{\\"\+"]s}_~}"+~1$~{L}@~!&}_~}_``1>W<"\"]s\~=}_~}"@]s}_~}

{{[1$'{@"_~}{{[\"_~}\"2$+'{@\"_~}\"]s`\"{{['{\\\\\"\+\"]s}_~}\"+~1$~{L}@~!&}_~}"]s\~=}_~}

{{["_~}"2$+'{@"_~}"]s`"{{['{\\"\+"]s}_~}"+~1$~{L}@~!&}_~}

A and F take no parameters and return a string. B, G and C take a CJam block as parameter and return 1 for truthy, or 0 for falsey.


text:
Hodorize a String
Hodor is a slow-minded but endearing character on the show Game of Thrones (he's in the books as well of course). The only word he ever says is 'hodor'.
Surprisingly, despite not having much of a vocabulary, Hodor always speaks in complete sentences with correct capitalization and punctuation, and does in fact convey meaning.
Hodor is capable of expressing all 128 ASCII characters, though it takes him an entire sentence to say each one. Each character has a single, exact representation as a sentence. An ASCII string is Hodorized by translating all the characters in the string to their Hodor sentence equivalents, then joining all the sentences. Since all characters map to exact sentences, all ASCII strings have a single, unique Hodorized representation.
Hodorizing Characters
Hodor divides his 128 expressible characters into 4 sets of 32 by using 4 different types of punctuation for the sentences that represent characters.
The sentence ends with...

. if the ASCII character code mod 4 is 0.
.[newline][newline] (for a new paragraph) if the code mod 4 is 1.
? if the code mod 4 is 2.
! if the code mod 4 is 3.

For example, the ASCII character code for b is 98, and 98 mod 4 is 2, so Hodor's sentence for b is sure to end in ?.
The content of the sentence is one of 32 distinct strings only containing the word 'hodor'. Each of the 32 characters of a particular punctuation type map to a different sentence content string. So with 32 sentence content strings and 4 punctuation types, all 128 ASCII character can be represented as distinct Hodor sentences.
To determine the sentence content for a character with ASCII code C, compute (floor(C / 4) + 16) mod 32; everything after the colon on that line in this list is the sentence content:
0:Hodor
1:HODOR
2:Hodor hodor
3:Hodor, hodor
4:Hodor hodor hodor
5:Hodor, hodor hodor
6:Hodor hodor hodor hodor
7:Hodor hodor, hodor hodor
8:Hodor hodor hodor hodor hodor
9:Hodor hodor, hodor hodor hodor
10:Hodor hodor hodor hodor hodor hodor
11:Hodor hodor hodor, hodor hodor hodor
12:Hodor hodor hodor hodor hodor hodor hodor
13:Hodor hodor hodor, hodor hodor hodor hodor
14:Hodor hodor hodor hodor hodor hodor hodor hodor
15:Hodor hodor hodor hodor, hodor hodor hodor hodor
16:Hodor hodor hodor hodor hodor hodor hodor hodor hodor
17:Hodor hodor hodor hodor, hodor hodor hodor hodor hodor
18:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
19:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor
20:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
21:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor
22:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
23:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor
24:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
25:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor
26:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
27:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor
28:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
29:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor
30:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor
31:Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor

It can be seen that, apart from the HODOR special case, these strings are generated by joining more and more hodor's, and every other string has a comma halfway between all the words (with the "larger half" right of the comma for an odd number of words).
Joining sentence content with punctuation, we can form the Hodor sentences for all 128 characters (the number on the left is the character code):
0:Hodor hodor hodor hodor hodor hodor hodor hodor hodor.
1:Hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
2:Hodor hodor hodor hodor hodor hodor hodor hodor hodor?
3:Hodor hodor hodor hodor hodor hodor hodor hodor hodor!
4:Hodor hodor hodor hodor, hodor hodor hodor hodor hodor.
5:Hodor hodor hodor hodor, hodor hodor hodor hodor hodor.[newline][newline]
6:Hodor hodor hodor hodor, hodor hodor hodor hodor hodor?
7:Hodor hodor hodor hodor, hodor hodor hodor hodor hodor!
8:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
9:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
10:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
11:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
12:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor.
13:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor.[newline][newline]
14:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor?
15:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor!
16:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
17:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
18:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
19:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
20:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor.
21:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor.[newline][newline]
22:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor?
23:Hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor!
24:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
25:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
26:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
27:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
28:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor.
29:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor.[newline][newline]
30:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor?
31:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor!
32:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
33:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
34:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
35:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
36:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor.
37:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
38:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor?
39:Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor!
40:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
41:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
42:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
43:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
44:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor.
45:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
46:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor?
47:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor!
48:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
49:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
50:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
51:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
52:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor.
53:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
54:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor?
55:Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor!
56:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.
57:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
58:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor?
59:Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor!
60:Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor.
61:Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
62:Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor?
63:Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor!
64:Hodor.
65:Hodor.[newline][newline]
66:Hodor?
67:Hodor!
68:HODOR.
69:HODOR.[newline][newline]
70:HODOR?
71:HODOR!
72:Hodor hodor.
73:Hodor hodor.[newline][newline]
74:Hodor hodor?
75:Hodor hodor!
76:Hodor, hodor.
77:Hodor, hodor.[newline][newline]
78:Hodor, hodor?
79:Hodor, hodor!
80:Hodor hodor hodor.
81:Hodor hodor hodor.[newline][newline]
82:Hodor hodor hodor?
83:Hodor hodor hodor!
84:Hodor, hodor hodor.
85:Hodor, hodor hodor.[newline][newline]
86:Hodor, hodor hodor?
87:Hodor, hodor hodor!
88:Hodor hodor hodor hodor.
89:Hodor hodor hodor hodor.[newline][newline]
90:Hodor hodor hodor hodor?
91:Hodor hodor hodor hodor!
92:Hodor hodor, hodor hodor.
93:Hodor hodor, hodor hodor.[newline][newline]
94:Hodor hodor, hodor hodor?
95:Hodor hodor, hodor hodor!
96:Hodor hodor hodor hodor hodor.
97:Hodor hodor hodor hodor hodor.[newline][newline]
98:Hodor hodor hodor hodor hodor?
99:Hodor hodor hodor hodor hodor!
100:Hodor hodor, hodor hodor hodor.
101:Hodor hodor, hodor hodor hodor.[newline][newline]
102:Hodor hodor, hodor hodor hodor?
103:Hodor hodor, hodor hodor hodor!
104:Hodor hodor hodor hodor hodor hodor.
105:Hodor hodor hodor hodor hodor hodor.[newline][newline]
106:Hodor hodor hodor hodor hodor hodor?
107:Hodor hodor hodor hodor hodor hodor!
108:Hodor hodor hodor, hodor hodor hodor.
109:Hodor hodor hodor, hodor hodor hodor.[newline][newline]
110:Hodor hodor hodor, hodor hodor hodor?
111:Hodor hodor hodor, hodor hodor hodor!
112:Hodor hodor hodor hodor hodor hodor hodor.
113:Hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
114:Hodor hodor hodor hodor hodor hodor hodor?
115:Hodor hodor hodor hodor hodor hodor hodor!
116:Hodor hodor hodor, hodor hodor hodor hodor.
117:Hodor hodor hodor, hodor hodor hodor hodor.[newline][newline]
118:Hodor hodor hodor, hodor hodor hodor hodor?
119:Hodor hodor hodor, hodor hodor hodor hodor!
120:Hodor hodor hodor hodor hodor hodor hodor hodor.
121:Hodor hodor hodor hodor hodor hodor hodor hodor.[newline][newline]
122:Hodor hodor hodor hodor hodor hodor hodor hodor?
123:Hodor hodor hodor hodor hodor hodor hodor hodor!
124:Hodor hodor hodor hodor, hodor hodor hodor hodor.
125:Hodor hodor hodor hodor, hodor hodor hodor hodor.[newline][newline]
126:Hodor hodor hodor hodor, hodor hodor hodor hodor?
127:Hodor hodor hodor hodor, hodor hodor hodor hodor!

([newline]'s are to be replaced with actual newlines.)
Hodorizing Strings
Hodorizing a string really just involves concatenating all the character sentences of the string's characters together. There are only a couple caveats:

A space is inserted after every sentence except for the .[newline][newline] punctuated ones and the very last sentence.
If the last sentence is punctuated with .[newline][newline], the punctuation becomes ... so there is no trailing whitespace.

Examples
The string F0 is Hodorized as
HODOR? Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor.

F has ASCII code 70. 70 mod 4 is 2, so the first sentence ends in ?. (floor(70 / 4) + 16) mod 32 is 1 so the content is HODOR.
0 has ASCII code 48. 48 mod 4 is 0, so the second sentence ends in .. (floor(48 / 4) + 16) mod 32 is 28 so the content is 15 hodor's strung together with no comma.
Notice that there is no trailing space.

The string CEE is Hodorized as
Hodor! HODOR.

HODOR...

Notice that there is no space before the last sentence.
Notice that the the last sentence punctuation was changed to ....

The string
Hodor's real name is Walder.
Did you know?

is Hodorized as
Hodor hodor. Hodor hodor hodor, hodor hodor hodor! Hodor hodor, hodor hodor hodor. Hodor hodor hodor, hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor? Hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor? Hodor hodor, hodor hodor hodor.

Hodor hodor hodor hodor hodor.

Hodor hodor hodor, hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor, hodor hodor hodor? Hodor hodor hodor hodor hodor.

Hodor hodor hodor, hodor hodor hodor.

Hodor hodor, hodor hodor hodor.

Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor.

Hodor hodor hodor hodor hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor, hodor hodor! Hodor hodor hodor hodor hodor.

Hodor hodor hodor, hodor hodor hodor. Hodor hodor, hodor hodor hodor. Hodor hodor, hodor hodor hodor.

Hodor hodor hodor hodor hodor hodor hodor? Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor? Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor? HODOR. Hodor hodor hodor hodor hodor hodor.

Hodor hodor, hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor hodor.

Hodor hodor hodor, hodor hodor hodor! Hodor hodor hodor, hodor hodor hodor hodor.

Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor! Hodor hodor hodor, hodor hodor hodor? Hodor hodor hodor, hodor hodor hodor! Hodor hodor hodor, hodor hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor!

(assuming the newline is a single \n)
Challenge
Write a program or function that takes in an ASCII string and Hodorizes it, printing or returning the resulting string. Take input in any standard way (from text file, command line, stdin, function arg).
The solution with the fewest bytes wins. Tiebreaker is earlier post. (Handy byte counter.)

This challenge makes me want to re-watch seasons 1-4 and discover what he's really saying. :D

Great, we found the next version of Ook.

Hodor hodor. Hodor hodor hodor, hodor hodor hodor! Hodor hodor, hodor hodor hodor. Hodor hodor hodor, hodor hodor hodor! Hodor hodor hodor hodor hodor hodor hodor? Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor...

@AdamDavis Hodorception!

I would answer this question with HODOR but I think I may crash SE.

Hodor! Hodor hodor? Hodor hodor hodor hodor hodor.
Hodor hodor hodor, hodor hodor hodor.
Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor hodor hodor, hodor hodor hodor hodor hodor hodor hodor hodor.
Hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor hodor. Hodor hodor hodor hodor hodor? Hodor hodor hodor hodor hodor hodor hodor hodor.
Hodor hodor hodor, hodor hodor hodor hodor. Hodor hodor, hodor hodor hodor.
Hodor hodor hodor hodor hodor hodor hodor!
That's just the language and size header!? Nevermind then, let's just encode the post in boring old ASCII. Sorry if you have trouble understanding the post, Hodor.

CJam, 85 bytes
Here's my attempt. Some parts of this code felt rather clunky when I wrote them, so there's likely potential to beat this!
qW%{'@^4md('.X1$N?_++a"?!."XLS?f++=\(_)2md","*1$)"hodor":Ha*H@+@(2/\tS*0:X'HtHeu?}%W%

Try it online.
Explanation
qW%             "Read and reverse the input.";
{               "Map each character c:";
  '@^4md          "Calculate (c^64)/4, which is the sentence content determiner,
                    and c%4, which is the sentence ending determiner.";
  (               "Calculate c%4-1 for later.";
  '.X1$N?_++      "Produce the sentence ending string for the case that c%4==1,
                   which is '.' followed by two copies of:
                    - '.' if this is the first processed (last actual) character
                    - or a newline otherwise.
  a"?!."XLS?f     "Produce a list of the sentence ending strings for the cases
                   that c%4 is 2, 3, or 0, which are:
                    - '?', '!', and '.' if this is the first processed character
                    - or these punctuation marks each followed by a space
                      otherwise.";
  ++=\            "Prepend the sentence ending string for the case that c%4==1
                   to the list for the other cases and select the element at the
                   index (c%4-1)%4 as the correct sentence ending string.";
  (               "Calculate (c^64)/4-1 for later.";
  _)2md           "Calculate the quotient and remainder of the sentence content
                   content determiner divided by 2.";
  ","*            "Produce a string of commas with a length of the remainder
                   calculated above (either 0 or 1).";
  1$)"hodor":Ha*  "Produce a list of copies of 'hodor' with a length of the
                   quotient calculated above plus one.";
  H@+@(2/\t       "Append the string of commas (either empty or one comma) to
                   the middle 'hodor'.";
  S*              "Join the sentence words into a string a space between each.";
  0:X             "Signal that later characters are not the first processed.";
  'Ht             "Capitalize the first letter of the sentence (always 'h').";
  Heu             "Produce the string 'HODOR'.";
  ?               "Select the correct sentence content, which is 'HODOR' if
                   (c^64)/4-1 is zero or the full sentence produced before that
                   otherwise.";
}%
W%              "Reverse the reversed translation to obtain the forward one.";
                "Implicitly print the result.";

Post the explanation in Hodor to make it more readable.

Hodor, 602 582 bytes
HoDoRHoDoR HODOR! (Hodor ){r='';Hodor!? =Hodor .Hodor!? hodor? HODOR? hodor! hodor. h;HODOR{}(Hodor? =0;Hodor? <Hodor!? ;++Hodor? ){hodor =Hodor .hodor hHODOR rHodor... odhodor? hodor?!? hodor. (Hodor? );HODOR? =(0|hodor /4+16)%32;r+='H';HODOR =HHHOOODDDDOOORRR!!! hodor?!? rrHODOR HODOR!?! (0|HODOR? /2+2);HOdor!!!(HODOR? %2)HODOR [0|(HODOR? +1)/4]=',';r+=HODOR? ==1?'ODOR':HODOR .HODOR?! oHodor? HODOR? (' hodor').Hodor Hodor!? Hodor? hodor hodor? (2);r+=['. ',Hodor? ==Hodor!? -1?'....':'.\HODOR? \HODOR? ','? ','! '][hodor %4]}HODOR:: r.Hodor Hodor!? Hodor? hodor hodor? (0,-1)}

Here is an ungolfed version... you know... for readability:
HoDoRHoDoR HODOR! (Hodor ){
    r='';
    Hodor!? =Hodor .Hodor!? hodor? HODOR? hodor! hodor. h;
    HODOR{}(Hodor? =0;Hodor? <Hodor!? ;++Hodor? ){
        hodor =Hodor .hodor hHODOR rHodor... odhodor? hodor?!? hodor. (Hodor? );
        HODOR? =(0|hodor /4+16)%32;
        r+='H';
        HODOR =HHHOOODDDDOOORRR!!! hodor?!? rrHODOR HODOR!?! (0|HODOR? /2+2);
        HOdor!!!(HODOR? %2)HODOR [0|(HODOR? +1)/4]=',';
        r+=HODOR? ==1?'ODOR':HODOR .HODOR?! oHodor? HODOR? (' hodor').Hodor Hodor!? Hodor? hodor hodor? (2);
        r+=['. ',Hodor? ==Hodor!? -1?'....':'.\HODOR? \HODOR? ','? ','! '][hodor %4]
    }
    HODOR:: r.Hodor Hodor!? Hodor? hodor hodor? (0,-1)
}

Yep, there is a language called Hodor. (And it's rather new.) It's essentially just a string substitution for JavaScript. The corresponding JS looks like this:
function f(s){
  r='';
  l=s.length;
  for(i=0;i<l;++i){
    c=s.charCodeAt(i);
    n=(0|c/4+16)%32;
    r+='H';
    a=new Array(0|n/2+2);
    if(n%2)a[0|(n+1)/4]=',';
    r+=n==1?'ODOR':a.join(' hodor').slice(2);
    r+=['. ',i==l-1?'....':'.\n\n','? ','! '][c%4]
  }
  return r.slice(0,-1)
}

Hence, my submission is a function taking a string and returning the Hodorised equivalent.
Unfortunately, there doesn't seem to be any information about how Hodor actually works (apart from the source code of the interpreter), but it comes with a JS2HD translation script.
Note that Hodor's substitutions are also applied within string literals. So while you may just call the above function as
HODOR! ("CEE")

You can also use the following:
HODOR! ("Hodor... HooodorrHodor HooodorrHodor ")

where Hodor... HooodorrHodor HooodorrHodor will be substituted with CEE. Note that this means, that if your string itself contains certain forms of Hodor you'll have to encode it, or else it will be substituted. E.g. "Hodor. " is actually "m" in JavaScript. The catch is that the letters [dhor] (case insensitively) are not replaced at all, so you can't even encode this. One solution is to split up the literal, like "Hod"+"or. ", such that the substitution step doesn't find anything to decode.

This makes me so happy.

@AlexA. I think you meant to say "Hodor! Hodor hodor hodor! Hodor?"

The last sentence punctuation is only ... instead of the newlines, not .....

@mbomb007 The fourth . could be replaced by anything. It's a placeholder for the space that's usually there, which is removed with the final r.slice(0,-1).

I see, never mind.

Are you going to list the JS program as a submission, too?

@mbomb007 No, I wasn't planning to. It wouldn't beat any other submission, it's probably not particularly well-golfed for JavaScript, and I should probably also convert it to ES6.

582 bytes but with a -65535 bonus for using the Hodor programming language gives this answer a score of -59713 and makes this answer the clear winner ;-)

This looks like Hodor was just belligerent and attempting to type out an email while uncontrollably hitting random symbols.

Python 2, 219 198 bytes
Try it here
Uses the same method as Martin's JavaScript, and it's several bytes shorter in Python. I make use of Python 2.7's handy integer division. Thanks to Sp3000 for some golfing.
def f(s,r='',i=2):
    for j in s:c=ord(j);n=(c/4+16)%32;a=['']*(n/2+2);a[-~n/4]=','[:n%2];r+='H'+[' hodor'.join(a)[2:],'ODOR'][n==1]+['. ',['.\n\n',4*'.'][i>len(s)],'? ','! '][c%4];i+=1
    return r[:-1]

And for your own entertainment and my own enjoyment and curiosity...
Here it is as a lambda function!!!
Python 2, 349
Try it here, along with an older version of the program above.
f=lambda s:'H'.join(['']+[('ODOR'if(ord(s[i])/4+16)%32==1 else' hodor'.join((['']*(((ord(s[i])/4+16)%32)/2+2))[:((ord(s[i])/4+16)%32+1)/4]+([',']if ord(s[i])/4%2 else[''])+(['']*(((ord(s[i])/4+16)%32)/2+2))[((ord(s[i])/4+16)%32+1)/4+1*(ord(s[i])/4%2<1):])[2:])+['. ',4*'.'if i+2>len(s)else'.\n\n','? ','! '][ord(s[i])%4]for i in range(len(s))])[:-1]

Creating this involved deeper and deeper substitutions as well as some extra creativity.

Every j is replaced with s[i].
Every c is replaced with ord(s[i]).
Every n is replaced with (ord(s[i])/4+16)%32.

Except where I only need n%2, so I use (ord(s[i])/4%2 instead.

Finally, a is replaced with (['']*(((ord(s[i])/4+16)%32)/2+2))[:((ord(s[i])/4+16)%32+1)/4]+([',']if ord(s[i])/4%2 else[''])+(['']*(((ord(s[i])/4+16)%32)/2+2))[((ord(s[i])/4+16)%32+1)/4+1*(ord(s[i])/4%2<1):].

This is because we cannot assign a value, so we must split the list in half, conditionally append the comma, then append the last half again.

I believe this gives 198?

Cool, I didn't know you could slice [:0] like that to get empty string.

MUMPS, 284 236 bytes
New version: After looking at it for a while I came up with a shorter version (236 bytes):
H(H) S L=$L(H) F O=1:1:L D
 .S D=$A($E(H,O)),R=D#4,P=$S('R:".",R=2:"?",R=3:"!",O=L:"...",1:"."_$C(10,10)),E=D\4+16#32,(S,Q)="hodor" F F=1:1:E\2 S Q=S_$S(E#2&(F=(E\4+1)):", ",1:" ")_Q,$E(Q)="H" S:E=1 Q="HODOR"
 .W Q_P_$S(L=O:"",1:" ")
 Q

First version:
H(H) S L=$L(H) F O=1:1:L D
 .S S=$C(10),D=$A($E(H,O)),R=D#4,P=$S('R:".",R=2:"?",R=3:"!",O=L:"...",1:"."_S_S),E=D\4+16#32,(S,Q)="hodor ",G=6*(E+1\4) F F=1:1:E\2 S Q=S_Q
 .S Q=$E(Q,1,$L(Q)-1) S:E=1 Q="HODOR" S:E#2&(E>2) Q=$E(Q,1,G-1)_","_$E(Q,G,99) S $E(Q)="H" W Q_P_$S(L=O:"",1:" ")
 Q

Damn you, CJam!
Maybe I could save some bytes using ObjectScript (there're list operators), but I doubt it.
Here's a somewhat verbose version:
VH(H)
 F I=1:1:$L(H) D              ; iterate over input string H
 .S O=$E(H,I)                 ; O is a single char
 .S D=$A(O)                   ; ascii code (dec)
 .S R=D#4                     ; #: mod, $S: $SELECT(condition:result,cond...)
 .S P=$S(R=0:".",R=2:"?",R=3:"!",I=$L(H):"...",1:"."_$C(10)_$C(10))
 .S E=D\4+16#32               ; \: integer division
 .S (S,Q)="hodor "            ; hodor
 .F J=1:1:E\2 S Q=S_Q         ; build hodor -"list"
 .I E=1 S Q="HODOR"           ; HODOR
 .I E'=1 S Q=$E(Q,1,$L(Q)-1)  ; remove trailing _
 .;                           ; insert ,
 .I E#2,E>2 S Q=$E(Q,1,6*(E+1\4)-1)_","_$E(Q,6*(E+1\4),99)
 .S $E(Q)="H"                 ; ^h->^H
 .W Q_P_$S($L(H)=I:"",1:" ")  ; Write and remove trailing _
 Q

C# 378 Bytes
string x(string h){string[]f={". ",".\n\n","? ","! "};string[]a=new string[32];string s="";int i,j,c=0;for(i=0;i<32;i++){a[i]="hodor";if(i==1)a[i]=a[i].ToUpper();else{for(j=0;j<i/2;j++){if(i%2==1&&j==c/2)a[i]+=",";a[i]+=" hodor";}if(i%2==1)c++;a[i]=char.ToUpper(a[i][0])+a[i].Substring(1);}}foreach(char b in h){s+=a[(int)(Math.Floor((double)b/4)+16)%32]+f[(int)b%4];}return s;}

It's my first time golfing, so bare with me.

Welcome to Programming Puzzles & Code Golf Stack Exchange! You can save some bytes by using a single-character function name instead of hodor. You can probably also remove some if not all of those newlines, and several spaces (e.g. after for oder the if). However, you should probably either count the using directive for System or fully qualify Console.

Thank you for your help, I'll try to improve and save some bytes :D.

When golfing C# code, it's not necessary to have a specific access modifier; so you can drop the public keyword to save some bytes. You can also remove the space between [] and the actual name of the variable that holds the array. Also, it's not necessary to convert a string to a char array when you iterate over all chars of a string in a foreach; you can simply do foreach (char c in h).

Edited, thank you. Manage to bring it down to 378 bytes, this is fun.

C++, 547 452 bytes
void H(string s){string e[4]={".",".\n\n","?","!"};string r;char c,m;int n=s.size();for(int i=0;i<n;i++){r.clear();c=s.at(i);m=c%4;r.append(A(c));r.append(e[m]);if(i==n-1){int k=r.size();r.pop_back();if(m==1){r.pop_back();r.append("..");}}cout<<r.c_str();}}string A(char x){string h("Hodor");int c=((int )floor(x/4)+16)%32;int n=c;bool o=(c%2==1);if(n==1)h="HODOR";else{while(n>1){h.append("hodor");if(o&&n==(int )(c/2)){h.append(",");}n--;}}return h;}

Ungolfed:
#include <iostream>
#include <math.h>
using namespace std;
void Hodorise(string s);
string FromAscii(char c);

void Hodorise(string s)
{
string end[4] = {". ",".\n\n","? ","! "};
string res;
char c, m;
int n = s.size();
for (int i = 0; i < n; i++)
{
res.clear();
c = s.at(i);
m = c % 4;
res.append(FromAscii(c));
res.append(end[m]);
if (i == n - 1)
{
int k = res.size();
res.pop_back();
if (m == 1)
{
res.pop_back();
res.append("..");
}

}
cout << res.c_str();
}
}

string FromAscii(char c)
{
string hodor("Hodor");
int code = ((int)floor(c / 4) + 16) % 32;
int n = code;
bool odd = (code % 2 == 1);
if (n == 1)hodor = "HODOR";
else
{
while (n > 1)
{
hodor.append(" hodor");
if (odd && n==(int)(code/2))
{
hodor.append(",");
}
n--;
}
}
return hodor;
}
#define N 3
int main()
{
string x[N] = { "F0", "CEE", "Hodor's real name is Walder.\nDid you know ?" };
for (size_t i = 0; i < N; i++)
{
cout << endl << x[i].c_str() << ":\n";
Hodorise(x[i]);
}

char c;
cin >> c;
return 0;
}

I count only 505 bytes. Did you count the line breaks as \r\n instead of \n? Also, why do you even need most of those line breaks at all?

The submission needs to include #include, using namespace std;, etc.

Most people submitting answers do not count #include or imports etc