text:
Rotation summation
Take a square matrix containing positive integers as input, and calculate the "rotated sum" of the matrix.
Rotated sum:
Take the sum of the original matrix and the same matrix rotated 90, 180 and 270 degrees.
Suppose the matrix is:
 2    5    8
 3   12    8
 6    6   10

then the rotated sum will be:
2    5    8     8    8   10    10    6    6     6    3    2
3   12    8  +  5   12    6  +  8   12    3  +  6   12    5  =
6    6   10     2    3    6     8    5    2    10    8    8

26   22   26
22   48   22
26   22   26

Test cases:
Input and output separated by dashes, different test cases separated by a newline. Test cases in more convenient formats can be found here.
1
-------------
4

1 3
2 4
-------------
10   10
10   10

14    6    7   14
 6   12   13   13
 6    2    3   10
 5    1   12   12
-------------
45   37   24   45
24   30   30   37
37   30   30   24
45   24   37   45

14    2    5   10    2
18    9   12    1    9
 3    1    5   11   14
13   20    7   19   12
 2    1    9    5    6
-------------
24   29   31   41   24
41   49   31   49   29
31   31   20   31   31
29   49   31   49   41
24   41   31   29   24

Shortest code in bytes in each language wins. Explanations are highly encouraged!

Python 2, 78 bytes
Thanks to Dennis for golfing two bytes off my previous recursive approach.
f=lambda*l:l[3:]and[map(sum,zip(*d))for d in zip(*l)]or f(zip(*l[0][::-1]),*l)

Try it online! or See a test suite.

Python 2, 80 81 83 85 bytes (non-recursive)
Takes input as a singleton list.
l=input()
exec"l+=zip(*l[-1][::-1]),;"*3
print[map(sum,zip(*d))for d in zip(*l)]

Try it online!
Code functionality
Since this is quite length-ish to analyse it as a whole, let's check it out piece-by-piece:
f = lambda *l:                # This defines a lambda-function that can accept any number
                              # of arguments (the matrix) using starred expressions.
l[3:] and ...X... or ...Y...  # If l[3:] is truthy (that is, the length of the list is
                              # higher than 3), return X, otherwise Y.

[map(sum,zip(*d))for d in zip(*l)]     # The first expression, X.
[                                ]     # Start a list comprehension, that:
                 for d in              # ... Iterates using a variable d on:
                          zip(*l)      # ... The "input", l, transposed.
         zip(*d)                       # ... And for each d, transpose it...
 map(sum,       )                      # ... And compute the sum of its rows.
                                       # The last two steps sum the columns of d.

f(zip(*l[0][::-1]),*l)     # The second expression, Y. This is where the magic happens.
f(                   )     # Call the function, f with the following arguments:
  zip(*          )         # ... The transpose of:
       l[0][::-1]          # ...... The first element of l (the first arg.), reversed.
                  ,        # And:
                   *l      # ... l splatted. Basically turns each element of l
                           # into a separate argument to the function.

And for the second program:
l=input()                                # Take input and assign it to a variable l.
                                         # Note that input is taken as a singleton list.

exec"l+=zip(*l[-1][::-1]),;"*3           # Part 1. Create the list of rotations.
exec"                     ;"*3           # Execute (Do) the following 3 times:
     l+=                 ,               # ... Append to l the singleton tuple:
        zip(*           )                # ...... The transpose of:
             l[-1][::-1]                 # ......... The last element of l, reversed.

print[map(sum,zip(*d))for d in zip(*l)]  # Part 2. Generate the matrix of sums.
print                                    # Output the result of this expression:
     [                for d in        ]  # Create a list comprehension, that iterates
                                         # with a variable called "d" over:
                               zip(*l)   # ... The transpose of l.
      map(sum,       )                   # ... And computes the sum:
              zip(*d)                    # ... Of each row in d's transpose.
                                         # The last 2 steps generate the column sums.

TL;DR: Generate the list of matrices needed by rotating the input 3 times by 90-degrees and collecting the results. Then, get the sums of the columns of each matrix in the result's transpose.

f=lambda*l:l[3:]and[map(sum,zip(*d))for d in zip(*l)]or f(zip(*l[0][::-1]),*l) saves two bytes with "normal" input. Try it online!

@Dennis Thank you! I thought lambda*l wasn't possible in Python 2 for some reason.

You can't do x,*y=1,2,3 in Python 2.7 or [*x] in Python 3.4, but starred expressions can be used for function arguments even in Python 1.6. Try it online!

Octave, 29 bytes
@(x)(y=x+rot90(x))+rot90(y,2)

Try it online!
Explanation
This adds the input matrix with a 90-degree rotated version of itself. The result is then added with a 180-degree rotated version of itself.

Julia 0.6, 29 bytes
x*y=rotr90(y,x)
!x=x+1x+2x+3x

Try it online!
I couldn't get below LukeS's solution
But in trying I did come up with this, which I think is kinda cute.
First we redefine multiplication to be the rotate operation, where there first time is the number of times to rotate.
So since julia multipes by juxtaposition then: 1x becomes rotr90(x,1) and 3x becomes rotr90(x,3) etc.
Then we write out the sum.

Clean, 110 bytes
import StdEnv,StdLib
r=reverse
t=transpose
z=zipWith(+)
$m=[z(z(r b)a)(z(r c)d)\\a<-m&b<-r m&c<-t m&d<-r(t m)]

Try it online!
From the matricies:

X = transpose(reverse M): 90-degree rotation
Y = reverse(map reverse M): 180-degree rotation
Z = reverse(transpose M): 270-degree rotation

This zips the addition operator over M and X, as well as Y and Z, and then over the results.

Wolfram Language (Mathematica), 28 bytes
Sum[a=Reverse@a,{a=#;4}]&

 is \[Transpose].
Try it online!

Nice solution. I tried ReplacePart[#,{a_,b_}:>Tr@Extract[#,{{a,b},{b,-a},{-a,-b},{-b,a}}]]& and also Plus@@NestList[Reverse@#&,#,3]&

Julia 0.6, 28 24 bytes
~A=sum(rotr90.([A],0:3))

Try it online!
~A=sum(rotr90.([A],0:3)) #
~                        # redefine unary operator ~
 A                       # function argument
               [A]       # put input matrix A into a list with one element
                   0:3   # integer range from 0 to 3
       rotr90.(   ,   )  # apply function rotr90 elementwise, expand singleton dimensions
       rotr90.([A],0:3)  # yields list of rotated matrices:
                         # [rotr90(A,0), rotr90(A,1), rotr90(A,2), rotr90(A,3)]
  sum(                )  # sum

It is worth perhaps noting that to do the [1] example on should do ~reshape([1], (1,1)) because that is how a 1x1 matrix is declared in julia 0.6.

APL (Dyalog Classic), 8 bytes
(⌽+⍉)⊖+⌽

Try it online!

Jelly, 7 bytes
ZU+µUṚ+

Try it online!

Octave, 33 bytes
@(a)a+(r=@rot90)(a)+r(a,2)+r(a,3)

Try it online!
Explanation:
(r=@rot90) in an inline way of creating a function handle r used to rotate the matrix 90 degrees. If a second argument, k is given to r then it will rotate the matrix k*90 degrees. So this is equivalent to the pseudo code:
a + rot90(a) + rot180(a) + rot270(a)

MATL, 9 bytes
i3:"G@X!+

Try it at MATL Online
Explanation
i       # Explicitly grab the input matrix
3:"     # Loop through the values [1, 2, 3], and for each value, N:
  G     # Grab the input again
  @X!   # Rotate the value by 90 degrees N times
  +     # Add it to the previous value on the stack
        # Implicitly end the for loop and display the resulting matrix

Pyth, 13 bytes
m+MCdC.u_CN3Q

Try it online!

J, 16 15 bytes
[:+/|.@|:^:(<4)

Try it online!

This is a perfect challenge for ^:. Clever solution!

That's an elegant solution!

MATL, 7 bytes
,t@QX!+

Try it at MATL Online!
Explanation
Port of my Octave answer.
,        % Do twice
  t      %   Duplicate. Takes input (implicit) the first time
  @Q     %   Push 1 in the first iteration, and 2 in the second
  X!     %   Rotate by that many 90-degree steps
  +      %   Add
         % End (implicit). Display (implicit)

R, 69 64 bytes
function(x,a=function(y)apply(y,1,rev))x+a(x)+a(a(x))+a(a(a(x)))

Try it online!

Attempt number three at codegolf.
From 69 to 64 bytes thanks to Giuseppe!

Moving a to a function argument will save bytes by allowing you to get rid of the {} around the function body. Also, porting Luis Mendo's Octave approach might save some bytes? Finally, I'm not 100% sure but is t(apply(x,2,rev)) equivalent to apply(x,1,rev)?

Thanks, I was able to improve with tip #1 and #3. I did not succeed in saving bytes by adding an argument n to a() to repeat the operation though.

I meant something like this

K4 / K (oK), 23 8 bytes
Solution:
+/(|+:)\

Try it online!
Example:
+/(|+:)\5 5#14 2 5 10 2 18 9 12 1 9 3 1 5 11 14 13 20 7 19 12 2 1 9 5 6
24 29 31 41 24
41 49 31 49 29
31 31 20 31 31
29 49 31 49 41
24 41 31 29 24

Explanation:
Thanks to ngn for the simplified transformation technique.
+/(|+:)\ / the solution
       \ / converge
  (   )  / function to converge
    +:   / flip
   |     / reverse
+/       / sum over the result

Extra:
In Q this could be written as
sum (reverse flip @) scan

+/{|+x}\

I knew there was a better way to apply the transformations!

+/(|+:)\ https://tio.run/##y9bNz/7/X1tfo0bbSjPGWMFY2UjBVMFCwVjB0AhImQGhocH//wA is sadly the same count... Gah cannot figure out markup on mobile.

It seems markup in comments has a bug, not only on mobile - backslash before backquote messes things up. I avoided it by inserting a space.

Attache, 20 bytes
Sum@MatrixRotate&0:3

Try it online!
Explanation
Sum@MatrixRotate&0:3

MatrixRotate&0:3 expands to, with input x, MatrixRotate[x, 0:3], which in turn exapnds to [MatrixRotate[x, 0], MatrixRotate[x, 1], MatrixRotate[x, 2], MatrixRotate[x, 3]]. That is to say, it vectorizes over the RHS. Then, Sum takes the sum of all of these matrices by one level. This gives the desired result.

Jelly, 7 bytes
ṚZ$3Ð¡S

Try it online!
Saved 1 byte thanks to Erik the Outgolfer (also thanks to a suggestion for fixing a bug).
How?

ṚZ$3Ð¡S || Full program (monadic).

   3Ð¡  || Do this 3 times and collect results in a list
  $     || –> Apply the last two links as a monad
Ṛ       || –––> Reverse,
 Z      || –––> Transpose.
      S || Summation.

Pari/GP, 31 bytes
a->sum(i=1,4,a=Mat(Vecrev(a))~)

Try it online!

JavaScript (ES6), 77 bytes
a=>a.map((b,i)=>b.map((c,j)=>c+a[j][c=l+~i]+a[c][c=l+~j]+a[c][i]),l=a.length)

Python 2, 76 bytes
f=lambda x,k=-2:k*x or[map(sum,zip(*r))for r in zip(x,f(zip(*x)[::-1],k+1))]

Try it online!

05AB1E, 12 bytes
3FÂø}3F‚øε`+

Try it online!

8 bytes with modern 05AB1E: 3FÂø}+++.

APL (Dyalog Classic), 17 bytes
{⍵+⌽∘⍉⍵+⌽∘⊖⍵+⍉⌽⍵}

Try it online!
APL NARS 34bytes 2117 chars
{⍵+⌽∘⍉⍵+⌽∘⊖⍵+⍉⌽⍵}

-2 chars thanks to ngn
-2 chars because operator composite ∘ seems to have precedence on +
it seems ⌽⍉a rotate a from 90°,⌽⊖a rotate a from 180°,⌽⍉⌽⊖a rotate a from 270° as ⍉⌽
If exist the operator p as:
∇r←(g p)n;a;i;k
   a←⌽,n⋄r←⍬⋄i←0⋄k←⍴a⋄→C
A: →B×⍳r≡⍬⋄r←g¨r
B: r←r,⊂i⊃a
C: →A×⍳k≥i+←1
   r←⌽r
∇

The operator p above would be such that if g is a 1 argument function (monadic?) it should be:
"g f a a a a" is "a ga gga ggga"

the solution would be pheraps 15 chars
  g←{⊃+/⌽∘⍉ p 4⍴⊂⍵}
  a←2 2⍴1 3 2 4
  g a
10 10
10 10
  g 1
4

But could be better one operator "composed n time" d such that "3 d f w" is f(f(f(w))).
Now I wrote something but it is too much fragile without the need type checking.
But i like more the operator q that repeat compose of f with argument m
(it is not complete because the error cases of the types are not written)
∇r←(n q f)m;i;k;l
   r←⍬⋄k←⍴,n⋄→A×⍳k≤1⋄i←0⋄→D
C: r←r,⊂(i⊃n)q f m
D: →C×⍳k≥i+←1
   →0
A: l←n⋄r←m⋄→0×⍳n≤0
B: l-←1⋄r←f r⋄→B×⍳l≥1
∇

the solution would be 17 chars but i prefer it
  g←{⊃+/(0..3)q(⌽⍉)⍵}
  ⎕fmt g a
┌2─────┐
2 10 10│
│ 10 10│
└~─────┘
  ⎕fmt g 1
4
~

270 could be just ⍉⌽ and the whole thing is suitable for a train

If exist one f such that g f w w w w is w gw ggw gggw the answer would be +/⌽⍉f 4/rho w

You mean +/⌽∘⍉f 4⍴⊂⍵? To get four copies of ⍵, first you should enclose it with ⊂. To have ⌽⍉ as an operand to f, you must compose it into a single function like this: ⌽∘⍉. The mysterious f could be scan (backslash), but there's another detail to take care of - ⌽∘⍉ will get a left argument, so we must make it ignores it: +/{⌽⍉⍵}\4⍴⊂⍵ or +/⊢∘⌽∘⍉\4⍴⊂⍵.

In my first comment I was suggesting this train: ⊢ + ⌽∘⍉ + ⌽∘⊖ + ⍉∘⌽. That can lead to even shorter solutions if you rearrange the squiggles cleverly and make good use of trains.

@ngn even a simple {⍵+ ⍺ }\1 2 3 4  return domain error

@ngn even a simple {⍵+ ⍺ }\1 2 3 4  return domain error... For me could be ok the function +/ {⍺,⌽⍉⍵}\a a a a or f<-,⌽⍉;   +/f\a a a a, where a is the matrix

Ruby, 74 72 66 bytes
->a{r=0...a.size;r.map{|i|r.map{|j|(0..3).sum{i,j=j,~i;a[i][j]}}}}

Try it online!
This works on an element-by-element basis, finding the associated elements mathematically, instead of rotating the array. The key part is i,j=j,~i, which turns (i, j) clockwise 90 degrees.
-2 bytes thanks to Mr. Xcoder
-6 bytes because of sum

tinylisp, 132 bytes
Let's take the recently added library function transpose for a spin!
(load library
(d T transpose
(d R(q((m #)(i #(c m(R(reverse(T m))(dec #)))(
(q((m)(foldl(q(p(map(q((r)(map sum(T r))))(T p))))(R m 4

The last line is an unnamed lambda function that performs rotation summation.
 To actually use it, you'll want to use d to bind it to a name. Try it online!
Ungolfed, with comments
(load library) (comment Get functions from the standard library)

(comment Rotating a matrix by 90 degrees is just transpose + reverse)
(def rotate
 (lambda (matrix)
  (reverse (transpose matrix))))

(comment This function recursively generates a list of (count) successive rotations
          of (matrix))
(def rotations
 (lambda (matrix count)
  (if count
   (cons matrix
    (rotations (rotate matrix) (dec count)))
   nil)))

(comment To add two matrices, we zip them together and add the pairs of rows)
(def matrix-add
 (lambda two-matrices
  (map row-sum (transpose two-matrices))))

(comment To add two rows of a matrix, we zip them together and add the pairs of numbers)
(def row-sum
 (lambda (two-rows)
  (map sum (transpose two-rows))))

(comment Our final function: generate a list containing four rotations of the argument
          and fold them using matrix-add)
(def rotated-sum
 (lambda (matrix)
  (foldl matrix-add (rotations matrix 4))))

Java 8, 135 133 131 bytes
a->{int l=a.length,r[][]=new int[l][l],i,j,k=0;for(;k<l*l;)r[i=k/l][j=k++%l]=a[i][j]+a[j][l+~i]+a[l+~i][l-++j]+a[l-j][i];return r;}

-4 bytes thanks to @ceilingcat.
Explanation:
Try it online.
a->{                       // Method with integer-matrix as both parameter and return-type
  int l=a.length,          //  Dimensions of the input-matrix
      r[][]=new int[l][l], //  Result-matrix of same size
      i,j,k=0;             //  Index-integers
  for(;k<l*l;)             //  Loop over the cells
    r[i=k/l][j=k++%l]=     //    Set the cell of the result-matrix to:
      a[i][j]+a[j][l+~i]+a[l+~i][l-++j]+a[l-j][i];
                           //     The four linked cells of the input-matrix
  return r;}               //  Return the result-matrix

Husk, 9 bytes
F‡+↑4¡(↔T

Try it online!
Explanation
F‡+↑4¡(↔T)  -- implicit input M, for example: [[1,0,1],[2,3,4],[0,0,2]]
     ¡(  )  -- repeat infinitely times starting with M
        T   -- | transpose: [[1,2,0],[0,3,0],[1,4,2]]
       ↔    -- | reverse: [[1,4,2],[0,3,0],[1,2,0]]
            -- : [[[1,0,1],[2,3,4],[0,0,2]],[[1,4,2],[0,3,0],[1,2,0]],[[2,0,0],[4,3,2],[1,0,1]],[[0,2,1],[0,3,0],[2,4,1]],[[1,0,1],[2,3,4],[0,0,2]],…
   ↑4       -- take 4: [[[1,0,1],[2,3,4],[0,0,2]],[[1,4,2],[0,3,0],[1,2,0]],[[2,0,0],[4,3,2],[1,0,1]],[[0,2,1],[0,3,0],[2,4,1]]]
F           -- fold (reduce) the elements (example with [[1,0,1],[2,3,4],[0,0,2]] [[1,4,2],[0,3,0],[1,2,0]])
 ‡+         -- | deep-zip addition (elementwise addition): [[2,4,3],[2,6,4],[1,2,2]]
            -- : [[4,6,4],[6,12,6],[4,6,4]]

Python 3, 105 102 bytes
3 bytes thanks to Mr. Xcoder.
def f(a):l=len(a)-1;r=range(l+1);return[[a[i][j]+a[l-j][i]+a[l-i][l-j]+a[j][l-i]for j in r]for i in r]

Try it online!

Ruby 89 79 bytes
-10 bytes thanks to Unihedron

->m{n=m;3.times{n=n.zip(m=m.transpose.reverse).map{|i,j|i.zip(j).map &:sum}};n}

Try it online!

I'm pretty sure you can replace .map &:dup with *1 to cut off a lot of characters. array*length creates a new array and is a handy way to shallow clone.

Actually, n=*m is even shorter.

@Unihedron that's the problem, I need to deep clone

Seems to me that it doesn't affect the output; I fiddled with it in your "try it online" link and the output appears to remain correct with that change

You're right, actually you don't even need a shallow clone, transpose takes care of that

Haskell, 84 83 67 bytes
z=zipWith
e=[]:e
f l=foldr(\_->z(z(+))l.foldr(z(:).reverse)e)l"123"

Try it online!
Thanks to Laikoni and totallyhuman for saving a lot of bytes!

83 bytes.

@totallyhuman That's clever! Thanks!

67 bytes: Try it online!

APL (Dyalog Unicode), 8 bytesSBCS
+∘⍉∘⊖⍣3⍨

Try it online!
How it works
+∘⍉∘⊖⍣3⍨  ⍝ Input: matrix m
  ⍉∘⊖     ⍝ Rotate 90 degrees clockwise
+∘        ⍝ Add the original matrix m
     ⍣3⍨  ⍝ Repeat 3 times, starting with m

J, 12 bytes
(+|:@|.)^:3~

Try it online!
Straightforward port of the APL answer above.

Factor + combinators.extras math.matrices, 49 48 bytes
[ [ dup flip [ reverse ] map ] thrice m+ m+ m+ ]

Try it online!

[ ... ] thrice Call [ ... ] 3 times.
dup Make a copy of the top of the stack.
flip [ reverse ] map Rotate a matrix 90 degrees.
m+ m+ m+ Add 4 matrices together.

Perl 5, 92 bytes
sub f{@t=@_;map{//;[map$t[$'-1][$_-1]+$t[$_-1][-$']+$t[-$'][-$_]+$t[-$_][$'-1],1..@t]}1..@t}

Try it online!

Burlesque, 38 bytes
SP{{}{tp<-}{<-)<-}{tp)<-}}M-r{q?+Z]}sp

Try it online!
SP        # Read input as array
{
 {}       # Original
 {tp<-}   # 90deg
 {<-)<-}  # 180deg
 {tp)<-}  # 270deg
}
M-        # Return an array of maps
r{        # Reduce by
 q?+      # Vectorised addition
 Z]       # Zip, push, map
}
sp        # Pretty print as array

GolfScript, 64 bytes
4/{.(,\;[]:w;{[]:t;{(t\+:t;}%t{+}*w\+:w;}\*; w.,(!!3*)*.4/,/~}%`

I cheated, I cheated. Kinda. Though there are typical, standardized ways to take in Matrix input, I decided to take it in a... less conventional method. GolfScript is fucking terrible at rotational mathematics, so I knew I had to try. Below is the array-matrix method I used.

So yeah. You might notice a bit of convenient symmetry in this format, and I abused the hell out of it.
Input is taken in as an array of circular-ordered arrays, such as
[ [1 2 3 4][5 6 7 8][9 10 11 12][13 14 15 16][17 18][19 20][21 22][23 24][25] ]
for a 5x5 array.
1  2  3  4  5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9

It returns in identical output.
Teehee.
Maybe one day I'll make a program that takes an array of this format and turns it into nice formatting and vice-versa.
Then my program will no longer be an abomination.
I mean, it still would be, the I/O would just be more conventional.
God, should I even write an explanation for this hot garbage?
Try it online, if you dare.

Haskell, 84 bytes
import Data.List
s=foldl1(zipWith(zipWith(+))).take 4.iterate(transpose.map reverse)

Try it online!


text:
Same Name, Lame!
Write a function or program that, when given a list of names, outputs or returns a list where duplicates of given names have a unique shortened version of their surname.
Input:
A list of names, where a name is defined by a given name and a last name separated by a space. Names are non-empty strings containing only uppercase and lowercase letters. The list can be an array of strings, or the names separated by a constant non-alpha, non-space character, but the output must be in the same format as the input.
Output:
A list of the inputted names in the same order and format as the input that have been modified by these rules:

For unique given names, output just the given name
For names that share the same given name:

As well as their given name, add the shortest unique version of their surname that that is not shared by another name, followed by a period. For instance:
John Clancy, John Smith becomes John C.,John S. and James Brown, James Bratte becomes James Bro.,James Bra.
If one surname is a subset of another, such as Julian King,Julian Kingsley, return the full surname of the smaller one without a period. The example would become Julian King,Julian King.

Basically a period represents the regex .+, where only one name should match it.
You may assume that no-one will share both the same given name and the same surname
Names are case-sensitive

Test Cases:

John Clancy,Julie Walker,John Walker,Julie Clancy -> John C.,Julie W.,John W.,Julie C.
Julian King,Jack Johnson,Julian Kingsley > Julian King,Jack,Julian King.
Jack Brown,Jack Black,Jack Blue > Jack Br.,Jack Bla.,Jack Blu.
John Storm,Jon Snow,Johnny Storm > John,Jon,Johnny
Jill DeSoma,Jill Desmond > Jill DeS.,Jill Des.
XxXnO sCOppeXxX,XxXNO MERCYXxX > XxXnO,XxXNO

This is code-golf, so the lowest byte count for each language wins.

Related, related (Thanks @Laikoni). Sandbox Post

Where does the Angela C. come from the in the test case?

Meant to be a Julie oops, thanks. Fixed

Python 2, 130 bytes
def f(a):n=[[x[:i]+'.'*(' 'in x[:i]<x)for i in range(x.find(' '),len(x)+1)]for x in a];print[min(x,key=sum(n,[]).count)for x in n]

Try it online!
First generates all the nicknames, as follows:
n == [
    ['John', 'John .', 'John C.', 'John Cl.', 'John Cla.', 'John Clan.', 'John Clanc.', 'John Clancy'],
    ['Julie', 'Julie .', 'Julie W.', 'Julie Wa.', 'Julie Wal.', 'Julie Walk.', 'Julie Walke.', 'Julie Walker'],
    ['John', 'John .', 'John W.', 'John Wa.', 'John Wal.', 'John Walk.', 'John Walke.', 'John Walker'],
    ['Julie', 'Julie .', 'Julie C.', 'Julie Cl.', 'Julie Cla.', 'Julie Clan.', 'Julie Clanc.', 'Julie Clancy'],
    ['Jill', 'Jill .', 'Jill D.', 'Jill De.', 'Jill Des.', 'Jill Desm.', 'Jill Desmo.', 'Jill Desmon.', 'Jill Desmond']
]

Then picks the first* one from each list that is least frequent in sum(n,[]). This will always be the first unique nickname.
Note that n includes the erroneous nicknames 'John .' etc., but they will never be picked.
(*CPython 2.7’s min does so, anyway. This code may not be portable!)

Jelly,  34 33 32  30 bytes
;\ċÐf⁶t€⁶;€JṖḊ$$¦”.µ€ċ@ÐṂ€Ẏ$Ḣ€

A monadic link taking a list of lists of characters (i.e. a list of "strings") and returning the abbreviations in the same format and relative order.
Try it online! (a full program test suite)
How?
;\ċÐf⁶t€⁶;€JṖḊ$$¦”.µ€ċ@ÐṂ€Ẏ$Ḣ€ - Link: list of lists    e.g. ["Sam Ng","Sam Li","Sue Ng"]
                   µ€          - monadically for €ach:  e.g. "Sue Ng"
 \                             -   cumulative reduce with:
;                              -     concatenation           ["S","Su","Sue","Sue ","Sue N","Sue Ng"]
     ⁶                         -   literal space character   ' '
   Ðf                          -   filter keep if:
  ċ                            -     count (spaces)          ["Sue ","Sue N","Sue Ng"]
        ⁶                      -   literal space character   ' '
      t€                       -   trim from €ach            ["Sue","Sue N","Sue Ng"]
                 ”.            -   literal period character  '.'
                ¦              -   sparse application...
         ;€                    -   ...of: concatenate €ach (with a period)
                               -   ...only for these indexes:
               $               -     last two links as a monad:
           J                   -       range of length       [1,2,3]
              $                -       last two links as a monad:
            Ṗ                  -         pop                 [1,2]
             Ḋ                 -         dequeue             [2]  (i.e. 2,3,...,length-1)
                               -   ...i.e.:                  ["Sue","Sue N.","Sue Ng"]
                               -                   yielding: [["Sam","Sam N.","Sam Ng"],["Sam","Sam L.","Sam Li"],["Sue","Sue N.","Sue Ng"]]
                           $   - last two links as a monad:
                          Ẏ    -   tighten                   ["Sam","Sam N.","Sam Ng","Sam","Sam L.","Sam Li","Sue","Sue N.","Sue Ng"]
                       ÐṂ€     -   filter keep minimals for €ach:
                     ċ@        -     count (sw@ping args)    [["Sam N.","Sam Ng"],["Sam L.","Sam Li"],["Sue","Sue N.","Sue Ng"]]
                            Ḣ€ - head €ach                   ["Sam N.","Sam L.","Sue"]

Ruby 165 162 161 160 bytes
Includes 1 trailing space if only the given name is returned, eg. "John "
->a,n=0,s=0{a.group_by{|i|i[n]}.values.flat_map{|i|j=i[0];k=j.index' ';i.size<2?j.size>n ?j[0,[n+1,k].max-(s>1?0:1)]+(n>k ??.:''):j:f[i,n+=1,i.count{|l|l[n]}]}}

Try it online!
163 bytes if you don't want the trailing space
->a,n=0,s=0{a.group_by{|i|i[n]}.values.flat_map{|i|j=i[0];k=j.index' ';i.size<2?j.size>n ?j[0..[n,k-1].max-(s>1?0:1)]+(n>k ??.: ''):j:f[i,n+1,i.count{|l|l[n+1]}]}}

Try it online!

source: Stack Exchange

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

sort: votes


text:
404 - Unique 404 page not found
Inspired by a polyglot on the Stack Overflow 404 page:

Goal
Your goal is simple, to create a polyglot that outputs the number 404, and then terminate, in as many languages as possible.
Restrictions
Here's the twist, there's a restriction to make it harder:
You have to write N programs and pick N languages in a particular order. the ith program needs to print 404 in the first i languages, but not in any language after the ith. This is to prevent very simple solutions from destroying competition
Scoring:

The first criterion for determining a winner is the number of languages the main program runs in.
The second criterion is byte count, where the programs with more languages have more importance for this criterion.
The third and final criterion is time of submission

Clarifications:
The source codes of the programs do not need to have any relation. They're run as separate programs. Any of the programs can output trailing and/or leading whitespace. THE PROGRAMS DO NOT HAVE TO BE SUBSEQUENCES OF EACH OTHER!
Thanks to @MartinEnder for a better explanation!

Can the sub program be inserted into the previous or only appended? For example 1) ><> # ;nnn404 2) ><> and Befunge-93 #  ]404,,,@;nnn404

The source code of the subprograms do not need to have any relation. They're run as separate programs

Bytecount of the final program or the total of every program?

So "Working" is outputting and "Not Working" is doing anything else?

@JoKing, I just edited that.

@EsolangingFruit Yes, working is outputting 404. It's edited now

Is it okay if we output with a leading newline?

You think anyone is going to get to 404 languages?

@JoKing That would be greater than the current "add a language to a polyglot" challenges, so probably not...

"The source code of the subprograms does not need to have any relation" - but they must each be a subsequence of the full (byte-count) program that runs in all N languages, right? If not could you please define "sub-program"?

"submission" means the post, not the code. Thanks for bringing that up

I evidently suck at explaining things

I think I fixed it now,

@Zacharý Maybe don't talk about subprograms. Just say something like "you have to write N programs and pick N languages in a particular order. the ith program needs to print 404 in the first i languages, but not in any language after the ith".

To be clear, if a program prints 404 but also errors it is considered working, right? Also is any leading or trailing whitespace allowed? By the way I think this is a great challenge

+1 only because now I know what that crap was. I just ignored it before. Oh no, this cannot be unseen now!

Are programs ending in infinite loops allowed?

What do you mean, @JoKing? You mean output 404 then go into an infinite loop? I'd have to say no there

@Zacharý why's that? They print 404. If trailing whitespace is OK I think that should be OK.

54 Languages, 1331 bytes
><>,
Gol><>,
Foo,
Befunge-93,
Befunge-98,
brainfuck,
Brain-Flak,
Python 2,
Python 3,
Hexagony,
Perl,
Ruby,
Julia,
Cardinal,
Brainbash,
Turtlèd,
Deadfish~,
Whitespace,
Braille,
Rail,
Fission,
ETA,
Trigger,
Self-modifying Brainfuck,
Numberwang,
Actually,
Emoji,
Symbolic Brainfuck,
TinCan,
Alphuck,
Shove,
Cood,
Wise,
Width,
Whispers,
Thue,
Surface,
Stones,
evil,
Set,
Prelude,
Gaot++,
Cubix,
Cubically,
PATH,
Commercial,
Brian & Chuck,
Monkeys,
Nhohnhehr,
Beam,
AsciiDots,
Alumin,
Alice,
Whirl
This is getting very long, so at @MDXF's suggestion, I'm moving the subprograms and comments to a gist. The program here is only the final program. Thanks to MDXF again for providing the TIO test driver.
54. Whirl
##\$"404"#N#S# , ,,#$#?@\404!?@GJlICJlGCC*G^+0%=%=+0%x&fqpqqqiipsoddddoiipsohphhhhyhhhh? 	  ?nnn4$4#!000110000011110000100000100000110000011001100000111100001110011000111000110000
#?\++++:----:++++:H@((((4O0O4O@((((()()()){}){x}x){}x()){}){}()){}){})<[-]>[-]-[<+>-----]<+x%"404"?.⌂----.++++.>11
#i(N/"404"ooo@ENTHOEONHSSEONTHOEONSETssipceaiiiiiscejiiiijeeeejapmzaeeaeueewzaeeeaeewzaeeaeueewqs??|?)999|997+|++++!999777+++++!999997+++++!
print(404)

__DATA__=1
# \"404"*CC'[-][ .-$_"404"&]
"""pp
I want 404 of this
How much is it
#  -52, Z, -1                          #
#  -48, Y, -1                          #
#  -52, X, -1                          #
[-][
x::=~404
::=
x
]<<<
> 404
>> Output 1
red up two blue up red up one blue up red up two blue up
baaaaa bleeeeeeeeet bleeeeeeeeet baaaaa bleeeeeeeeet
a now 404 dollar off!
a has been selling out worldwide!
2 LEFT
2 LEFT
2 UP
2 LEFT
2 TEACH
1 LEFT
1 RIGHT
1 BOND
1 BOND
1 TEACH
2 YELL
1 FIGHT
2 YELL
1 TEACH
2 YELL
set ! 52
set ! 48
set ! 52
+------+
|$0011\|
|/000\0|
|0/0@11|
|00  10|
|0\10/0|
|\1100/|
+------+
$'main'
 \-444o000o444omm^

[-][$++++++++++++++++++++++++++++++++++++++++++++++++++++.----.++++.#
<<<<<<```>>>>.>.>.
]
ss"""
#7777777777777777777777777777724091557093543643404➡77▲▲▲²²▲²²¡▼▼▼▼¡▲▲▲▲¡⠎⡆⡎⡆⢐⠣⠃s&&&&~-<<:<<:<<<:<:>>>>>>>>:^||||G<>

Try it online!
Whirl is described as a Turning Tarpit [sic], which uses only two instructions, 1 and 0. 1 rotates the current wheel of instructions (either the math wheel or the operations wheel), 0 swaps the rotation of the wheel, and two 0s executes the instruction and switches wheels. The relevant instructions are on the first line:
000110000011110000100000100000110000011001100000111100001110011000111000110000
000110000 Switch to math wheel and execute math.not (math.val = 1)
011110000 Execute math.store, (memval = math.val = 1)
10000     Execute math.add, (math.val = math.val+memval = 1+1 = 2)
010000    Execute math.store (memval = math.val = 2)
0110000   Execute math.multiply, (math.val = math.val*memval = 2*2 = 4)
01100     Execute math.store (memval=math.val) and switch to the ops ring
110000    Execute ops.one (ops.val = 1)
011110000 Executes ops.intio, printing memval (4)
11100     Add one to memory pointer (memval=0)
1100      Execute maths.nop to switch back to ops ring
011100    Execute ops.intio, printing memval (0)
01100     Execute maths.store, (memval=maths.val=4)
00        Execute maths.intio, printing memval (4)

The leading 01s cancel each other out, and the trailing 01s cause a floating point exception.
Edit: fixed a bunch of broken stuff
(Commands to be careful about in the future: UDLR%"[.]o473psjw)
If any programs work for future languages or don't work for current or previous languages, please comment.

@Zacharý RE: my comment under the OP - at some stages this has ...print(0 or 404) but it is not a subsequence of the 97 byte N-program.

@JonathanAllan yeah, I was a little concerned about that too. Sub-program does imply they are related to the final program, but I’m going off the question specs here

No, you're not going off question specs. "Submission" meant the entire post, not the code.

I think I fixed the specs now

Hey it won't work in brain-flak, # is comment

Oh brain-hack :P

You should be able to add Actually if you can stick . after the "404" and then ⌂ before any other .s.

@Mego Done. Was a little harder than suggested, but it all worked out

I think you should be able to add TinCan. @MDXF too. I can't because Jelly and M won't allow any line to begin with #. I'm really regretting including those two languages haha.

35, wow this got ridiculous fast

If you can add #hell with two characters mad props

Turning Tarpit ... LOLOL

The [sic] isn't needed actually; it is in fact a Turning Tarpit, not just a misspelling of Turing Tarpit. It's a type of Turing Tarpit that uses a wheel of instructions.

@Makonede I'm pretty sure I knew that, I was just using [sic] in an unconventional way to signal that I wasn't making a typo myself

53 languages, 2789 bytes
Bash, Foo, Implicit, Charcoal, Emoji, ><>, rk, Brain-Flak, C, Set, Cood, Arcyou, TRANSCRIPT, S.I.L.O.S, Commercial, C++, Braille, Deadfish~, Memescript 1.0, ETA, Python 1, Python 3, PARI/GP, Lily, Fission, Decimal, Cubically, Bitwise, TinCan, Whispers, Thue, Emotinomicon, what??!, Ook!, evil, Lennyfuck, Blablafuck, Stones, TacO, COW, Symbolic Brainfuck, Underload, Rail, Reticular, Gaot++, PATH, axo, Monkeys, Nhohnhehr, xEec, VTFF, K-on Fuck, Churro, and Forked.
Try everything online in the test driver!
Join us in the chatroom for this challenge!

This post got way too large so here's a gist containing my progress. Current final program:
Forked
#undef l" 404"p;((((\)0)0)0)0;(4⏬0⏬4⏬«404»[:5*11-1/1]%&)(404)S^/*NNNNTNNEONHSSEONTHOEONiisoddddoiisohOok! Ook! Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. ????!?!!?!??!!!???????????????!?!!!?!????!??????????????!!??!??!??!????!⎚404»404➡ to for the and of to to to to to is the and  a to to to to a and and and and a ;n4n0n4
#11404D301          \4%0%p%&
""""echo 404|| rk:start int x = 404 print: x rk:end R"404"*
exit;
#;
OUT &52 &1
OUT &48 &1
OUT &52 &1 */
#include<stdio.h>
main(){char aA[]={37,100,0};printf(aA,404);}/*<<<<<mzaeeeaeeaaaawuuuuwaaaa what the frick frack backtrack snick snack tic tac snick snack patty wack diddily dack tic tac diddily dack frick frack quarterback frick frack
x::=~404
::=
x #
set ! 52
#;⠎⡆⡎⡆⢐⠣⠃▲▲▲²²▲²²¡▼▼▼▼¡▲▲▲▲¡(♥ ͜ʖ♥)( ͡°((∩ ͡° ͜ʖ ͡°)⊃━☆ﾟ.*( ͡° ͜ʖ ͡°)ᕦ( ͡°ヮ ͡°)ᕥ(♥ ͜ʖ♥)(♥ ͜ʖ♥)(♥ ͜ʖ♥)(♥ ͜ʖ♥)(♥ ͜ʖ♥)) ͡°)(∩ ͡° ͜ʖ ͡°)⊃━☆ﾟ.*( ͡° ͜ʖ ͡°)(> ͜ʖ<)(♥ ͜ʖ♥)(♥ ͜ʖ♥)(♥ ͜ʖ♥)(♥ ͜ʖ♥)(> ͜ʖ<)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)(> ͜ʖ<)うんうんうんうんたんたんたんたんうんうんうんたんうんたんうんうんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんたんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうん {o}===}{======={o}{o}}{======={o}{o}===}{======={o}
> 404
>> Output 1
I want 404 of this.
How much is it?
Ju is here.
>Ju, 404
>X Ju
b = 404
printInt b ;
set ! 48 MoOMoOMoO
set ! 52 MoOOOMmoO
+--------+
|$00110\ |
|/00001/ |
|\11000\ |
|/11000/ |
|\0100 \ |
|        | baaaaa bleeeeeeeeet
|  404p@ |
|        |
+--------+
$'main': OOMmOoOOM ;
 \-444o000o444o-{<$$^- >}+{-----v}+.----.++++.#
#  bleeeeeeeeet baaaaa ^        < bleeeeeeeeet >
2 LEFT
2 LEFT
2 UP
2 LEFT
2 TEACH
1 LEFT
1 RIGHT
1 BOND
1 BOND
1 TEACH
2 YELL
1 FIGHT
2 YELL
1 TEACH
2 YELL
red up two blue up red up one blue up red up two blue up ;
o now 404 dollars off!
o has been selling out worldwide!
#  -52, Z, -1                          #
#  -48, Y, -1                          #
#  -52, X, -1                          #
⡆⡎⡆⢐⠣⠃((((p 404)((()(((()()()){}){}){}){}){}){}){}) h#4 o# h#0 o# h#4 o# """
print(404)#"*/

Try it online!
My new (-ly implemented) esolang!

what the frick frack paddy wack (give the dog a bone) is that language? (congratz on passing me)

@JoKing honestly I have no idea what was going through my head when I made that language.... also thanks for the help with Braille and Deadfish~, I hope you don't mind that I used your code?

no worries mate

MDXF v. Dylnan, I see.

@Zacharý MD XF v Dylnan v Jo King; every time I pull ahead, I fall asleep and then have to go to school and by the time I get back on they both are ahead again, building off my languages and each others'... sigh

this is my last day of work for the week, so you bet i'll be catching up!

If we get our own site design, the winner definitely goes on the 404.

@Zacharý will you also accept the winner? (I'm going to try as hard as I can to win and I've never had one of my answers accepted before)

I will eventually, but when the updating slows down

@Zacharý yeah wait at least a week

I didn't see that you'd already done Cood, but you can get rid of the Hey waiter! part, and the ending punctuation on the other two lines.  Try it online!

Normal brainfuck no longer works. It prints a bunch of null characters, 4044 and enters an infinite loop (lol can't post TIO link because too long)

Braille is broken now. I checked because it had been broken on mine since I added Symbolic BF. @JoKing somehow your program works for both Braille and Symbolic BF. Should we start a chat room for this challenge? I don't know how to do it

@JoKing I can't fix it, I just removed Brainfuck.

34 Languages, 387 characters
Jelly,
M,
Pyon,
Proton, Python 3, Python 2, Python 1, Perl 6, Perl 5, Ruby, bc, Pari/GP, brainfuck, Emoji, Emotinmicon, Charcoal, Braingolf, Whitespace, Deadfish~, Deadfish, Self-modifying Brainfuck, Symbolic Brainfuck, Numberwang, Cardinal, Actually, Fission, Prelude, Brain-Flak (BrainHack), Alphuck, Deadfish x, TacO, Braille,
rk,
evil
This answer is getting very long so here is the full answer. From now on only the last program will be kept here.
If anyone finds that one of the programs is broken for one language or one program works for a language it shouldn't, let me know.
print(404)
+1#<[-]>--[<+>-----]"404".⌂<+.----.++++.404➡⎚404»___pppissiiiisiiiio▲▲▲²²▲²²¡▼▼▼▼¡▲▲▲▲¡sipceaiiiiiscejiiiijeeeejaxxcxxxcxxxKddddKcxxxx7777777724091557093543643%R"404";77999++++++++!++++++++6+1+!++++++5++++!> @p404 sp7 rk:start print: "404"77szaeeaeueewzaeeeaeewzaeeaeueew

+1#((a(()a((()(((()()())a{})a{})a{})a{})a{})a{})a{})

+1#ṛ“Nạç»⠎⡆⡎⡆⢐⠣⠃

Try it online!

Wow, congrats, you've just blown everyone else out of the water.

@MDXF Thanks! I'm planning on doing more I just have to stop for now.

If only the Julia versions were different enough I could've beaten you by 10 bytes with this sigh

@MDXF Someone did post a double Julia answer to the Trick or Treat polyglot question exploiting some bug but it got deleted and I don't remember what it was

@dynlan well I can see deleted posts so I'll go check it out, thanks!

Brainbash prints some stuff before the 404. How about this?

@JoKing which program does it print stuff before 404?

Nooo I had just passed you again :(

@MDXF Haha sorry! I am having so much fun with this challenge

Brainbash for the last two (i'm at work, so I can't add any more languages right now. you guys are catching up fast)

@JoKing It isn't for me... Do you have a link where it does that? Your suggestion is shorter anyway, do you mind if I use it?

@dylnan haha me too (passed you again btw) :P

@JoKing This is the second to last for brainbash and this is the last for brainbash. They are both printing 404. Maybe I'm misunderstanding what you're saying

I see three boxes in the output. Maybe your browser isn't displaying the unprintable characters? (i'm on chrome) It prints hex bytes 9A 96 9A, cell values 154, 150, 154

@JoKing I'm also on Chrome. Checked on my computer and phone and it works on both. Maybe a third person can check

@JoKing Weird that we aren't seeing the same thing. The program you gave prints 4041 for braingolf unfortunately

in the brainbash link I got some weird chars and then 404

You can use * to destroy the atom in Fission if you need to

Fission works for the Cardinal addition. I think an R just snuck in there too early

@JoKing Oops, thanks. I think that happened when I was fixing Numberwang.

11 languages, 10 bytes
Pyon
print(404

Pyon, Python 2
print 808//2

Pyon, Python 2, Python 1
print None or 404

Pyon, Python 2, Python 1, Python 3
die=0
print(die or 404);

Pyon, Python 2, Python 1, Python 3, Lua
print(None or 404)

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5
print(404 or 0)

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5, Ruby
;print("40"+"4")

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5, Ruby, Swift 4
print("40"+"4")

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5, Ruby, Swift 4, Perl 6
print(404**1)

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5, Ruby, Swift 4, Perl 6, Julia
print(404);

Pyon, Python 2, Python 1, Python 3, Lua, Perl 5, Ruby, Swift 4, Perl 6, Julia, Lily
print(404)

Nice. Very clean and simple answer and it still has plenty of languages

4 Languages: CJam, Python, Underload, ><>
The following works in CJam but not Python, Underload, or ><>:
404

To CJam: This pushes the literal 404 to the stack. The program ends, and the 404 is output.
To Python: This program consists of a single expression 404. The expression is evaluated, and the program terminates.
To Underload: 4 and 0 are invalid commands, so the TIO interpreter simply ignores them, and the program terminates.
To ><>: 404 pushes 4, 0 and 4 to the stack. The IP wraps around to the beginning, and the program repeats infinitely.

The following works in CJam or Underload (though it errors) but not Python or ><>:
N(404)S;(\

To CJam: N pushes a string (array of characters) containing a newline to the stack. ( pops the single character (a newline) out of the string. 404 pushes 404 to the stack, and then ) increments it to give 405. S; pushes a spaces and then immediately deletes it. ( decrements again to get 404, and then \ swaps the newline and the 404. 404\n is output (the empty array is displayed as nothing).
To Underload: N is ignored. (404) pushes the string 404 to the stack. S outputs it. ; is ignored. ( causes the interpreter to try to look for a closing ), but as none is found, the program segfaults.
To Python: This is invalid syntax (the expression N(404) is followed by an identifier S, which is malformed), so the program errors.
To ><>: N is an invalid instruction, so the program errors.

The following works in CJam (though it errors), Underload, or Python, but not ><>:
[]
Le=404
+Le#(404)S
(print(404))

To CJam: [] pushes the empty array to the stack, and L pushes the empty array to the stack. e= counts the number of occurrences of [] in [], giving 0. 404 pushes 404 to the stack. + adds the two numbers together, giving 404. L pushes the empty array to the stack again, and e# creates a comment that lasts until the end of the line. ( tries to pop an element out of an array, but since the top stack element is the empty array [], the program errors. 404 is still output.
To Python: [] is a statement consisting of a no-op instruction. Le=404 defines a variable Le to be equal to 404. +Le takes the unary plus of the variable Le (a rather useless operation) and the result is discarded. #(404)S is a line comment. (print(404)) prints 404.
To Underload: The only relevant part is (404)S, which pushes 404 to the stack and outputs it. (print(404)) pushes print(404) to the stack, but nothing is done with it and the program terminates.
To ><>: [ tries to pop a number off the top stack on the metastack, and then pop that many elements off that stack and make them into a new stack which is then pushed to the metastack. There is no number on the stack, so the program errors.

The following works in CJam (though it errors), Python, Underload, and ><>:
"404nnn;\
"
Le=404
+Le#(404)S
(print(404))

To CJam: Most of what I said last time applies here. Instead of being [], we now have a string literal, but the content is still unimportant.
To Python: Most of what I said last time applies here. Instead of being [], the unused first expression is now a string literal, but the content is still unimportant.
To Underload: Everything I said last time applies here. All of the commands are still ignored.
To ><>: The " begins string mode, and the IP wraps around the first row pushing every character code it sees to the stack (this is unimportant). The IP wraps around and hits " again, which exits string mode. 404 pushes the digits 404 to the stack, and then nnn outputs each of them (technically, this happens in reverse order, but since 404 is a palindrome this doesn't matter). ; ends the program.

8 Languages, 498 Bytes
BFFuck
outc(52)
outc(48)
outc(52)

BFFuck, Python
print(404)

print prints a number in Python, while using  print() with a string without quotes it prints out the string in BFFuck.
BFFuck, Python, Brainfuck
print(404)#+++++++[>+++++++<-]>+++.----.++++.

BFFuck and Python both support # as comments.
BFFuck, Python, Brainfuck, Befunge-93
#["404",,,@]
print(404)#+++++++[>+++++++<-]>+++.----.++++.

BFFuck, Python, Brainfuck, Befunge-93, PlusOrMinus
#["404",,,@]
print(404)#++++++++++++++++++++++++++++++++++++++++++++++++++++.-+++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+.-+++++.-

- in PlusOrMinus is the same as .- in BF, while . is an ignored character in PlusOrMinus
BFFuck, Python, Brainfuck, Befunge-93, PlusOrMinus, Deadfish
#["404",,,@]iisoddddoiiso
print(404)#++++++++++++++++++++++++++++++++++++++++++++++++++++.-+++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+.-+++++.-

BFFuck, Python, Brainfuck, Befunge-93, PlusOrMinus, Deadfish, Alphuck
#["404",,,@]pppiisoddddoiisosaeaeaepaepiceeeasccsajiiiijeeeej
print(404)#++++++++++++++++++++++++++++++++++++++++++++++++++++.-+++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+.-+++++.-s

The hardest, because it mixes up with Python and Deadfish.
BFFuck, Python, Brainfuck, Befunge-93, PlusOrMinus, Deadfish, Alphuck, oOo CODE
#["404",,,@]pppiisoddddoiisosaeaeaepaepiceeeasccsajiiiijeeeej
print(404)#++++++++++++++++++++++++++++++++++++++++++++++++++++.-+++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+.-+++++.-saazzzZzZzzzZzZzzzZzZzZzzzzZzZzZzZzzzzZZzZZzZZzZzzzzZZzzZzzZzZZzzzZZz
#ZzzZzzZzzZzzZZzZzZZzZZzZZzZZZz

Welcome to Code Golf, and nice answer!

6 Languages Brain-Hack, Brain-Flak, Brain-Fuck, Foo, Javascript, Alphuck
More to come!
Brain-Hack
#(((()((()(((()()()){}){}){}){}){}){}){})

Prints 404 in Brain-Hack
Brain-Hack, Brain-Flak
(((()((()(((()()()){}){}){}){}){}){}){})

Brain-Hack, Brain-Flak, Brain-Fuck
(((()((()(((()()()){}){}){}){}){}){}){})#-[<+>-----]<+.----.++++.>-.++++.

Uses comments in Brain-Flak to print it
Brain-Hack, Brain-Flak, Brain-Fuck, Foo
"404"
(((()((()(((()()()){}){}){}){}){}){}){})#-[<+>-----]<+.----.++++.>-.++++.

Brain-Hack, Brain-Flak, Brain-Fuck, Foo, Javascript
console.log("404")
//(((()((()(((()()()){}){}){}){}){}){}){})#-[<+>-----]<+.----.++++.>-.++++.

Brain-Hack, Brain-Flak, Brain-Fuck, Foo, Javascript, Alphuck
console.log("404")
//(((()((()(((()()()){}){}){}){}){}){}){})#-[<+>-----]<+.----.++++.>-.++++.iaipiiiiiaecsaejiiiijeeeej

Did i mention i use esolangs?

Umm, your original Brainfuck code prints 4...

@MDXF fixed that lol

Now the brainfuck has alot of extra code.

5 languages (87 bytes)
Pyon
print(404

Try it online!
Python 2
print(404)

Try it online!
Brain-Flak (BrainHack)
print(404)#(((()((()(((()()()){}){}){}){}){}){}){})

Try it online!
brainfuck
Taken from Jo King's answer because I wasn't able to come up with a brainfuck code that had the brackets balanced (Brain-flak restriction).
print(404)#(((()((()(((()()()){}){}){}){}){}){}){})-[<+>-----]<+.----.++++.>

Try it online!
05AB1E
Note that this also works with Ohm.
#404q
print(404)#(((()((()(((()()()){}){}){}){}){}){}){})-[<+>-----]<+.----.++++.>

Try it online!
Thanks to Jo King for -6 bytes.

The x%x and [-] aren’t necessary

@JoKing Oh whoops I forgot to remove them after adapting your brainfuck code >_<. Edited. Thanks

You can easily add Python 1: https://gist.github.com/anonymous/77ed24162c35aae0a10e4e1cada8547a

@MDXF That seems invalid to me. 1) The Python 1 version doesn’t work in Pyon 2) The Python 1 version also works in Python 2, which is forbidden.

@Mr.Xcoder Oh, I forgot that the non-parenthesis syntax works in Python 2.

2 Languages, 24 bytes, Python and Batch
Program 1: Python 3
print('404')

Program 2: Python 3 and Batch
print('404')#|echo 404

After the the hash comments the rest of the code in python, and the | is a statement in bash to do this if the other command fails.

2 Languages, 53 bytes: C and Python
Let's start things off with something simple.
Program 1: C
int main(){printf("404");}

Program 2: C and Python
#define print(X)int main(){printf("404");}
print(404)

TIO links:

C program 1
Python program 2

This is just an example, and will probably be beaten many times over.

4 languages, 91 bytes
C++
#ifdef __cplusplus
#include "stdio.h"
int main(){printf("%d",404);}
#endif

C++, C
#include "stdio.h"
int main(){printf("%d",404);}

Removes the C++ macro
C++, C, Befunge
#define A "404",,,@
#include "stdio.h"
int main(){printf("%d",404);}

Adds a macro that will be ignored in C++, but read as code in Befunge.
C++, C, Befunge, Python
#define A "404",,,@
#include "stdio.h"//\
print(404);'''
int main(){printf("%d",404);}//'''

Ads a piece of code that causes the next line to be a comment in C, but not in Python (//<backslash>)

all_licenses: 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/


text:
Tell my browser
Background
Many people visit webpages, which require special browsers because of lack of compatibility. So you have to write a script (client sided or server sided), which just prints the name of the browser. Because not everyone has fast internet, the script has to be as short as possible. (This is a joke xD)
Rules

You have to print the name of the browser loading the page without any version number etc. to STDOUT or equivalent. Leading or trailing spaces are allowed.
You can assume the browser is Firefox, Chrome, Edge, Safari or Opera, so
only those browsers will be tested. Don't print "Chromium", this does NOT count.
The script may be server sided with CGI (in any language), ruby on rails, jsp and similar. (Given server will be apache 2 on debian) Client sided scripts may be written in JavaScript, TypeScript, and any other versions of ECMAScript, it just has to run in all five browsers.
If your language has no offline interpreter for CGI, assume it's saved in /usr/bin/i, the shebang at the beginning does not add bytes to the count.
This is a code-golf, so the shortest answer wins!
Http requests are put through stdin.

How would an offline language even be getting information from a browser?

oh. forgot that. http requests are given through stdin.

@Shaggy big difference. Here,you don't have a given string.

Japt, 55 52 bytes
-3 bytes thanks to Shaggy
Ox`nàÀÓ&.ÔÀAgt`
`SafÂÈOpÀCËTFifoxnEdge`qn f!øU o

Try it!

52 bytes


text:
Wait, what language is this?
Recently I had the pleasure of writing a Haskell program that could detect if the NegativeLiterals extension was engaged.  I came up with the following:
data B=B{u::Integer}
instance Num B where{fromInteger=B;negate _=B 1}
main=print$1==u(-1)

Try it online!
This will print True normally and False otherwise.
Now I had so much fun doing this I'm extending the challenge to all of you.  What other Haskell language extensions can you crack?
Rules
To crack a particular language extension you must write a Haskell program that compiles both with and without the language extension (warnings are fine) and outputs two different non-error values when run with the language extension and it turned off (by adding the No prefix to the language extension).  In this way the code above could be shortened to just:
data B=B{u::Integer}
instance Num B where{fromInteger=B;negate _=B 1}
main=print$u(-1)

which prints 1 and -1.
Any method you use to crack a extension must be specific to that extension.  There may be ways of arbitrarily detecting what compiler flags or LanguageExtensions are enabled, if so such methods are not allowed.  You may enable additional language extensions or change the compiler optimization using -O at no cost to your byte count.
Language extensions
You cannot crack any language extension that does not have a No counterpart (e.g. Haskell98, Haskell2010, Unsafe, Trustworthy, Safe) because these do not fall under the terms outlined above.  Every other language extension is fair game.
Scoring
You will be awarded one point for every language extensions you are the first person to crack and one additional point for every language extension for which you have the shortest (measured in bytes) crack. For the second point ties will be broken in favor of earlier submissions.  Higher score is better
You will not be able to score a point for first submission on NegativeLiterals or QuasiQuotes because I have already cracked them and included them in the body of the post.  You will however be able to score a point for the shortest crack of each of these.  Here is my crack of QuasiQuotes
import Text.Heredoc
main=print[here|here<-""] -- |]

Try it online!

Can programs take input?

Can we require more than one extension, but only toggle one

@H.PWiz programs should not take input.  You may require additional language extensions if you wish.

I think this is a list of all valid options

Note that my above comment does not include NondecreasingIndentation for obvious reasons

If certain circumstances raise an exception and the program can recover from it (printing a message to stderr), is this acceptable behaviour? Asking because of this.

@BMO You are free to print to STDERR during compilation for warnings but at run time STDERR should be empty.

How should other flags be scored? See the comments here for context.

I'd suggest that language extensions other than the one you're testing for should count for bytes. Mostly because I'm disappointed about all the TemplateHaskell use I see here.

@ØrjanJohansen In retrospect it might not have been a good idea to let all language extensions get by for free, but I don't intend to change the rules now.

I think you should drop the requirement for a No counterpart. I'm not sure, but I think there might be at least one game to play with safe Haskell.

@dfeuer The problem with extensions that don't have No counter part is it is hard to tell what we should be comparing it to. No counterparts make it nice and clear.

@SriotchilismO'Zaic, in those cases, compare to the effect of not giving the option. The same goes for No options without a positive counterpart, if there are any.

I'm quite curious whether it's possible to crack RelaxedPolyRec, for a compiler ancient enough to actually support turning it off. (The option hung around, with documentation, for some years after it stopped doing anything.)

@dfeuer I don't have an old compiler to check, but would x=0^y;y=seq(x/)0;y::Int work? (Needs NoMonomorphismRestriction.)

@ØrjanJohansen, my intuition for NoRelaxedPolyRec is rather poor. The description of the restriction in the Haskell 98 Report is just awful.

@ØrjanJohansen, I'm really not sure. GHC is the only compiler I've been able to find that (at one point) claimed to be able to turn the extension on and off. As far as I can tell, there's no way to turn it on in Gofer, and the only way I've found to (maybe!) turn it off in Hugs also disables all other extensions. I don't see any mention of it in the nhc98 docs. It's probably still possible to get some really old GHC versions....

@dfeuer x()=0^y;y=seq(x()/)0;y::Int ought to work without NoMonomorphismRestriction. However, changing between Hugs and Haskell 98 mode (which I'm guessing you mean) doesn't change the result. :(

Yes, that's what I meant. That was the only option I saw that looked like it might disable the extension. I could've missed something though.

@dfeuer Looking at this ticket it seems like GHC 6.12.1 supported turning it off.

Are we allowed to print more than one value?

@dfeuer What does it mean to print more than one value?

For example, to print two numbers, one on each line. Also, we need an answer about whether the output is allowed to be empty, or just a newline, sometimes. Do the things printed have to represent Haskell values, or can they be arbitrary strings?

@dfeuer Yeah, I don't care whether things are haskell values or how many lines they are on etc.  As long as the outputs are different and non-error. (output to STDERR or non-zero exit code)

What are the rules about compiler flags (e.g., -O)?

@dfeuer I'd like to say that you can use whatever flags you want at no cost, but I am pretty sure there are ways that you can just write all your code as flags and thus "score" zero bytes.  I went ahead and said you can use the various -Os at no additional cost, if there is any other flags you or any one else would like me to add I'd probably do so.

Incidentally, solutions to this challenge demonstrate the importance of keeping language extensions behind pragmas

MagicHash, 30 bytes
x=1
y#a=2
x#a=1
main=print$x#x

-XMagicHash outputs 1, -XNoMagicHash outputs 2
MagicHash allows variable names to terminate in a #. Therefore with the extension, this defines two functions y# and x# which each take a value and return a constant 2, or 1. x#x will return 1 (because it is x# applied to 1)
Without the extension, this defines one function # which takes two arguments and returns 2. The x#a=1 is a pattern that never gets reached. Then x#x is 1#1, which returns 2.
29 bytes
a=1
a#b=a
main|a<-0=print$a#0

I'm now singing X Magic Hash to the tune of Dance Magic Dance. I hope you're proud!

I'm astonished that MagicHash doesn't allow non-trailing hashes. Weird!

CPP, 33 20 bytes
main=print$0-- \
 +1

Prints 0 with -XCPP and 1 with -XNoCPP.
With -XCPP, a slash \ before a newline removes the newline, thus the code becomes main=print$0--  +1 and only 0 is printed as the +1 is now part of the comment.
Without the flag the comment is ignored and the second line is parsed as a part of the previous line because it is indented.

Previous approach with #define
x=1{-
#define x 0
-}
main=print x

Also prints 0 with -XCPP and 1 with -XNoCPP.

Oh god, until now I kind of thought GHC would strip Haskell comments before passing over to the CPP.

@Cubic Is it not a pre-processor?

@Bergi Sure, but pre-processors doesn't necessarily mean "is the first thing that runs", especially since GHC has to make a pass over the file first to even find the pragma. I guess comments are kept in so doc comments and the like work after CPP is done.

NumDecimals, 14 bytes
main=print 1e1

-XNumDecimals prints 10. -XNoNumDecimals prints 10.0.

BinaryLiterals, 57 bytes
b1=1
instance Show(a->b)where;show _=""
main=print$(+)0b1

-XBinaryLiterals prints a single newline. -XNoBinaryLiterals prints a 1.
I am sure there is a better way to do this. If you find one, please post it.

Can't you just define b as a function (so no binary becomes b(0, 1), but binary becomes 0b1)?

MonomorphismRestriction + 7 others, 107 bytes
This uses TH which requires the flag -XTemplateHaskell at all times.
File T.hs, 81 + 4 bytes
module T where
import Language.Haskell.TH
p=(+)
t=reify(mkName"p")>>=stringE.show

Main, 22 bytes
import T
main=print $t

Compiling with the flag MonomorphismRestriction forces the type of p to Integer -> Integer -> Integer and thus produces the following output:
"VarI T.p (AppT (AppT ArrowT (ConT GHC.Integer.Type.Integer)) (AppT (AppT ArrowT (ConT GHC.Integer.Type.Integer)) (ConT GHC.Integer.Type.Integer))) Nothing"

Compiling with the flag NoMonomorphismRestriction leaves the type of p at the most general, ie. Num a => a->a->a - producing something like (shortened the VarT names to a):
"VarI T.p (ForallT [KindedTV a StarT] [AppT (ConT GHC.Num.Num) (VarT a)] (AppT (AppT ArrowT (VarT a)) (AppT (AppT ArrowT (VarT a)) (VarT a)))) Nothing"

Try them online!

Alternatives
Since the above code simply prints out the type of p, this can be done with all flags that somehow influence how Haskell infers types. I will only specify the flag and with what to replace the function p and if needed additional flags (besides -XTemplateHaskell):
OverloadedLists, 106 bytes
Additionally needs -XNoMonomorphismRestriction:
p=[]

Either p :: [a] or p :: IsList l => l, try them online!
OverloadedStrings, 106 bytes
Additionally needs -XNoMonomorphismRestriction:
p=""

Either p :: String or p :: IsString s => s, try them online!
PolyKinds, 112 bytes
This is entirely due to  @CsongorKiss:
data P a=P

Either P :: P a or P :: forall k (a :: k). P a, try them online!
MonadComprehensions, 114 bytes
p x=[i|i<-x]

Either p :: [a] -> [a] or p :: Monad m => m a -> m a, try them online!
NamedWildCards, 114 bytes
This one was found by @Laikoni, it additionally requires -XPartialTypeSignatures:
p=id::_a->_a

They both have the save type (p :: a -> a) but GHC generates different names for the variables, try them online!
ApplicativeDo, 120 bytes
p x=do i<-x;pure i

Either p :: Monad m => m a -> m a or p :: Functor f => f a -> f a, try them online!
OverloadedLabels, 120 bytes
This needs the additional flag -XFlexibleContexts:
p x=(#id)x
(#)=seq

Either types as p :: a -> b -> b or p :: IsLabel "id" (a->b) => a -> b, try them online!

Does a similar thing work for other flags?

Yeah, you could do it with OverloadedStrings or OverloadedLists for sure and probably others as well..

It also works with PolyKinds:
Try it online!

Also seems to work with NamedWildCards: Try it online! (Requires -XPartialTypeSignatures)

CPP, 27 25
main=print({-/*-}1{-*/-})

Try it online!
Prints () for -XCPP and 1 for -XNoCPP
Previous version:
main=print[1{-/*-},2{-*/-}]

Try it online!
Prints [1] with -XCPP and [1,2] otherwise.
Credits: This is inspired by Laikoni's answer, but instead of a #define it simply uses C comments.

ScopedTypeVariables, 162 113 bytes
instance Show[()]where show _=""
p::forall a.(Show a,Show[a])=>a->IO()
p a=(print::Show a=>[a]->IO())[a]
main=p()

-XScopedTypeVariables prints "" (empty), -XNoScopedTypeVariables prints "[()]".
Edit: updated solution thanks to useful suggestions in the comments

Ah I see.  Its generally nicer to include your code in the body, but ungolfed versions are nice as well.  I'm also noticing that "T" can just be replaced with "".

Another thing you can do is replace your datatype T with (). To avoid having to define it. Try it online!

Nice catch, I just realised that the incoherent pragma can be included as a flag: Try it online!

Additionally show  can be changed for print

Unicode syntax for forall will save you a few bytes. I doubt any solution that needs extra instances has much hope of winning, though.

BangPatterns, 32 bytes
(!)=seq
main|let f!_=0=print$9!1

-XBangPatterns prints 1 whereas -XNoBangPatterns will print 0.
This makes use that the flag BangPatterns allows to annotate patterns with a ! to force evaluation to WHNF, in that case 9!1 will use the top-level definition (!)=seq. If the flag is not enabled f!_ defines a new operator (!) and shadows the top-level definition.

OverloadedStrings, 65 48 32 bytes
Taking advantage of RebindableSyntax, use our own version of fromString to turn any string literal into "y".
main=print""
fromString _=['y']

Must be compiled with -XRebindableSyntax -XImplicitPrelude.
Without -XOverloadedStrings prints ""; with prints "y".
Also, it only just now struck me that the same technique works with (e.g.) OverloadedLists:
OverloadedLists, 27 bytes
main=print[0]
fromListN=(:)

Must be compiled with -XRebindableSyntax -XImplicitPrelude.
Without -XOverloadedLists prints [0]; with prints [1,0].

You can shorten the last line to fromString a=['y'].

The space in print "n" can also be dropped.

@ØrjanJohansen thanks! I was having it fail with ="y", but =['y'] works fine!

You can remove the second n from print"n"

You can also use -XImplicitPrelude after RebindableSyntax to avoid the import line.

MonoLocalBinds, GADTs, or TypeFamilies, 36 32 bytes
EDIT:

-4 bytes: A version of this was incorporated into the great polyglot chain by stasoid, who surprised me by putting all the declarations at top level. Apparently triggering this restriction does not require actual local bindings.

a=0
f b=b^a
main=print(f pi,f 0)

With no extensions, this program prints (1.0,1).
With either of the flags -XMonoLocalBinds, -XGADTs, or -XTypeFamilies, it prints (1.0,1.0).
The MonoLocalBinds extension exists to prevent some unintuitive type inference triggered by GADTs and type families. As such, this extension is automatically turned on by the two others.
It is possible to turn it off again explicitly with -XNoMonoLocalBinds, this trick assumes you don't.
Like its more well-known cousin the monomorphism restriction, MonoLocalBinds works by preventing some values (in local bindings like let or where, thus the name apparently it can also happen at top level) from being polymorphic. Despite being created for saner type inference, the rules for when it triggers are if possible even more hairy than the MR.
Without any extension, the above program infers the type f :: Num a => a -> a, allowing f pi to default to a Double and f 0 to an Integer.
With the extensions, the type inferred becomes f :: Double -> Double, and f 0 has to return a Double as well.
The separate variable a=0 is needed to trigger the technical rules: a is hit by the monomorphism restriction, and a is a free variable of f, which means that f's binding group is not fully generalized, which means f is not closed and thus doesn't become polymorphic.

RebindableSyntax, 25 bytes
I was reading the recently posted Guide to GHC's Extensions when I noticed an easy one that I didn't recall seeing here yet.
main|negate<-id=print$ -1

With -XNoRebindableSyntax, prints -1.
With -XRebindableSyntax, prints 1.

Also requires -XImplicitPrelude, or alternatively import Prelude in the code itself.

-XRebindableSyntax changes the behavior of some of Haskell's syntactic sugar to make it possible to redefine it.
-1 is syntactic sugar for negate 1.
Normally this negate is Prelude.negate, but with the extension it's "whichever negate is in scope at the point of use", which is defined as id.
Because the extension is meant to be used to make replacements for the Prelude module, it automatically disables the usual implicit import of that, but other Prelude functions (like print) are needed here, so it is re-enabled with -XImplicitPrelude.

ApplicativeDo, 104 bytes
import Control.Applicative
z=ZipList
instance Monad ZipList where _>>=_=z[]
main=print$do a<-z[1];pure a

Try it online!
With ApplicativeDo, this prints
ZipList {getZipList = [1]}

Without it, it prints
ZipList {getZipList = []}

ZipList is one of the few types in the base libraries with an instance for Applicative but not for Monad.
There may be shorter alternatives lurking somewhere.

BinaryLiterals, 31 24 bytes
Edit:

-7 bytes: H.PWiz suggested adjusting it further by using a single b12 variable.

An adjustment to H.PWiz's method, avoiding the function instance.
b12=1
main=print$(+)0b12

With -XNoBinaryLiterals,  0b12 lexes as 0 b12, printing 0+1 = 1.
With -XBinaryLiterals, 0b12 lexes as 0b1 2, printing 1+2 = 3.

ApplicativeDo, 146 bytes
newtype C a=C{u::Int}
instance Functor C where fmap _ _=C 1
instance Applicative C
instance Monad C where _>>=_=C 0
main=print$u$do{_<-C 0;pure 1}

Prints 1 when ApplicativeDo is enabled, 0 otherwise
Try it online!

Thanks! Ah, I think I'm on an older version of GHC (the "no applicative" was a warning on my system)

Using -XDeriveAnyClass you can derive Applicative and Show to save using record syntax, see this.

Strict, 87 84 82 bytes
-5 bytes thanks to dfeuer!
Could be less with BlockArguments saving the parens around \_->print 1:
import Control.Exception
0!_=0
main=catch @ErrorCall(print$0!error"")(\_->print 1)

Running this with -XStrict prints a 1 whereas running it with -XNoStrict will print a 0. This uses that Haskell by default is lazy and doesn't need to evaluate error"" since it already knows that the result will be 0 when it matched on the first argument of (!), this behaviour can be changed with that flag - forcing the runtime to evaluate both arguments.
If printing nothing in one case is allowed we can get it down to 75 bytes replacing the main by (also some bytes off by dfeuer):
main=catch @ErrorCall(print$0!error"")mempty

StrictData, 106 99 93 bytes
-15 bytes thanks to dfeuer!
This basically does the same but works with data fields instead:
import Control.Exception
data D=D()
main=catch @ErrorCall(p$seq(D$error"")0)(\_->p 1);p=print

Prints 1 with the -XStrictData flag and 0 with -XNoStrictData.
If printing nothing in one case is allowed we can get it down to 86 bytes replacing the main by (19 bytes off by dfeuer):
main=catch @ErrorCall(print$seq(D$error"")0)mempty

Note: All solutions require TypeApplications set.

You can cut this down pretty easily to 98 bytes, which happens to match my (very different) solution exactly. TIO.

Actually, you can do even better: instead of printing in the exception handler, just use pure().

@dfeuer: Nice, the D{} trick is pretty cool! Shaved another one off by using PartialTypeSignatures instead of ScopedTypeVariables :)

You used the Monoid instance for ErrorCall ->IO ()?! Devious! The record syntax trick is useful in real code when the number of fields in a sum type constructor can potentially change, but you only care which constructor it is.

I'm not optimistic that my own StrictData solution can be cut down any, but do you think you could give it a try?

You can drop one more byte by switching from catch to handle: 95 bytes

BTW, your TIO for StrictData actually invokes Strict (unnecessarily).

I'm not sure printing nothing qualifies as printing a value.

@ØrjanJohansen, that's a good point, but it's not really clear to me what exactly "print a value" is supposed to mean in general. As I recall, putStrLn.show$ ("'::Text) doesn't print anything either.

@dfeuer: I had a look and tried a few things, but I never used Generics, so I'm probably not the right person.

93 bytes

You can do even better with bleeding edge GHC and -XBlockArguments: main=catch @ErrorCall(p$seq(D$error"")1)\_->p 3

It looks like empty output is fine.

58 bytes for StrictData, taking advantage of some truly disgusting trickery. See my latest answer.

ExtendedDefaultRules, 54 53 bytes
instance Num()
main=print(toEnum 0::Num a=>Enum a=>a)

Prints () with -XExtendedDefaultRules and 0 with -XNoExtendedDefaultRules.
This flag is enabled by default in GHCi, but not in GHC, which recently caused some confusion for me, though BMO was quickly able to help.
The above code is a golfed version of an example in the GHC User Guide where type defaulting in GHCi is explained.
-1 byte thanks to Ørjan Johansen!

While looking at this code borrowed into the polyglot (where the parentheses give some trouble), I remembered that GHC supports the one byte shorter syntax toEnum 0::Num a=>Enum a=>a.

You can get it down to 48 bytes with PartialTypeSignatures: main=print(toEnum 0::_=>Num a=>a). Also, your TIO link is out of date.

Strict, 52 bytes
import GHC.IO
f _=print()
main=f$unsafePerformIO$f()

-XStrict
-XNoStrict
With -XStrict, prints () an extra time.
Thanks to @Sriotchilism O'Zaic for two bytes.

StrictData, 58 bytes
import GHC.Exts
data D=D Int
main=print$unsafeCoerce#D 3+0

-XNoStrictData
-XStrictData
Requires MagicHash (to let us import GHC.Exts instead of Unsafe.Coerce) and -O (absolutely required, to enable unpacking of small strict fields).
With -XStrictData, prints 3. Otherwise, prints the integer value of the (probably tagged) pointer to the pre-allocated copy of 3::Integer, which can't possibly be 3.
Explanation
It will be a bit easier to understand with a little expansion, based on type defaulting. With signatures, we can drop the addition.
main=print
  (unsafeCoerce# D (3::Integer)
    :: Integer)

Equivalently,
main=print
  (unsafeCoerce# $
    D (unsafeCoerce# (3::Integer))
    :: Integer)

Why does it ever print 3? This seems surprising! Well, small Integer values are represented very much like Ints, which (with strict data) are represented just like Ds. We end up ignoring the tag indicating whether the integer is small or large positive/negative.
Why can't it print 3 without the extension? Leaving aside any memory layout reasons, a data pointer with low bits (2 lowest for 32-bit, 3 lowest for 64-bit) of 3 must represent a value built from the third constructor. In this case, that would require a negative integer.

OverloadedLists, 76 bytes
import GHC.Exts
instance IsList[()]where fromList=(():)
main=print([]::[()])

With -XOverloadedLists it prints [()]. With -XNoOverloadedLists it prints []
This requires the additional flags: -XFlexibleInstances, -XIncoherentInstances

You can get away with overlapping instances.

DeriveAnyClass, 121 113 bytes
Thanks to dfeuer for quite some bytes!
import Control.Exception
newtype M=M Int deriving(Show,Num)
main=handle h$print(0::M);h(_::SomeException)=print 1

-XDeriveAnyClass prints 1 whereas -XNoDeriveAnyClass prints M 0.
This is exploiting the fact that DeriveAnyClass is the default strategy when both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled, as you can see from the warnings. This flag will happily generate empty implementations for all methods but GeneralizedNewtypeDeriving is actually smart enough to use the underlying type's implementation and since Int is a Num it won't fail in this case.

If printing nothing in case the flag is enabled replacing the main by the following would be 109 bytes:
main=print(0::M)`catch`(mempty::SomeException->_)

At least in runhaskell, this actually prints M 1 with -XDeriveAnyClass, due to laziness...

@ceasedtoturncounterclockwis: Yes in GHCi as well, but when compiling on TIO (and my machine) & then running it results in 1 :)

113 bytes

109 bytes

I got it down to 104 in a completely different way, so I added my own answer.

UnboxedTuples, 52 bytes
import Language.Haskell.TH
main=runQ[|(##)|]>>=print

Requires -XTemplateHaskell. Prints ConE GHC.Prim.(##) with -XUnboxedTuples and UnboundVarE ## with -XNoUnboxedTuples.

Shouldn't there be another +16 in the score for the required option -XTemplateHaskell?

@celtschk I did not count it because the current meta consensus on command line flags says they are not counted but constitute a new language instead. Though upon thinking about it I see that in the context of this challenge which only allows Haskell answers but also the use of other flags it is not quite clear what todo. I'll ask OP about it.

I wasn't aware that the consensus on this has changed. Thank you for the pointer. Asking the OP is a good idea for sure.

HexFloatLiterals, 49 25 bytes
-24 bytes thanks to Ørjan Johansen.
main|(.)<-seq=print$0x0.0

Prints 0.0 with -XHexFloatLiterals and 0 with -XNoHexFloatLiterals.
There are no TIO links because HexFloatLiterals was added in ghc 8.4.1, but TIO has ghc 8.2.2.

main|(.)<-seq=print$0x0.0 avoids the import hiding.

main|let _._=0=print$0x0.0 might be easier for the polyglot though.

ScopedTypeVariables, 37 bytes
main=print(1::_=>a):: ∀a.a~Float=>_

This also requires UnicodeSyntax,PartialTypeSignatures, GADTs, and ExplicitForAll.
Try it online (without extension)
Try it online (with extension)
Explanation
The partial type signatures are just to save bytes. We can fill them in like so:
main=print(1::(Num a, Show a)=>a):: ∀a.a~Float=>IO ()

With scoped type variables, the a in the type of 1 is constrained to be the a in the type of main, which itself is constrained to be Float. Without scoped type variables, 1 defaults to type Integer. Since Float and Integer values are shown differently, we can distinguish them.
Thanks to @ØrjanJohansen for a whopping 19 bytes! He realized that it was much better to take advantage of the difference between Show instances of different numerical types than differences in their arithmetic. He also realized that it was okay to leave the type of main "syntactically ambiguous" because the constraint actually disambiguates it. Getting rid of the local function also freed me up to remove the type signature for main (shifting it to the RHS) to save five more bytes.

45 bytes

@ØrjanJohansen, nice.

@ØrjanJohansen, should I make the edit, or would you prefer to add your own?

Edit, it was a gradual evolution from yours.

@ØrjanJohansen, thanks, that was beautiful.

@ØrjanJohansen, five more down. I suspect this may be minimal.

Huh, I didn't know the :: forall a. ... for scoping could be on a local expression.

@ØrjanJohansen, I learned that trick from Ed Kmett.

PostfixOperators, 63 bytes
import Text.Show.Functions
instance Num(a->b)
main=print(0`id`)

Try it online (without extension)
Try it online (with extension)
This is a cut-down version of a Hugs/GHC polyglot I wrote. See that post for explanation. Thanks to @ØrjanJohansen for realizing I could use id instead of a custom operator, saving four bytes.

id can be used instead of !.

@ØrjanJohansen, yes indeed! That saves a cool four bytes.

StrictData, 97 bytes
import GHC.Generics
data A=A()deriving Generic
main=print$selDecidedStrictness$unM1.unM1$from$A()

Try it online (no strict data)
Try it online (strict data)
Also requires DeriveGeneric.

DeriveAnyClass, 104 bytes
import Control.Exception
newtype M a=M a deriving(Show,Exception)
main=print.displayException$M Deadlock

Try it online (without extension)
Try it online (with extension)
Also requires GeneralizedNewtypeDeriving.

TemplateHaskell, 140 91 bytes
Just copied from mauke with small modifications. I don't know what's going on.
-49 bytes thanks to Ørjan Johansen.
import Language.Haskell.TH
instance Show(Q a)where show _=""
main=print$(pure$TupE[]::ExpQ)

Try it online!

$(...) (no space) is template evaluation syntax when TH is enabled, and TupE[] ("empty tuple") gives (). Using Show might work well for the polyglot, although for this particular challenge I feel a bit bad about defining a value to print as an empty string...

UnicodeSyntax, 33 bytes
(∀)=0
main|forall<-1=print(∀)

Try it online!

MonomorphismRestriction, 31 29 bytes
Edit:

-2 bytes with an improvement by H.PWiz

f=(2^)
main=print$f$f(6::Int)

-XMonomorphismRestriction prints 0. -XNoMonomorphismRestriction prints 18446744073709551616.

With the restriction, the two uses of f are forced to be the same type, so the program prints 2^2^6 = 2^64 as a 64-bit Int (on 64-bit platforms), which overflows to 0.
Without the restriction, the program prints 2^64 as a bignum Integer.

I think f=(2^);main=print$f$f(64::Int) would save a byte. But it won't realistically terminate

@H.PWiz Fortunately 64=2^6, which saves yet another byte.

ScopedTypeVariables, 119 97 bytes
Just copied from mauke with small modifications.
Currently there are two other answers for ScopedTypeVariables: 113 bytes by Csongor Kiss and  37 bytes by dfeuer.
This submission is different in that it does not require other Haskell extensions.
-22 bytes thanks to Ørjan Johansen.
class(Show a,Num a)=>S a where s::a->IO();s _=print$(id::a->a)0
instance S Float
main=s(0::Float)

Try it online!

97 bytes (although the IO()/print trick won't work in the polyglot).

@ØrjanJohansen I added ScopedTypeVariables, but broke ExtendedDefaultRules. How it can be fixed? I already had such error before, but I am unable to apply your explanation here. The ScopedTypeVariables code I added is this.

I see, the codes use similar defaulting tricks, and they interfer with each other. One solution is to let the new one use a more restricted class than Num. I think class(Show a,Floating a)=>K a where{k::a->String;k=pure$ show(f pi)where f=id::a->a}; should work, conveniently using that Float and Double display pi with different precision.

OverloadedStrings, 77 bytes
import Data.String
instance IsString Double where fromString _=0
main=print""

Try it online!
Other OverloadedStrings answers: by ბიმო, by felixphew.
This one does not require other extensions. Created by Ørjan Johansen.

NegativeLiterals, 20 bytes
main=print$ -1`mod`2

Try it online!
Copied from this answer.

LexicalNegation, 20 bytes
main=print$ -1`mod`2

(No TIO: ghc 8.2.2 < 9.0.1)
Same as NegativeLiterals.

MonomorphismRestriction, 24 bytes
p=1
x=p+0.0
main=print$p
-XMonomorphismRestriction gives 1.0
-XNoMonomorphismRestriction gives 1
Explanation
So here we have p which I assign to 1.  Now in Haskell 1 is a numeric literal and can be any Num type.  Next we assign x to p+0.0, 0.0 is another literal, but it's a fractional literal so it has a more specific type than 1.  That's ok since Fractionals are also Nums.  So x is just some fractional type.  Then we print p.
So how does the monomorphism restriction come into play?  Well since p doesn't have a type anotation, the compiler needs to come up with a type for p.  With the monomorphism restriction this type is going to be concrete, i.e. it's going to come up with the first type it can rather than the most general kind.  It sees that p is used as a fractional in the definition of x so it picks Float as the type for p.  When we print p it's then printing a float, so it prints a decimal.
Without the monomorphism restriction the compiler takes some extra time and figures out that there is a polymorphic type that can be given to p.  So it assigns it the polymorphic type Num a => a rather than Float.  It then doesn't matter what's going on in x as long as it type checks it can't influence the type of p.  When we print p at the end then the compiler once again has to guess a concrete type, however since the type is fully polymorphic it can choose its preferred default of Int and thus it prints 1 as an Int without the decimal place.
So here we are using type defaulting to control the type of the object that gets printed.  Since 1 prints differently as a Float and an Int this results in different output.

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


text:
Find the Missing Numbers in the Fibonacci Sequence Mod K
Inspired by this Math.SE question.
Background
The Fibonacci Sequence (called F) is the sequence, starting 0, 1 such that each number (F(n)) (after the first two) is the sum of the two before it (F(n) = F(n-1) + F(n-2)).
A Fibonacci Sequence mod K (called M) is the sequence of the Fibonacci numbers mod K (M(n) = F(n) % K).
It can be shown that the Fibonacci Sequence mod K is cyclic for all K, as each value is determined by the previous pair, and there are only K2 possible pairs of non-negative integers both less than K. Because the Fibonacci sequence mod K is cyclic after its first repeated pair of terms, a number which doesn't appear in the Fibonacci Sequence mod K before the first repeated pair of terms will never appear.
For K = 4
0 1 1 2 3 1 0 1 ...
For K = 8
0 1 1 2 3 5 0 5 5 2 7 1 0 1 ...
Notice that for K = 8, 4 and 6 do not appear before the repeated 0 1, so 4 and 6 will never appear in the Fibonacci Sequence mod 8.
Challenge
Given an integer K strictly greater than 0, output all of the non-negative integers less than K that do not appear in the Fibonacci Sequence mod K.
Rules

Default loopholes are forbidden.
Default I/O.
Programs or functions are acceptable.
You can assume that K will fit in your native integer type (within reason).
If there are non-negative numbers less than K that do not appear in the Fibonacci Sequence mod K, your program/function should output all such numbers in any reasonable manner.
If there are no non-negative integers less than K that do not appear in the Fibonacci Sequence mod K, your program/function may indicate this by returning an empty list, printing nothing, producing an error, etc.
Order does not matter.
This is code-golf, so shortest answer in each language wins.

Test Cases
Generate test cases online!
Non-Empty Test Cases
  8 [4, 6]
 11 [4, 6, 7, 9]
 12 [6]
 13 [4, 6, 7, 9]
 16 [4, 6, 10, 12, 14]
 17 [6, 7, 10, 11]
 18 [4, 6, 7, 9, 11, 12, 14]
 19 [4, 6, 7, 9, 10, 12, 14]
 21 [4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 19]
 22 [4, 6, 7, 9, 15, 17, 18, 20]
 23 [4, 7, 16, 19]
 24 [4, 6, 9, 11, 12, 14, 15, 18, 19, 20, 22]
 26 [4, 6, 7, 9, 17, 19, 20, 22]
 28 [10, 12, 14, 16, 18, 19, 23]
 29 [4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27]
 31 [4, 6, 9, 12, 14, 15, 17, 18, 19, 22, 25, 29]
 32 [4, 6, 10, 12, 14, 18, 20, 22, 26, 28, 30]
 33 [4, 6, 7, 9, 15, 17, 18, 20, 24, 26, 27, 28, 29, 31]
 34 [4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 30]
 36 [4, 6, 7, 9, 10, 11, 12, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32]
 37 [9, 10, 14, 17, 20, 23, 27, 28]
 38 [4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 36]
 39 [4, 6, 7, 9, 15, 17, 19, 20, 22, 24, 30, 32, 33, 35]
...
200 [4, 6, 12, 14, 20, 22, 28, 30, 36, 38, 44, 46, 52, 54, 60, 62, 68, 70, 76, 78, 84, 86, 92, 94, 100, 102, 108, 110, 116, 118, 124, 126, 132, 134, 140, 142, 148, 150, 156, 158, 164, 166, 172, 174, 180, 182, 188, 190, 196, 198]
...
300 [6, 18, 30, 42, 54, 66, 78, 90, 102, 114, 126, 138, 150, 162, 174, 186, 198, 210, 222, 234, 246, 258, 270, 282, 294]
...
400 [4, 6, 10, 12, 14, 20, 22, 26, 28, 30, 36, 38, 42, 44, 46, 52, 54, 58, 60, 62, 68, 70, 74, 76, 78, 84, 86, 90, 92, 94, 100, 102, 106, 108, 110, 116, 118, 122, 124, 126, 132, 134, 138, 140, 142, 148, 150, 154, 156, 158, 164, 166, 170, 172, 174, 180, 182, 186, 188, 190, 196, 198, 202, 204, 206, 212, 214, 218, 220, 222, 228, 230, 234, 236, 238, 244, 246, 250, 252, 254, 260, 262, 266, 268, 270, 276, 278, 282, 284, 286, 292, 294, 298, 300, 302, 308, 310, 314, 316, 318, 324, 326, 330, 332, 334, 340, 342, 346, 348, 350, 356, 358, 362, 364, 366, 372, 374, 378, 380, 382, 388, 390, 394, 396, 398]
...

Empty Test Cases (no output, error, empty list, etc. is acceptable output)
1, 2, 3, 4, 5, 6, 7, 9, 10, 14, 15, 20, 25, 27, 30, 35 ... 100 ...

Related:
Counting Fibonacci Orbits
Find the Pisano Period

Sandbox (deleted).

Haskell, 70 bytes
Some amount of bytes saved thanks to Esolanging Fruit
8 bytes saved thanks to Laikoni
a=1:scanl(+)1a
f x=[u|u<-[2..x-1],and[mod b x/=u|(_,b)<-zip[1..x^2]a]]

Try it online!

@EsolangingFruit Ah thanks!  I was just coming to a similar conclusion myself.

read$show works instead of fromInteger in this case and saves two bytes.

Using zip[1..x^2] for truncating saves some more bytes: Try it online!

@Laikoni Took a while but I made the change.  Thanks, that's a good idea.

Jelly, 9 8 bytes
²RÆḞ%ḟ@Ḷ

Try it online!
Based on the pisano period p(n) <= 6n from A001175. Also, p(n) <= 6n <= n^2 for n >= 6 and p(n) <= n^2 for n < 6. Saved this byte thanks to Dennis.

² should work instead of ×6.

Perl 6,  43 42 39  32 bytes
{^$_ (-)(1,1,(*+*)%$_...->\a,\b{!a&&b==1})}

Test it
{^$_∖(1,1,(*+*)%$_...->\a,\b{!a&&b==1})}

Test it
{^$_∖(1,1,(*+*)%$_...{!$^a&&$^b==1})}

Test it
{^$_∖(1,1,(*+*)%$_...!*&*==1)}

Test it
Expanded:
{  # bare block lambda with implicit parameter ｢$_｣

  ^$_               # Range upto and excluding the input

  ∖                 # set minus (U+2216)

  (                 # generate the Fibonacci sequence mod k

    1, 1,           # seed the sequece (can't be 0,1)

    ( * + * ) % $_  # add two values and modulus the input (lambda)

    ...             # keep doing that until

                    # it matches 0,1
    !*              #   negate the first param (1 when 0)
    &               #   and Junction
    *               #   second param
    == 1            #   both match 1

  )
}

><>, 48 bytes
01\
?!\:&+{:}%:1$0p&$:
v0\~:1=?
>?!;1-::0g?!nao:

Try it online!
Takes input through the -v flag.
Prints a lot of excess newlines, but gets the job done. This basically uses the first line to store the set of numbers that have appeared so far in the sequence.
How It Works:
01\    Input is already on the stack
...... Initialises the sequence with 1 and 0
...... Goes to the second line
......

......
..\:&+{:}% Gets the next number in the modded Fibonacci sequence while preserving the previous number
......
......

......
..........:1$0p&$: Puts a 1 at that cell number on the first line
.......
.......

......             If the number is a 0 go to the third line
?!\..............: Check if the next number is a 1, meaning we've reached the end of the sequence
v0\~:1=?           Go to the fourth line if so
>.....             Re-add the 0 and go back to the second line if not

......           While input:
......             Get the cell from the first line
......             If not 0: print the number
>?!;1-::0g?!nao:   Finally, print a newline and decrement the input

Python 2, 69 bytes
m=input();r=set(range(m))
a=b=1
exec"a,b=b,a+b;r-={a%m};"*m*6
print r

Try it online!

MATL, 19 18 bytes
0lbU:"yy+]vG\G:qX~

Try it online!
-1 byte thanks to Guiseppe.
  bU:"   ]         % Do K^2 (>6K) times.
0l    yy+          %  Fibbonaci
                X~ % Set exclusive difference between
          vG\      %  the fibonacci numbers mod K
             G:q   %  and 0...K-1

18 bytes; rearranging recovers your use of X~!

@Giuseppe Thanks! Still very long though....

Husk, 13 12 10 bytes
Thanks @Zgarb for -2 bytes!
-U2m%⁰İfŀ⁰

Prints an empty list in case all integers appear, try it online!
Explanation
-U2m%⁰İfŀ⁰  -- named argument ⁰, example with: 8
-           -- difference of
        ŀ⁰  -- | lowered range: [0,1,2,3,4,5,6,7]
            -- and
      İf    -- | Fibonacci sequence: [1,1,2,3,5,8,13,21,34,55,89,144,233,377…
   m%⁰      -- | map (modulo ⁰): [1,1,2,3,5,0,5,5,2,7,1,0,1,1…
 U2         -- | keep longest prefix until 2 adjacent elements repeats: [1,1,2,3,5,0,5,5,2,7,1,0,1]
            -- : [4,6]

You can use U2 to get the longest prefix where no adjacent pair repeats.

Python 3,173 152 143 131 bytes
f=lambda n,m,a=0,b=1:a%m if n<=0else f(n-1,m,b,a+b)
p=lambda n,i=2,y={0}:y^{*range(n)}if f(i,n)==1>f(i-1,n)else p(n,i+1,y|{f(i,n)})

Special Thanks to @ovs.
Try It Online
How Does It Work?
The first function takes two parameters m and n, and it returns the nth Fibonacci number mod m. The second function loops through the Fibonacci numbers mod k and checks if 0 and 1 are repeated. It stores the numbers in a list and compares it with a list containing the numbers 1-n. The duplicate numbers are removed and the remaining numbers are returned.

Its a part of the header and that is not compulsory to include in the code.

Okay done. @ovs Thanks for telling, I was unaware of it.

131 bytes by creating sets with curly brackets instead of set() and chained comparisons.

05AB1E, 10 bytes
L<InLÅfI%K

Try it online!
-3 bytes thanks to Emigna.

L<I6*LÅfI%K

@Emigna I have been looking for that built-in for ages! Thanks!

Python 3, 91 bytes
lambda n:{*range(n)}-{*f(n*n,n)}
f=lambda c,m,l=[1,0]:f(c-1,m,[(l[0]+l[1])%m]+l)if c else l

Try it online!

R, 92 86 bytes
Thanks to @Giuseppe for saving 6 bytes!
function(k,n=!!0:2){while(any((z=tail(n,2))-n[1:2]))n=c(n,sum(z)%%k);setdiff(1:k-1,n)}

Try it online!
Pretty straightforward implementation (previous version, but same concept):
function(k,
         K=1:k-1,      #Uses default arguments to preset variables for legibility
         n=c(0,1,1)){  #(wouldn't change byte-count to put them in the body of the function)
    while(any((z=tail(n,2))!=n[1:2])) #Do as long as first 2 elements are not identical to last 2 elements
        n=c(n,sum(z)%%k) #Built the fibonacci mod k sequence
    K[!K%in%n] #Outputs integers < k if not in sequence.
}

86 bytes

@Giuseppe ah setdiff, good idea!

70 bytes porting the 1:k^2 approach that everyone else uses

Python 3, 78 bytes
def m(K):M=0,1;exec(K*6*'M+=sum(M[-2:])%max(K,2),;'+'print({*range(K)}-{*M})')

Try it online!
Prints a set, so the output for empty test cases is set(), which is the empty set.

72 bytes as a full program

@ovs you mean in Python 2, right? sure

Ruby, 47 bytes
->n{a=b=1;[*1...n]-(1..n*n).map{a,b=b,a+b;a%n}}

Try it online!
While it uses some of the same logic, this is not based off  G B's Answer.
Explanation:
->n{
  a=b=1;   # start sequence with 1,1
  [*1...n] # all the numbers from 1 to n-1 as an array
           # 0 is excluded as it should never be in the final answer
  -  # set operation; get all items in the first set and not in the second
  (1..n*n).map{ # n squared times
    a,b=b,a+b;  # assign next fibonacci numbers
    a%n         # return a fibonacci number mod n
  }    # Map to an array
}

Common Lisp, 106 bytes
(lambda(k)(do((a 1 b)c(b 1(mod(+ a b)k)))((=(1- b)0 a)(dotimes(i k)(or(member i c)(print i))))(push a c)))

Try it online!

Vyxal, 9 bytes
ʁ⁰²ɾ∆f⁰%F

Try it Online!
How?
ʁ⁰²ɾ∆f⁰%F
           # (implicit input)
ʁ          # Exclusive zero range [0, n)
 ⁰²        # Input squared
   ɾ       # Inclusive one range [1, n]
    ∆f     # Nth fibonacci number (implicit vectorization)
      ⁰%   # Modulo with input
        F  # Remove all values from this list in the other list

Elixir,  148 144  bytes
 fn x->Enum.to_list(1..x-1)--List.flatten Enum.take_while Stream.chunk(Stream.unfold({1,1},fn{p,n}->{rem(p,x),{n,p+n}}end),2),&Enum.sum(&1)!=1end

Try it online!
Not an especially competitive answer, but was really fun to golf! Elixir is a pretty readable language, but an explanation for the the mess of characters in the middle follows.

This explanation is in two sections, the mod-fibonacci and the operating on it
Mod-fib:
Stream.unfold({1,1},fn{p,n}->{rem(p,x),{n,p+n}}end)

This returns an infinite stream of fibonacci mod x. It starts with an accumulator {1,1}, and applies the following operation ad infinitum: given accumulator {p,n}, output p mod x to the stream. Then, set the accumulator to {n,p+n}.
The rest:
fn x->                              Define a fxn f(x) that returns
  Enum.to_list(1..x-1)--            The numbers from 1..x-1 that are not in
  List.flatten                      The flattened list constructed by
    Enum.take_while                 Taking from mod-fib until
      Stream.chunk(                 A 2-size chunk
        Stream.unfold({1,1},fn{p,n}->{rem(p,x),{n,p+n}}end) (of mod fib)
        ,2)
      ,&Enum.sum(&1)!=1             sums to 1, representing [0,1] or [1,0]
end

SNOBOL4 (CSNOBOL4), 153 bytes
 k =input
 a =table()
 y =1
i z =remdr(x + y,k)
 a<z> =1
 x =y
 y =z
 i =lt(i,k * 6) i + 1 :s(i)
o output =eq(a<o>) lt(o,k) o
 o =lt(o,k) o + 1 :s(o)
end

Try it online!

Ruby, 55 53 bytes
->n{*a=0,b=1;(n*n).times{a<<(b+=a[-2])%n};[*1...n]-a}

Try it online!

Pari/GP, 49 bytes
n->[k|k<-[0..n-1],prod(i=0,n^2,k-fibonacci(i)%n)]

Try it online!

JavaScript (ES6), 84 bytes
f=(n,a=0,b=1,q=[...Array(n).keys()])=>a*b+a-1?f(n,b,(a+b)%n,q,q[b]=0):q.filter(x=>x)

Python 3, 76 bytes
def t(n,r=[1]):
 while n*n>len(r):r+=[sum(r[-2:])%n]
 return{*range(n)}-{*r}

This simply looks over the longest possible cycle of Fibonnaci numbers (n^2), and creates a list of all numbers that occur in that time.  To simplify logic the numbers are stored modulo n.