text:
Rock, Polyglot, Scissors
Write a program that is a polyglot in three languages that plays rock–paper–scissors.
The input for any version of the program is always one of the strings rock or paper or scissors.
In the first language the program must output the rock–paper–scissors choice that beats the input:
Input     Output
rock      paper
paper     scissors
scissors  rock

In the second language the program must output the rock–paper–scissors choice that ties the input:
Input     Output
rock      rock
paper     paper
scissors  scissors

In the third language the program must output the rock–paper–scissors choice that loses to the input:
Input     Output
rock      scissors
paper     rock
scissors  paper

The shortest code in bytes wins. Tiebreaker is higher-voted answer.
The inputs and/or outputs may optionally have a trailing newline but otherwise should only be the plain rock/paper/scissors strings. You may use uppercase ROCK, PAPER, SCISSORS if desired.
You may not use different versions of the same language (e.g. Python 2 and 3).

Can a language error out to exit?

@KritixiLithos Go with the meta concensus. "I think terminating with an error or an uncaught exception is fine here, as long as it doesn't produce stray output to STDOUT."

Never quite sure with polyglots, can the different languages take input in different ways?

@JonathanAllan That's ok. For some language sets that only have certain forms of input it would be necessary.

What happened to Lizard, Spock? http://bigbangtheory.wikia.com/wiki/Rock_Paper_Scissors_Lizard_Spock

Python, brainfuck and JavaScript, 103 99 bytes Yay under 100 bytes!
0,[.5,];p=["rock","scissors","paper"]
1//1;lambda x:p[p.index(x)-1];"""
x=>p[-~p.indexOf(x)%3]//"""

In Python, this defines a function which beats the input, in brainfuck it's just a simple cat program, and in JavaScript it loses. Here's a version which gives the functions a name, f, and also prompts for input in JavaScript and Python 3:
0,[.5,];p=["rock","scissors","paper"]
1//1;f=lambda x:p[p.index(x)-1];"""
f=x=>p[-~p.indexOf(x)%3]//"""

1//1;"""
console.log(f(prompt())) // JavaScript
1//1"""; print(f(input())) # Python

Try it online (older version): Python,
 brainfuck, JavaScript
Explanation:
In Python, """...""" is a multiline string, which can be used as any token. When placed stand-alone it doesn't do anything at all. I use this to "hide" the JavaScript code from Python. The same goes for the (0,[.5,]) bit, it's just a tuple containing a 0 and a list of 5, and also the 1//1 part, // in Python is integer division, but starts a comment in JavaScript. Here's the code stripped of these tokens:
p=["rock","scissors","paper"]
lambda x:p[p.index(x)-1]

The first line is pretty self-explanatory, it just defines the list p to contain the different choices in rock-paper-scissors. The second line defines an unnamed function which takes one argument, x, and gives back the choice that beats x (eg. the previous element in p)

In JavaScript, // denotes a single-line comment. Similarly to Python, single tokens are ignored, so the code stripped of these tokens is:
p=["rock","scissors","paper"]
x=>p[-~p.indexOf(x)%3]

This works similarly to Python, by first setting the list p to contain the choices and then defining an anonymous function that gives the losing choice. -~x is the same as x+1 but with higher precedence so that I can skip the parens.

In brainfuck, every character except +-,.[]<> are removed, leaving this:
,[.,][,,]
[.-]
>[-.]

The command , reads one byte of input, . prints it and [...] loops while the value is non-zero. What this program does then is read the input and printing it one character at a time until the character \0 is found. Since we don't have that in the code, we can ignore the rest of the program. In effect, this just echoes back whatever the user types in, effectively tying them.

Was working on a very similar solution but you beat me to it :). You have to update the Javascript TIO link btw, it is different from the other two.

x=>p[p.indexOf(x)+1]||"rock"//""" could be shortened to x=>p[(p.indexOf(x)+1)%3]//"""

+1 I've never seen Brainfuck being hidden so well. Usually it's obvious if a polyglot also contains BF. Not in this one!

I think you can move the BF program around a little to save a byte or two: 1//1,[.5,];

As a matter of fact, I think you can use the existing [] on the second line to save more bytes: 1//1,;lambda x:p[p.index(x,0)+-1];"""

Python 2, Ruby, Retina, 90 83 bytes
 -7 bytes thanks to Value Ink
s=['rock','paper','scissors']
print s[s.index((0and gets or input()))+(0and-2or-1)]

Try it Online: Python,
Ruby, Retina
Wins in Ruby, loses in Python, and ties in Retina.
This solution makes use of the fact that 0 is truthy in Ruby but falsey in Python. It also makes use of negative indexing in both Python and Ruby.

and has operator precedence over or, so s.index(0and STDIN.gets or input()) works. Also, gets is an alias for STDIN.gets in Ruby.

+1 for not just commenting out code in different ways!

@ValueInk Thank you! I figured there had to be a more concise way to get input in Ruby, and it turns out there was

V, Brain-flak, and Python 2, 97, 86, 81, 77, 75 bytes
o='rock paper scissors'.split()
lambda s:o[o.index(s)-1]#ddt.C rHd*wywVp

Two bytes saved thanks to @nmjcman101!
This was super fun! I like this answer a lot because it's a cool overview of languages I like: My favorite editor, my favorite non-esoteric language, and a language I wrote. (Technically python 3 is better, but python 2 is golfier so ¯\_(ツ)_/¯).
Try it online! in Python (slightly modified so you can see the output), which prints what loses to the input.
Try it online! in Brain-Flak, which prints what ties with the input.
Try it online! in V, which prints what beats the input.
Since V relies on unprintable ASCII characters, here is a hexdump:
00000000: 6f3d 2772 6f63 6b20 7061 7065 7220 7363  o='rock paper sc
00000010: 6973 736f 7273 272e 7370 6c69 7428 290a  issors'.split().
00000020: 6c61 6d62 6461 2073 3a6f 5b6f 2e69 6e64  lambda s:o[o.ind
00000030: 6578 2873 292d 315d 231b 6464 742e 4320  ex(s)-1]#.ddt.C
00000040: 720e 1b48 642a 7779 7756 70              r..Hd*wywVp

Explanation:
Python
In python, this is very straightforward. We define a list of the three elements, and return the element right before the input. Since -1 returns the back element, this works circularly, and it's all very straightforward and easy. Then, everything after # is a comment.
Brain-Flak
This is also extremely straightforward in brain-flak. If we had to do winning or losing, this would probably be several hundred bytes. But this actually works in 0 bytes. On the start of the program, all of the input is loaded onto the stack. At the end of the program, the whole stack is implicitly printed.
Once we remove all of the irrelevant characters, the code brain-flak sees is
()[()]

Which simply evaluates to 1 + -1, but since this value is not used at all, it's a NOOP.
V
Here is where it gets a little weird. Naming the python list o might have seemed arbitrary, but it's definitely not. In V, o opens up a newline, and puts us in insert mode. Then,
='rock paper scissors'.split()
lambda s:o[o.index(s)-1]#

is inserted into the buffer. After that, the relevant code is:
<esc>ddxxf'C r<C-n><esc>Hd*wywVp

Explanation:
<esc>                          " Return to normal mode
     dd                        " Delete this line. Now the cursor is on '='
       t.                      " Move the cursor forward to the "'"
         C                     " Delete everything after the "'", and enter insert mode
           r                   " From insert mode, enter '<space>r'
            <C-n>              " Autocomplete the current word based on what is currently in the buffer
                               " Since only one word starts with 'r', this will insert 'rock'
                 <esc>         " Leave back to normal mode
                      H        " Go to the first line (where the input is)
                       d*      " Delete everything up until the next occurence of the input
                         w     " Move forward one word
                          yw   " Yank the word under the cursor
                            Vp " And paste that word over the current line, delete everything else

@WheatWizard In Python, there's no reason not too (except that it's the same length). But it ruins everything in V.

@WheatWizard Cause V is a really weird language, and this is a really weird task for it. Everything heavily relies upon the layout of the characters, and .split() is easier to get rid of then the various parenthesis and quotes that show up in your solution.

Super minor, but you can take out the xx and replace it with a 2 to make the command 2f' since the =' will be deleted by the d* later anyway.  EDIT: you might be able to make it t.?

@nmjcman101 Oooh, sweet, awesome idea. Thanks for the tip!

CJam, Retina, PHP, 92 86 85 bytes
ECHO["rock",0,"scissors","paper"][ORD(READLINE())%4];
#];"scissors  paper rock"S/rci=

Should be run in PHP using the -r flag.
Try it in CJam
Try it in Retina
Try it in PHP
CJam
In CJam, all capital letters are predefined variables. On the first line, many of these values are pushed onto the stack, along with some string and array literals. Some increments, decrements, and other operations are performed.
After all of that, the stack is wrapped in an array (]) and discarded (;), so none of that other stuff matters at all. The main CJam program is simply:
"scissors  paper rock"S/rci=

"scissors  paper rock"        e# Push this string
                      S/      e# Split it on spaces
                        r     e# Read the input
                         c    e# Cast to char (returns the first character in the string)
                          i   e# Cast to int (its codepoint)
                           =  e# Get the index of the split array (CJam has modular arrays)

Retina
This almost feels like cheating...
Retina will substitute any match of the regex ECHO["rock",0,"scissors","paper"][ORD(READLINE())%4]; in the input with #];"scissors  paper rock"S/rci=. Whatever this regex matches, it certainly doesn't match anything in rock, paper, or scissors, so no substitution is made. The unmodified input is then implicitly output.
PHP
The second line is a comment, so it is ignored.
The first line uses the same algorithm as the CJam part, but with different ordering of the results.

TIL PHP functions are case insensitive.

C, C++, Python; 227 226 216 bytes
Saved a byte thanks to @Mat!
#include<stdio.h>/*
f=lambda a:"rock"if a[0]=="r"else"paper"if a[0]=="p"else"scissors"
"""*/
int f(char*b){puts(sizeof'b'-1?*b=='r'?"paper":*b=='s'?"rock":"scissors":*b=='r'?"scissors":*b=='s'?"paper":"rock");}
//"""

Defines a function f in all languages. Wins in C, ties in Python, loses in C++. Like C++ always does /s
The part between the /* and the */ is a comment block in C and C++ while it's the lambda function declaration in Python. It basically compares the first character of the function argument and returns the move that starts with that letter.
The part between the """s is a multiline string in Python while it's the function declaration in both C and C++. sizeof'b'-1 figures out if the current language is C of C++. It has a truthy value if the size is other than 1, a falsy value otherwise. In C character literals are 4-byte long type while in C++ they are a single byte type. Then after the language is figured out it just looks at the first letter of the input and outputs accordingly.
C
Try it online!
C++
Try it online!
Python
Try it online!

"The part between the """s is a comment block in Python" It's actually a multiline string.

C++, R, C;  252 240 226 220 209 bytes
#define b/*
M=function()cat(readline())
#*/
#import<stdio.h>
#define M()main(){int i=0;char t[9];char*u;char*s[]={"rock","paper","scissors"};scanf("%s",t);for(;*t-*s[i++];);puts(s[(i+=sizeof('a')==1)%3]);}
M()

Makes use of the difference between C and C++ that the size of a character literal is 4 bytes in C and 1 byte in C++.
C++:
Try it online!
R:
Result:
> #define b/*
> M=function()cat(readline())
> #*/
> #import<stdio.h>
> #define M()main(){int i=0;char t[9];char*u;char*s[]={"rock","paper","scissors"};scanf("%s",t);for(;*t-*s[i++];);puts(s[(i+=sizeof('a')==1)%3]);}
> M()
rock
rock

C:
Try it online!

Gawk, Retina, Perl; 68 bytes
{eval"\$_=uc<>"}{$_=/[Sk]/?"paper":/[Pc]/?"rock":"scissors"}{print}

(with a newline at the end)
Gawk (winner)
Some junk for Perl's sake, then change the line content ($_, which is the same as $0 because the variable _ is undefined) depending on whether it contains a k or a c, then print the result. Ignore any warning about escape sequences, I meant to do that.
{a_string_that_is_ignored}
{$_ = /[Sk]/ ? "paper" : /[Pc]/ ? "rock" : "scissors"}
{print}

Retina (tie)
Same trick as Basic Sunset and others: replace matches of some silly regexp on the first line by the content of the second line, so pass the input through.
Perl (loser)
Read a line and convert it to uppercase, then choose a word based a letter it contains, and print the result. The first and last step are wrapped using eval to hide them from awk.
$_ = uc <>;
$_ = /[Sk]/ ? "paper" : /[Pc]/ ? "rock" : "scissors";
print $_

Gawk, Retina, perl -p; 57 bytes
I'm entering this as a bonus because the command line switch in perl -p is supposed to be part of the program by the usual rules on this site, which would make it not a polyglot.
{eval"\$_=uc"}$_=/[Sk]/?"paper":/[Pc]/?"rock":"scissors"

Again with a final newline for Retina. This time, with perl -p to print the output automatically, the perl overhead is significantly reduced. I can let the assignment to $_ trigger an implicit print in awk.

Could you perhaps add a TIO link (or a similar online-compiler to test) for each of them?

@KevinCruijssen Added. The output on TIO for perl -p is empty, it must be a bug on TIO.

><>, Retina, Python 2: 144 127 123 bytes
1 byte saved thanks to @Loovjo by removing a space
4 bytes saved thanks to @mbomb007 by using input instead of raw_input
#v"PAPER"v?%4-2{"SCISSORS"v?%2:i
#>ooooo; >oooooooo<"ROCK"~<
a="KRS".index(input()[-1])
print["SCISSORS","ROCK","PAPER"][a]

Posted in TNB as a challenge, I decided to try out this combination of languages.
><>
Try it online!
The IP starts moving right.
#                      Reflect the IP so that it now moves left and it wraps around the grid
i:                     Take one character as input and duplicate it

The possible characters that will be taken into the input are PRS (since the program only takes the first character). Their ASCII-values are 80, 81 and 82.
2%                     Take the modulo 2 of the character. Yields 0, 1, 0 for P, R, S respectively
?v                     If this value is non-zero (ie the input was ROCK), go down, otherwise skip this instruction

If the input was rock, then this is what would happen:
<                      Start moving to the left
~                      Pop the top most value on the stack (which is the original value of R and not the duplicate)
"KCOR"                 Push these characters onto the stack
<                      Move left
oooo                   Output "ROCK" as characters (in turn these characters are popped)
o                      Pop the top value on the stack and output it; but since the stack is empty, the program errors out and exits promptly.

Otherwise, if the input was SCISSORS or PAPER, this is what the IP would encounter:
"SROSSICS"             Push these characters onto the stack
{                      Shift the stack, so the the original value of the first char of the input would come to the top
2-4%                   Subtract 2 and take modulo 4 of the ASCII-value (yields 2, 0 for P, S respectively)
?v                     If it is non-zero, go down, otherwise skip this instruction

If the input was PAPER, then:
>ooooooooo             Output all characters on the stack (ie "SCISSORS")
<                      Start moving left
o                      Pop a value on the stack and output it; since the stack is empty, this gives an error and the program exits.

Otherwise (if the input was SCISSORS):
"REPAP"                Push these characters onto the stack
v>ooooo;               Output them and exit the program (without any errors).

Retina
Try it online!
In this case, Retina considers each pair of two lines as a pair of a match and substitution. For example, it tries to replace anything matching the first line with the second line, but since the first line is never matched, it never substitutes it with anything, thus preserving the input.
Python 2
Try it online!
The Python program requires input to be put in between "s.
The first two lines are comments in Python.
a="KRS".index(input()[-1])             # Get the index of the last character of the input in "KRS"
print["SCISSORS","ROCK","PAPER"][a]    # Print the ath index of that array

I don't think the space after print at the last line is necessary.

You can use input() instead of raw_input().

@Loovjo Thanks for the tip :)

@mbomb007 That doesn't seem to work

@KritixiLithos it works if the python part takes input with quotes

@mbomb007 Thanks for the tip, I am new to golfing in Python

Ruby, Clojure, Common Lisp - 251 bytes
(print(eval '(if()({(quote SCISSORS)(quote PAPER)(quote PAPER)(quote ROCK)(quote ROCK)(quote SCISSORS)}(read))(eval(quote(nth(position(read)(quote("SCISSORS""PAPER""ROCK")):test(quote string-equal))(quote(ROCK SCISSORS PAPER))))))))
;'['"'+gets+'"']))

More readable version with whitespaces:
(print(eval '(if() ; distinguish between CLojure and Common Lisp
    ({(quote SCISSORS)(quote PAPER)(quote PAPER)
       (quote ROCK)(quote ROCK)(quote SCISSORS)}(read)) ; use hash-map as a function
    (eval(quote(nth ; find index of the input arg in the list
       (position(read)(quote("SCISSORS""PAPER""ROCK")):test(quote string-equal))
    (quote(ROCK SCISSORS PAPER))))))))
 ;'['"'+gets+'"'])) ; ruby indexation

Clojure always wins, Ruby always draws, Common Lisp always loses.
For Ruby everything inside 's is a string. It spans across two lines. Then it uses [] operator with a string argument which return the string itself if it's present in the string. The result is printed out, Ruby just mirrors the input.
The second line is a comment for Clojure and Common Lisp. A bunch of eval and quote has to be used because Clojure needs to make sure that all symbols are valid. It would be nice to reuse code more but even nth function have different signatures in these languages. Basically for Clojure if() evaluates to true and it goes to the first branch when a hash-map of possible variants is called with argument read from stdin. Common Lisp goes to the second branch, it finds the position of the argument from stdin in the list and returns corresponding item from the resulting list.
I guess Common Lisp part can be golfed more.
See it online: Ruby , Common Lisp , Clojure

Scala, Javascript and Ook, 167 bytes
s=>{var a="paper,scissors,rock".split(",")/*/**/a[-1]="rock"
return a[a.indexOf(s)-1];`*/a((a.indexOf(s)+1)%3)//`//Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!
}

Try it in Scala Try it in Javascript Try the brainfuck version of Ook
Scala - wins
s=>{                                                      //define an anonymous function
  var a="paper,scissors,rock".split(",")                  //generate the array
  /* /* */ a[-1]="rock"                                   //scala supports nested comments,
  return a[a.indexOf(s)-1];`                              //so this comment...
  */                                                      //...ends here
  a((a.indexOf(s)+1)%3)                                   //return the winning string
  //`//Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!  //another comment
}

Javascript - loses
s=>{                                                   //define an anonymous function
  var a="paper,scissors,rock".split(",")               //generate the array
  /*/**/                                               //a comment
  a[-1]="rock"                                         //put "rock" at index -1
  return a[a.indexOf(s)-1];                            //return the string that loses
  `*/a((a.indexOf(s)+1)%3)//`                          //a string
  //Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!  //a comment
}

Ook! - ties
The Ook part is the simple brainfuck cat program ,[.,] tranlsated to Ook.
s=>{var a="paper,scissors,rock".split(",")/*/**/a[-1]="rock"   //random stuff
return a[a.indexOf(s)-1];`*/a((a.indexOf(s)+1)%3)//`//         //more random stuff
Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!              //the program
}                                                              //random stuff

If you use a[(a.indexOf(s)+2)%3] then you don't need to set a[-1]="rock". Also, can you not put the Ook code inside the JavaScript string too?


text:
Is my Diffy game degenerate?
Recently I posted a question about Diffy games which has gone unanswered.  Thats fine, the question is really hard, but I would like to make an easier question about Diffy games so that we can get the ball rolling.

How Diffy works
Copied from Find Diffy Games
The Diffy game works like as follows:  You start with a list of non-negative integers, in this example we will use
3 4 5 8

Then you take the absolute difference between adjacent numbers
 (8)  3   4   5   8
    5   1   1   3

Then you repeat.  You repeat until you realize you have entered a loop. And then generally the game starts from the beginning again.
3 4 5 8
5 1 1 3
2 4 0 2
0 2 4 2
2 2 2 2
0 0 0 0
0 0 0 0

Most games end in a string of all zeros, which is considered to be a lose state, but a rare few games get stuck in larger loops.

Task
Given the starting state of a Diffy game determine whether or not the game eventually reaches a state of all zeros.  You should output a Truthy or Falsy value for each of the two states.  Which corresponds to which does not matter.
The goal is to minimize the number of bytes in your source.

The task wording seems to imply that any game that does not reach a state of all zeroes is therefore periodic. Earlier, periodic is defined as including the initial state in the repeated sequence. Does this mean that any sequence eventually reaches either all zeroes or the initial state?

No: adding a positive constant to any nonzero periodic state results in a state that neither returns to itself nor goes to all zeros. For example, 1 1 0 is periodic, so 42 42 41 is such a state.

Does the user have the right to choose "which way the differences are shifted"? For example, the starting state 3 4 5 8 goes to either 5 1 1 3 or 1 1 3 5, depending on a predetermined wraparound convention; can we (consistently) choose our favorite of these two conventions?

@GregMartin it does not effect the output which way you decide to shift.

If "eventually periodic" is being used to mean the loop does not include the initial state, then all zeroes would be periodic (with period 1). Perhaps different terminology would reduce the potential for confusion.

Indeed, for the specific question being asked, one doesn't even need a notion of "periodic". "Eventually reaches a state of all zeros" is self-contained and clear.

I've proven a partial characterization: If the list length n is odd, the game doesn't go to zero unless all the numbers are equal. If the length is a power of 2, it always goes to zero.

A bound of the number of steps to reach zero: A list with n elements and maximum m takes at most n * bit_length(m) steps. So, n*m is also an upper bound. A stronger upper bound is t(n) * bit_length(m), where t(n) is the largest power of 2 that's a factor of n.

Pyth, 6 bytes
suaV+e

Test suite
This program is very suave. 0 (falsy) means all zeroes, anything else (truthy) means not all zeroes.
How it works:
suaV+e
suaV+eGGGQ    Variable introduction.
 u       Q    Apply the following function repeatedly to its previous result,
              starting with the input. Stop when a value occurs which has
              occurred before.
  aV          Take the absolute differences between elements at the same indices of
        G     The previous list and
    +eGG      The previous list with its last element prepended.
s             The repeated value is returned. Sum its entries. This is zero (falsy)
              if and only if the entries are all zero.

thats a suave solution

Mathematica, 52 bytes
1>Max@Nest[Abs[#-RotateLeft@#]&,#,Max[1+#]^Tr[1^#]]&

Pure function taking a list of nonnegative integers as input and returning True or False.
Abs[#-RotateLeft@#]& is a function that executes one round of the diffy game. (Technically it should be RotateRight, but the ultimate answer is unaffected, and hey, free byte.) So Nest[...,#,R] executes R rounds of the diffy game, and then 1>Max@ detects whether the result is all zeros.
How do we know how many diffy-game rounds R to do? If m is the largest value in the input, notice that we will never produce an integer larger than m no matter how many rounds we do. The total number of lists of length l of nonnegative integers all bounded by m is (m+1)^l. So if we carry out (m+1)^l rounds of the diffy game, we are guaranteed to have seen some list twice by then, and thus will be in the periodic part of the game. In particular, the game ends in all zeros if and only if the result of (m+1)^l rounds of the game is the all-zeros list. That expression is what Max[1+#]^Tr[1^#] computes.

Jelly, 13 bytes
Ṁ‘*L
ṙ1ạ
ÇÑ¡Ṁ

Outputs 0 (falsey) if the all zero state will be reached, otherwise a truthy value (a positive integer) is returned.
Try it online!
Uses the observation first made by Greg Martin that the numbers within the array may never leave the domain [0,m] where m is the maximal element in the input, so performing (m+1)l rounds where l is the input's length will suffice.
How?
Ṁ‘*L - Link 1, number of rounds to perform: list a
Ṁ    - maximum of a
 ‘   - incremented
   L - length of a
  *  - exponentiate

ṙ1ạ - Link 2, perform a round: list x
ṙ1  - rotate x left by 1
  ạ - absolute difference (vectorises) with x

ÇÑ¡Ṁ - Main link: list a
  ¡  - repeat:
Ç    -     the last link (2) as a monad
 Ñ   -     the next link (1) as a monad times
   Ṁ - return the maximum of the resulting list

Could this be improved with xnor's bound?

@WheatWizard I think it would cost a byte. (It might be possible to get a shorter method by collecting all results until they are not unique, but I have not found it).

R (3.3.1), 87 bytes
Returns zero for a game ending in all zeros, and a positive number otherwise.
z=scan();sum(Reduce(function(x,y)abs(diff(c(x,x[1]))),rep(list(z),max(z+1)^length(z))))

leverages the same fact by Greg Martin and uses the builtin diff to do the diffy-ing

provided that xnor's bound is correct (from the comments), this could be two bytes shorter by using max(z)*length(z) but I'm not convinced of the correctness

PHP, 144 Bytes
print 0 for all zero and any positive integer value for true
<?for($r[]=$_GET[0];!$t;){$e=end($r);$e[]=$e[$c=0];for($n=[];++$c<count($e);)$n[]=abs($e[$c-1]-$e[$c]);$t=in_array($n,$r);$r[]=$n;}echo max($n);

Online Version
Expanded
for($r[]=$_GET;!$t;){
    $e=end($r);  # copy last array
    $e[]=$e[$c=0]; # add the first item as last item
    for($n=[];++$c<count($e);)$n[]=abs($e[$c-1]-$e[$c]); # make new array
    $t=in_array($n,$r); # is new array in result array
    $r[]=$n; # add the new array
}
echo max($n); # Output max of last array

array_push ? But why ?

also if using $_GET as input you should assume it contains a string.

@Christoph ?0[0]=1&0[1]=1&0[2]=0 or ?0[]=1&0[]=1&0[]=0 is an array of strings but this does not matter. But you are right I could make it shorter with ?0=1&1=1&2=0 why not àrray_push` I am sure that you or Titus find better ways to short this.

array_push($e,$e[$c=0]); is simply exactly the same as $e[]=$e[$c=0]; and you even use the syntax already ($r[]=$n). You already use max now so you should also replace end($r) with $n because $n is always equal to end($r) when the echo is executed.

@Christoph It seems so that yesterday was not my day. Thank you. You have bring me to my idea for a new entry in the tips section

Jelly, 7 bytes
ṙ1ạµÐLẸ

Try it online!
Outputs 0 (falsey) if it is degenerate, and 1 (truthy) if not
How it works
ṙ1ạµÐLẸ - Main link. Takes an array A on the left
   µ    - Group the links to the left into a monad f(A):
ṙ1      -   Rotate A one step to the left
  ạ     -   Take the absolute differences with A
    ÐL  - Repeatedly apply f(A) on A until reaching a fixed point
      Ẹ - Yield 0 if all 0s, else 1

PHP, 123 115
for($a=$_GET,$b=[];!in_array($a,$b);){$b[]=$c=$a;$c[]=$c[0];foreach($a as$d=>&$e)$e=abs($e-$c[$d+1]);}echo!max($a);

taking input via HTTP get e.g. ?3&4&5&8 saves a few bytes.
Prints 1 if it reaches all zeros or nothing otherwise.

for($e=$argv,$r=[];!in_array($e,$r);$q=$e[0]){$e[0]=end($e);$r[]=$e;foreach($e as$k=>&$q)$q=abs($q-$e[$k+1]);}echo!max($e);

takes the list of arguments via command line. I've got the feeling this can be golfed even further (looking at @Titus).

Python 3.6, 101 bytes
def f(t):
 x={}
 while x.get(t,1):x[t]=0;t=(*(abs(a-b)for a,b in zip(t,t[1:]+t[:1])),)
 return any(t)

Takes a tuple of numbers and returns False if it ends in zeros and True if it loops.

JavaScript (ES6), 95 92 90 bytes
f=(a,b=(Math.max(...a)+1)**(c=a.length))=>b?f(a.map((v,i)=>v-a[++i%c]),b-1):a.every(v=>!v)

Explanation
Recursive function that calls itself as long as the counter (which starts at the maximum value in the list plus one to the power of the length of the list [= (max + 1)**length]) is not zero. On every call, the counter is decremented, and when it hits zero, all elements in the list are checked against zero. If they all equal zero, the program returns true, and false otherwise.

Röda, 80 bytes
f l...{x=[{peek a;[_];[a]}()|slide 2|abs _-_];[sum(x)=0]if[x in l]else{x|f*l+x}}

Try it online!
Ungolfed:
function f(l...) { /* function f, variadic arguments */
    x := [ /* x is a list of */
        { /* duplicate the first element of the stream to the last position */
            peek a /* read the first element of the stream */
            [_]    /* pull all values and push them */
            [a]    /* push a */
        }() |
        slide(2) | /* duplicate every element except first and last */
        abs(_-_)   /* calculate the difference of every pair */
    ]
    /* If we have already encountered x */
    if [ x in l ] do
        return sum(x) = 0 /* Check if x contains only zeroes */
    else
        x | f(*l+x) /* Call f again, with x appended to l */
    done
}

05AB1E, 13 bytes
Returns 1 if it ends in zeroes and 0 otherwise.
Z¹g*F¤¸ì¥Ä}_P

Try it online!
Explanation
Uses the upper bound of rounds: max(input)*len(input) explained by xnor in the comment section.
Z              # get max(input)
 ¹g            # get length of input
   *           # multiply
    F          # that many times do:
     ¤         # get the last value of the current list (originally input)
      ¸        # wrap it
       ì       # prepend to the list
        ¥      # calculate deltas
         Ä     # calculate absolute values
          }    # end loop
           _   # negate each (turns 0 into 1 and everything else to 0)
            P  # calculate product

J, 22 bytes
Returns 0 (which is effectively false in J) for a degenerate game ending in all zeros. Returns 1 (true) if the nth iteration contains a non-zero number, where n is equal to the largest integer in the original sequence multiplied by the length of the list. See Greg Martin's answer explaining why this is true.
*>./|&(-1&|.)^:(#*>./)

Translation:

What is the sign *
of the greatest value >./
when you iterate the following as many times as ^:(   )
the length of the list # multiplied by * the greatest value in the list >./:

take the absolute value |& of
the difference between the list (-    ) and
the list rotated by one 1&|.

Examples:
   *>./|&(-1&|.)^:(#*>./) 1 1 0
1
   *>./|&(-1&|.)^:(#*>./) 42 42 41
1
   *>./|&(-1&|.)^:(#*>./) 3 4 5 8
0
   *>./|&(-1&|.)^:(#*>./) 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1
0

That is not what Greg Martin's claim is. However, xnor has better bounds in the comments above (but still not just the largest integer). The simplest is to multiply the greatest value with the length.

Good catch. I wasn't paying enough attention. I'll fix the solution.

JavaScript (ES6), 84 83 bytes
Returns true for a game ending in all zeros, false otherwise.
f=(a,k=a)=>k[b=a.map((n,i)=>Math.abs(n-a[(i||a.length)-1]))]?!+b.join``:f(k[b]=b,k)

Test

f=(a,k=a)=>k[b=a.map((n,i)=>Math.abs(n-a[(i||a.length)-1]))]?!+b.join``:f(k[b]=b,k)

console.log(f([3,4,5,8])); // ends in zeros
console.log(f([1,0,1]));   // does not end in zeros
console.log(f([7]));       // ends in zeros

source: Stack Exchange

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

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

sort: votes


text:
C# First 1 (right to left) in binary number
I am trying to use C# to find the index of the first 1 (right to left) in the binary representation of a number. For example, since 100 in binary is:
0b1100100

The first 1 is in the third position from the right, so it should yield 3.
234 should yield 2, 0 should yield 0, etc.
Here is my current solution:
k < 1 ? 0 :(int)Math.Log(k & -k, 2) + 1;

Any ways I can make this shorter?

The obvious tip is to remove your extraneous whitespace. I see 10 spaces that you could easily remove.

Convert.ToString(k,2).IndexOf("1") is what you want, or something similar, wrong site though.

@close-voters - Why the close-votes?  I think this is an on-topic [tag:tips] question.  Or have there been any rules changes I've missed in this regard?

If only C# supported machine-specific intrinsics… There is a single instruction that can do this in x86 assembly language, and on most other processor architectures as well. Then you'd have not only the shortest code, but very likely the fastest.
In fact, making this code shorter is an extremely boring problem compared to making this code fast. There are all sorts of really neat, efficient, bit-twiddling solutions, and you could also consider using a look-up table.
None of that matters for golfing, though. It looks to me like your current solution is the best you can do. Of course, you can remove the superfluous whitespace:
k<1?0:(int)Math.Log(k&-k,2)+1

I would personally write it as:
k>0?(int)Math.Log(k&-k,2)+1:0

because I think it's slightly clearer to have the direction of the conditional test that way, as well as to compare it against zero, but I guess it's six one way, half a dozen the other.
C# doesn't support implicit conversion from int to bool like C and C++ do, so you can't really shorten the conditional test any further.
You are also stuck with the explicit cast from double (as returned my Math.Log) to int, as C# won't allow this to happen implicitly. Of course, that's normally a good thing because it would point out that you have a big performance problem here: promoting an int to a double, computing the log of a double, and then converting the double result back to an int will be massively slow, so it's normally something that you'd want to avoid. But these are the kinds of perversions you have to put up with when playing code golf.

I had initially come up with
k > 0
      ? ((k & -k) >> 1) + 1
      : 0

(ungolfed for clarity, of course), which avoids taking the logarithm and is therefore an improvement in code size and speed. Unfortunately, this doesn't always get the right answer, and I assume that's an inflexible requirement. :-) Specifically, it fails if the input value (k) is a factor of 8. This is fixable, but not without making the code longer than the Math.Log version.

Note that for code golf the Math would have to be fully qualified so your other version should be better although I haven't actually counted the bytes.

You mean the one that produces the wrong output? @the

Well you said there's a fix to it but it would make it longer. If the fix is shorter than when the OPs version includes System. then it should be shorter and correct.

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


text:
Print all Sundays in 2017
Print the dates of all the Sundays in 2017 in the following format : dd.mm.yyyy.
Expected Output:
01.01.2017
08.01.2017
15.01.2017
22.01.2017
29.01.2017
05.02.2017
12.02.2017
19.02.2017
26.02.2017
05.03.2017
12.03.2017
19.03.2017
26.03.2017
02.04.2017
09.04.2017
16.04.2017
23.04.2017
30.04.2017
07.05.2017
14.05.2017
21.05.2017
28.05.2017
04.06.2017
11.06.2017
18.06.2017
25.06.2017
02.07.2017
09.07.2017
16.07.2017
23.07.2017
30.07.2017
06.08.2017
13.08.2017
20.08.2017
27.08.2017
03.09.2017
10.09.2017
17.09.2017
24.09.2017
01.10.2017
08.10.2017
15.10.2017
22.10.2017
29.10.2017
05.11.2017
12.11.2017
19.11.2017
26.11.2017
03.12.2017
10.12.2017
17.12.2017
24.12.2017
31.12.2017

Possible dupe of Plan your Sundays? This one is a specific year though.

I checked out Plan your Sundays before posting, but it asks to print the Sundays in a given month. @xnor

Any particular reason for that specific output format? You could open in up a bit.

I'm newbie here, please help me add that @Riker

@xnor was it a ninja edit? I don't see it in the rev history. And Patrick commented, is this some magic I don't know about?

I actually like this as an exact-text kolmogorov challenge. Getting the date formatting right has some interesting optimizations.

@Riker There is a 5-minute grace period, so the edit could have ninja'd there, but then how does the top comment contain the [tag:code-golf] tag? Since comments override the grace period, it seems strange... unless there was a [tag:code-golf] tag before the comment, which seems strange again because OP's reply says "Added tags[...]". There might have been some 11 around, since mods can delete revisions, but then that's only used when there's an absolute emergency. Can't find an explanation, and the first revision does indeed have a [tag:code-golf] tag. Something's gone crazy...

Anyways, I think the close votes should be retracted.

Is a trailing newline accepted?

Python 2, 81 bytes
x=0
exec"print'%05.2f.2017'%(x%30.99+1.01);x+=7+'0009ANW'.count(chr(x/7+40));"*53

Try it online!
No date libraries, computes the dates directly. The main trick is to treat the dd.mm as a decimal value. For example, 16.04.2017 (April 16) corresponds to the number 16.04. The number is printed formatted as xx.xx with  .2017 appended.
The day and month are computed arithmetically. Each week adds 7 days done as x+=7. Taking x modulo 30.99 handles rollover by subtracting 30.99 whenever the day number gets too big. This combines -31 to reset the days with +0.01 to increment the month.
The rollover assumes each month has 31 days. Months with fewer days are adjusted for by nudging x upwards on certain week numbers with +[8,8,8,17,25,38,47].count(x/7). These list is of the week numbers ending these short months, with 8 tripled because February is 3 days short of 31.
This list could is compressed into a string by taking ASCII values plus 40. The shift of +40 could be avoided by using unprintable chars, and could be accessed shorter as a bytes object in Python 3.

What a cool answer! '888z!}+'.count(chr(x%146)) saves one byte.

PHP, 48 bytes
while($t<53)echo gmdate("d.m.2017
",605e3*$t++);

PHP, 46 bytes (for non-negative UTC offsets)
while($t<53)echo date("d.m.2017
",605e3*$t++);

Shouldn´t that be gmdate for timezone safety? It fails on onlinephpfunctions.com. Great work in all other aspects!

Python 2, 90 79 bytes
-5 bytes with the help of xnor (avoid counting the weeks themselves)
-1 byte thanks to xnor (add back in e for 605000 as 605e3)
from time import*
i=0
exec"print strftime('%d.%m.2017',gmtime(i));i+=605e3;"*53

Try it online!
0 seconds since epoch is 00:00:00 on the 1st of January 1970, which, like 2017 was not a leap year. 605000 seconds is 1 week, 3 minutes, 20 seconds. Adding 52 of these "weeks" does not take us beyond midnight.

Here's a shorter way to generate the arithmetic progression.

@xnor Thanks, I was working on the same kind of thing and was trying to go lower, but 81 seems to much to go for with the library approach.

@xnor ...or not.

Nice! The number can be 605e3. I have some ideas though :)

PowerShell, 51 47
0..52|%{date((date 2017-1-1)+7.*$_)-u %d.%m.%Y}

Fairly straightforward. 2017-01-01 is a Sunday, so is every following seven days. We can save two bytes if we only need the script to be working in my lifetime:
0..52|%{date((date 17-1-1)+7.*$_)-u %d.%m.%Y}

You can save a few bytes if you, instead of a string, add a double representing number of days, i.e. (date 2017-1-1)+7.*$_ . See this answer

@DankoDurbić: Oh, wow. I only knew of adding int for ticks and strings for days so far. Nice to know.

Bash + coreutils, 44 bytes
seq -f@%f 0 605e3 32e6|date -uf- +%d.%m.2017

may save 2 bytes -u if GMT is assumed

Thanks Digital Trauma point out -f paramter for date which saves 10 bytes;
And use 2017 in format string saves more bytes which idea is from the answer given by
user63956

@0 is 1970-1-1
605000 is one week (604800) plus 200 sec

200 sec. should just work since there are only 52 weeks in a year

@32000000 is just a little more than a year

seq -f@%1.f 14833e5 605e3 1515e6|date -uf- +%d.%m.%Y saves you 10 bytes.  You should probably claim this as Bash + coreutils, though.

Excel VBA 106 91 79 bytes
Sub p()
For i = #1/1/2017# To #12/31/2017#
If Weekday(i) = 1 Then MsgBox i
Next
End Sub

saved 15 bytes thanks to @Radhato
Assuming 1/1/2017 is Sunday it will save 12 more bytes.
Sub p()
For i = #1/1/2017# To #12/31/2017#
MsgBox i
i = i + 6
Next
End Sub

Thanks @Toothbrush 66 bytes
Sub p:For i=#1/1/2017# To #12/31/2017#:MsgBox i:i=i+6:Next:End Sub

Edit: (Sub and End Sub is not necessary) 52 bytes
For i=#1/1/2017# To #12/31/2017#:MsgBox i:i=i+6:Next

Can be improved by chanching For i = 42736 To 43100 to For i = #1/1/2017# To #12/31/2017# and then removing Format(...) replacing with just i

@Radhato but wouldn't that increase byte size?

I think it reduces it to 96.. at least thats what I counted lol

Yes it did. Thanks

Using MsgBox (as you did) reduces it further to 91, if I didnt count wrong. And should be valid, since the OP just stated the output should contain every sunday.. not on how it is supposed to show up (i.e. MsgBox / Debug.Print)

I know VB.NET will allow you to remove some spaces, I don't know if Excel VBA is as lenient. If so, you should be able to remove spaces around the =, to shave about 4 more bytes.

@BrianJ Nope the VBA Editor inserts the space back if you remove it

@newguy Sub p:For i=#1/1/2017# To #12/31/2017#:MsgBox i:i=i+6:Next:End Sub is perfectly valid VBA code and is only 66 bytes. The fact that the VBA Editor adds in extra spaces is irrelevant.

k6, 32 bytes
`0:("."/|"."\)'$2017.01.01+7*!53

Brief explanation:
                2017.01.01+7*!53 /add 0, 7, 14, ..., 364 to January 1st
   ("."/|"."\)'$                 /convert to string, turn Y.m.d into d.m.Y
                                 /   split by ".", reverse, join by "."
`0:                              /output to stdout (or stderr), line by line

Alas, this seems to only work in the closed-source, on-request-only interpreter.

Pyke, 26 24 bytes
53 Fy17y"RVs6)c"%d.%m.%Y

Try it online!
53 F                     - for i in range(53):, printing a newline between each
    y17y"                -  Create a time object with the year 2017. (Month and days are initialised to 1.)
         RV  )           -  Repeat i times:
           s6            -   Add 1 week
              c"%d.%m.%Y -  Format in "dd.mm.yyyy" time

Or 11 bytes
If allowed to ignore output format
y17y"52VDs6

Try it online!
y17y"       - Create a time object with the year 2017. (Month and days are initialised to 1.)
     52V    - Repeat 52 times:
        D   -  Duplicate the old time
         s6 -  Add 1 week

PHP, 67 bytes
Using the fact the PHP automatically assign value 1 to undeclared loop variables, and using Linux epoch times,
<?php for(;54>$t+=1;)echo date("d.m.Y\n",604800*($t)+1482624000);?>

Welcome to PPCG! I believe this can be counted as 59 bytes (although I don't golf in PHP myself).

<?for(;54>++$t;)echo date("d.m.Y\n",605e3*$t+148263e4); should just be ok

Always nice to see some new PHP golfers ! You're allowed to use php -r so you don't need <?php and ?> and therefore can count this as 59 bytes like @JonathanAllan correctly said. You don't need the brackets around $t. A few other golfs and you end up with for(;++$t<54;)echo date("d.m.Y\n",605e3*$t+14827e5); for 51 bytes (in my time zone). You can replace "\n" with a real line break which is only 1 byte therefore it's 51 byte.

Thanks @Christoph I'm trying out another approach, will update soon

Apart from all the other hints, you might want to use gmdate instead of date for timezone safety.

Is it possible to do 54>$t++ ?

JavaScript, 111 106 bytes

for(i=14833e8;i<1515e9;i+=605e6)console.log(new Date(i).toJSON().replace(/(....).(..).(..).*/,'$3.$2.$1'))

Note: Stack Exchange's console isn't long enough to display the entire list, so here's the first half as a separate snippet:

for(i=14833e8;i<15e11;i+=605e6)console.log(new Date(i).toJSON().replace(/(....).(..).(..).*/,'$3.$2.$1'))

The custom format costs me 40 bytes...

R, 79 67 58 bytes
cat(format(seq(as.Date("2017/01/01"),,7,53),"\n%d.%m.%Y"))

First of January being a sunday, this snippet creates a sequence of days, every 7 days starting from the 01-01-2017 to the 31-12-2017, format them to the desired format and print them.

This should bring it down to 41 bytes print(as.Date("2017-01-01")+seq(7,365,7))

@count Thanks but it wouldn't print the required output (i. e. "2017.01.01" instead of "2017/01/01")

Befunge-98 (PyFunge), 99 95 93 85 bytes, Leaves trailing newline
All the optimizations were made by @JoKing many thanks to them
s :1g2/10g\%:d1p10g\`+:b`#@_:1\0d1g#;1+:a/'0+,a%'0+,'.,j;a"7102"4k,d1g7+
>8><><>><><>

Try it online!
I felt like we were missing out on some esostericity here so I made a solution in my favourite Esosteric language.
Explanation:
>8><><>><><> Encodes the length of the 12 months
s  Store the old day in the blank space
:1g2/ Get an ASCII value from the bottom row and divide it by two this gives us the length of a given month Ex: 8 = 56 in ASCII => 56/2 = 28 => The month (February) has 28 days
10g\% Get the previously saved day and modulo it by the length of the month which allows us to transition the date into the next month
:d1p Save a copy of the new updated day
10g\`+ Test if old date > new date => we transitioned into the next month => add 1 to the month counter
:b`  Test if month counter > 11 that means we reached the end of the year (using 0 indexing)
#@_ Based on the previous if terminate the program
:1\0d1g Reorder the stack so it looks like this: Month, 1, Month, 0, Day
# skip the next insctruction (duh)
1+:a/'0+,a%'0+,'., Convert the number to 1 indexing, print, add a . at the end
j; Use the 0 from the stack to not jump and use the ; to go to to the print schedule again then use the 1 to jump over the ; next time
a"7102"4k, Print 2017\n
d1g Get the day value again
7+ Add a week before repeating

@JoKing Omc such an obvious optimization! How could've I missed that one? Thank you.

A few more bytes off. Try it online! One from changing the -17 jump to a comment instead, one from using 0 based indexing for the month counter and one from changing it to a one-liner

@JoKing Wow that's a lot of golfing you did there. Lemme add it to the answer.

Hell, why not make the days 0 indexed as well, and save having to do any of the initialisation at all! 85 bytes

Perl 5, 64 bytes
use POSIX;print strftime"%d.%m.%Y\n",0,0,0,7*$_+1,0,117for 0..52

Try it online!
The task given was 2017, not any year, so I hardcoded in:

117 (which is perlish for year 2017, 1900+117)
+1 because 1st of January is a sunday in 2017
0..52 because 2017 have 53 sundays

POSIX is a core module and is always installed with Perl5. Doing the same without using modules in 101 bytes, removing whitespace:
$$_[5]==117&&printf"%02d.%02d.%d\n",$$_[3],$$_[4]+1,$$_[5]+1900
  for map[gmtime(($_*7+3)*86400)],0..1e4

Mathematica 90 84 bytes
Fairly wordy.  numbermaniac and Scott Milner saved 5 and 1 bytes, respectively.
Column[#~DateString~{"Day",".","Month",".","Year"}&/@DayRange["2017","2018",Sunday]]

Do you need the Most@? The output seems to be identical without it.

@numbermaniac,  Thanks. Most was in there to avoid the first Sunday in 2018.  I had originally tested the code, without Most, for years, 2011, 2012, in which case the first Sunday in 2012 is  included in the output.  (That's why I included it into the code.)  Strangely, Most is not needed for 2017-18.  Nor does Most have any apparent effect on the result.  Mysterious!

Ruby, 75 bytes
Straightforward solution to figure out the dates with Time.
t=Time.new 2017
365.times{puts t.strftime("%d.%m.%Y")if t.sunday?
t+=86400}

If you add a whole week(604800 seconds), then you don't need to check for a sunday, just repeat 53 times.

If you do the trick suggested by @GB and no longer check for Sunday, you can also initialize with t=Time.new 1 and then do t.strftime"%d.%m.2017" for -1 byte.

SAS, 52 50 bytes
Saved 2 bytes thanks to @user3490.
data;do i=20820to 21184 by 7;put i ddmmyyp10.;end;

You don't need to specify a dataset - just use data; instead of data c; and that saves 2 bytes. I think you do need a run; though.

@user3490 Thanks, I wasn't aware of that. I guess that's the equivalent of data _null_? Also, the run statement is implied if it's missing.

Not quite equivalent - you end up with an output dataset following the datan naming convention.

C#, 138 111 102 bytes
Saved 9 more bytes thanks to Johan du Toit!
Saved 27 bytes thanks to Kevin Cruijssen's suggestions!
()=>{for(int i=0;i<53;)Console.Write(new DateTime(2017,1,1).AddDays(7*i++).ToString("dd.MM.yyyy\n"));}

Anonymous function which prints all Sundays in 2017.
Full program with ungolfed method:
using System;

class P
{
    static void Main()
    {
        Action f =
        ()=>
        {
            for (int i = 0; i < 53; )
                Console.Write(new DateTime(2017, 1, 1).AddDays(7 * i++).ToString("dd.MM.yyyy\n"));
        };

        f();
    }
}

Isn't it easier to just use .AddDays(7*i++)? Then there is no need for the .DayOfWeek<1 check. We know 01-01-2017 is a Sunday, and from there we can just keep adding 7 days.

Not sure about this -- in all code golfs I partake, I always used the complete namespace -- but aren't you missing some Systems in there --
System.DateTime and System.Console.Write?

Cool but you can save a couple of bytes: ()=>{for(int i=0;i<53;)Console.Write(new DateTime(2017,1,1).AddDays(7*i++).ToString("dd.MM.yyyy\n"));};

@auhmaan: Yes, either full namespaces should be used, or the using statements should be included in the byte count.

@adrianmp: You can save some bytes by eliminating i. (for(var d=new DateTime(2017,1,1);d.Year<2018;d=d.AddDays(7))Console.Write(d.ToString("dd.MM.yyyy\n"))). Also your current answer is 112 bytes not 111.

@auhmaan: I've seen both forms. I consider it ok if it's a function and the standard System namespace was the only one used.

@adrianmp: Necessary using statements to run the code must be counted. See this Meta question: Do I need to use imports or can I call a class explicity?

VBA, 81 bytes (maybe 64)
Sub p()
For i = 0 To 52
MsgBox format(42736 + i * 7, "dd.mm.yyyy")
Next i
End Sub

My first post. Building on newguy's solution by removing the check for weekdays and just specifying every 7th day. Removing the dates saves 12 bytes a piece. 42736 is 1/1/2017.
Output date format depends on system setting. Is that allowed?
If so, it's 64 bytes because you don't need the format method.
MsgBox #1/1/2017# + i * 7

You can also remove a lot of the white space that is autoformatted. For instance, and For i=0To 52 and Format(42736+i*7,"dd.mm.yyyy"). Also, you can just use Next instead of Next i.

AHK, 67 bytes
d=20170101
Loop,52{
FormatTime,p,%d%,dd.MM.yyyy
Send,%p%`n
d+=7,d
}

Nothing magical happens here. I tried to find a shorter means than FormatTime
but I failed.

Java 8+, 104 100 99 bytes
()->{for(int t=0;t<53;)System.out.printf("%1$td.%1$tm.2017%n",new java.util.Date(t++*604800000L));}

Java 5+, 109 105 104 bytes
void f(){for(int t=0;t<53;)System.out.printf("%1$td.%1$tm.2017%n",new java.util.Date(t++*604800000L));}

Uses the date-capabilities of the printf format.
Test it yourself!
Savings

104 -> 100: changed the loop values and the multiplicand.
100 -> 99: golfed the loop

T-SQL, 94 Bytes
DECLARE @ INT=0,@_ DATETIME='2017'W:SET @+=1SET @_+=7PRINT FORMAT(@_,'dd.MM.yyy')IF @<52GOTO W

if you don't like SQL GOTO or WHILE, here is a 122 bytes CTE solution
WITH C AS(SELECT CAST('2017'AS DATETIME)x UNION ALL SELECT x+7FROM C WHERE X<'12-31-17')SELECT FORMAT(x,'dd.MM.yyy')FROM C

your first solution starts at 08.01.2017 not 01.01.2017

Very good tricks in your solution.  Good job. I couldn't resist to borrow them. ;)

Ruby, 60+7 = 67 bytes
Uses the -rdate flag.
(d=Date.new 1).step(d+365,7){|d|puts d.strftime"%d.%m.2017"}

Groovy, 81 77 63 60 56 bytes
d=new Date(0);53.times{printf('%td.%<tm.2017%n',d);d+=7}

The above can be run as groovy script.
My first code golf entry.
Fortunately, the year 1970 was not a leap year, thus can use it as a base.
Thanks to Dennis, here's a:
Try it online!

Welcome to Programming Puzzles & Code Golf! In case you're interested, here's a permalink: Try it online!

Thank you @Dennis I didn't know this existed :)

You can save four bytes by moving the date inside the times block, 53.times{printf('%td.%<tm.2017%n',new Date(0)+it*7)}, 52 bytes. Defending groovy's honor here...

C#, 110 109 bytes
using System;()=>{for(int i=42729;i<43100;Console.Write(DateTime.FromOADate(i+=7).ToString("dd.MM.yyy\n")));}

You can enjoy this program online here
In this soluion we :

Use OLE Automation Date (OADate) to avoid "AddDay()" from datetime.
FromOADate() seem big but it's equal to new DateTime(2017,1,1)
Start the loop on the last sunday of 2016. to allow us to increment with operator += only. This operator return the value after the increment is done.
Increment by 7 days to jump from sunday to sunday before printing the date.
We stop once the last sunday of 2017 has been hit.
Use Debug instead of Console to save two characters
Avoid having explicit variable declaration and assignment

Unless otherwise specified, our defaults say you should provide a function or program (i.e. not a snippet), and you need to qualify Debug and DateTime: I'd recommend adding using System; and switching to Console from Debug (which is a tad dodgy itself, but I can't find any commentary on meta regarding it).

@VisualMelon I've complied with "provide a function" and I have also replace Debug for Console since Debug required a specific include. However,  I didn't comply with the 'use system' because my competitor in this language doesn't do it. Also, you can't code outside a class which itself required to be defined within a namespace. I'm pretty sure most c# answer on this site doesn't include that. So what now, do we throw all these answers to the garbage? Do we downvote them all to force them to comply? If so, then the community might as well ban c# from codegolf  altogether.

These 'rules' are just what the community has over time settled on (and documented on meta). We don't downvote answers, we comment and don't upvote them either. When they fix them, then we are free to upvote. Both other C# answers have comments suggesting they should add the using directive or fully qualify the methods and types, please don't take any of this personally. I'm a long time C# golfer, and I appreciate how arbitrary the rules seem, so I like to nudge people in the right direction when I can. I specifically 'target' C# answers because I'm relatively well informed on the matter.

Just regarding the bit about code being required to be defined within a class (classes, by the way, do not need to be declared within a namespace), the idea of the rules isn't that it should compile as is, but that it should (ideally) be unambiguous, not too convoluted, and consistent (fair). Do please join the discussion on meta if you disagree!

@VisualMelon Fair enough, I'm just a passerby here anyway. So I shall accept your rules while I'm here. Therefore, I've attempted to make my answer comply this time.

Looks good to me! +1 for the original approach. And you don't need the space after using System; (I assume that wasn't intentional) so that's 109 bytes.

TSQL, 112 105 bytes
SELECT CONVERT(VARCHAR,DATEADD(d,number*7,42734),104)FROM master..spt_values WHERE type='p' AND number<53

Demo
T-SQL Convert Syntax

You can save 2 bytes by replacing DAY by d. It does the same.

+1 You can save another 3 bytes by replacing '20170101' with 42734. Dates are number. Time is the decimals part of the number.

T-SQL, 79 77 Bytes
After helping Salman A improve his answer. I decided to write my own using a loop and PRINT.
I ended with this 90 bytes solution.
DECLARE @d DATETIME=42734 WHILE @d<43100BEGIN PRINT CONVERT(VARCHAR,@d,104)SET @d=@d+7 END

Then I looked at the current leader in T-SQL which was 94 bytes from WORNG ALL with this answer.
This guy had found very good tricks.

Name the variable only @
Loop with GOTO instead of actual LOOP
Save one character using FORMAT instead of CONVERT. (SSMS2012+ only)

Using these tricks, this solution was trimmed down to the solution below which is 79 bytes.
DECLARE @ DATETIME=42734G:PRINT FORMAT(@,'dd.MM.yyy')SET @+=7IF @<43100GOTO G

You can save 2 bytes by changing @=@+7 to @+=7 and by removing the space between the 7 and the IF.

In this post is where I got all the tricks, may help you too.

@WORNGALL  wonderfull, I was unaware we could do that. Thanks a lot.

JavaScript (ES6), 123 bytes
It's my first post here, hello!
a=x=>`0${x}.`.slice(-3);[].map.call('155274263153',(x,i)=>{for(j=0;j<4+(2633>>i&1);j++)console.log(a(+x+j*7)+a(i+1)+2017)})

This solution uses hardcoded data and is designed to work specifically for the year 2017. It relies on no date/time APIs.
As for the digits in the string 155274263153, each digit is a number of its own and denotes the first Sunday of each consecutive month. Output for the entire year can be generated by successively adding 7 to those.
What about the magic number, 2633, used in the loop?
Well... 2633 (decimal) is 101001001001 in binary. Now what could those 1s mean? Starting from the right, the 1st, 4th, 7th, 10th and 12th bit are set. This corresponds to months which happen to have five Sundays, as opposed to those that have only four. Golfed down to this neat expression, it initially looked like this: for(j=0;j<4+ +[0,3,6,9,11].includes(i);j++).
I guess the remaining parts are fairly self-explanatory.

@SIGSEGV: I don't mind changing ECMAScript 2015 to Javascript (ES6), but... you broke my code and I had to revert it.

Oh, that's the community's consensus, having only the lambda part is allowed.

@SIGSEGV This is not the case here. This lambda contains only a small portion of the code, and I need that identifier to be able to use it elsewhere. Without the a= the code is actually broken.

Octave, 37 bytes
A lot shorter than all other non-golfing languages, and it's even tied with Jelly! Way to go Octave! :)
disp(datestr(367:7:737,'DD.mm.2017'))

Try it online!
Luckily, year 2 AD looks exactly the same as year 2017 AD. Both starts and ends at a Sunday, and neither is a leap year. This saves a lot of bytes, since 367:7:737 is quite a bit shorter than 736696:7:737060.
This converts the number of days since 01.01.0001, to a string on the format DD.mm, with a trailing .2017.

Haskell, 133 130 bytes
import Data.Time.Calendar
((\[f,g,h,i,j]->i:j:'.':f:g:".2017\n").drop 5.show)=<<take 53(iterate(addDays 7)$fromGregorian 2017 1 1)

Try it online!
Without a calendar library, 148 144 140 bytes
(\l->last l!l++length l!l++"2017\n").fst.span(>0).(<$>scanl((+).(+28))0[3,0,3,2,3,2,3,3,2,3,2]).(-)=<<[1,8..365]
a!_=['0'|a<=9]++show a++"."

This is funny since using an operator for the padding function saves two bytes even though the second argument is unused, because less parentheses are needed – p(last l) is longer than last l!l. Works by calculating day/month pairs by subtracting the cumulative month start dates from the day of the year. The month start dates are compressed as (scanl((+).(+28))0[3,0,3,2,3,2,3,3,2,3,2]). Month number is the number of positive elements and day number is the last positive element.
Try it online!

C#, 116 114 113 bytes
for(long i=(long)636188256e9;i<636502857e9;i+=(long)605e10)Out.Write(new DateTime(i).ToString("dd.MM.yyyy\n"));
Can be run in the interactive windows of Visual Studio (or any other C# REPL based on Roslyn)
Down to 113 bytes: thanks to Kevin Cruijssen.

Could you add a TryItNow link? Also, you can golf it a bit by using a for-loop instead of a while-loop: for(long i=(long)636188256e9;i<636502857e9;i+=(long)605e10)Out.Write(new DateTime(i).ToString("dd.MM.yyyy\n"));

@KevinCruijssen Unfortunaly I am not able to find an applicable compiler on the given page. Here is a link to the used technology if you want to get in touch with it: link. Anyway thanks for the new loop. :)

Unless otherwise specified, our defaults say you should provide a function or program (i.e. not a snippet), and you need to qualify Debug and DateTime: I'd recommend adding using System; and using Console.WriteLine(string)

Java 7, 145 144 142 bytes
void c(){for(long x=604800000,i=-x;i<52*x;)System.out.println(new java.text.SimpleDateFormat("dd.MM.2017").format(new java.util.Date(i+=x)));}

-2 bytes thanks to Cliffroot due to a stupid mistake of me..
Try it here.
Explanation:
void c(){                                  // Method
  for(long x=604800000,                    //  Initialize `x` as 604,800,000
           i=-x;                           //  Initialize `i` as `-x` / -604,800,000 as starting number
      i<52*x;)                             //  Loop over all 52 weeks
    System.out.println(new java.text.SimpleDateFormat("dd.MM.2017")
      .format(new java.util.Date(i+=x)));  //   Raise `i` by `x` and then print it in the format `dd.MM.2017`
                                           //  End of loop (implicit / single-line body)
}                                          // End of method

long x=605000000 is shorter

@cliffroot Thanks. I really should just use the entire long from now on, and in case it can be shortened change it to (long)NeM.. I think this is already the second time you've corrected me on this..

SpecBAS - 61 bytes
1 FOR i=42736 TO 43100 STEP 7: ?DATE$(i,"dd.mm.yyyy"): NEXT i

Dates are a decimal number starting at 30-Dec-1899, so had to work out what 1 Jan 2017 and 31 Dec 2017 were, then just step through those values adding 7 days each time.

Java 7, 126 bytes
void e(){for(int i=0,j=1,k;i<12;j%=k)for(k="(%('('(('('(".charAt(i++)-9;j<k+1;j+=7)System.out.format("%02d.%02d.2017\n",j,i);}

Computes everything manually. The string "(%('('(('('(" encodes number of days in month. Outer loop goes from 0 to 11 (number of months), inner loops goes until the number representing day is greater than number of days in this month.
See it online

SQL (PostgreSQL), 74 Bytes
SELECT to_char(generate_series('170101'::date,'171231','7d'),'DD.MM.YYYY')

If output must be in a single string rather than individual records then the query can be run from psql with the -tA options, making it 76 bytes.

REXX, 91 bytes
do n=1 to 365
  if date(w,n,d)='Sunday' then say left(translate(date(e,n,d),.,'/'),6)2017
  end

c, 119 116 114 bytes
y=2017,m=1,d=1,i=53,v;main(){for(;i--;)printf("%02d.%02d.%d\n",d,m,y),v=m^2?m%2^m<8?30:31:28,(d+=7)>v?++m,d-=v:0;}

Try it online

103 bytes - d=1,i=53,v;main(m){for(;i--;(d+=7)>v?++m,d-=v:0)printf("%02d.%02d.2017\n",d,m),v=m^2?m%2^m<8?30:31:28;}

Suggest 31-(m%2^m<8) instead of m%2^m<8?30:31

SQL (Oracle), 137 bytes
select substr(d,1,10)
from (select to_char(sysdate-1e4+rownum,'DD.MM.YYYYdy') d from dual connect by rownum<=2e4)
where d like '%2017s%';

Jelly,  38  37 bytes
-1 thanks to user202729 (use the ⁽ quick I implemented about a month after this answer.)
Ḋ€;⁽¥Ñj”.
“£hṅ’ṃ“þœ÷‘R,€"J$;/m7+³DÇ€Y

Jelly currently has no date type or way of representing a date natively, so a purely numeric approach is required.
Try it online!
How?
Ḋ€;⁽¥Ñj”. - Link 1, format helper: list of lists   e.g. [[x,0,2],[x,0,7]] (for 2nd July)
Ḋ€        - dequeue €ach                                [[0,2],[0,7]]
   ⁽¥Ñ    - literal 2017                                2017
  ;       - concatenate                                 [[0,2],[0,7],2017]
       ”. - character '.'
      j   - join                                        [0,2,'.',0,7,'.',2017]
              which has the representation:             "02.07.2017"

“£hṅ’ṃ“þœ÷‘R,€"J$;/m7+³DÇ€Y - Main link: no arguments
“£hṅ’                       - base 250 compressed number 213991
      “þœ÷‘                 - code-page indexes [31,30,28]
     ṃ                      - base decompression: 213991 base length([31,30,28])
                                = [1,0,1,2,1,2,1,1,2,1,2,1]; indexed into [31,30,28]
                                = [31,28,31,30,31,30,31,31,30,31,30,31]
           R                - range (vectorises): [[1,2,...,31],[1,2,...,28],...]
                $           - last two links as a monad:
               J            -     range(length): [1,2,3,4,5,6,7,8,9,10,11,12]
              "             -     zip with:
            ,€              -         pair for €ach: [[[1,1],[2,1],...,[31,1]],[[1,2],[2,2],...,[28,2]],...]
                 ;/         - reduce with concatenation: [[1,1],[2,1],...,[31,1],[1,2],[2,2],...,[28,2],...]
                   m7       - every 7th item: [[1,1],[8,1],...,[24,12],[31,12]]
                      ³     - 100
                     +      - add (vectorises): [[101,101],[108,101],...[124,112],[131,112]]
                       D    - to decimal (vectorises): [[[1,0,1],[1,0,1]],[[1,0,8],[1,0,1]],...,[[1,2,4],[1,1,2]],[[1,3,1],[1,1,2]]]
                        Ç€  - call last link as a monad for €ach: [[0,1,'.',0,1,'.',2017],[0,8,'.',0,1,'.',2017],...,[2,4,'.',1,2,'.',2017],[3,1,'.',1,2,'.',2017]]
                          Y - join with line feeds: [0,1,'.',0,1,'.',2017,'\n',0,8,'.',0,1,'.',2017,'\n',...,'\n',2,4,'.',1,2,'.',2017,'\n',3,1,'.',1,2,'.',2017]
                            - implicit print

Why don't you use ⁽¥Ñ instead? New feature?

This post was made about a month before I implemented ⁽. I will update it but I have not trawled through my old posts looking for golfs using newer language features (there are probably many that could use the quicks ƊƲɗʋ, a bunch that could use Ɲ, and a few that could use Ƥ or ÐƤ, and maybe more...).

Python 3.6, 94 bytes
from datetime import*
for x in range(53):print(f"{datetime(1,1,1)+timedelta(x*7):%d.%m.2017}")

I wanted to try using high-level features. Well, it's still readable but not that short…

T-SQL, 141 bytes
SELECT FORMAT(d,'dd.MM.yyyy')FROM(SELECT DATEADD(ww,ROW_NUMBER()OVER(ORDER BY name)-1,'20170101')d FROM sys.stats)a WHERE 2017=DATEPART(yy,d)

Try it here

save 53 bytes

k, 36 Bytes
Same approach as zgrep. 2017.01.01+0 7 14..., string it, split it on ".", reverse each and join back on "." - finally print the list of strings e.g. -1@("Print";"me");
-1@"."/:'|:'"."\:'$2017.01.01+7*!53;

Oracle SQL, 89 bytes
    select to_char(to_date('25-DEC-16')+level*7,'DD.MM.YYYY') from dual connect by level < 54

Explanation:
You can just add an integer to a date and it's treated as a number of days.
Exploiting connect by we're generating 53 rows for the 53 sundays which occur in 2017.
Setting the starting date as the last sunday of 2016 saves me two bytes because I don't have to subtract 7 to compensate level starting at 1.

Microsoft Sql Server, 114 bytes
with v as(select 0 n union all select n+7 from v where n<364)select format(dateadd(d,n,'2017'),'dd.MM.yyyy')from v

Check It Online

this is the good idea, but you can save a few bytes using spt_values

05AB1E, 81 79 bytes
•8tåxвÓÈCм∞º²áÝViΣþ1₄É¨Å9”ÓU2Èn¶äΔb'Î?™Íćεr$Ã]7¤¶¸M•11BR'A¡vy2ôN>".ÿ.2017"«})˜»

Try it online!
No date built-ins.

01081522A05121926A05121926A0209162330A07142128A04111825A0209162330A06132027A03101724A0108152229A05121926A0310172431

Is the compressed base-11 number at the beginning, when split on A's you get:
['01081522', '05121926', '05121926', '0209162330', '07142128', '04111825', '0209162330', '06132027', '03101724', '0108152229', '05121926', '0310172431']

Which is the days of each month that are Sundays, in order. Then, we split each one into pieces of two, and concatenate the index of those days plus 2017 to each.
Finally we just flatten and return the list separated by newlines.

Tcl, 80 bytes
time {puts [clock format [expr 1482624000+[incr i 604800]] -format %d.%m.%Y]} 53

Try it online!

Japt -R, 25 21 15 bytes
Locale dependent - You'll need to set your browser's locale to (among others, I'm sure) Romania (RO), Russia (RU) or Turkey (TR) for the dates to be formatted correctly.
#5ÆÐ#É7TX*7Ä s7

Test it

Explanation
Takes advantage of the fact that if you provide JavaScript's date construct a value for the day that's higher than the number of days in the month you've provided, it will rollover to the next month.
#5                        :53
  Æ                       :Create the range [0,53) and pass each integer X through a function
    #É7                   :  2017
       T                  :  0
        X*7Ä              :  X*7+1
   Ð                      :  new Date() with those 3 arguments as year, month & day
             s7           :  Convert to date string, locale formatted

JavaScript, 80 bytes
(f=x=>x?[...f(--x),new Date(2017,0,x*7+1).toLocaleDateString()]:[])(53).join`
`

This looks like an auto-flag, so I'm reviewing Looks OK.

Pyth, 122 bytes
jm+X2d\.".2017"c+\0`i."0Z|´&ÓäßæÅJÈD@ßÍTû=´}¾}Zàe+ñðºâ$Ã°Gzdüä#Ò×ûíO^©¢Q Óýo`Åi2ÓàÀ{9¢à>«+íø#o^Mý"36 4

Try it online!
The code uses unprintable characters that are not displayed properly on Stack Exchange. Use the link to get the working version.
Pyth doesn't have a way to check whether a date is a Sunday, so this is the Kolmogorov version.
It uses a MAGIC STRING which represents this integer.
Explanation:
jm+X2d\.".2017"c+\0`i."…"36 4 # Code with MAGIC STRING replaced with …
                   `          # String representation of
                      "…"     # THE MAGIC STRING
                     ."       # Decompressed
                    i    36   # To int from base 36
                +\0           # With a 0 in front
               c            4 # Chopped into strings of length 4 as a list
 m                            # With each member
   X2d\.                      #  with . inserted at index 2
  +     ".2017"               #  and appended with .2017
j                             # Joined with newlines

Red, 107 bytes
f: func[n][n: pad/left/with to-string n 2 #"0"]d: 1-1-2
loop 53[print rejoin[f d/3":"f d/4":"2017]d: d + 7]

Try it online!

Groovy, 52 bytes
53.times{printf('%td.%<tm.2017%n',new Date(0)+it*7)}

Building on Krystian's groovy answer above with an optimisation dropping another four bytes. Uses the fact that the epoch year 1970 matches 2017 weekdays and months.


text:
The Big Bang Polyglot
Everyone loves The Big Bang Theory, right? And everyone loves polyglots, right? So let's combine them!
Task
Your task in each language is quite basic. You must output the name of the one of the 5 main characters of The Big Bang Theory: Sheldon Lee Cooper, Leonard Leakey Hofstadter, Howard Joel Wolowitz, Rajesh Ramayan Koothrapali and Penny Hofstadter.
Your task overall is to write a polyglot that will work in at least 5 languages. Each language should output a different character on the show.
I say "at least" because in order to win, you must output more characters (see Scoring below). But before that, let's go over the details of your program
Input
You program should take no input when run in any of the languages.
Output
Your program should output the full name of a different characters of TBBT for each language it is run in. If no middle name is known, no middle name is required. 5 of those characters must be the 5 main characters:

Leonard Leakey Hofstadter
Sheldon Lee Cooper
Howard Joel Wolowitz
Rajesh Ramayan Koothrapali
Penny Hofstadter

The names outputted must be characters that have appeared in more than one episode and they must have both a first and a last name. If they have a middle name, it must be outputted as well.
Scoring
The scoring system is quite basic: your score is the length of your code in bytes minus 20 times the extra number of characters you output. The extra characters are any that aren't in the list above.
length - 20 * (num_characters - 5)

You may also subtract 100 from your score if you don't use any comment characters.
Rules

No builtins allowed. (Why not?)
The lowest score wins.
Only characters with both first and surnames are valid
You must output to STDOUT or your languages equivalent. Nothing may be outputted to STDERR
Each submission must run in at least 5 different languages
Different language versions do not count as different languages
Entries must be full programs
Case and whitespace matter so an output of Pen nyHof STAdter isn't valid.
The valid characters are listed here
Leading/trailing whitespace is allowed.
A comment character is a character that makes the program ignore the next line or command

I don't think you'll receive answers with more than 5 characters, since adding another character will probably cost multiple bytes, of which only one gets compensated for. I'd suggest a bonus of 20 bytes per extra character.

@Luke yeah I've edited the question given that I've just wasted 4 hours trying to find a solution for 5

Penny Hofstadter Thanks for the spoiler

@ThisGuy That last part isn't necessary (unless there's another meaning to that than the literal meaning)

Related

"You may also subtract 100 from your score if you don't use any comment characters." Define "comment characters". Does a simple skip statement count as a comment character? The border becomes fuzzy with 2D languages

Befunge-98, ><>, Haystack, Minkolang, Alice: 5 languages
151 150 146 bytes
4 bytes saved thanks to @MartinEnder
#\"retdatsfoH ynneP">:#,_@>o<'Leonard Leakey Hofstadter'
#>!v"Howard Joel Wolowitz"$O.
| @>"Sheldon Lee Cooper"O
d&O>/"ilaparhtooK nayamaR hsejaR"

All aboard the 2D-language train!
I got the template for this answer from a previous answer of mine from a similar challenge, but I wanted this submission to be composed of only 2D languages. I am planning to add more languages soon.
Befunge-98
Try it online!
#                          Jump over one command
"retdatsfoH ynneP"         Push the characters in this string
>:#,_@                     Print it (basically checks if the top value is not zero, then prints it, otherwise exits the program)

Outputs Penny Hofstadter.
><>
Try it online!
#                         Reflect; the IP moves to the left and wraps around to go to the right edge of the field
'retdatsfo ... ranoeL'    Push the characters in this string
>o<                       And output each character in the stack until there are no more, at which point the program exits with an error

Outputs Leonard Leakey Hofstadter and exits with an error.
Haystack
Try it online!
#                        Ignored
\                        Reflect; moves downward
>                        Move right
!                        Ignored
v                        Go down
>                        Go right
Sheldon Lee Cooper"      Push this string
O                        Output all characters in the stack; the program wraps around to the left edge
|                        End program

Outputs Sheldon Lee Cooper.
Minkolang
Try it online!
#                       Doesn't do anything important
\                       Reflect; moves downward
>                       Move right
!                       Ignore the next command
"Howard Joel Wolowitz"  Push this
$O                      Output all characters in the stack
.                       End program

I could have put the . and the beginning of the second line so that the IP would encounter that once it wraps around, but since the grid is padded with spaces and Minkolang travels through time when it sees a space (infinite loop in this case), I had to include the . right after the $O.
Outputs Howard Joel Wolowitz.
Alice
Try it online!
Alice was the most fun and the most confusing of these languages.
#                     Skip the next command
\                     Mirror; redirect IP north-east
                      The IP gets reflected off the top and start moving south-east instead
!                     This command gets skipped over from the #
>                     Set the horizontal component of the IP to East (changes nothing)
/                     Set the IP's direction to East
"ilaparht ... sejaR"  Push this
                      IP wraps around and comes in from the left edge
d&O                   Output the string (duplicate the output command stack length times)

Now the program goes on a joyride (@MartinEnder showed how this bit works to me) to get to the @ in Row 3, Column 3.
/                     Mirror; redirect IP south-east
                      The IP hits the bottom and reflects north-east

Now the IP moves diagonally up and down as it gets reflected executing the commands along its way.
anJ                   Push 10; negate it into an empty string; and jump to origin (0, 0)
                      After the jump, the IP still moves in a north-easterly (irk) direction
#                     Skip the next command
                      IP gets reflected and start moving south-east
@                     Terminate the program

Of course, the @ could have been placed right after the d&O (replacing the useless >) but that wouldn't have been fun :)
Outputs Rajesh Ramayan Koothrapali.

Foo, Python, JavaScript, Retina, ><>: 166 148 bytes
1//1;print('Sheldon Lee Cooper');"""
alert`Howard Joel Wolowitz`

// Rajesh Ramayan Koothrapali
//!??

//\"Leonard Leakey">o<'Penny'" Hofstadter"""

The trailing newline is significant.
Foo outputs Leonard Leakey Hofstadter
Python outputs Sheldon Lee Cooper
JavaScript outputs Howard Joel Wolowitz
Retina outputs Rajesh Ramayan Koothrapali
><> outputs Penny Hofstadter
Explanations
Foo
In Foo, any text written inside double quotes is sent to STDOUT. So it outputs Leonard Leakey and Hofstadter. It also prints it with a leading newline. Honestly I'm really not sure about how it parses strings, but it works as-is. It also tries to do some other operations (/ is divide, parentheses form loops, etc.), but all of that just causes errors and prints to STDERR without affecting the main output in any way.
Python
1//1 is 1 integer divided by 1. In a statement by itself, that does nothing relevant. Then it prints Sheldon Lee Cooper, and the rest is in a triple quoted string, which is basically a block comment.
JavaScript
JavaScript sees most lines as either empty or commented (//). The first statement is 1 by itself which, like in the Python part, does nothing. Then it alerts Howard Joel Wolowitz.
Retina
1//1;print('Sheldon Lee Cooper');"""
alert`Howard Joel Wolowitz`

First all matches of 1//1;print('Sheldon Lee Cooper');""" in the input are replaced with alert`Howard Joel Wolowitz`. Seeing as the input is empty, nothing happens.

// Rajesh Ramayan Koothrapali
Then the empty input is replaced with // Rajesh Ramayan Koothrapali.
//!??

Then all matches of // optionally followed by a ! are replaced with nothing. This deletes the initial //, leaving one leading space (which is allowed).
//\"Leonard Leakey">o<'Penny'" Hofstadter"""

Then all matches of the regex above are replaced with nothing. This regex doesn't match anything in the working string, so nothing happens.
The working string is then output implicitly.
><>
The IP starts in the top-left, initially moving right. It first pushes 1, then bounces around on mirrors (/ and \) for a while (looping around when it goes out of bounds). The 1 will be popped when it hits ?.
Eventually it will be on the right side of the second last line moving left. On this line, it sees an empty string "", pushing nothing. Then it encounters two strings, " Hofstadter" and 'Penny', pushing the characters from each as it sees them. When it hits >o<, it repeatedly pops and prints the top of the stack as a character, until there's nothing left to pop. It exits with an error.

Clojure, Java, Ruby, Groovy, Common Lisp - 297 bytes
;/\u002A/
(if '()(print"Leonard Leakey Hofstadter")(eval(quote(princ"Sheldon Lee Cooper"))))
;'then print "Howard Joel Wolowitz" end)
;%(/a*/class I{public static void main(String[]a){System.out.print("${}".getClass().getName().contains("G")?"Rajesh Ramayan Koothrapali":"Penny Hofstadter");}}//%)

Ruby actually sees all the lines of the program. The first line is a ; (no-op) followed by Ruby Regexp. The second line is an if expression which evaluates a string which is True and on the third line it prints the character. The last line is no-op again followed by multi-line string %( and %).
See it online : Ruby
Java and Groovy see the same portion of the program, these langauges allow ; as no-op (first line), then the comment is started as /\u0002A which evaluates to /* and then the comment ends right before class declaration.
After that it's a plain Java/Groovy program. In order to distinguish between them I check the name of the String object class, in Java it will be the usual java.lang.String but in Groovy this string object will have class name groovy.lang.GString because it contains interpolated expression ${}.
See it online: Java , Groovy
Clojure and Common Lisp see only the second line of the program (; denotes comment). In Clojure empty list '() (quote symbol luckily denotes string in ruby) evaluates to true and it evaluates to nil in Common Lisp, which is false. eval has to be used in an else part because print in Common Lisp outputs value with double-quotes so princ is used which is not a valid function in Clojure so it's eval`d.
See it online: Clojure , Common Lisp