vector -1,-1,1,1
is in fact an discrete sine wave (appropriately scaled and phase-shifted), with a frequency of 0.25 cycles per sample:
$$ \begin{align}
f(n) &= \sqrt{2} \sin\left(0.25\cdot 2\pi n + {5\pi \over 2} \right) \\
f(0) &= -1 \\
f(1) &= -1 \\
f(2) &= 1 \\
f(3) &= 1
\end{align} $$
It's not a square wave but let's suppose it is. A square wave consists of a fundamental and odd harmonics. So if we took the fourier transform of this square wave, it would have a fundamental at 0.25 cycles/sample, and a harmonic at 0.25*3 = 0.75 cycles/sample.
But 0.75 cycles/sample is greater than the nyquist frequency of 0.5 cycles/sample. This harmonic can't be represented at this sample rate. Therefore by contradiction the source is not a square wave.
In fact, to even begin to represent a square wave, it must have a fundamental frequency strictly less than 0.5 / 3 = 0.16666 cycles / sample, otherwise none of the harmonics can be represented. A square wave without any harmonics is just a sine wave.
As you've seen, viewing discrete waveforms in the time sink can be a little misleading because by default it connects each sample with a straight line. You could consider changing the settings to draw just the points, which can be a little less misleading but also sometimes harder to read.
-1,-1,1,1...
discrete sine? $\endgroup$-1,-1,1,1
has only 2 values,how could it be resampled to more values then shape the sine? $\endgroup$