text:
A Dog on a Chain
I'm looking out of my attic window into my neighbor's yard.  They have a dog chained to a post in the center of the yard.  The dog runs around the yard but is always on the end of its chain, so it ends up leaving a track in the dirt. Normally this track would be perfectly circular, but my neighbors have some other poles in their yard that the dog's chain gets caught on.  Each time the dogs chain hits a pole the dog begins rotating about the new pole with whatever length of chain is left as its radius.  Since the poles, the dog and the chain all have zero width (my neighbors are mathematicians) the chain can wind around a pole indefinitely without the radius of the circle shortening.  The dog can also pass through the chain (just not its collar) if the chain is in its path.  After observing this oddity for a while I decide I will write some code to simulate my neighbor's dog.  The code will take the locations of a center pole, to which the dog is chained, the locations of the other poles in my neighbors yard, the length of the chain, and the starting location of the dog, and will output a diagram indicating the path where the dog has worn down the grass.  You may assume that any combination of the following are constant (and thus not take them as input):

Location of the pole to which the dog is chained
Length of the chain
Starting location of the dog

The sun is rising, so the space on the floor of my attic illuminated by the window is shrinking, giving me less and less space to write my code. Please try to minimize the byte count of your code so that I have space to draft it on my attic floor.
Test cases
Here I assume that the dog starts 3 units south from the to which pole it is chained (the red dot), located at 0,0.  I have indicated where the poles are with dots for clarity, you do not need to include them in your output.
Poles at 1,2 -1,2

Poles at 0,.5

Poles at 0,1 1,1 -2,1 -1,-.5

Poles at 0,1 1,1

What is the output for {0,-.5}?

@KritixiLithos Its the output of {0,.5} flipped vertically without the largest circle.  The dog essentially starts caught on the second pole.

As a result of floating-point issues, my program draws a circle around (1,1) in the last testcase (the string length is 99.99999). Is this okay?

The dog runs both clockwise and counter-clockwise, but from a fixed point?

"The sun is rising the space on the floor of my attic illuminated by the window is shrinking giving me less and less space to write my code" +1 just for this

Python 3 using matplotlib, 457 bytes
from cmath import*
from matplotlib import pyplot as g,patches as i
def x(p):
 p+=[0];d=180/pi;a=2;h=g.gca();h.set_xlim(-5,5);h.set_ylim(-5,5)
 while a:
  a-=1;c=0;y=3;z=-pi/2
  while 1:
   s=[n for n in p if abs(n-c)<=y and n!=c]
   if not s:h.add_patch(i.Arc((c.real,c.imag),y*2,y*2));break
   n=[max,min][a](s,key=lambda n:(z-phase(n-c))%(2*pi));l,r=polar(n-c);h.add_patch(i.Arc((c.real,c.imag),y*2,y*2,[z,r][a]*d,0,[r-z,z-r][a]*d));y-=l;z=r;c=n
 g.show()

Because your neighbors are mathematicians I've assumed that your neighbor's garden occupies the complex domain and any coordinates of objects in the garden are therefore complex numbers. To use this function, you should therefore pass it a list of complex numbers signifying the locations of the poles in your neighbor's garden. The default coordinate system representation has been chosen, where to the right are positive real numbers and upwards are positive imaginary numbers. This means the examples become:
x([2j+1,2j-1])
x([.5j])
x([1j,1+1j,-2+1j,-1-.5j])
x([1j,1+1j])

Furthermore, the program assumes the following things: the leash is tied to the point 0, the leash is 3 units long, and the plot area is 10 by 10 centered around 0. For these parameters, the results match up exactly with the examples, and this is how the result looks like (for the final example):

The algorithm is quite simple, only requiring one conditional to differentiate the clockwise and the counterclockwise search. The state of the algorithm is defined by the current rotation point and the orientation/remaining length of the leash when it hit the current rotation point. It works as follows:

Filter out points from the collision set that are further away from the current rotation point than the remaining leash length, as well as the current rotation point.
If this set is empty, draw a circle with the radius of the remaining belt length around this point as the end of this arm has been reached.
Determine the point where the phase difference between the difference vector and the leash orientation is minimal/maximal. This is the next point the leash will hit in the clockwise/counterclockwise direction respectively.
Draw the arc based on these vectors, take the leash length, subtract the magnitude of the distance and set the leash orientation to the orientation of the difference vector. Update the rotation point and continue from the start.

This algorithm is then performed first in the clockwise direction, after which the state is reset and it is executed in the counterclockwise direction. The simplicity of the algorithm means that about half of the program bytecount is spent on the drawing functions. If the drawing routines were stripped out it would remove 218 bytes from the program size.
The following is an ungolfed version that also contains debug code, which also displays points and leash collisions:
from cmath import pi, rect, polar, phase
from matplotlib import pyplot, patches
def x_ungolfed(points):
    degrees = 180/pi # conversions

    # add the center point to the collision points
    points.append(0.0)

    # configure plot area
    axes=pyplot.gca()
    axes.set_xlim(-5,5)
    axes.set_ylim(-5,5)

    # plot the points
    x, y =zip(*((p.real, p.imag) for p in points))
    axes.scatter(x, y, 50, "b")

    # first iteration is clockwise, second counterclockwise
    clockwise = 2
    while clockwise:
        clockwise -= 1

        # initial conditions
        center = 0 + 0j;
        leash_size = 3
        leash_angle = -pi / 2

        # initial leash plot
        leash_start = rect(leash_size, leash_angle)
        axes.plot([center.real, leash_start.real], [center.imag, leash_start.imag], "r")

        # search loop
        while 1:
            # find possible collission candidates
            candidates = [n for n in points if abs(n - center) <= leash_size and n != center]
            # if we reached the end, draw a circle
            if not candidates:
                axes.add_patch(patches.Arc(
                    (center.real, center.imag),
                    leash_size*2, leash_size*2
                ))
                break
            # find the actual collision by comparing the phase difference of the leash angle vs the difference between the candidate and the current node
            new = (min if clockwise else max)(candidates, key=lambda n: (leash_angle - phase(n - center)) % (2 * pi))

            # convert the difference to polar coordinates
            distance, new_angle = polar(new - center)
            # draw the arc
            if clockwise:
                axes.add_patch(patches.Arc(
                    (center.real, center.imag),
                    leash_size * 2, leash_size * 2,
                    new_angle * degrees,
                    0,
                    (leash_angle-new_angle) * degrees
                ))
            else:
                axes.add_patch(patches.Arc(
                    (center.real, center.imag),
                    leash_size * 2, leash_size * 2,
                    leash_angle * degrees,
                    0,
                    (new_angle - leash_angle) * degrees
                ))
            # draw intermediate lines
            edge = rect(leash_size, new_angle) + center
            axes.plot([center.real, edge.real], [center.imag, edge.imag], "g")

            # perform updates: decrease remaining leash size, set new leash angle, move rotation center to the collision
            leash_size -= distance
            leash_angle = new_angle
            center = new

    # show the graph
    pyplot.show()

The output it produces looks like this:

+1 for a really great explanation and for having golfed me by almost twice as much! gosh I envy those builtins

Processing 3, 815 833 835 876 879 bytes
Saved two bytes thanks to @ZacharyT by removing unnecessary parentheses
void settings(){size(600,600);}int i,w,x,n;float l,d,t,a,f,g,m,R,U;float[][]N,T;float[]S,p;void s(float[][]t){N=new float[t.length+1][2];N[0][0]=N[0][1]=i=0;for(float[]q:t)N[++i]=q;translate(w=300,w);noFill();pushMatrix();f(N,0,-w,w,1,0);popMatrix();f(N,0,-w,w,0,0);}float p(float a,float b){for(a+=PI*4;a>b;)a-=PI*2;return a;}void f(float[][]P,float x,float y,float L,int c,int I){l=2*PI;d=i=0;S=null;for(;i<P.length;i++){float[]p=P[i];g=atan2(y,x);m=atan2(p[1],p[0]);if(p(f=(c*2-1)*(g-m),0)<l&(t=dist(0,0,p[0],p[1]))<=L&I!=i){l=p(f,0);S=new float[]{g,m};d=t;n=i;}}if(S==null)ellipse(0,0,2*(L-d),2*(L-d));else{arc(0,0,L*2,L*2,p(S[c],S[1-c]),S[1-c]);R=cos(a=S[1]);U=sin(a);translate(d*R,d*U);T=new float[P.length][2];for(int i=0;i<T.length;T[i][1]=P[i][1]-d*U,i++)T[i][0]=P[i][0]-d*R;f(T,(L-d)*R,(L-d)*U,L-d,c,n);}}

Run this program like so:
void setup() {
    s(new float[][]{{0,100},{100,100},{-200,100},{-100,-50}});
}

(the function s takes in a float[][]). This is essentially testcase #3, but multiplied by 100 to fit the window.
Several things to note:

the program does NOT draw poles
the images appear flipped upside-down because in Processing's coordinate system, the positive y-axis goes down
because Processing uses floats, the calculations are not very accurate, so you might see this in the images. I have asked the OP if these floating-point error matter.
the size of the window is 600 pixels by 600 pixels
very small input coordinates will bork the program because the stack pushMatrix() and popMatrix() operate on can only hold 32 matrices.
the dog starts at (0, -300) and the chain starts at 300 pixels long
the images below have been minified for convenience

Sample output for the above testcase.

If you want to see the prettified output, add this line right after the translate(w,w); in function s.
background(-1);scale(1,-1);fill(255,0,0);ellipse(0,0,25,25);fill(0);for(float[]q:N)ellipse(q[0],q[1],25,25);

And this gives us this result:

Ungolfed f() and explanation
(contains debug code as well)
void f(float[][]points, float x, float y, float len, int c, int pindex) {
    print(asd+++")");
    float closest = 2*PI;
    float d=0,t;
    float[]stuff = null;
    int index = 0;
    for(int i=0;i<points.length;i++) {
        if(pindex != i) {
            float[]p = points[i];
            float originAngle = atan2(y, x);
            float tempAngle = atan2(p[1], p[0]);
            //println(x,y,p[0],p[1]);
            float diff = c<1?tempAngle-originAngle:originAngle-tempAngle;
            println("@\t"+i+"; x=\t"+x+"; y=\t"+y+"; tx=\t"+p[0]+"; ty=\t",p[1], diff, originAngle, tempAngle);
            if(p(diff) < closest && (t=dist(0,0,p[0],p[1])) < len) {
                println("+1");
                closest = p(diff);
                stuff = new float[]{originAngle, tempAngle};
                d=t;
                index = i;
            }
        }
    }
    if(stuff == null) {
        ellipse(0,0,2*(len-d),2*(len-d));
        println("mayday");
    } else {
        println("d angles",d,p(stuff[c],stuff[1-c],c), stuff[1-c]);
        //println(points[0]);
        arc(0, 0, len*2, len*2, p(stuff[c],stuff[1-c],c), stuff[1-c]);
        float angle = stuff[1];
        translate(d*cos(angle), d*sin(angle));
        println("Translated", d*cos(angle), d*sin(angle));
        println("angle",angle);
        float[][]temp=new float[points.length][2];
        for(int i=0;i<temp.length;i++){
            temp[i][0]=points[i][0]-d*cos(angle);
            temp[i][1]=points[i][1]-d*sin(angle);
            println(temp[i]);
        }
        println(d*sin(angle));
        pushMatrix();
        println();
        f(temp, (len-d)*cos(angle), (len-d)*sin(angle), (len-d), c, index);
        popMatrix();
        //f(temp, (len-d)*cos(angle), (len-d)*sin(angle), (len-d), 0, index);
    }
}

To put it shortly, the program sends two "seekers", one goes anti-clockwise and the other clockwise. Each of these seekers finds the closest pole and draws an arc to it if the chain is long enough, other wise it draws a circle. Once it draws an arc, it sends another seeker to that pole and the process continues. f() contains the process of each seeker. A more detailed explanation will come as soon as I golf this more.

Do you need the parens around the last L-d?

@ZacharyT I don't know how I missed that, thanks.

LOGO, 305 298 297 293 bytes
Try the code on FMSLogo.
Define a function draw (golfed as d) that, given input as a list of pole coordinate (for example draw [[0 100] [100 100] [-200 100] [-100 -50][0 0]], will draw on screen the result.
Requirements:

Initial rope length = 300 pixels. (as 3 pixels is too small)
[0 0] must be included in pole list. If debug code (draw poles) is turned on, then [0 0] must be the last item.
The dog start at coordinate x=0, y=-300 (as in the problem description)

Possible optimizations:

-1 byte if exceptional case (the dog run into a pole) is not required to be mathematically correct by replacing >= with >

Golfed code:
to f
op(if ?=pos 360 modulo :m*(180+heading-towards ?)360)
end
to x :m[:1 300]
home
forever[make 2 filter[:1>=u ?](sort :p[(u ?)<u ?2])invoke[pd
arc -:m*f :1
pu
if 360=f[stop]make 1 :1-u ?
lt :m*f
setpos ?]reduce[if f<invoke[f]?2[?][?2]]:2]
end
to d :p
copydef "u "distance
foreach[1 -1]"x
end

Ungolfed code (; starts an inline comment (used for explanation), and : starts a variable name):
to f
    op ifelse ? = pos 360 modulo :m*(180 + heading - towards ?) 360
end

to x
    home
    foreach :poles [pu setpos ? pd circle 5] ; debug code
    make "length 300 ; initial length of rope
    forever [
        make "tmp filter [:length >= distance ?] ; floating point error makes > and >= similar,  ~
            ; but >= is correct mathematically ~
            (sort :poles [(distance ?) < distance ?2])
         ; the last = longest element will be rotated
        invoke [
            pd
            arc -:m*f :length
            pu
            if 360=f [stop]
            make "length :length - distance ?
            lt :m*f
            setpos ?
        ] reduce [
            if f < invoke[f]?2 [?] [?2]
        ] :tmp ; apply to use ? instead of :pos
    ]
end

to draw :poles
    foreach [1 -1] [[m]
        x
    ]
end

Python 2 + PIL, 310 bytes
from PIL import Image
from cmath import*
I,_,X,P=Image.new('1',(300,300),'white'),abs,polar,input()
def r(s):
 a,C,l=0,0,3
 while _(a)<99:
  c=C+l*exp(1j*a);I.load()[c.real*30+150,150-c.imag*30]=0
  for p in P+[0]:
   N,E=X(C-c);n,e=X(C-p)
   if n<=N and _(E-e)<.1:l-=_(p-C);C=p
  a+=s
r(.01)
r(-.01)
I.show()

The script reads the list of points from stdin as a list of complex numbers.
printf '[complex(0,0.5)]' | python2 snippet.py

printf '[complex(0,1), complex(1,1)]' | python2 snippet.py

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


text:
Check if a string is the anagram of another
Skat
I'm a fan of anagrams, so given two strings s1 and s2 write a program or function that outputs a truthy value if s2 is an anagram of s1, and a falsey value otherwise (not accounting for spaces and capital letters).
For example:
Input: s1 = "Anagram"; s2 = "Nag a ram"
true

Input: s1 = "stack overflow"; s2 = "fewer kool cats"
false

Input: s1 = "apple rocks"; s2 = "paler spock"
true

Rules

Program and function allowed.
Shortest code in bytes wins.

Duck logo!

05AB1E, 8 bytes
lðδKJ€{Ë

Try it online!

Wow, your answer and mine are literal polar opposites at the same cost; you remove spaces, I add them. Yours is definitely more efficient though. I'm removing mine, this was so much better lol.

If you sort first you can just remove the trailing newlines and dont have to join afterwards. tl;dr: l€{ðδÛË should also work (1 byte saving yay)

@Datboi Hmm, well, I'll rather answer the original challenge with that.

Jelly, 8 bytes
ŒlḟṢ¥€⁶E

Try it online!

Python 3, 74 bytes
def f(a,b):print(g(a)==g(b))
g=lambda a:sorted(a.upper().replace(" ", ""))

Try it online!

You can change def f(a,b):print(g(a)==g(b)) for lambda a,b:g(a)==g(b)

You missed an extra space after .replace()'s comma.

Japt, 13 bytes
v rS á øVv rS

Test it

source: Stack Exchange

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

sort: votes


text:
Stealing sequences: Cops
This is cops-and-robbers. This is the Cops thread. For the robbers thread, go here.
I've noticed a number of OEIS (On-line Encyclopedia of Integer Sequences) challenges since I joined the site. It seems only fair that we have a cops-and-robbers challenge that determines who is the master of online integer sequences, once and for all.
Edit: In order to prevent trivial answers, cops lose 1/2 point for each submission that is cracked. Additionally, for the purposes of this challenge, constant sequences are not allowed. This only applies to solutions posted after this edit.
Cops
Write a program or function that, given no input, deterministically prints any sequence from the OEIS. By deleting some subset of the characters, your program must be able to print a different OEIS sequence when run in the same language. The new sequence must be entirely new, not just the first by a different name or with a different offset. Neither sequence may be simply a repeated constant value.
You must provide the first function, along with the name of the OEIS sequence so correctness can be verified. It's OK if behavior gets questionable around your language's MAX_INT value or 256, whichever is larger.
Robbers
Delete characters from some Cop's submission such that your new program outputs any other sequence from the OEIS. Provide the new function along with the name of the new OEIS sequence. Here is a utility to make sure that your submission is valid (i.e. deletes characters without any funny business.  Doesn't check the sequence itself.)
It's in your best interest to delete as many characters from the Cop's submission as possible. If another robber (anyone except the Cop who authored the original program) comes along and finds a shorter solution that finds another different sequence, that robber steals your point. (Note that simply golfing off characters and printing the same sequence is not sufficient to steal the point.)
Rules & Scoring
If, after one week, nobody has been able to crack your solution, you can mark your solution as safe by providing the second program along with the name of the sequence it generates.
You get one point for each safe posting and one point for each submission you crack. Cops lose 1/2 point for each cracked submission. Note that another robber can steal your point from the cracked submission at any time by providing a shorter program that yields a different sequence.
Cops may only post one challenge per language, per person.
The player with the most points at 12:00 UTC on 7 July wins.

Sandbox post: https://codegolf.meta.stackexchange.com/a/13042/66460

In order for a solution to be solved, does the robber need to delete the correct characters? For example, what if they manage to find a solution but it wasn't the intended one, and produces a third sequence that the cop did not intend the program to ever produce?

@Christian that is a perfectly valid solution (see how robbers can steal from one another.) The cop needs to provide a program for which this is possible but also needs to protect from other sequences.

Sorry, this is too easy for the cops and robbers.

@juniorRubyist it can't be too easy for both the cops and robbers. It may be easier for the robbers, but there are a few things cops can do to make it more challenging.

This challenge is extremely similar. I won't dupe hammer it, but I think this is probably a duplicate.

@FryAmTheEggman ah, didn't see that. I don't think it's quite a dupe as hamming distance =/ deletions and the robbers have a lot more leeway to find unintended answers, but it is more similar than I would like.

Two questions, and the first might speak to my ignorance of C&R: 1) if I post a Cops solution that ends up being "safe", am I allowed to post the exact same solution again to try for another point? 2) When you say the Robbers have to remove a subset of characters, do you mean the characters removed must be sequential?

@Shaggy to your first question, you can't post two solutions in the same language, so I'd say the answer is no. To the second question, they do not have to be sequential, but you can't reorder characters.

Thanks, @rogaos. That was the answer I expected to the first question so no worries. Got a couple of ideas for Cops, hopefully I'll get a few minutes in the morning to work them up.

I think that golfing vs Levenstein distance makes this substantially different.  Cops have to consider drastically different potential solutions.

MarioLANG, 23 bytes cracked
   >+
 :<":
>+^!<
===#=

Try it online!
produces the odd numbers A005408

cracked

C, A000217, 239 bytes Cracked
This isn't code-golf so I didn't bother.
#include <stdio.h>
#include <limits.h>
int main()
{
    int i, n, temp = 0;
    for(i = 0; i < INT_MAX; i++)
    {
        n = 0;
        temp = i;
        while(temp)
            n+=temp--;
        printf("%d, ", n);
    }
    return 0;
}

Sequence: https://oeis.org/A000217

@rogaos The one that is cracked from this code is not constant (at least, the one I'm aware of)

Edited in bytes for robber's convenience.

cracked?

@rogaos I think this could be cracked better than mine by making it constant, but I think it's more interesting to be non-constant, so I'd vote for this to not be an exception to the constant rule

@nmjcman101 fair enough, as Govind didn't intend it to be a constant. Deleting my comment above.

Python 2, 273 bytes, cracked
Initial Sequence: A004442
import zlib, base64;exec(zlib.decompress(base64.b64decode('eJzLtDUAAAHoANc=')))
while True:print eval(zlib.decompress(base64.b64decode('eJwzAgAAMwAz')))^eval(zlib.decompress(base64.b64decode('eJwzjssEAAHBAPs='))),;exec(zlib.decompress(base64.b64decode('eJzL1LY1BAAC1AED')))

Try it online!

cracked

mega cracked (I think)

MOO, 86 bytes, safe
a=0;b=1;while(a>-1)a=$math_utils:sum(a,a);a=max(1,a);notify(player,tostr(a));endwhile

Prints powers of two (A000079).
Solution:

a=1;while(a>-1)a=$math_utils:sum(a,a,a);notify(player,tostr(a));endwhile
 (which prints powers of 3 (A000244) instead)

PHP, 20 bytes Cracked
for(;;)echo+!$i,",";

Try it online!
print sequence https://oeis.org/A000012

Your original version cracks this version.

Cracked

Did you have a solution in mind for the first one? If so, you should roll back.

@rogaos, I cracked the current version without seeing that it had changed. Rolling back would cause a mess.

I commented to ask for the rollback before I saw your solution. Leaving it as-is is fine.

@rogaos I have make this example to show that many approachs can be solve by a similar sequence. Give me one  digit and I can use one of them

@PeterTaylor It is okay that it be cracked

@JörgHülsermann I've edited the scoring mechanism such that you lose 1/2 point for each cracked submission, to dissuade trivial answers like this one. It only applies to answers after this one (so your score is still 0.)

@rogaos You should ban sequences which return a constant value

cQuents (older commit), 10 bytes, cracked
=0,1,1:z+y

This is still a heavily WIP language, but I patched the interpreter up so it worked. Click the language name for the Github link.
This outputs the Fibonnacci sequence: A000045
Explanation:
(because I have no documentation and I don't expect you to read my interpreter code)
=0,1,1      Set start to [0,1,1]
      :     Mode: sequence
       z+y  Each term is the previous two terms added together
            Because there is no input, output the whole sequence

If constant sequences were still allowed, this would be super easy to rob.

cracked

This language is excellent

@rogaos it's not done yet, nowhere close, but thanks :)

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


text:
Stealing sequences: Robbers
This is cops-and-robbers. This is the Robbers thread. For the cops thread, go here.
I've noticed a number of OEIS challenges since I joined the site. It seems only fair that we have a cops-and-robbers challenge that determines who is the master of online integer sequences, once and for all.
Cops
Write a program or function that, given no input, deterministically prints any sequence from the OEIS. By deleting some subset of the characters, your program must be able to print a different OEIS sequence when run in the same language. The new sequence must be entirely new, not just the first by a different name or with a different offset. Neither sequence may be simply a repeated constant value.
You must provide the first function, along with the name of the OEIS sequence so correctness can be verified. It's OK if behavior gets questionable around your language's MAX_INT value or 256, whichever is larger.
Robbers
Delete characters from some Cop's submission such that your new program outputs any other sequence from the OEIS. Provide the new function along with the name of the new OEIS sequence. Your new sequence may not simply be a repeated constant value.
It's in your best interest to delete as many characters from the Cop's submission as possible. If another robber (anyone except the Cop who authored the original program) comes along and finds a shorter solution that finds another different sequence, that robber steals your point. (Note that simply golfing off characters and printing the same sequence is not sufficient to steal the point.)
Rules & Scoring
If, after one week, nobody has been able to crack your solution, you can mark your solution as safe by providing the second program along with the name of the sequence it generates.
You get one point for each safe posting and one point for each submission you crack. Note that another robber can steal your point from the cracked submission at any time by providing a shorter program that yields a different sequence.
Cops may only post one challenge per language.
The player with the most points at 12:00 UTC on 7 July wins.

Be warned that languages exist where MAX_INT is 1. You should probably require at least 256.

Here is a utility to check whether a robber's submission is legal (i.e. only deletes characters from a cop's): https://tio.run/##lZGxCoMwEIb3PMXhZKBDSzfBDmrabim2mzgETDUQosRI6dNbY6uQVgre@N//fXBc8zRVrfZ9X/A7SF4y6ddalEIxuYGHMFXCJTeiVi0OEAwjbE3NJQxhCFtgqhhjlxh3b8yO5qbTCm664@tVhwXTkcl2Vk2abJtbkYMP2Q/sHpvtgvzrYBthtIbA/bSEEDzPQzG9QEwTAidKrnAmKUE2Rg716aY0iki6WG@0UMb//x3cvwA

C (gcc), Govind Parmar 142 bytes deleted
Golfed more thanks to @StephenS.  I'm not sure it matters, but just for the spirit of the site!
#include<stdio.h>
#include<limits.h>
main(){int i,n;for(i=0;i<INT_MAX;i++){n=i;printf("%d,",n);}}

Try it online!
Sequence: A001477

I swear you had posted something different the first time I looked. Anyway, here is it golfed down more: try it online

PHP, Jörg Hülsermann, 1 byte deleted
for(;;)echo+$i,",";

Produces A000004

MarioLANG, marcosm, 13 bytes deleted
>+:<
===#=

Try it online!
A109613.

how do you get the +: part only by deleting?

@marcosm The + is from the first line, and the : from the second line.

great! understood now

cQuents, Stephen S, 1 byte deleted
=0,11:z+y

A022345.

PHP, Jörg Hülsermann, 5 bytes deleted
for(;;)echo+$i;

Produces A000004

Peter Taylor currently holds the point, since your solution provides the same sequence.

Dang it. I missed that point.

Still, it's a good example of how easy it is to overlook significant savings, so +1 from me.

Python 2, juniorRubyist, 253 bytes deleted
while True:print 6,4

Try it online!
Not sure how valid this is, because of the newlines, but I believe whitespace is irrelevant. TIL that if I could add a comma at the end, it would fix the whitespace.
A226294

Isn't this a constant sequence?

@juniorRubyist as far as I can tell, OP currently only bans constant sequences that only output the same value - the exact words are Neither sequence may be simply a repeated constant value.. a seems to me to mean one. If OP actually means an alternating pattern I'll delete my answer.

@StephenS while non-periodic sequences are somehow more "interesting" I can't ban periodic sequences since I'm sure there are plenty of sequences in oeis whose periodicity is unknown. So this is a legal answer. The whitespace is fine.

Python 2, juniorRubyist, 114 bytes deleted cracked
import zlib, base64;exec(zlib.decompress(base64.b64decode('eJzLtDUAAAHoANc=')))
while True:print i,;exec(zlib.decompress(base64.b64decode('eJzL1LY1BAAC1AED')))

Try it online!
A001477.

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


text:
Double up some diamonds
Problem
Given a positive integer n where n < 100
Output a diamond pattern as follows:
Input n=1
/\/\
\/\/

Input n=2:
 /\      /\
//\\/\/\//\\
\\//\/\/\\//
 \/      \/

Input n=3:
  /\                /\
 //\\  /\      /\  //\\
///\\\//\\/\/\//\\///\\\
\\\///\\//\/\/\\//\\\///
 \\//  \/      \/  \\//
  \/                \/

Input n=4:
   /\                              /\
  //\\    /\                /\    //\\
 ///\\\  //\\  /\      /\  //\\  ///\\\
////\\\\///\\\//\\/\/\//\\///\\\////\\\\
\\\\////\\\///\\//\/\/\\//\\\///\\\\////
 \\\///  \\//  \/      \/  \\//  \\\///
  \\//    \/                \/    \\//
   \/                              \/

And so on.
Rules

Program and function allowed.
Trailing whitespace allowed.
Leading whitespace on lines with no / or \ allowed.
Trailing and leading newlines allowed.
Shortest code in bytes win

This is probably pretty related

Related. Related.

@carusocomputing You're hallucinating right now...

I like how only input < 5 screws up that badly and after that it gets closer.

Are prepending newlines (with spaces) allowed? Is an equal amount of spaces before each line allowed?

On lines that contain "" or "/" prepending spaces are not allowed, I will allow  leading newlines or spaces on leading newlines.

This happened.

@dzaima to the sandbox with it!

@carusocomputing Sure, but first I have to figure out why and how it happened :p

Also related https://codegolf.stackexchange.com/q/56032/15599

SOGL V0.12, 24 bytes
ā.∫ā;∫ \*+}ø┼↔±╬¡;øΚ┼}╬³

Try it Here!
Explanation:
ā                         push an empty array (the main canvas)
 .∫                  }    iterate over the input, pushing 1-indexed iteration
   ā;                       push an empty array below the iteration
     ∫    }                 iterate over the iteration counter
       \*                     push current iteration amount of slashes
         +                    append those to the 2nd array
           ø┼               append nothing (so it'd space the array to a square)
             ↔±             reverse horizontally (swapping slashes)
               ╬¡           quad-palindromize with 0 overlap and swapping characters as required
                 ;          get the canvas ontop
                  øΚ        prepend to it an empty line (so the now bigger romb would be one up)
                    ┼       append horizontally the canvas to the current romb
                      ╬³  palindromize horizontally with no overlap and swapping characters

Wow, ╬, that's a sick command.

@carusocomputing Pretty recent addition too. relevant file. Still have to figure out what to do with the remaining 190 characters

Wow, so you have 190 free commands in SOGOL and you can already golf this efficiently?

@carusocomputing I meant 190 free commands for ╬ lol

"palendromize"?

@CalculatorFeline I always write that word wrong. Feel free to edit whenever you see that mistake :p

@carusocomputing But as a fun fact, (approximately) 90/256 chars are not implemented and 61/256 don't have any documentation

Sarah Palindromize.

Charcoal, 30 27 bytes
Ｆ⁺¹Ｎ«Ｆι«Ｆ⁴«↙⁻ικ↑⟲Ｔ»←»Ｍι←»‖Ｍ

Try it online! Link is to verbose version of code. Explanation: Charcoal's drawing primitives can't quite draw a diamond, because the diagonal movements stay on squares of the same parity. Edit: The new solution is to draw one side of a diamond and then rotate the entire canvas ready to draw the next side, allowing a diamond to be drawn in a loop. This loop is then contained in a loop to draw all the inner diamonds for each diamond. The outermost loop draws all diamonds adjacent to each other. Finally the image is mirrored.
Note that Charcoal has since been extended and another byte could be saved by using Increment.

Where are the 0.5 char movements when you need them :(

05AB1E, 47 43 41 35 34 33 32 bytes
'/×ηηvy∞.C.Bø€∞¹NαGð.ø}})øíJ.B»∞

Try it online!
(-4 bytes thanks to @Emigna who suggested 3 improvements)

This explanation was for the earlier version, there have been a few iterations since then.
>                                          # [2]
 '/×                                       # ['//']
    η                                      # ['/','//']
     €η                                    # [['/'], ['/', '//']]
       vy                    }             # {For each element...}
         ∞                                 # Mirror horizontally.
          ¶¡                               # Split mirror on newlines.
            N£                             # Shave each diamond down a layer.
              .C                           # Horizontal center.
                .B                         # Pad for the transpose.
                  ø                        # Transpose.
                   €∞                      # Mirror each (vertically).
                     ¹NαFð.ø}              # Pad each list for transpose (verticaly).
                              )            # Wrap back to list...
                               €.B         # Pad each horizontally.
                                  ¦        # Remove the random numbers?
                                   ø       # Back to horizontal...
                                    €R     # Reverse to get correct order.
                                      J    # Join, no spaces.
                                       »   # Join newlines.
                                        ∞  # Final horizontal mirror.

There are spaces between your diamonds

@LiefdeWen is this okay? With trailing and preceeding newlines?

You can use prefixes η instead of suffixes as they are the same for this string.

N£ is the same as ¨ here and €R is í.

@Emigna I golfed some of that out, but thank you! You going to attempt a 33 byte answer that's 100% different :P?

@carusocomputing Yeah that's fine.

APL (Dyalog), 70 69 66 bytes
B←{'/\ '['\/'⍳⍺⍺⍵]}
C←⊢,⌽B
C(⊢⍪⊖B)⊃,/{C⊖A↑⊖' /'[⍵≤∘.+⍨⍳⍵+1]}¨⌽⍳A←⎕

Try it online!
Assumes ⎕IO←0, which is standard on many systems, so the program is 0-indexed.
This is a tradfn that takes input via STDIN.
Explanation
(slightly outdated)
Note that ⍺ is the left argument, ⍵ is the right argument and ⍺⍺ is the left operator.
B is a function that helps in mirroring the diamonds. It takes the string as the right argument and the reverse function as the left (so B is an operator).
B←{'/\ '['\/'⍳⍺⍺⍵]}
              ⍺⍺⍵            Apply ⍺⍺ on ⍵
         '\/'⍳               Find the index of the reflected string in '\/' (if the character is not found in `'\/'`, then return an index out of the bounds of the string, ie `2` if the character is a space)
   '/\ '[        ]           Use these indexes on '/\ ' to reflect the '/\' characters

And now we go to the main part of the program.
A←⎕              Assign the input to variable A
⍳                Create a range 0 .. A-1
⌽                Reverse it so that it becomes A-1 .. 0
¨                For each element do (the right argument is the element):
 ⍳⍵+1             Create a range 0 .. ⍵
 ∘.+⍨             Create an addition table using the range to result in a matrix like so:
                   0+0 0+1 0+2 .. 0+⍵
                   1+0 1+1 1+2 .. 1+⍵
                   2+0 2+1 2+2 .. 2+⍵
                   ...
                   ⍵+0 ⍵+1 ⍵+2 .. ⍵+⍵
 ⍵≤              The elements of the matrix that are greater than or equal to the ⍵,
                 this creates a triangle matrix that looks like this:
                   0 0 .. 0 1
                   0 0 .. 1 1
                   ..
                   1 1 .. 1 1
 ' /'[...]       Index it in ' /' to get a character matrix
                 (ie replace 0s with spaces and 1s with '/'s)
 ⊖               Flip this vertically
 A↑              Pad the top spaces

This is necessary to ensure that all the triangles created for every element in the range ⌽⍳A have the same height so that they can be later concatenated with each other.
 ⊖               Flip the matrix vertically again to go back to the original state
 (⊢,  )          Concatenate it with
    ⌽B           itself, but flipped horizontally
,/              Concatenate all triangles formed by the range operator
⊃               The resulting matrix is nested, so this operator "un-nests" it

Now the top left part of the pattern is complete. All that's remaining is to flip it vertically and then horizontally.
(⊢⍪⊖B)          Concatenate the resulting matrix with itself but flipped vertically
                (the vertically flipped matrix is concatenated below of the original matrix)
                Now the left part of the pattern is complete
(⊢,⌽B)         Concatenate the resulting matrix with itself flipped horizontally

And that's it! The output is a character matrix with /\s and padded with spaces.

CJam, 65 63 bytes
q~_,:)_W%\+f{_2*S*a@2$-*\_,f{)'/*\Se[_W%'/'\er+}_W%Wf%+1$++}zN*

Try it online!
Explanation
In this explanation, I will refer to the input number as n.
q~        e# Read and eval the input (push n to the stack).
_,        e# Copy it an get the range [0 .. n-1].
:)        e# Increment each element to get [1 .. n].
_W%       e# Copy it and reverse it.
\+        e# Prepend the reverse to the original range, resulting in [n n-1 .. 1 1 .. n-1 n].
f{        e# Map over each number x in the range using n as an extra parameter:
 _2*S*a   e#  Push a string containing n*2 spaces, and wrap it in an array.
 @2$-     e#  Push n-x.
 *        e#  Repeat the space string from before n-x times.
 \        e#  Bring x back to the top.
 _,       e#  Copy it and get the range [0 .. x-1].
 f{       e#  Map over each number y in this range, using x as an extra parameter:
  )       e#   Increment y.
  '/*     e#   Repeat '/' y times.
  \Se[    e#   Pad the resulting string to length x by adding spaces to the left.
  _W%     e#   Copy the result and reverse it.
  '/'\er  e#   Replace '/' with '\' in that.
  +       e#   Concatenate to the other string. This forms one row of one diamond.
 }        e#  (end map, now we have the top half of a diamond of size x)
 _W%      e#  Copy the half-diamond and reverse it.
 Wf%      e#  Reverse each row.
 +        e#  Concatenate to the top half. Now we have a full diamond of size x.
 1$++     e#  Put the spaces from before at the beginning and end. This is to pad the top
          e#  and bottom of the smaller diamonds.
}         e# (end map)
z         e# Transpose.
N*        e# Join with newlines. Implicit output.

Out of curiosity, why e# in the explanation?

@carusocomputing It's a comment, so you can run the explanation itself. Not really necessary but ¯\(ツ)/¯

@carusocomputing # isn't a comment in CJam - https://sourceforge.net/p/cjam/wiki/Basic%20operators/#number-sign - even though it is in many other languages. Since CJam is a golfing language, all one-character commands are used for golf-appropriate functionality. Comments are only useful for ungolfed code, so it uses a 2-character sequence, thus freeing the one-character sequence up for something else

Pyth, 35 32 bytes
j.tsm+Jm.[yQS*"\/"k\ Sd_M_Js__BS

Test suite
Done to see how my and @LeakyNun's approaches would differ.

Python 2, 152 147 143 140 bytes
-1 byte thanks to musicman523

n=input()
r=range(n)
r+=r[::-1]
for x,i in enumerate(r):a,b='/\\\/'[i<x::2];s=' '*(n+~i);print''.join((s+a*n)[:n-j]+(b*-~i+s)[j:]for j in r)

Try it online!
This works by chopping the inner columns of the largest diamond to make the smaller ones, using [0,..,n,n,..,0] to control the amount of columns to remove.

You can get one cheap byte by changing r=r+ to r+=

Dyalog APL, 46
{⊃,/⍵∘{'/ \'[2+((-⍪⊖)⌽,-)(-⍺)↑∘.≥⍨⍳⍵]}¨(⌽,⊢)⍳⍵}

Welcome to PPCG and nice first answer! Seeing as how this is a dfn, I added the {} to your answer as they must be included.

Pyth, 49 bytes
LC.tb)L+_b.rb"\/"js_,J'MsMCyMy_Mm'Myd._._*\/Q__MJ

Try it online!

V, 38 bytes
Àá/Àá\ò2ÙlX$xòÍî
òYGpVæHÄÓ¯¨¯*Ü*©Ü/ ±

Try it online!

Canvas, 13 bytes
ＨＨ／ｎ｝！╬＋｝⤢ｒ！║

Try it here!


text:
Counting Gems on the Ground
Counting Gems
Background
My jewel box just fell down! There're too many gems of different shape on the ground. And your task is to count number of a certain type of gem.
I/O

Your code should take two inputs S and G, which could be a string with newlines, an array of lines, a two-dimensional array of characters, a textfile or in any reasonable format (if so, please state it clearly).
These two strings will only contain !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (from 0x21 to 0x7E in ASCII table), space and newlines (binary form depending on your platform).
In each string, lines are in same length.
S is the gem we want to count. There're two circumstances.

Enclosed and doesn't contain any nested enclosed area. (in example 1/2)
Doesn't contain any enclosed area. (in example 3/4)

Surrounding spaces are not regarded as a part of the gem.
G is the shape of gems on the ground.
It is acceptable that your code requires extra input to specify the dimension(s) of S and G
It is acceptable that your code take ASCII values as inputs, instead of characters themselves. But you should not substitute characters with simpler integers (0,1,2,3). Your program should be able to process characters, or ASCII values.

Example 1 (Character as input)
Input S:
+-+
| +-+
| | |
| | |
| +-+
+-+

Input G:
    +-+       +-+
    | +-+   +-+ |
    | | |   | | |
    | | |   | | |
    | +-+   +-+ |
    +-+       +-+
         +-+
+---+    | +-+
|   |    | | |
|   |    | | |
|   |    | +-++
|   |    +-+| +-+
+---+       | | |
            | | |
  +-+       | +-+
  | +-+     +-+
  | |-|
  | |-|
  | +-+
  +-+

Ouptut:
2

Example 2 (ASCII value as input)
Input S:
32 32 32 32 32 32 32 32
32 32 32 32 99 32 99 32
32 32 32 99 32 99 32 99
32 32 32 99 32 32 32 99
32 32 32 99 32 32 32 99
32 32 32 99 32 32 32 99
32 32 32 32 99 32 99 32
32 32 32 32 32 99 32 32
32 32 32 32 32 32 32 32

Input G:
32 99 32 99 32 99 32 99 32 32 99 32
99 32 99 32 99 32 99 32 99 99 32 99
99 32 32 32 99 32 32 32 99 32 32 99
99 99 32 32 99 32 32 32 99 32 32 99
99 32 32 32 99 32 32 32 99 32 32 99
32 99 32 99 32 99 32 99 99 32 99 32
32 32 99 32 32 32 99 32 32 99 32 32

Output:
1

Visualized S (32 replaced with --):
-- -- -- -- -- -- -- --
-- -- -- -- 99 -- 99 --
-- -- -- 99 -- 99 -- 99
-- -- -- 99 -- -- -- 99
-- -- -- 99 -- -- -- 99
-- -- -- 99 -- -- -- 99
-- -- -- -- 99 -- 99 --
-- -- -- -- -- 99 -- --
-- -- -- -- -- -- -- --

Visualized G:
-- 99 -- 99 -- 99 -- 99 -- -- 99 --
99 -- 99 -- 99 -- 99 -- 99 99 -- 99
99 -- -- -- 99 -- -- -- 99 -- -- 99
99 99 -- -- 99 -- -- -- 99 -- -- 99
99 -- -- -- 99 -- -- -- 99 -- -- 99
-- 99 -- 99 -- 99 -- 99 99 -- 99 --
-- -- 99 -- -- -- 99 -- -- 99 -- --

Example 3 (Not enclosed)
Thanks to @Draco18s
Input S
AB

Input G
AAB BA CAB

Output
2

Example 4 (Not enclosed 2D)
Input S
ABCD
  GE
   F

Input G
ABCD
BGGED
CDEFE
    F

Output
1

Remarks

Only two gems of exact one shape are considered the same.
Same shape in different directions are not considered the same.
However, as is described in example I/O, overlapping is possible. Under such circumstances, only complete ones are counted.
+, - and | in the example have no special meanings. They do not indicate any corner or edge of the shape.
You may assume input is always valid.
You may assume two target gems never share an exactly same edge.
Standard loopholes are forbidden.
This is a code-golf, so shortest code wins!

I don't understand the second example, how is G contained within S?

@LiefdeWen I made it visualized, you may find S in the middle of G.

I think some simpler examples are needed here, such as S = "AB",G="    AAB BA CAB", output = ?

@Draco18s Thank you, i will add it.

That simple example really helped understand the desired behavior. Cool

Imo, this is almost like searching for sub-images within a larger image, but WAY MORE difficult, since we need to first find each sub-images and find the number of matches. lol!

C (gcc), 303 305 326 bytes
All optimizations need to be turned off and only work on 32-bit GCC.
#define r(z,k)for(z=0;z<k;z++)
#define c s[i][j]
x,y,o,p,t,i,j;char**s;h(i,j){!((i<0)+(j<0)+i/x+j/y+c-32)?h(i+1,j),h(i-1,j),h(i,j+1),h(i,j-1),c=0:0;}f(w,e,u,v,a,g)char**a,**g;x=w,y=e,s=a;r(o,x)h(o,0),h(o,y-1);r(p,y)h(0,p),h(x-1,p);w=0;r(o,u-x+1)r(p,v-y+1){t=1;r(i,x)r(j,y)t*=!(c*(c-g[i+o][j+p]));w+=t;}}

The code uses floodfill to replace surrounding spaces with \0 and looks for matches while ignoring \0.
ungolfed and macros calculated (some letters are different from the golfed version, but logic stays the same):
int x, y, o, p, c, d, t;
char **s, **g;
h(int i, int j) {                             // Floodfill function
    if(i<0 || j<0) return;                    // Boundary detection
    if(i>=x || j>=y) return;
    if(s[i][j] != ' ') return;                // Character detection

    s[i][j] = 0;                              // Replace it with \0
    h(i+1, j);
    h(i-1, j)
    h(i  , j+1);
    h(i  , j-1);
}
f(
    int w,    //1st dimension of S
    int e,    //2nd dimension of S
    int u,    //1st dimension of G
    int v     //2nd dimension of G
    char** i, //Input S
    char** j, //Input G
    );
{
    x=w,y=e,s=i,g=j;
    for(o=0; o<x; o++)                        // Replace all surrounding spaces using floodfill
    {
        h(o, 0);
        h(o, y-1);
    }
    for(p=0; p<y; p++)
    {
        h(0,   p);
        h(x-1, p);
    }
    w = 0;
    for(o=0; o<=u-x; o++)                     // Main O(w*e*u*v) matching process
        for(p=0; p<=v-y; p++) {
            t=1;
            for(c=0; c<x; c++)
                for(d=0; d<y; d++)
                if(s[c][d]*(s[c][d]-g[c+o][d+p]))
                    t=0;
            w+=t;
        }
}


text:
Spin the Calculator
Introduction:
Let's take a look at a standard Calculator in Windows:

For this challenge, we'll only look at the following buttons, and ignore everything else:
7 8 9 /
4 5 6 *
1 2 3 -
0 0 . +

Challenge:
Input:
You will receive two inputs:

One is something to indicate the rotation in increments of 90 degrees
The other is a list of coordinates representing the buttons pressed on the rotated calculator.

Based on the first input, we rotate the layout mentioned above clockwise in increments of 90 degrees. So if the input is 0 degrees, it remains as is; but if the input is 270 degrees, it will be rotated three times clockwise (or once counterclockwise). Here are the four possible lay-outs:
Default / 0 degrees:
7 8 9 /
4 5 6 *
1 2 3 -
0 0 . +

90 degrees clockwise:
0 1 4 7
0 2 5 8
. 3 6 9
+ - * /

180 degrees:
+ . 0 0
- 3 2 1
* 6 5 4
/ 9 8 7

270 degrees clockwise / 90 degrees counterclockwise:
/ * - +
9 6 3 .
8 5 2 0
7 4 1 0

The second input is a list of coordinates in any reasonable format †. For example (0-index 2D integer-array):
[[1,2],[2,3],[0,3],[1,0],[1,1]]

Output:
We output both the sum, as well as the result (and an equal sign =).
Example:
So if the input is 270 degrees and [[1,2],[2,3],[0,3],[1,0],[1,1]], the output will become:
517*6=3102

Challenge rules:

† The inputs can be in any reasonable format. The first input can be 0-3, 1-4, A-D, 0,90,180,270, etc. The second input can be a 0-indexed 2D array, 1-indexed 2D array, a String, list of Point-objects, etc. Your call. It's even possible to swap the x and y coordinates compared to the example inputs given. Please state which input formats you've used in your answer!
You are allowed to add spaces (i.e. 517 * 6 = 3102) if you want to.
You are allowed to add trailing zeros after the comma, to a max of three (i.e. 3102.0/3102.00/3102.000 instead of 3102 or 0.430 instead of 0.43).
You are not allowed to add parenthesis in the output, so (((0.6+4)-0)/2)/4=0.575 is not a valid output.
You are allowed to use other operand-symbols for your language. So × or · instead of *; or ÷ instead of /; etc.
Since a calculator automatically calculates when inputting an operand, you should ignore operator precedence! So 10+5*3 will result in 45 ((10+5)*3=45), not 25 (10+(5*3)=25)
(i.e. 10 → + → 5 → * (it now displays 15 in the display) → 3 → = (it now displays the answer 45)). Keep this in mind when using eval and similar functions on the resulting sum.
There won't be any test cases for division by 0.
There won't be any test cases with more than three decimal digits as result, so no need for rounding the result.
There won't be any test cases where multiple operands follow each other, or where two dots follow each other.
There won't be any test cases for negative numbers. The minus-sign (-) will only be used as operand, not as negative.
There won't be any test cases for .## without a leading number before the comma (i.e. 2+.7 will not be a valid test case, but 2+0.7 could be).

General rules:

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters, full programs. Your call.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code.
Also, please add an explanation if necessary.

Test cases:
Input:   270 degrees & [[1,2],[2,3],[0,3],[1,0],[1,1]]
Output:  517*6=3102

Input:   90 degrees & [[3,1],[0,0],[0,1],[3,3],[2,0],[0,3],[0,0],[0,2],[3,0],[2,1]]
Output:  800/4+0.75=200.75

Input:   0 degrees & [[0,0],[1,0],[2,0],[3,0],[1,2],[2,1],[2,2]]
Output:  789/263=3

Input:   180 degrees & [[3,0],[1,0],[1,2],[0,0],[3,2],[0,1],[2,0],[0,3],[2,1],[0,3],[3,2]]
Output:  0.6+4-0/2/4=0.575

Can I output the equation with (proper) parentheses? (e.g. ((((0.6)+4)-0)/2)/4=0.575)

The test cases have many errors (e.g. the 3rd and 4th has X and Y swapped (1st doesn't) and I don't even know what happened to the 2nd)

Should the program handle weird button presses? 1+-*/+-*/2 will gives 0.5 on Windows (10) calculator.

second test case should start with [1,3],

Do we have to handle decimals less than 1 without leading 0s, like in 2+.7?

In Windows 8 calculator, 3 * - 5 is equivalent to 3-5. Does it indicate that the code needn't handle negative numbers in the input (though negatives are possible during calculation)?

@KevinCruijssen Yes, the post has been in sandbox for 7 days, but was in there for only 5 hours with the precedence rule and test-cases added.

Inb4 Mr. Mendo provides us a 13 byte MATL answer.

Operator precedence is why I never use Windows Calculator in standard mode.

@dzaima Thanks for pointing this out, and you are indeed right I shouldn't have posted it as soon after editing.. I was impatient and eager to post it I guess. Test cases should all be fixed now (I hope). As for your very first question: no, you can't have parenthesis in the output.

@user202729 I've added a rule that there won't be two operands following each other, so you won't have to deal with that.

@Tutleman I've added a rule for this: all decimals will have a leading number before the comma, so 2+.7 won't be a valid test case, but 2+0.7 could be a valid test case.

@KeyuGan The minus-sign will only be used as operand in this challenge, so you won't have to deal with negative numbers (except in the form of
a test case like 5-9=-4).

It seems like the 1st test case is given with [x,y] coordinates and the other ones with [y,x]. Could you please clarify? (+what @Uriel already said: the first entry of the 2nd test case is not consistent)

@Neil : The worst part is that the windows calculator displays "1 + 2 * 3" but calculates "(1 + 2) * 3"

SOGL V0.12, 70 69 67 bytes
i⅛⁸Νο;⌡░▼Y6γj±²‘1n4n.⌡Iø,→{_≤whwιh:"/*-+”;W? )Κ; (Κ;}+}:Ƨ)(čøŗoļ=→p

Try it Here, or try a version which takes inputs as given in the test-cases
uses SOGLs I operator, which rotates the array. Then reads a string as a JavaScript array, and where an operation is used, encase previous result in parentheses, evaluates as JavaScript and then removes the parentheses.

Dyalog APL, 94 88 86 85 bytes
{o,'=',⍎('('\⍨+/'+-×÷'∊⍨o),'[×÷+-]'⎕R')&'⊢o←(((⌽∘⍉⍣⍺)4 4⍴'789÷456×123-00.+')⊃⍨⊂∘⊢)¨⍵}

Try it online!
Takes the rotations as left argument, 0-3, and the 1-based indices as right argument, as a list of y x coordinates, like (1 1)(2 3)(4 5) etc.
This got quite messy because of the right-handed evaluation of expressions in APL.

C (gcc), 282 294 295 296 300 304 306 310 bytes
All optimizations need to be turned off and only work on 32-bit GCC.
float r,s;k,p,l,i;g(d,x,y){int w[]={y,x,3-y,3-x,y};d=w[d+1]*4+w[d];}f(x,y,z)int**z;{for(i=0;i<=y;i++)putchar(k=i-y?"789/456*123-00.+"[g(x,z[i][0],z[i][1])]:61),57/k*k/48?p?r+=(k-48)*pow(10,p--):(r=10*r+k-48):k-46?s=l?l%2?l%5?l&4?s/r:s+r:s-r:s*r:r,r=p=0,l=k:(p=-1);printf("%.3f",s);}

1 byte thanks to @Orion!
Try it online!
Function prototype:
f(<Direction 0-3>, <Number of entries>, <a int** typed array in [N][2]>)

Input format (as on TIO):
<Direction 0~3> <Number of entries>
<Entries 0 Row> <Entries 0 Column>
<Entries 1 Row> <Entries 1 Column>
....
<Entries N Row> <Entries N Column>

Ungolfed version with comments:
float r, s;
k, p, l, i;
g(d, x, y) {
  int w[] = {
    y,
    x,
    3 - y,
    3 - x,
    y
  };
  d = w[d + 1] * 4 + w[d];
}
f(x, y, z) int **z; {
  for (i = 0; i <= y; i++)
  {
      putchar(k = i - y ?
      "789/456*123-00.+"[g(x, z[i][0], z[i][1])] : 61),     // Print character, otherwise, '='
      57 / k * k / 48 ?                                     // If the character is from '0'~'9'
        p ?                                                 // If it is after or before a dot
            r += (k - 48) * pow(10., p--)                   // +k*10^-p
        :
            (r = 10 * r + k - 48)                           // *10+k
      :
          k - 46 ?                                          // If the character is not '.', that is, an operator, + - * / =
            s = l ?                                         // Calculate the result of previous step (if exist)
                    l % 2 ?                                 // If + - /
                        l % 5 ?                             // If + /
                            l & 4 ?
                                s / r
                            :
                                s + r
                        :
                            s - r
                    :
                        s * r
                 :
                    r,
                    r = p = 0, l = k                        // Reset all bits
          :
            (p = -1);                                       // Reverse the dot bit
  }
  printf("%.3f", s);
}

The code can handle cases such as 1+.7 or -8*4.
Very sad C doesn't have an eval .

You can indeed deem cases like 3*-5 invalid. I've specified this in the rules.

Considering the required precision in the rules is only 3 places, you could replace double with float for a free byte. Also, isn't putc() identical to putchar()? I could be wrong, though.

@Orion I remember putc needs a second argument to specify which stream you are writing to?

276 bytes

Ruby, 135 133 132 bytes
->r,c{a="";c.map{|x,y|a=((w="789/456*123-00.+"[[y*4+x,12-x*4+y,15-y*4-x,x*4+3-y][r]])=~/[0-9.]/?a:"#{eval a}")+w;w}*""+"=#{eval a}"}

Try it online!
Orientation as integer: 0 for 0°, 1 for 90° and so on.

JavaScript (ES6), 162 160 157 bytes
Takes input as orientation o and array of (y,x) coordinates a in currying syntax (o)(a).
The orientation is an integer in [0..3]:

0 = 0°
1 = 90° clockwise
2 = 180° clockwise
3 = 270° clockwise

o=>a=>(s=a.map(([y,x])=>'789/456*123-00.+'[[p=y*4+x,12+(y-=x*4),15-p,3-y][o]]).join``)+'='+eval([...x=`0)+${s}`.split(/(.[\d.]+)/)].fill`(`.join``+x.join`)`)

Test cases

let f =

o=>a=>(s=a.map(([y,x])=>'789/456*123-00.+'[[p=y*4+x,12+(y-=x*4),15-p,3-y][o]]).join``)+'='+eval([...x=`0)+${s}`.split(/(.[\d.]+)/)].fill`(`.join``+x.join`)`)

console.log(f(3)([[2,1],[3,2],[3,0],[0,1],[1,1]])) // 517*6=3102
console.log(f(1)([[1,3],[0,0],[1,0],[3,3],[0,2],[3,0],[0,0],[2,0],[0,3],[1,2]])) // 800/4+0.75=200.75
console.log(f(0)([[0,0],[0,1],[0,2],[0,3],[2,1],[1,2],[2,2]])) // 789/263=3
console.log(f(2)([[0,3],[0,1],[2,1],[0,0],[2,3],[1,0],[0,2],[3,0],[1,2],[3,0],[2,3]])) // 0.6+4-0/2/4=0.575

Java 10, 418 380 378 bytes
d->a->{String r="",g=d>2?"/*-+963.85207410":d>1?"+.00-321*654/987":d>0?"01470258.369+-*/":"789/456*123-00.+",n[],o[];for(var i:a)r+=g.charAt(i[1]*4+i[0]);n=r.split("[-/\\+\\*]");o=r.split("[[0-9]\\.]");float s=new Float(n[0]),t;for(int i=1,O,j=0;++j<o.length;O=o[j].isEmpty()?99:o[j].charAt(0),s=O<43?s*t:O<44?s+t:O<46?s-t:O<48?s/t:s,i+=1-O/99)t=new Float(n[i]);return r+"="+s;}

Decided to answer my own question as well. I'm sure it can be golfed some more by using a different approach.
Input as int (0-3) and int[][] (0-indexed / the same as in the challenge description). Output as float with leading .0 if the result is an integer instead of decimal number.
-2 bytes thanks to @ceilingcat.
Explanation:
Try it here.
d->a->{                       // Method with int & 2D int-array parameters and String return
  String r="",                //  Result-String, starting empty
    g=d>2?                    //  If the input is 3:
       "/*-+963.85207410"     //   Use 270 degree rotated String
      :d>1?                   //  Else if it's 2:
       "+.00-321*654/987"     //   Use 180 degree rotated String
      :d>0?                   //  Else if it's 1:
       "01470258.369+-*/"     //   Use 90 degree rotated String
      :                       //  Else (it's 0):
       "789/456*123-00.+",    //   Use default String
    n[],o[];                  //  Two temp String-arrays
  for(var i:a)                //  Loop over the coordinates:
    r+=g.charAt(i[1]*4+i[0]); //   Append the result-String with the next char
  n=r.split("[-/\\+\\*]");    //  String-array of all numbers
  o=r.split("[[0-9]\\.]");    //  String-array of all operands (including empty values unfortunately)
  float s=new Float(n[0]),    //  Start the sum at the first number
        t;                    //  A temp decimal
  for(int i=0,                //  Index-integer `i`, starting at 0
      O,                      //  A temp integer
      j=0;++j<o.length        //  Loop `j` over the operands
      ;                       //    After every iteration:
       O=o[j].isEmpty()?      //     If the current operand is an empty String
          99                  //      Set `O` to 99
         :                    //     Else:
          o[j].charAt(0),     //      Set it to the current operand character
       s=O<43?                //     If the operand is '*':
          s*t                 //      Multiply the sum with the next number
         :O<44?               //     Else-if the operand is '+':
          s+t                 //      Add the next number to the sum
         :O<46?               //     Else-if the operand is '-':
          s-t                 //      Subtract the next number from the sum
         :O<48?               //     Else-if the operand is '/':
          s/t                 //      Divide the sum by the next number
         :                    //     Else (the operand is empty):
          s,                  //      Leave the sum the same
       i+=1-O/99)             //     Increase `i` if we've encountered a non-empty operand
    t=new Float(n[i]);        //   Set `t`  to the next number in line
  return r+"="+s;}            //  Return the sum + sum-result

Why does lambda expression count as a fully executable code in Java?

@NikolasCharalambidis Default I/O rules apply, which means both a full program and function is allowed. And a lambda is basically a function.

I didn't know such a poll existed. Thanks for the link.

Python 3, 235 234 230 bytes
Bit ugly but it works for all the test cases except the first, which doesn't seem to match the example calculator. I take the rotation as 0-3 (0-270) and multiply by 16 to offset.
eval() is a built-in which attempts to compile strings as code and handles converting the text symbols to operators.
import re
def f(r,c,J=''.join):
 b='789/456*123-00.+01470258.369+-*/+.00-321*654/987/*-+963.85207410'
 s=t=J([b[r*16+x*4+y]for y,x in c]);t=re.split('([\+\-\/\*])',s)
 while len(t)>2:t=[str(eval(J(t[0:3])))]+t[3:]
 print(s+'='+t[0])

Alternate method, it turned out a little bit longer but I really like this SO tip for rotating the array.
import re
def f(r,c):
 L=list;b=L(map(L,['789/','456*','123-','00.+']))
 while r:b=L(zip(*b[::-1]));r-=1
 s=''.join([b[x][y]for y,x in c]);t=re.split('([\+\-\/\*])',s)
 while len(t)>2:t=[str(eval(''.join(t[0:3])))]+t[3:]
 print(s+'='+t[0])

PHP, 267 235 229 225 221 213 bytes
<?php $t=[1,12,15,4,1];$j=$t[$k=$argv[1]];($o=$i=$t[$k+1])<5&&$o--;foreach(json_decode($argv[2])as$c){echo$s='/*-+963.85207410'[($c[0]*$i+$c[1]*$j+$o)%16];strpos(' /*-+',$s)&&$e="($e)";$e.=$s;}eval("echo'=',$e;");

Try it online!
6 bytes thanks to @Kevin Cruijssen.
Input directions are: 0 is 0, 1 is 90, 2 is 180 and 3 is 270 degrees.
Ungolfed
The rotation is tricky, my idea is to re-map the symbols depending on orientation. The re-mapping is done by multiplying the x and y coordinates by different amounts and offsetting the result. So, there is a triple per orientation (stored in $rot). There is probably a better way, but I can't think of it at the moment!

$coords = json_decode($argv[2]);
$symbols = '789/456*123-00.+';
$r=$argv[1];
$rot = [1,4,0,12,1,12,15,12,15,4,15,3];
list($xs,$ys,$o)=array_slice($rot,$r*3,3);

$expression='';

foreach($coords as $coord) {
    $symbol=$symbols[($coord[0]*$xs+$coord[1]*$ys+$o)%16];

    if (!is_numeric($symbol) && $symbol!='.') {
        $expression = "($expression)";
    }
    $expression .=$symbol;
    echo $symbol;
}

eval ("echo '='.($expression);");

?>

I'm not too familiar with PHP, but I think you can golf the && to & to save a byte. And nice answer, +1 from me! :)

Actually, I think if(!is_numeric($s)&$s!='.') can be golfed further to if(strpos(' /*-+',$s)) (if I understand this SO answer correctly).

Of course! And thanks. There I was staring at that if statement, but nothing came.

05AB1E, 57 54 bytes
εžm3ôí…/*-ø"00.+"ª€SIFøí}yθèyнè}JD'=s.γžh'.«så}R2ôR».VJ

Uses 0-based coordinates similar as the challenge description, and [0,1,2,3] for [0,90,180,270] respectively as inputs.
Try it online or verify all test cases.
Explanation:
ε                    # Map over each of the (implicit) input-coordinates:
 žm                  #  Push builtin "9876543210"
   3ô                #  Split it into parts of size 3: [987,654,321,0]
     í               #  Reverse each inner item: [789,456,123,0]
      …/*-           #  Push string "/*-"
          ø          #  Zip the lists together: [["789","/"],["456","*"],["123","-"]]
           "00.+"ª   #  Append string "00.+": [["789","/"],["456","*"],["123","-"],"00.+"]
                  €S #  Convert each inner item to a flattened list of characters
                     #   [[7,8,9,"/"],[4,5,6,"*"],[1,2,3,"-"],[0,0,".","+"]]
 IF                  #  Loop the input-integer amount of times:
   ø                 #   Zip/transpose the character-matrix; swapping rows/columns
    í                #   And then reverse each inner row
 }                   #  Close the loop (we now have our rotated character matrix)
  yθèyнè             #  Index the current coordinate into this matrix to get the character
}J                   # After the map: join all characters together to a single string
  D                  # Duplicate the string
   '=               '# Push string "="
     s               # Swap to get the duplicated string again
      .γ             # Group it by (without changing the order):
        žh           #  Push builtin "0123456789"
          1/         #  Divide it by 1, so it'll become a float with ".0": "0123456789.0"
                     #  (1 byte shorter than simply appending a "." with `'.«`)
            så       #  And check if this string contains the current character
       }             # Close the group-by, which has separating the operators and numbers
                     #  i.e. "800/4+0.75" → ["800","/","4","+","0.75"]
        R            # Reverse this list
                     #  i.e. ["0.75","+","4","/","800"]
         2ô          # Split it into parts of size 2
                     #  i.e. [["0.75","+"],["4","/"],["800"]]
           R         # Reverse the list again
                     #  i.e. [["800"],["4","/"],["0.75","+"]]
            »        # Join each inner list by spaces, and then those strings by newlines
                     #  i.e. "800\n4 /\n0.75 +"
             .V      # Execute this string as 05AB1E code
               J     # Join this with the earlier string and "=" on the stack
                     # (after which the result is output implicitly)

Burlesque, 122 bytes
pe'1'9r@3co{".-"".*""./"}z[)FL{'0'0'.".+"}+]j{{}{tp}{)<-<-}{tp)<-}}j!!e!<-Ppra{pPj<-d!}msJ'=_+j{><}gB3co{rtp^}mwpe?+'.;;++

Try it online!
Takes args as: "[[1,2],[2,3],[0,3],[1,0],[1,1]]" 3
pe                  # Push args to stack
'1'9r@              # Range of characters [1,9]
3co                 # Split into chunks of 3
{".-" ".*" "./"}z[  # Zip in the operators
)FL                 # Flatten the resulting list (giving us the first 3 rows)
{'0 '0 '. ".+"}+]   # Add the 4th row
j                   # Swap rotation index to top of stack
{
 {}                 # NOP
 {tp}               # Transpose
 {)<- <-}           # Reverse each column and row
 {tp )<-}           # Transpose and reverse each row
}
j!!e!               # Select which based on rotation spec and eval
<-                  # Reverse the result
Pp                  # Push to hidden stack
ra                  # Read the coords as array
{
 pP                 # Pop from hidden stack
 j<-                # Reverse the coords (tp'd out)
 d!                 # Select this element
}ms                 # For each coord and accumulate result as string
J                   # Duplicate said string
'=_+j               # Put the equals at the end of the other string
{><}gB              # Group by whether digits
3co                 # Split into chunks of 3
{
 rt                 # rotate (putting op in post-fix position)
 p^                 # Ungroup
}mw                 # Map intercalating spaces
pe                  # Evaluate the result
?+                  # Combine the results
'.;;++              # Change .* ./ etc to * /


text:
Classify Quadrilaterals | Help me with my math exam!
Help! My math exam is coming up soon and I didn't study! 1 Part of the exam is to classify a quadrilateral given its vertex coordinates, which I, unfortunately, do not know how to do. 2
So, your challenge is to write a program to do this for me so I don't fail!
Challenge
Given four vertices such that no three of them are colinear, determine the most specific classification of the quadrilateral formed by those four vertices.
What I mean by "most specific classification" is that even though all squares are rectangles, if the shape is a square, you should indicate that it is a square and not indicate that it is a rectangle.
Input
Input will be given as four (x, y) coordinates. You may take these as a list of length 4 of lists/tuples of length 2. Alternatively, you can take input as a list of the x-coordinates and a list of the respective y-coordinates.
For example, if my shape has vertices at points (0, 0), (5, 0), (6, 1), and (1, 1), you may choose to take input in either of the following formats or something similar:
[(0, 0), (5, 0), (6, 1), (1, 1)]
([0, 5, 6, 1], [0, 0, 1, 1])

You may assume that the quadrilateral is not self-intersecting and that the points are given in the correct order (that is, two consecutive points in the input will be connected by a line segment in the quadrilateral).
Output
You will need a unique output for each of the following classes of quadrilaterals:

Square
Rectangle
Rhombus
Parallelogram
Trapezoid/Trapezium
Kite
Quadrilateral

This could be the exact name itself, a character, an integer, etc.
Rules

Standard Loopholes Apply
If your programming language has a built-in that will perform this exact task, that built-in is not allowed.
Built-ins for finding the distance between two points are allowed.
Built-ins for finding the angle between two lines are allowed.

At this point, if you know all of the terms, you are ready to start programming! (Test Cases are at the end)
Terminology
This section is for anyone who needs clarification on the definitions of the different shapes.
Square
A quadrilateral is a square if and only if all 4 of its sides are equal in length and every pair of adjacent sides is perpendicular (that is, it is both a rectangle and a rhombus).
Rectangle
A quadrilateral is a rectangle if and only if every pair of adjacent sides is perpendicular.
Rhombus
A quadrilateral is a rhombus if and only if all 4 of its sides are equal.
Parallelogram
A quadrilateral is a parallelogram if and only if each pair of opposite sides is parallel and each pair of opposite angles is equal. Both of these conditions imply each other so you only need to check for one of them.
Trapezoid/Trapezium
A quadrilateral is a trapezoid/trapezium if and only if it has at least one pair of parallel sides.
Kite
A quadrilateral is a kite if two opposite pairs of adjacent sides are equal in length; that is, two of its adjacent sides are equal and the other two are also equal.
Test Cases
input as (x, y) * 4 -> full name
[(0, 0), (1, 0), (1, 1), (0, 1)] -> square
[(0, 0), (1, 1), (-1, 3), (-2, 2)] -> rectangle
[(0, 0), (5, 0), (8, 4), (3, 4)] -> rhombus
[(0, 0), (5, 0), (6, 1), (1, 1)] -> parallelogram
[(0, 0), (4, 0), (3, 1), (1, 1)] -> trapezoid/trapezium
[(0, 0), (1, 1), (0, 3), (-1, 1)] -> kite
[(0, 0), (2, 0), (4, 4), (0, 1)] -> quadrilateral

Links (Desmos Graphing Calculator)
Here are links to visualizations of each of the test cases.
Square
Rectangle
Rhombus
Parallelogram
Trapezoid/Trapezium
Kite
Quadrilateral
Winning Criteria
I can't bring a computer into the exam obviously, so I need you to write the shortest code possible so I can memorize it. I need to write it into the margins and run it using TryItOfflineTM so to fit it into the margins your program needs to be as small as possible!
1 Of course I actually did :P
2 Of course I actually do :P

I might be able to help you with your margin problem https://xkcd.com/1381/

@RohanJhunjhunwala I am the new Fermat (I think that's the right person?). But nice XKCD ref :P

is CSV allowed input?

What is the partial order of specificity?

Related

can we assume first point at 0,0?

@tuskiomi Please elaborate/give an example, what specific format?

@tuskiomi No, that is not a permitted assumption. I just realized that all of the cases had that though, so I'll add another example when I get to a computer.

@PeterTaylor Sorry, this is grade 10 math, we have not learned that yet :P What does that mean?

The question states that square is more specific than rectangle, but doesn't state what any of the other relationships are.

@PeterTaylor ah ok. The order of specificity is as listed in the out put list, the terminology list, and the test cases list; they are all in the correct order.

Are you sure you've got the Rectangle example right?  I keep checking my math, but I get corners that are not right angles. I get angles of about 108.5 and 71.5 degrees, which makes it a parallelogram.  You might use [(0, 0), (1, 1), (-1, 3), (-2, 2)]

@CCB60 Thanks for pointing that out. I noticed that too; the Desmos link has the coordinates you gave me but I forgot to update it >.<

Can we assume that the points are given in counterclockwise order?

@ngenisis No, it could go either way.

APL (Dyalog), 104 89 80 82 81 79 78 bytes
⍙←{⍵⍺⍺1⌽⍵}
⎕←(|x){⍵≡2⌽⍵:≡⍙¨0⍺⍵⋄2 4=+/1=2|+⍙↑⍵(=⍙⍺)}2|1+-⍙(12○x←-⍙⎕+.×1 0J1)÷○1

Try it online!

Input/Output
Takes a 4×2 matrix of coordinates as input
Outputs

1 1 1 for Square
1 1 0 for Rhombus
1 0 1 for Rectangle
1 0 0 for Parallelogram
1 0 for Kite
0 1 for Trapezium
0 0 for Quadrilateral

Algorithm
First, find all 4 side lengths and angles of the quadrilateral
If both pairs of opposite angles are equal (OA), then the shape is some kind of parallelogram. Determine if all side lengths are equal (AS, Adjacent Sides) and if all angles are equal (AA).
+--------+----------------+----------------+
|        |       AA       |      ~AA       |
+--------+----------------+----------------+
|   AS   |     Square     |    Rhombus     |
|--------+----------------+----------------+
|  ~AS   |    Rectangle   |  Parallelogram |
+--------+----------------+----------------+

If not OA, then:

Determine if there are exactly 2 pairs of equal adjacent sides and if they are separated (aabb instead of aaab). If so, the shape is a kite.

Determine if there are exactly 1 pair of parallel opposite sides. If so, the shape is a trapezium.

Otherwise, the shape is a quadrilateral.

Code
⍙←{⍵⍺⍺1⌽⍵} defines a new operator. In APL, an operator means a higher-order function. This operator takes 1 functional argument (⍺⍺) and returns a monadic function that:

Rotates (1⌽) the argument (⍵)
Apply ⍺⍺ between it and ⍵

This is especially useful for scalar functions since most of them implicitly map across array arguments, allowing ⍙ to apply those between each adjacent pair of elements with wrap around. For example +⍙1 2 3 4 is 1 2 3 4 + 2 3 4 1 which evaluates to 3 5 7 5.

x←-⍙⎕+.×1 0J1 converts the input coordinate matrix into an array of complex numbers representing the vectors of the 4 sides of the shape.

⎕, when referenced, takes and returns input

1 0J1 represents the vector [1,i] ("vector" in the mathematical sense, and "i" as the square root of -1). In APL, a complex number a+bi is written aJb

+.× matrix multiplication. Mathematically, the result would be a 4×1 matrix. However, +.× is called "inner product" in APL which generalizes matrix multiplication and vector inner product and allows you to do even stuff like "multiply" a 3-dimensional array with a 2-dimensional one. In this case, we are multiplying a 4×2 matrix and a 2-element vector, resulting in a 4-element vector (of the complex number representations of the 4 given vertices).

-⍙ is pairwise subtraction with wrap around as noted above. This gives the vectors of the 4 sides of the shape (as complex numbers). These vectors point in the "reverse" direction but that doesn't matter.

x← stores that into the variable x

2|1+-⍙(12○x)÷○1 finds (a representation of) the exterior angles at the 4 vertices of the shape.

12○x finds the principal argument, in radians, of each of the 4 side vectors.

÷○1 divides by π so that the angles are easier to work with. Thus, all angles are expressed as a multiple of a straight angle.

-⍙ Pairwise subtraction with wrap around as noted above. This gives the 4 exterior angles.

2|1+ The principal argument is capped (-1,1] and pairwise subtraction makes the range (-2,2]. This is bad since the same angle has 2 different representations. By doing "add 1 mod 2", the angle is re-capped at (0,2]. Although all angles are 1 more than what it should be, it's fine if we keep that in mind.

|x finds the magnitude of each of the 4 side vectors

{⍵≡2⌽⍵:≡⍙¨0⍺⍵⋄2 4=+/1=2|+⍙↑⍵(=⍙⍺)} defines and applies a function with the array of 4 exterior angles as right argument ⍵ and the array of 4 side lengths as right argument ⍺.

The function has a guarded expression. In this case, ⍵≡2⌽⍵ is the guard.
If the guard evaluates to 1 then the next expression ≡⍙¨0⍺⍵ is executed and its value returned.
If the guard evaluates to 0, that expression is skipped and the one after that 2 4=...=⍙⍺) gets executed instead.

⍵≡2⌽⍵ checks if both pairs of opposite angles are equal.

2⌽⍵ rotates the angles array by 2 places.
⍵≡ checks if that is the same as ⍵ itself

≡⍙¨0⍺⍵ returns a unique value for each parallelogram-type shape.

0⍺⍵ is the 3-element array of the scalar 0, the side lengths array ⍺, and the angles array ⍵.
≡⍙¨ executes ≡⍙ for each of those elements.
≡⍙ checks if all values of an array are equal by checking if rotating it by 1 gives the same array. Scalars do not rotate so ≡⍙0 returns 1. As noted above, ≡⍙⍺ checks for a rhombus and ≡⍙⍵ checks for a rectangle.

2 4=+/1=2|+⍙↑⍵(=⍙⍺) returns a unique value for each non-parallelogram-type shape. This is achieved by intertwining the checks for kite and trapezium.

2=+/1=2|+⍙⍵ checks for a trapezium.

+⍙⍵ gives the adjacent angle sums. The interior angles of parallel lines sum to a straight angle, thus so does the exterior angles of parallel sides of a quadrilateral. So, each pair of parallel sides should lead to two 1 or -1 in the adjacent angle sums.

1=2| However, the angles in ⍵ are 1 more than what they should be, so the angles actually sum to 1 or 3. This can be checked by "mod 2 equals 1".

+/ sums the array. This gives a count of adjacent angle sums which is 1 or 3.

2= check if that equals 2. (I.e. if there is exactly one pair of parallel sides)

4=+/1=2|+⍙(=⍙⍺) checks for a kite.

(=⍙⍺) gives an array indicating which adjacent sides are equal. Unlike ≡, = work element-wise. Thus, this is a 4-element array with 1s where the length of that side is equal to that of the "next" side.

+⍙ Pairwise sum with wrap around.

1=2| Since (=⍙⍺) gives a boolean array (one with only 0s and 1s), the only possible values of pairwise sum are 0, 1 and 2. So 1=2| is same as just 1=.

+/ sums the array. This gives a count of pairwise sums which is 1.

4= check if that equals 4. The only way that happens is if (=⍙⍺) is 1 0 1 0 or 0 1 0 1. As noted above, this means the shape is a kite.

2 4=+/1=2|+⍙↑⍵(=⍙⍺) intertwines the above checks.

⍵(=⍙⍺) is the 2-element nested array of the array ⍵ and the array (=⍙⍺)

↑ promotes the nested array to a proper matrix. Since ⍵(=⍙⍺) is a 2-element array of 4-element arrays, the result is a 2×4 matrix.

+⍙ Since ⌽ (and, by extension, ⍙) rotates the last (horizontal) axis, +⍙ to a matrix is same as applying +⍙ to each row individually.

1=2| both residue/mod (|) and equals (=) works on a per-element basis, even to matrices.

+/ By default, reduce (/) works along the last (horizontal) axis. So +/ sums along rows and turn a 2×4 matrix into a 2-element simple array.

2 4= Since = works per-element, this checks the kite and trapezium conditions simultaneously.

Mathematica, 195 bytes
Which[s=Differences@{##,#};l=Norm/@s;r=#.#2==#2.#3==0&@@s;Equal@@l,If[r,1,2],#==#3&&#2==#4&@@l,If[r,3,4],MatchQ[l,{a_,b_,b_,a_}|{a_,a_,b_,b_}],5,#+#3=={0,0}||#2+#4=={0,0}&@@Normalize/@s,6,1>0,7]&

With whitespace:
Which[
    s = Differences @ {##,#};
    l = Norm /@ s;
    r = #.#2 == #2.#3 == 0& @@ s;

    Equal @@ l, If[r, 1, 2],
    # == #3 && #2 == #4& @@ l, If[r, 3, 4],
    MatchQ[l, {a_,b_,b_,a_}|{a_,a_,b_,b_}], 5,
    #+#3 == {0,0} || #2+#4 == {0,0}& @@ Normalize /@ s, 6,
    1 > 0, 7
]&

Outputs 1 for squares, 2 for rhombi, 3 for rectangles, 4 for parallelograms, 5 for kites, 6 for trapezoids, and 7 for anything else. I'd post a TIO link, but this apparently doesn't work in Mathics.
If the four points are P, Q, R, and S, then {##,#} is {P,Q,R,S,P},  so s is the list of side vectors {Q-P,R-Q,S-R,P-S}, l is the lengths of those vectors, and r is the condition that the angle between Q-P and R-Q as well as the angle between R-Q and S-R are both 90 degrees.
Thus, if all the sides lengths are equal, then the quadrilateral is a rhombus. If r holds, it is in fact a square, otherwise it's just a plain rhombus.
Ruling out rhombi, if both pairs of opposite side lengths are equal, then the quadrilateral is still parallelogram. If r holds, it is in fact a rectangle, otherwise, it's just a plain parallelogram.
Ruling out parallelograms, the list of side lengths l is of the form {a,b,b,a} or {a,a,b,b} for some a and b, then the quadrilateral is a kite. Note that it can't additionally be a trapezoid or it would in fact be a rhombus.
Ruling out parallelograms and kites, if the quadrilateral has a pair of parallel sides, then it is a trapezoid. We check this by Normalizeing the side vectors and checking whether a pair of opposite vectors adds to {0,0}.
Ruling out all of the above, if 1 > 0 (it better be), then the quadrilateral is just a plain old quadrilateral.

Python 2, 463 410 408 397 bytes
Saved 53 bytes by using a tuple in the sixth line instead of indexing into a list.
Saved 11 bytes by shifting to output integers 1 through 7 instead of the first letter of each shape.  The integers correspond as follows:

Square
Rectangle
Rhombus
Parallelogram
Trapezoid
Kite
Quadrilateral

from numpy import *;D=dot
from numpy.linalg import *;N=norm
def P(a,b):x=D(a,b);y=N(a)*N(b);return x==y or x==-y
def Q(a,b):return int(N(a)==N(b))
L=input()
a,b,c,d=tuple([(L[i][0]-L[(i+1)%4][0],L[i][1]-L[(i+1)%4][1]) for i in range(4)])
g=7
e=Q(a,c)+Q(b,d)
if e==2:
 g=(1if D(a,b)==0 else 3) if Q(a,b) else 2 if D(a,b)==0 else 4
elif P(a,c) or P(b,d):
 g = 5
elif Q(a,b) or Q(b,c):
 g = 6
print g

Try it online!
Ungolfed  to show the logic
Shown as a function, to show output for the different test input.  note I changed the "Rectangle" test example from the one originally provided in the question, which was not a rectangle.
The logic rests on dot products and the norm (length) of the vectors formed by the sides of the quadrilateral to assess whether sides are equal in length, parallel on opposite sides, or perpendicular to adjacent sides.
def S(va, vb):
    return (va[0]-vb[0], va[1]-vb[1])
def dot(sa,sb):      # Eventually replaced with numpy.dot
    return(sa[0]*sb[0]+sa[1]*sb[1])
def norm(s):         # Eventually replaced by numpy.linalg.norm
    return (s[0]**2+s[1]**2)**.5
def isperp(a,b):     # Test if lines/vectors are perpendicular
    return dot(a,b)==0
def ispar(a,b):      # Test if lines/vectors are parallel
    x = dot(a,b)
    y = norm(a)*norm(b)
    return x == y or x == -y
def iseq(a,b):       # Test if lines/vectors are equal in length
    return norm(a)==norm(b)

def f(L):
    #Define the four sides
    s = []
    for i in range(4):
        s.append(S(L[i],L[(i+1)%4]))  # I refer often so shorter names may eventually

    guess = 'Q'
    eqsides = 0           # These 6 lines eventually golfed using integer arithmetic by returning an int from iseq()
    if iseq(s[0], s[2]):
        eqsides += 1
    if iseq(s[1],s[3]):
        eqsides += 1
    if eqsides == 2:
    # Opposite sides are equal, so square, rhombus, rectangle or parallelogram
        if iseq(s[0],s[1]):       #Equal adjacent sides, so square or rhombus
            guess='S' if isperp(s[0], s[1]) else 'H'
        else:                     # rectangle or Parallelogram
            guess='R' if isperp(s[0], s[1]) else 'P'
    elif ispar(s[0],s[2]) or ispar(s[1],s[3]):
        guess = 'T'
    elif iseq(s[0],s[1]) or iseq(s[1],s[2]):
        guess = 'K'
    return guess

#test suite:
print f([(0, 0), (1, 0), (1, 1), (0, 1)]) # -> square
print f([(0, 0), (1, 1), (-1, 3), (-2, 2)]) # -> rectangle
print f([(0, 0), (5, 0), (8, 4), (3, 4)]) #  -> rhombus
print f([(0, 0), (5, 0), (6, 1), (1, 1)]) #  -> parallelogram
print f([(0, 0), (4, 0), (3, 1), (1, 1)]) # -> trapezoid/trapezium
print f([(0, 0), (1, 1), (0, 3), (-1, 1)]) #-> kite
print f([(0, 0), (2, 0), (4, 4), (0, 1)]) #-> quadrilateral

Try it online!

Misclassified [(0, 0), (2, 2), (4, 0), (0,-2)] as kite

Would this work? https://repl.it/JRzE

@TwiNight  Thanks.  Did not see this possibility.  Problem is that my initial algorithm only checks to see if there's ONE pair of sides of matched length.  As you example shows, that's not sufficient.  I'd need to check for one pair of matched sides, and then check if the opposite pair are also similar in length. Been too busy to implement that.

Batch, 287 bytes
@set/aa=%3-%1,b=%4-%2,c=%5-%1,d=%6-%2,e=%7-%1,f=%8-%2,g=a*a+b*b,h=(h=c-a)*h+(h=d-b)*h,i=(i=c-e)*i+(i=d-f)*i,j=e*e+f*f,p=!(i-g)+!(j-h),q=!(h-g),r=!(a*e+b*f),k=q+!(j-i)^|!(j-g)+!(h-i),t=!(a*(f-d)-b*(e-c))+!((c-a)*f-(d-b)*e)
@if %p%==2 (echo 1%r%%q%)else if %k%==2 (echo 1)else (echo 1%t%)

Outputs in binary: 1 = Kite, 10 = Quadrilateral, 11 = Trapezium, 100 = Parallelogram, 101 = Rhombus, 110 = Rectangle, 111 = Square.
Explanation: g, h, i, j are the squares of the lengths of the sides. p is the number of pairs of opposite sides with the same length, q distinguishes between parallelograms/rectangles and rhobmi/squares by checking whether the opposite pairs are in fact equal, r distinguishes between parallelograms/rhombi and rectangles/squares via a perpendicularity check, k checks for a kite by looking for pairs of equal adjacent sides and t checks for a trapezium via a couple of parallel side checks.

See this comment

@TwiNight Bah, checking for a kite is really awkward.

Yeah, I was lucky to find a compact way to do it

@TwiNight I'll take your word for it; APL is completely unreadable to me.

The part where I check for kite is 2=|-.=⍙⍺. Certainly looks compact if you ignore the work put into calculating ⍺ (the 4 side lengths) and a whole line to define ⍙