text:
Design a One Instruction Set Computer!
Notice: I'm willing to give a bounty to any answer that I find interesting.
Your challenge is to design a Turing-complete one instruction set computer (OISC):

An OISC is an abstract machine that uses only one instruction – obviating the need for a machine language opcode. With a judicious choice for the single instruction and given infinite resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have multiple instructions.

Here are some examples of single commands that make a Turing-complete OISC.
Rules:
You must provide an interpretation or proof thereof
You must provide an interpreter for your language. This interpreter should only be restricted by memory/time (e.g. must have no user-imposed restrictions). If you do not provide an interpreter for your language (for whatever reason other than laziness) you must prove that it is possible for one to be written. An interpreter must be possible.
You must prove its Turing-completeness
You must include a formal proof that your language is Turing-complete. A simple way to do this is by proving that it can interpret or have the same behavior as another Turing-complete language. The most basic language to interpret would be Brainf**k.
For example, a normal language that has all the same commands as Brainf**k (and the same lack of user-imposed memory restrictions) is Turing-complete because anything that can be implemented in Brainf**k can be implemented in the language.
Here is a list of very simple-to-implement Turing-complete languages.
Additional OISC requirements

This OISC should only have one instruction - it cannot have multiple instructions with one of them making it Turing-complete.
Your OISC may use any syntax you like. You should define in your answer what is instruction, what is data, and what is a no-op (e.g. whitespace). Be creative!
Arguments do not just need to be integers. For example, /// is a beautiful example of a Turing-complete OISC.
How and if input and output are taken and given are left up to you. Most OISCs implement I/O via specific memory locations, but there may be other ways to do so, and you are encouraged to find one.
A valid answer must provide some example code in your OISC, either by including it in the post or linking to a simple challenge solved in the language.

Voting
Voters, please remember not to upvote boring submissions. Examples:

Lenguage-equivalents
An implementation of an existing OISC (answerers, please create your own!)
An "OISC" in which the first argument specifies a command to call (example)

However, you should upvote interesting, creative submissions, such as:

An OISC based off of a mathematical equation
A Turing-complete ZISC based on a neural network
An OISC in which output I/O happens in other ways than certain memory locations

Winning
As with popularity-contest, the answer with the most votes wins! Good luck!

Sandboxed post and OISC Wikipedia page.

not sure /// is an oisc still, due to its print instruction.

@DestructibleLemon It doesn't have a print instruction. It only has one instruction, which prints as a side effect.

What is an "instruction"? And how do we count them?

I wish I knew enough to do this, it looks fun.

@NoOneIsHere i wish i knew enough just to vote xD

I downvoted this. I think this is a very interesting idea, but you don't explain exactly what an OISC is and how to confirm something is one. I made BF an OISC, but that is clearly against the spirit of the question, but technically valid.

@MDXF i don't think you get ///: it has a substitution command, and it has print commands, which is not just a side effect of the substitution command

@DestructibleLemon no it doesn't have a print command, it just prints everything left after substitution at the end of the program.

@MDXF http://esolangs.org/wiki////#Description

@NoOneIsHere Because [tag:popularity-contest]. Yes, it's valid, but it has poor score (vote tally), so it won't win.

@user202729 Yeah, but just the fact that it is impossible to make sure a language truly has only 1 instruction makes me feel that the challenge is under-speficied.

Can one mandate that several specific values, [0, 1, and -1], are stored in memory locations?

@user230118 yes, that's fine.

Since I've voted to close this as unclear, I thought it would be a good idea to make explicit why.  As per my previous comment there is no explanation as to how one can count the size of the instruction set.  Without this definition I don't know how we can determine if an answer is a valid one.

@WheatWizard Can you think of an objective definition then?

@MDXF I don't even really understand what you want out of a definition, mostly because I'm unclear as to what you think is an OISC.  If had an idea for a definition I would have already suggested it, but I don't know what qualities you want out of a definition.

Is MOV-like languages not real OISC?

XOISC
This OISC is based on Fokker's X-combinator which is defined as follows:
$$ X = \lambda f\ . f\ (\lambda g\ h\ x\ . g\ x\ (h\ x))\ (\lambda a\ b\ c\ . a) $$
If we acknowledge the fact that the SKI-calculus is Turing complete the above \$X\$-combinator is Turing complete as well. This is because \$S\$, \$K\$ and \$I\$ can be written in terms of \$X\$, like this:
$$
  \begin{align}
      S &= X\ (X\ X) \\
      K &= X\ X \\
      I = S\ K\ K &= X\ (X\ X)\ (X\ X)\ (X\ X)
  \end{align}
$$
How XOISC works
Internally XOISC has an (initially empty) stack, from there the instruction taking \$n\$ as an argument does the following:

Pop \$n\$ elements (functions \$ f_1 \dots f_N\$) from the stack, push \$f_1\ (f_2\ (\dots (f_N\ X) \dots ))\$

Once there are no more instructions left XOISC will push all command-line arguments (if any) to the stack, for example:
$$
  [ \underbrace{s_1, \dots,\ s_M}_{\text{stack before}}
  ,\ \underbrace{a_1, \dots,\ a_N}_{\text{arguments}}
  ]
$$
The final computation will be \$(\dots ((\dots (s_1\ s_2) \dots)\ s_M)\ a_1) \dots) a_N \$.

Since the one instruction in XOISC takes only one argument (memory offset) there is no reason to even use a name for that instruction. So a valid source file will constitute solely of integers separated by newlines or whitespaces, like for example:
0 0 2 0 1 0 1

Try it online!
Example
Let's take the above example (stack growing to the right):
$$
  \begin{align}
& \texttt{0} & \text{pop 0 and apply (ie. push single } X \text{)}:
  & \quad [X] \\
& \texttt{0} & \text{again simply push } X:
  & \quad [X,\ X] \\
& \texttt{2} & \text{pop 2 (} a,b \text{) and push } a\ (b\ X):
  & \quad [X\ (X\ X)] \\
& \texttt{0} & \text{simply push } X:
  & \quad [X\ (X\ X),\ X] \\
& \texttt{1} & \text{pop 1 (} a \text{) and push } a\ X:
  & \quad [X\ (X\ X),\ X\ X] \\
& \texttt{0} & \text{simply push } X:
  & \quad [X\ (X\ X),\ X\ X,\ X] \\
& \texttt{1} & \text{pop 1 (} a \text{) and push } a\ X:
  & \quad [X\ (X\ X),\ X\ X,\ X\ X]
  \end{align}
$$
Finally evaluate the stack: \$((X\ (X\ X))\ (X\ X))\ (X\ X)\$ or with less parentheses \$X\ (X\ X)\ (X\ X)\ (X\ X)\$ which we recognize as the good old \$S\ K\ K\$ identity function.
Turing completeness
Proof idea
For XOISC to be Turing complete we need to be able to translate any (valid) interleaving of parentheses and \$X\$ combinators. This is possible because when popping, applying and pushing it does so in a right-associative manner (function application is left-associative).
To translate any such \$X\$ expression there is an easy way to do so: Always pop as many elements such that from the beginning of the current level of parentheses there will only be one element left.
As an example, the previously used expression: \$((X\ (X\ X))\ (X\ X))\ (X\ X)\$

to get \$X\$, we simply need a 0
next we're in a new level of parentheses, so we again only need a 0
now two parentheses close, so we need to pop 2 elements: 2
again we're in a new level of parentheses, so we need a 0
two parentheses, close so again a 2
and the same again

So we end up with a different (yet semantically equivalent) XOISC-program:
0 0 2 0 2 0 2 Try it online!
If we stay with this strategy we can easily transform any expression consisting of \$X\$ combinators to an XOISC program which only leaves a single function on the stack.
Formal proof
Given that the SKI-calculus is Turing complete, we need to show two things:

the \$X\$-combinator is a basis for the SKI-calculus
XOISC is able to represent any expression formed with the \$X\$ combinator

The first part - proving the three equalities in the introduction - is very tedious and space consuming, it's also not very interesting. So instead of putting it in this post, you can find here*.
The second part can be proven by structural induction, though it's easier to prove a slightly stronger statement: Namely, for any expression formed by \$X\$-combinators there is a program that will leave that expression as a single expression on the stack:
There are two ways of constructing such an \$X\$ expression, either it's \$X\$ itself or it's \$f\ g\$ for some expressions \$f\$ and \$g\$:
The former one is trivial as 0 will leave \$X\$ on the stack as a single expression. Now we suppose that there are two programs (\$\texttt{F}_1 \dots \texttt{F}_N\$ and \$\texttt{G}_1 … \texttt{G}_K\$) that will leave \$f\$ and \$g\$ as a single expression on the stack and prove that the statement holds for \$f\ g\$ as well:
The program \$\texttt{F}_1 \dots \texttt{F}_N\ \texttt{G}_1 \dots \texttt{G}_{K-1}\ (\texttt{G}_K + 1)\$ will first generate \$f\$ on the stack and then it will generate \$g\$ but instead of only popping parts of \$g\$ it will also pop \$f\$ and apply it, such that it leaves the single expression \$f\ g\$ on the stack. ∎
Interpreter
Inputs
Since the untyped lambda calculus requires us to define our own data types for everything we want and this is cumbersome the interpreter is aware of Church numerals - this means when you supply inputs it will automatically transform numbers to their corresponding Church numeral.
As an example here's a program that multiplies two numbers: Try it online!
You can also supply functions as arguments by using De Bruijn indices, for example the S combinator \\\(3 1 (2 1)) (or λλλ(3 1 (2 1))). However it also recognizes the S, K, I and of course X combinator.
Output
By default the interpreter checks if the output encodes an integer, if it does it will output the corresponding number (in addition to the result). For convenience there's the -b flag which tells the interpreter to try matching a boolean instead (see the last example).
Assembler
Of course any low-level language needs an assembler that converts a high-level language to it, you can simply use any input (see above) and translate it to a XOISC-program by using the -a flag, try it online!**

* In case the link is down, there's a copy as HTML comment in this post.
** This results in a program that tests for primality, try it online!

Is there a reason you picked the X combinator instead of the Iota combinator?

@EsolangingFruit: Yeah, there are several other options as well, in the end I opted for that one because it uses the least applications to build SK. It seemed like it would perform the best (tbh I haven't done a comparison myself).

Btw. there is a nice comparison of several combinators in the linked paper if you're interested.

Draw
Draw is an OISC acting on a 2D grid, marking squares in a manner similar to the Wang B-machine. However, to keep the language as simple and OISC-y as possible, all instructions (of which there are a grand total of one) mark the square just stepped on, and, in order to be able to halt, stepping on a marked square terminates the program.
The program consists of a sequence of lines containing a line identifier (arbitrary string not including # or whitespace), two integers (x and y) and two more line identifiers (a and b).
The program runs as follows:
Starting at the line identified as start with the pointer pointing to position (0, 0), move the pointer by the amount given by x and y and mark the square the pointer is now on (unless the square is already marked, in which case execution terminates). Then, jump to line a if at least one of the directly adjacent squares is also marked, and to line b otherwise.
Interpreters are encouraged to output the final result of the grid as some sort of image, canvas, etc.
Turing-Completeness
Draw is Turing-complete as it is possible to compile a modified version (called Alternate) of a Minsky machine into the language.
Alternate acts similarly to a two-counter Minsky machine, but there is a large restriction placed on the commands: commands must alternate between targeting the first and second counter. To get around this modification, an additional command has been added: nop. This command doesn't change the targeted counter at all, which makes it possible to "pad" consecutive changes to one counter, satisfying the restriction outlined above. This also means that the register that is to be modified doesn't have to be given and, for any given instruction, can be directly inferred from the instructions from which execution can jump to it.
Example: this Minsky machine
1 inc A 2
2 inc A 3
3 dec A 3 4
4 halt

turns into this Alternate program:
1 inc 2
2 nop 3
3 inc 4
4 nop 5
5 dec 6 8
6 nop 5
7 halt
8 halt

This restriction is necessary due to the way that the eventual Draw program handles registers, which is to say that it doesn't differentiate between them at all. Instead, the Draw program simply copies the register that hasn't been changed by the preceding instruction, modifying it according to the instruction being executed.
Then, the Alternate program is directly translated into Draw as follows:
The program starts with this block.
start 0 0 a a
a 3 0 b b
b -3 1 c c
c 3 0 d d
d -3 2 e e
e 3 0 f f
f 3 -3 i1_a i1_a

inc, dec and nop are translated in almost the same way as each other. In all cases, there is no difference between changing the first or the second register (as explained above). Here is an increment, equivalent to inc 2:
i1_y 0 -2 i1_z i1_y
i1_z 3 -1 i1_a i1_a
i1_a -5 1 i1_b i1_b
i1_b 0 2 i1_c i1_c
i1_c 0 2 i1_d i1_e
i1_d 0 2 i1_d i1_f

i1_e 5 0 i2_z i2_y
i1_f 5 0 i2_z i2_y

Change the numbers in the i1_x parts to the index of the current instruction, and in the i2_x parts to the index of the next instruction to be executed.
The nop instruction can be translated as such:
i1_y 0 -2 i1_z i1_y
i1_z 3 -1 i1_a i1_a
i1_a -5 1 i1_b i1_b
i1_b 0 2 i1_c i1_c
i1_c 0 2 i1_d i1_e
i1_d 0 2 i1_d i1_f

i1_e 5 -2 i2_z i2_y
i1_f 5 -2 i2_z i2_y

This is a decrement:
i1_y 0 -2 i1_z i1_y
i1_z 3 -1 i1_a i1_a
i1_a -5 1 i1_b i1_b
i1_b 0 2 i1_c i1_c
i1_c 0 2 i1_d i1_e
i1_d 0 2 i1_d i1_f

i1_e 5 -2 i3_z i3_y
i1_f 5 -4 i2_z i2_y

i3_x refers to the instruction to be called if the counter is already 1.
Halt:
i1_y 0 0 0 0
i1_z 0 0 0 0

Change labels appropriately and simply chain everything together. Doing this for the example from above gives the Draw program in the repository from above.
Interpreters
There are currently two interpreters, both written in Python. They can be found on Draw's GitHub repository.

draw.py: This interpreter is meant for the command line and takes the program source as an argument. After every step, it outputs the command that was executed and the location of the instruction pointer; after the program halts, it prints the number of marked cells.
draw_golly.py: This version uses Golly for exactly the wrong purpose easier graphical output, taking the source via a popup box when starting the script. Golly can be a little finicky with Python, so make sure you have Python 2 installed (and don't mix 32-bit Golly with 64-bit Python or vice versa). Output is provided via Golly's builtin cell grid.

The following image is an example for output from the second interpreter. Running the example program in the repository gives this (or similar):

Amazing! Congrats on finding a very unique way to do the challenge.

Your language doesn't need to halt at all to be turing complete. Rule 110 doesn't terminate, but it's turing complete nonetheless.

+1 for Golly the Best Cellular Automata Simulator Ever.

-3
Here's the gist.
Memory
Memory is a map of tapes, where the keys are strings and values are arbitrary-sized integers.
Additionally, there is a set of labels, where the program can jump to.
There is a stack, which contains the operands, which are strings.
There is an offset, which controls where in the memory's tapes it can access.
The One Instruction
-. First, it pops a string LABEL off the stack. If that LABEL is undefined as a label, it defines the label, and clears the source of that label (i.e. where it was pushed from) and the current instruction. Otherwise, it performs the following calculation, using the top two values, A and B:
if mem[A] < mem[B]:
    jump to LABEL
if mem[A] != mem[B]:
    mem[A]--
else:
    mem[B]++

Note that if there are excess arguments or insufficient arguments, the program will error out, showing the program's state.
The offset can be modified by accessing the value of ..
Example code
X-

i i X-
i i X-
i i X-
i i X-
i i X-
i i X-
i i X-

This sets variable i to 7, by incrementing 7 times.
X-

i i X-
i i X-
i i X-
LOOP-
    a a X-
    a a X-
    j i LOOP-

This multiplies i+1 by the constant 2.
Proof of Turing Completeness
Disregarding C++'s int sizes (that is, assuming they are infinite), -3 is Turing Complete by reduction to 3-cell brainfuck. I can disregard this size because there can be written an interpreter for -3 on a computer with infinite memory that has arbitrarily-large cells.
I also believe that any BCT can be written as a -3 program.

As I love to improve my content, please, an explanation concerning the down vote would be appreciated


text:
Russian Nesting Quine
A Russian nesting doll, more commonly known as a Matryoshka doll, is a doll which contains a smaller version of itself, which then contains another smaller version of itself, which contains a smaller version of itself,  which contains a smaller version of itself, which contains a smaller version of itself... - until finally, the last one is empty.
Today your goal is to emulate this Russian tradition by writing a program or function that, when it contains itself N times, will print itself containing N-1 copies of itself times.
For example, the doll program abcd will have the N=3 program abababcdcdcd, which will print the N=2 program ababcdcd, which prints the original N=1 program abcd, which finally prints N=0, which is empty. This should theoretically work for any reasonable value of N.
Rules:

Here is a TIO program to help generate doll programs based on your program
Standard Quine Rules apply
Standard Loopholes apply
'Contains' means directly in the center of the previous version, so your solution must have a positive even number of bytes. A program of length 10 will have a copy of the original inserted after the fifth byte, then another after the tenth byte etc.
A single trailing whitespace is allowed in the output
As this is code-golf, your goal is to make your N=1 program as short as possible.
An explanation of your code would be appreciated

Sandbox post (deleted)

For what N is the code size measured?

@flawr N=1.....

N=0, which is empty it HAS to be empty, or can be a single character?

@Rod Has to be empty. 0 copies of a program is a blank string

Related: One More Program and I'm Out!

Is even character count, odd or fractional byte count OK?

@noodleman hmm, tough question. i would say that as long as the output encoding matches the program encoding (as should be mandatory for quines), and that the program can be split evenly, e.g. 3 bytes split into 1.5+1.5 bytes

Underload, 4 bytes
N=1: Try it online.
 ()S

N=2: Try it online.
 ( ()S)S

N=3: Try it online.
 ( ( ()S)S)S

Explanation:
Self-explanatory, but I add it anyway.

(...)S prints anything between the parenthesis to STDOUT
The space before it is a no-op to make the byte-count even and comply to the rules of the challenge.

JavaScript, 36 32 bytes
Takes advantage of the fact that Function.prototype.toString() takes no arguments and will therefore ignore any that are passed to it.
Partly inspired by user202729's solution.
f=_=>f.toString( ).slice(14,-16)

Try it

o.innerHTML=["Five",(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString( ).slice(14,-16) ).slice(14,-16) ).slice(14,-16) ).slice(14,-16) ).slice(14,-16))(),"Four",(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString( ).slice(14,-16) ).slice(14,-16) ).slice(14,-16) ).slice(14,-16))(),"Three",(f=_=>f.toString(f=_=>f.toString(f=_=>f.toString( ).slice(14,-16) ).slice(14,-16) ).slice(14,-16))(),"Two",(f=_=>f.toString(f=_=>f.toString( ).slice(14,-16) ).slice(14,-16))(),"One",(f=_=>f.toString( ).slice(14,-16))(),"Thunderbirds Are Go!"].join`\n`
span{font-weight:bold;font-size:16px;line-height:1.5em;text-transform:uppercase;}span:last-child{font-size:8px;}

JavaScript (Node.js), 46 bytes
Full program. So console.log is necessary.
Use an idea from this answer to save some bytes.
l=console.log;   g=_=>{};l((''+g).slice(4,-1))

Try it online! Try it online twice! Try it online, three times!

My approach is similar to that used in Kevin Cruijssen's answer, find a nestable structure (a function in this case).

Jelly, 16 bytes
Ṿḣ-9Ḋð}“““““““““

Try it online!
Doubled: Try it online!
Tripled: Try it online!

Jelly doesn't have any nestable structure, but its string literals are auto-terminated.

Ṿḣ-9Ḋ    First chain. (monadic)
Ṿ        UneṾal. (to string)
 ḣ-9     Take the ḣead, ends at the -9'th character.
    Ḋ    Ḋequeue, remove the first character.

     ð             Terminate the first chain, start a new one.
      }            Convert the last monadic chain to a dyadic one.
       “““““““““   String literal.
                   This matches the pattern <dyad> <nilad>, so applies
                   the the corresponding rules. This way a link can take data
                   to the right of it.

Will try different approaches to see if they can be shorter.

DipDup, 2 bytes
[]

It pushes the list onto the stack, and prints it without the outmost brackets.
N = 1: Try it online!
N = 2: Try it online!
N = 3: Try it online!

dc, 4 bytes
 []p

Similar to some other answers, since strings in dc have start ([) and end (]) delimiters (that is, " doesn't perform both duties, etc.), they're nestable without any real effort. p to print.
N=1: Try it online!
N=2: Try it nested!
N=3: Try it nesteder!

Tcl, 12 bytes
puts {}

Try it online!
It's just another language that also has this.

source: Stack Exchange

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

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

sort: votes


text:
Create a square of increasing size by replicating the initial code
Your assignment is to write a program of even length, that prints an ASCII-art square (described below), that increases its side length by 1 unit each time the original source code is pasted in the middle of the current code.
It is quite hard for me to define this task very well, so I'll give you an example:

Let's say your initial code was CODE and that it printed:
0

Then, insert CODE in the middle: your code becomes COCODEDE and it should print:
00
00

Re-insert CODE in the middle: your code becomes COCOCODEDEDE
and should print:
000
000
000

And so on. Your answer should theoretically work after any number of iterations, but I understand if, due to language performance limitations, it cannot run reasonably over a certain threshold.

Some rules:

You can use any printable ASCII (32-127) as the character to use for your square. Your choice needs  to be constant (You should use the same character for each iteration).
The initial output square must have side-length 1.
An ascii-art square is defined as a string with N lines (separated by N-1 linefeeds / newlines), and with each line containing N copies of the chosen character.
Your output isn't allowed to contain any extraneous whitespace, other than a trailing newline.
You can use the defaults for input and output (programs or functions are allowed, but snippets are not).
The middle of your code is defined as the point where the source code can be split in two parts such that the two are equal.
Your answers will be scored by the length of your original program, in bytes. The lowest byte count wins. In case there's a tie, the answer that was submitted earlier wins.
You can use this program to apply the insertions without having to do that by hand.

I must admit I was inspired by this quine question posted earlier. If people think it is too close, I'll happily delete this. Also excuse me if I made any mistakes, I am still not too experienced with the rules here. :)

Welcome to PPCG! I suggest using the Sandbox for your future challenges.

Welcome to the site! Excellent use of another challenge for inspiration without falling into the dupe trap :)

Your helper program doesn't work for programs with multiple lines. How about this modified version from the other question?

@JoKing Oh whoops, fixed now. I actually modified my Python program to take input from command line arguments rather that STDIN, which removes the issues. I'd rather not have a reference implementation in Brainfuck, but thanks anyway for pointing that out!

@user77954 But my brainfuck code is shorter than your python :( (has anyone ever said that before?)

Pyth, 2 bytes

5

Try it online! Also Try it doubled, tripled!
How does that work?
\n is the command that prints its argument with a trailing newline, while returning it simultaneously. So, each time you make an insertion, you turn the integer literal 5 into a number containing N copies of 5 concatenated, and the leading newlines basically make sure it's printed the appropriate number of times, thus keeping it square.

Holy frick that's short...

Proof of optimality (:P): Since the byte counts must be even, and  cannot be negative, the minimum possible byte count is 0 bytes. There is exactly 1 program of 0 bytes, which doesn't fulfil the task. Therefore, 2 bytes is optimal.

Everyone (especially HNQ voters), go upvote other answers too and avoid the FGITW effect.

JavaScript (ES6), 42 32 30 bytes
s=[this.s]+0;  console.log(s);

Second iteration:
s=[this.s]+0;  s=[this.s]+0;  console.log(s);console.log(s);

This works by appending a 0 to s each time the first half of the code is run, and printing s itself each time the second half is run. Takes advantage of four quirks of JavaScript:

The current environment can be referred to with this. This allows us to do this.s in place of s.
When accessing a property that has not been defined on an object, instead of throwing an error, JavaScript returns undefined.
An array plus a number returns a string. [1,2,3] + 4 === "1,2,34"
When stringifying an array, undefined is converted to the empty string, which means that [undefined] + 0 === "0".

Put together, this means that we can express the first half (generating a string of zeroes) in just 13 bytes. If using alert instead of console.log is allowed, we can save 4 more bytes by shortening the second half.

Congrats, passes the tests I have made!

... Ingenious! :)

05AB1E, 2 bytes
5=

Try it online!
Port of my Pyth answer.

Congrats, passes the tests I have made!

TFW you're really over-complicating things and see this answer.

Python 2, 42 38 28 bytes
id='%s@'%id  ;print id[22:];

Try it online!. You can also try the 2nd and 3rd iterations

Uh... character, not string.

@user202729 thanks for the heads up, fixed =]

Python 2, 22 bytes
i=0;i+=1; i
print'*'*i

Try it online!
Doubled:
i=0;i+=1; ii=0;i+=1; i
print'*'*i
print'*'*i

Note that the second half starts with a newline character.

C (gcc), 170 168 96 80 72 70 bytes
Much shorter version. Still wish I could find a solution without the preprocessor.
i;main(n){for(;i++<n;)printf
#if 0

#endif
(" %*c",n=__LINE__/4, 10);}

Try it online!
Old 168 byte version:
#ifndef A
#define A p(c){putchar(c);}j,n;main(i){for(
#else
#define A n++,
#endif
A

#ifndef B
#define B i=++n;i--;p(10))for(j=n;j--;)p(64);}
#else
#define B
#endif
B

Try it online!

Doesn't seem to work?

@user202729 ah, yes. Thought I fixed a typo but introduced a bug. Reverting.

Python 2, 30 bytes
False+=1      ;print'*'*False;

Try it online!, 2nd and 3rd iteration
This makes use of the fact that bools in Python are basically ints and the names False and True were reassignable in Python 2.
Python 1, 32 bytes
exit=exit+'*'  ;print exit[30:];

Try it online!, 2nd and 3rd iteration
In Python 1 the builtin strings exit and quit existed to inform the user of the interactive shell how to exit it. The default value is "Use Ctrl-D (i.e. EOF) to exit.".

I was going to suggest n=False+=1;print'*'*n;, but I keep forgetting that that's not a Python feature...

Charcoal, 6 bytes
⊞υωＬυ⸿

Try it online! Explanation:
  ω     Predefined empty string (any variable would do here)
 υ      Predefined initially empty list
⊞       Push

υ ends up with a length of the number of repetitions.
    υ   List
   Ｌ    Length
        Implicitly print as a row of `-`s
     ⸿  Move to start of next line

Haskell, 68 bytes
let s@(z:n)="0\n"in case lines<$>[]of(h:t):_->(h:h:t)>>(z:h++n);_->s

Try it online once, twice or thrice.
Because of Haskell's laziness an expression like the one above counts as a function which takes no arguments, as per this Meta question.

Ruby, 18 bytes
$/=?x+$/;  puts$/;

Try it online! Doubled! Tripled!

brainfuck, 44 34 bytes
crossed out 44 is still regular 44 ;(
,>-[<+>---]++++++++++[<]>[.>]<----

Try it online!
Try it doubled, tripled. Look, no padding!
Prints squares of U. It splits right down the middle of the 10 +s.

Brain-Flak, 74 bytes
(((((()()()){}){}){}){})((()()()()()<>){})<>([]){({}[()]<(({})<>)<>>)}{}<>

Try it online!
Try it doubled and tripled.
Explanation
(((((()()()){}){}){}){}) # push 48 ("0") onto first stack
((()()()()()<>){})       # push 10 (\n) onto second stack
<>([]){({}[()]<          # a number of times equal to the height of the first stack:
  (({})<>)<>             #   copy the top of the first stack to the second stack
>)}{}<>                  # cleanup and return to second stack

The break point is in the middle of the <> in the "push 10" section.  Breaking this up will leave a 5 on the third stack until we reach the corresponding second half, at which point pushing 10 will resume right where it left off.
While it is possible to push a printable ASCII value (space) in 22 bytes, this would make the central <> be executed after pushing 5.  By adding two more bytes, I was able to move the <> so that all of the progress toward pushing 10 was on the third stack.  As a bonus, this also made the resulting square more aesthetically pleasing.

Command line flags are free now.

tinylisp, 112 bytes
(load library) (d N((q((x)(i x(inc x)1)))(v(h(t(t(h(t(q())))))))))(join(repeat-val(string(repeat-val 42 N))N)nl)

Try it online! Also doubled and fivefold.
The "build a string in the first half, print it in the second half" approach that a lot of languages are taking won't work in tinylisp, since there are no mutable variables. Instead, we do some serious code nesting.
When a second copy of the code is inserted, it is placed inside the (q()), which wraps it in a list. Then (h(t(t(h(t(...)))))) drills into that list to the part after (d N. (v(...)) evaluates it; then we pass it to the unnamed function (q((x)(i x(inc x)1))), which increments the resulting value if it's a number and returns 1 if it's the empty list. The final result in the outermost nested version of the code is assigned to N. In essence, we've set up a weird sort of recursion that counts the number of nesting levels.
The second half of the code then creates a string of N asterisks, then a list of N such strings, then joins the list on newlines. The result is displayed with a trailing newline.

R, 44 bytes
F=F+1;T=TRUE*TRUE+12;
write(strrep(1,F),"");

Try it online!
Prints with a trailing newline. The T=TRUE*TRUE+12 is just to pad the length.
Try it doubled and Try it tripled.

You can eliminate 2 bytes by deleting the semicolons. I suppose there is a space at the end of the first line, which you can replace with a #: F=F+1;T=TRUE*TRUE+12#  write(strrep(1,F),"")

@AndreïKostyrka that would be 43 bytes which isn't even, unfortunately.

SNOBOL4 (CSNOBOL4), 130 68 bytes
Now with no comments! See the edit history for an explanation of the old algorithm.
	X =X + 1
	A =ARRAY(X,DUPL(1,X));
I	I =I + 1
	OUTPUT =A<I>	:S(I)
END

Try it online!
Try it doubled and tripled
Explanation:
	X =X + 1		;* increment X
	A =ARRAY(X,DUPL(1,X));	;* create an x-length array with 1 repeated x times for each element
I	I =I + 1		;* for i < x
	OUTPUT =A<I>	:S(I)	;* output a[i]
END

Because an END label is required and anything after the first END label is ignored, we get two advantages for this challenge:

operations in the first half of the program are repeated X times for the X repetitions
there will (to the interpreter) only exist one copy of the second half, including labels.

This suggests that we use the repetition for the first half, and then we can use a more "conventional" labeling approach to repeat the output X times.
The first half is
	X =X + 1
	A =ARRAY(X,DUPL(1,X));
which, when repeated, increments X the appropriate number of times, and creates an ARRAY A with indices from 1 to X and where each element of A is the string 1 repeated X times.
Then no matter how many times the program is repeated, the interpreter only sees:
I	I =I + 1
	OUTPUT =A<I>	:S(I)
END

which is a typical SNOBOL program that prints out the elements of A one at a time until the index goes out of bounds, then terminates the program.
; is an optional line terminator usually reserved for one-line EVAL or CODE statements that quite neatly brings the byte count to 68 and marks the halfway point, allowing the code to be appended there.

Julia 0.6, 29 bytes
All my ideas were longer than adapting xnor's clever python solution.
i=0;i+=1;    i
println("0"^i)

Becomes
i=0;i+=1;    ii=0;i+=1;    i
println("0"^i)
println("0"^i)

Try it online!

shortC, 56 44 bytes
-12 bytes: wait duh I'm using shortC why not use some shortened C stuff
s[];A
strcat(s,"@");//
Js);/*filling space*/

I would've used standard C, but that requires a } at the end which messes with replication. shortC inserts it at EOF implicitly.

Try it online! (1x1)
Try it online! (2x2)
Try it online! (3x3)
...
Try it online! (15x15)

Perl 5, 25 bytes
24 bytes code + 1 for -p.
Appreciate that you might not want to allow commandline flags, please let me know if this is not valid.
$@=0 x++$n;;$_="$@
"x$n;

Try it online!

Command line flags are free now.

Zsh, 10 bytes
s+=0
<<<$s

Try a full test suite online!
...yeah, this is a bit better. Append to string N times, then print N times. Turns out <<<foo<<<foo works just fine.

Zsh, 64 bytes
Character used:  (space).
f(){printf '%*s\n' $1}
:<<'E'

E
repeat $[i=LINENO/3];f $i
exit

Try a full test suite online!
The midpoint is between the second E and the newline following it. A heredoc will end when there is an E on a line by itself, which happens right in the middle of the code.

lol @ "slight" improvement. could also express it as s+=0;<<<$s

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

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


text:
5 Day Weather Forecast

Weather forecasting: Wrong too often to rely on, right too often to ignore.

Given a high and low temperature and one of four weather conditions per day, output an ASCII-art graphical five day weather forecast. The structure of the four graphical indicators are shown below.
 \ /
 -O-       Sunny
 / \

\ /
-O(==)     Partly Cloudy
(====)

  (==)     Cloudy
(====)

  (==)
(====)     Rainy
/////

The forecasting chart is as follows: each graphical indicator is centered in its own 9x5 box, with 5 boxes across the chart. Each box is separated by | characters. Below the graphical indicator is a three-letter abbreviation for the day of the week (MON, TUE, WED, THU, FRI, SAT, SUN) centered in its own 9x1 box. The temperatures are below the day of the week centered in their own 9x2 box. An example is shown below.
---------------------------------------------------
|         |         |         |         |         |
|    (==) |    (==) |  \ /    |   \ /   |   \ /   |
|  (====) |  (====) |  -O(==) |   -O-   |   -O-   |
|         |  /////  |  (====) |   / \   |   / \   |
|         |         |         |         |         |
---------------------------------------------------
|   MON   |   TUE   |   WED   |   THU   |   FRI   |
---------------------------------------------------
|  H 75   |   H 69  |  H 77   |   H 80  |  H 85   |
|  L 57   |   L 53  |  L 61   |   L 63  |  L 66   |
---------------------------------------------------

Note that "centered" can be taken loosely -- see in the example how the graphical alignment and the temperature horizontal alignment are somewhat flexible.
Additionally, since I'm from the US and therefore use Fahrenheit, you can safely assume that the temperatures are all double-digit, so 9 < t < 100.
I/O and Rules
The I/O examples here are demonstrative of the above example chart.

Input can be taken in any reasonable format and by any convenient method. For example,
1) you could use numbers for the days of the week, the high and low temperatures, and the four conditions, and take input as five tuples, like [0, 75, 57, 2], [1, 69, 53, 3], ...
2) you could take input as five tuples using words, like ['MON', 75, 57, 'CLOUDY'], ['TUE', 69, 53, 'RAINY'] ...
3) you could take input as just the first day, and a list of high temperatures, a list of low temperatures, and a list of conditions, like 1, [75, 69, ...], [57, 53, ...], [2, 3, ...]
4) etc.
Leading/trailing newlines or other whitespace are optional, provided that the characters line up appropriately.
Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
Output can be to the console, returned as a list of strings, returned as a single string, etc.
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

-1 for using °F ಠ_ಠ

-1 for making this not work for my state in the USA (it's 9° F today).

@MagicOctopusUrn I guess programs which work also outside this range are also accepted.

Emojicode, 1202 974 bytes
afD MON   TUE   WED   THU   FRI   SAT   SUN  f / \   \ /   -O-  (====)\ /   -O(==)        (==)(====)/////   (==)(====)l ---------------------------------------------------u      s |  S  |   wH L lLs u s u s u s u s u sLoi⏩-2 4o s◀1ios j⏩0 5▶1ioofa j 0i s◀1ioow ia j i 10SooDa j 1 so0i1i0iLll

Takes input as a list of lists of integers in the format of condition day high low where condition is an integer between 0 and 4. Try it online!

JavaScript (ES8), 304 263 222 bytes
Takes input as an array of 5 [w,d,h,l] entries, where d is the day as a string and w, h, l are integers representing the weather (0-indexed, with 0 = sunny), high temperature and low temperature respectively. Returns an array of strings.
a=>',0,04,05,06,0,,01,,0H 2,0L 3,'.split`,`.map(s=>(s=a.map(p=>s.replace(/\d/g,n=>+n?p[n]||'  (==),(====),/////,\\ /,-O(==), \\ /, -O-, / \\,'.split`,`['765143810210'[p[0]*3-n+6]]:'|  ').padEnd(10,' -'[+!s])).join``)+s[0])

Demo

let f =

a=>',0,04,05,06,0,,01,,0H 2,0L 3,'.split`,`.map(s=>(s=a.map(p=>s.replace(/\d/g,n=>+n?p[n]||'  (==),(====),/////,\\ /,-O(==), \\ /, -O-, / \\,'.split`,`['765143810210'[p[0]*3-n+6]]:'|  ').padEnd(10,' -'[+!s])).join``)+s[0])

O.innerText =
  f([
    [2,'MON',75,57],
    [3,'TUE',69,53],
    [1,'WED',77,61],
    [0,'THU',80,63],
    [0,'FRI',85,66]
  ]).join('\n');

How?
We define:

L = ',0,04,05,06,0,,01,,0H 2,0L 3,'.split(',')
An array of strings describing each line of the board, in which:

0 = prefix string: "|  "
1 = day of week
2 = high temperature
3 = low temperature
4 = top pattern of the graphical indicator
5 = middle pattern of the graphical indicator
6 = bottom pattern of the graphical indicator

W = '  (==),(====),/////,\\ /,-O(==), \\ /, -O-, / \\,'.split(',')
An array of strings describing the patterns of the graphical indicators.
P = '765143810210'
A string describing the indices of the patterns in W for each graphical indicator, grouped by 3 and stored in reverse order.

The main function now reads as:
a => L.map(s =>                   // for each substring s in L
  (s = a.map(p =>                 //   for each array of parameters p in a:
    s.replace(                    //     replace in s
      /\d/g, n =>                 //       each digit n with:
        +n ?                      //         if n is non-zero:
          p[n] ||                 //           the n-th parameter in p, if defined
          W[P[p[0] * 3 - n + 6]]  //           or a graphical indicator pattern
        :                         //         else:
          '|  '                   //           the prefix string '|  '
    )                             //     end of replace()
    .padEnd(10, ' -'[+!s])        //     pad the result with either spaces or '-'
  ).join``)                       //   end of inner map(); join the results and save in s
  + s[0]                          //   append the first character
)                                 // end of outer map()

Charcoal, 110 94 bytes
↑χＦ⁵«Ｎθ↘→↘Ｐ⎇θ⁺⁺⎇⊖θ  ¦\ /¶-o“⎇)Ｄ№⸿≡⬤»”×/×⁵⁼θ³“2⸿φ*ＥＣ+@OΠ≦”Ｍ¹¦⁵ＰＳ¶¶ＥHL⁺⁺κ ＳＭ⁶±¹↑χ»Ｆ6231«Ｐ←⁵¹ＭＩι↓

Try it online! Link is to verbose version of code. Edit: Saved 16 bytes by avoiding repeating the cloud. Explanation:
↑χ

Print the left-hand column of |s.
Ｆ⁵«

Loop over the 5 days.
Ｎθ

Input the weather condition, numbered 0 to 3 using the same order as the question.
↘→↘Ｐ⎇θ

If the weather condition is not sunny:
⁺⁺⎇⊖θ  ¦\ /¶-o

If the weather condition is partly cloudy then print a partial sun.
“⎇)Ｄ№⸿≡⬤»”

Print a cloud.
×/×⁵⁼θ³

If the weather is rain then print it.
“2⸿φ*ＥＣ+@OΠ≦”

Otherwise print the sun.
Ｍ¹¦⁵ＰＳ

Read and print the day.
¶¶ＥHL⁺⁺κ Ｓ

Loop over and input and print the temperatures.
Ｍ⁶±¹↑χ»

Print the next column of |s.
Ｆ6231«

Loop over the characters 6, 2, 3 and 1.
Ｐ←⁵¹

Print a row of -s.
ＭＩι↓

Cast the character to integer and move ready to print the next row.

Python 3, 636 610 534 464 379 bytes
def w(s,l,h,a):
 g='|';A='   ';p,q,r=[A+'\ /'+A,'  \ / '+A,A+' (==) ',A+' (==) '],[A+'-O-'+A,'  -O(==) ','  (====) ','  (====) '],[A+'/ \\'+A,'  (====) ',A*3,'  /////  '];n='-'*51;R=n,;w=x=y=z=''
 for e in s:x+=g+p[e];y+=g+q[e];z+=g+r[e];w+=g+A*3
 R+=x+g,y+g,z+g,w+g;x=u=v=''
 for i in range(5):x+=g+a[i];v+='|  H '+h[i]+A;u+='|  L '+l[i]+A
 print('\n'.join(R+(x+g,n,u+g,v+g,n)))

Input Format:-
The first list takes the weather conditions day wise -
0 - Sunny
1 - Partly cloudy
2 - Cloudy
3 - Rainy.
Second and third list take the highest and lowest temperatures respectively(as strings). Don't do anything with the fourth list - its mainly to store the days of the week.
Try It Online
Note:- A very special thanks to Mr.XCoder, ovs and pizzapants184 for helping reduce a lot of bytes.

Clean, 328 bytes
import StdEnv,Text
s="----------"
u=" (====)"
v="(==)"
j=['-|||||-|-||-']
$[[d,h,l,w]:t]=[[z:cjustify 10(fromString x)]%(0,9)<+y\\x<-[s,"":[["\\ /","-O-","/ \\"],["\\ /  "," -O"+v,u]:map((++)["   "+v,u])[[""],["/////"]]]!!w]++["",s,"MONTUEWEDTHUFRI"%(d*3,d*3+2),s,"H "<+h,"L "<+l,s]&y<-if(t>[])($t)(map((<+)"")j)&z<-j]

join"\n"o$

Try it online!
As a partial function literal, taking [[Int]] and returning String.

Vyxal, 206 bytes
→a\-51*D:,\|w6ẋfð9*j:,`\ /   *\ /   *      *  (==)
-O-   *-O(==)*  (==)*(====)
/ \\   *(====)*(====)*///// `↵ƛ×/;ƛ£←aƛ¥ni;` |  `j`|  `p` |`+,;_,,?ƛð3*pð3*+;\|j\|p\|+,,`|  H %   `5*?%\|+,`|  L %   `5*?%\|+,,

Try it Online!
A giant mess. Please don't ask.


text:
Help golfing this solution further
We are doing a PCG challenge at work, and I'm submitting answers in C#.  This is a modification of the "M'Kay" challenge.  My solution has been deemed correct by the requirements, I'm just trying to shrink it further if possible.

A filler word is an apparently meaningless word, phrase, or sound that marks a pause or hesitation in speech.
Your task is to create a function that has a 30%-50% chance of adding a random filler word to a block of text after the punctuation marks , ; . ? and !; and when added is followed by the same punctuation. The same filler word must be used for each replacement within a single execution of the function.
If the filler word occurs after a sentence completing punctuation mark such as . ? or ! the filler word must have the first letter capitalized.
  If the filler word occurs after a sentence pausing punctuation mark such as , or ; the filler word must be in lowercase.
Fillers: um, literally, you know, er, okay, right, ah, like

My submitted code:
string p(string i,int z=-1){string w="Um|Literally|You know|Er|Okay|Right|Ah|Like".Split('|')[i.Length %8],s="?,!;.",o="";foreach(var c in i){var x=s.IndexOf(c);o+=(z>0&&i[z]>'9'&&x>-1&&(1&z)<1?c+" "+(x%2>0?" "+w.ToLower():w):"")+c;z++;}return o;}

Original input text: We heard tales of Americans like Coast Guard Petty Officer Ashlee Leppert, who is here tonight in the gallery with Melania.  Ashlee was aboard one of the first helicopters on the scene in Houston during Hurricane Harvey.  Through 18 hours of wind and rain, Ashlee braved live power lines and deep water, to help save more than 40 lives.  Thank you, Ashlee.
With fillers added: We heard tales of Americans like Coast Guard Petty Officer Ashlee Leppert, okay, who is here tonight in the gallery with Melania.  Ashlee was aboard one of the first helicopters on the scene in Houston during Hurricane Harvey. Okay.  Through 18 hours of wind and rain, Ashlee braved live power lines and deep water, okay, to help save more than 40 lives.  Thank you, Ashlee.

Clarification comments welcome, I don't know what else I need to include.

You have a redundant space in [i.Length %8], no?

@Mr.Xcoder dang, yes.  I had problems before with compilation errors in LINQPad and adding the space fixed them.  It runs now without it though.

Also, I wonder if you could use lambdas (=>-functions). I don’t know C# so I cannot tell for sure.

@Mr.Xcoder I think that constitutes an answer on its own...

"Your task is to create a function that has a 30%-50% chance of adding a random filler word to a block of text after the punctuation marks" would imply to me that 30-50% of runs add the filler after every punctuation mark.

There does not seem to be any requirement for any additional spaces, just the filler and trailing punctuation, so you can drop both " "+ (and I believe the one before w.ToLower() is excess to requirements even if adding spaces is required).

@JonathanAllan: the rules were clarified internally to mean after 30-50% of punctuation marks within a sentence.  The bitmask I'm doing was deemed suitable, because over enough inputs it will average at 50%.

OK I thought that might be the case. The spec as written is incorrect, it may be worth a little rewording to make it accurate.

@JonathanAllan: an (actually used internally) example added.

z++; can be incorporated into the (1&z)<1 check as (1&z++)<1 unless I'm missing something for 2 bytes, right?

@MagicOctopusUrn: not there anyway, because it bails out early frequently.  I might be able to move it as a precondition check early in the loop though.

I suggest having a TIO link for testing and avoid lines with too much characters, probably by replacing spaces by newlines whenever possible. That makes code easier to read.

I think i[z]>'9'&&x>-1 could maybe become i[z]>'9'&x>-1, saving one byte (TIO).

You can change the string p(string i,int z=-1) to a currying lambda: i=>z=>. Here is a TIO on how to do this.

Surely you are not going to submit any answers posted here as your own? If so, consider opening your challenge to all languages, not only c#. Also, consider posting your answer in the "answer" box below the question.

@anatolyg: I'm not going to plagiarize any answer :) This is just for me to learn how to do it better.  Are you suggesting I re-post my answer as an actual captial-A Answer to my own question?

Yes, I am suggesting that. I also suggest removing the c# tag, so people can answer in any language. You may consider this challenge as your personal c# learning corner, but this is not how stuff works here. It's better to make it everyone's play ground, and let you ignore any answers you want to ignore.

string ... s="?,!;." ... var x=s.IndexOf(c);

s is used only once, so could be inlined.

var x=s.IndexOf(c); ... &&x>-1&& ... c+" "+(x%2>0?" "+w.ToLower():w):"")+c;

Change "?,!;." to ",;?!." and the test x%2>0 can be simplified to x<2.
Where in the spec does it require double-space after sentence-terminating punctuation? IMO you could lose the " "+ inside the parentheses.

Given the IMO ridiculous interpretation which they're allowing of "random", I don't see why you do such complicated stuff with z. Just use the character index modulo 3. A direct change to
string p(string i){int n=i.Length,j,x;string w="Um|Literally|You know|Er|Okay|Right|Ah|Like".Split('|')[n%8],o="";for(j=0;j<n;j++){var c=i[j];x=",;.?!".IndexOf(c);o+=(x>-1&&j%3<1?c+" "+(x<2?" "+w.ToLower():w):"")+c;}return o;}

gives a further nice saving. An alternative using Linq also saves a lot by exploiting fat arrow syntax, and would be cheaper if they give you free using statements:
using System.Linq;string p(string s)=>string.Join("",s.Select((c,i)=>{var w="Um|Literally|You know|Er|Okay|Right|Ah|Like".Split('|')[s.Length%8];var x=",;.?!".IndexOf(c);return(x>=0&&i%3<1?c+" "+(x<2?" "+w.ToLower():w):"")+c;}));


text:
Perfect Squares Without Borders
Given n=m^2, return a list of integers that do not border the m x m grid of integers from 1 to n.
Examples
n=1 (m=1)
Grid:
[1]

Return:
[]

n=4 (m=2)
Grid:
[1,2]
[3,4]

Return:
[]

n=9 (m=3)
Grid:
[1,2,3]
[4,5,6]
[7,8,9]

Return:
[5]

n=16 (m=4)
Grid:
[ 1, 2, 3, 4]
[ 5, 6, 7, 8]
[ 9,10,11,12]
[13,14,15,16]

Return:
[6,7,10,11]

For higher values of m, this answer does a great visualization.

Rules:

You may take in either m or n (where n = m*m).

If taking in n you are allowed to have undefined behavior where there exists no m for n (E.G. 15).
n > 0, m > 0: Both must be integer values.

The output may be as a 1D/2D array, matrix or whitespace delimited
The output must be in order from least to greatest.

If outputting as a matrix this means it must be as it would be in the grid.

This is code-golf, lowest byte-count wins.

Complete fault on my end, I read it incorrectly.

@DevelopingDeveloper hey man, if I had a nickle for every time I did that I'd be able to buy a beer or two.

If outputting as a 2D array, can a single empty array be included in the result?

Octave, 26 bytes
@(m)find((t=[0:m-2 0])'*t)

The code defines an anonymous function that inputs m and outputs a (possibly empty) column vector.
Try it online!
Explanation
@(m)                          % Define anonymous function of m
          t=[0:m-2 0]         % Build row vector [0 1 2 ... m-2 0] and assign it
                              % to variable t
         (           )'       % Complex-conjugate transpose into a column vector
                       *t     % Matrix-multiply that column vector times the row
                              % vector t. This gives an m×m matrix with zeros in
                              % the border and nonzeros in the other entries.
    find(                )    % Linear indices of nonzero entries. The result is
                              % in increasing order

C, 50 bytes
i;f(m){for(i=m;++i<m*m-m;)i%m>1&&printf("%d ",i);}

Try it online!

Octave, 31 bytes
@(m)vec2mat(1:m*m,m--)(2:m,2:m)

Returns a matrix.
Try it online!

Nice! I've never come across the vec2mat function before.

Jelly, 8 bytes
’Ṗ×+€ṖḊ€

A monadic link taking m and returning a list of lists (the inner rows).
Try it online!
How?
’Ṗ×+€ṖḊ€ - Link m                    e.g. 5
’        - decrement                      4
 Ṗ       - pop (implicit range of input)  [1,2,3]
  ×      - multiply by m                  [5,10,15]
     Ṗ   - pop m                          [1,2,3,4]
   +€    - add €ach                       [[6,7,8,9],[11,12,13,14],[16,17,18,19]]
      Ḋ€ - dequeue €ach                   [[7,8,9],[12,13,14],[17,18,19]]

Didn't feel like doing the python one ;)?

Haskell, 31 bytes
f m=[i|i<-[m..m*m-m],mod i m>1]

Try it online!
Math version:
f(m) = {i : i ∈ (m, m² - m), i mod m < 1}

:P

Wait, this isn't valid, f(5) should be 7,8,9,12,13,14,17,18,19

Wait, oops I'm a dumbass.

R, 44 43 32 bytes
function(n)(x=n:(n^2-n))[x%%n>1]

Try it online!
Returns a vector.

Neat output format, is that by default how a matrix is output in R?

Yep, that's the print function for a matrix.

You can omit the second m in matrix(1:m^2,m,m,T): matrix(1:m^2,m,,T)

@JAD yes, of course. Thanks.

Nice one, what do you think about using scan()? You might save 2 bytes. Try it online!

Pure Bash, 49
The boring answer:
for((i=$1;i++<$1*$1-$1;));{ ((i%$1>1))&&echo $i;}

Try it online.

Or the interesting answer for 52:
(($1>2))&&eval echo \$[$1*{1..$[$1-2]}+{2..$[$1-1]}]

Try it online.

Wolfram Language (Mathematica), 31 bytes
Table[# i+j+1,{i,#-2},{j,#-2}]&

Try it online!

Jelly, 8 bytes
sÆ½ḊṖ$⁺€

Try it online!

Using m one could do ²s⁸ḊṖ$⁺€ too. (I have also posted another m alternative method.)

@JonathanAllan Already discovered that, but no byte saving over there, you can't remove the ⁸ :(

Proton, 28 bytes
k=>filter(u=>1<u%k,k..k*~-k)

Try it online!
Takes m as input.
How?
Filters the integers in [k, k2-k) that, when divided by k, yield a remainder higher than 1. This ensures that both ends are trimmed, because the first one yields 0 and the last one yields 1. It is also guaranteed to return a higher value for any valid integer, because they are consecutive.

MATL, 8 bytes
:G\1>&*f

Input is m. Output is the numbers in increasing order.
Try it online!
Explanation
Consider input 4 as an example.
:     % Implicit input: m. Push range [1 2 ... m-1 m]
      % STACK: [1 2 3 4]
G\    % Modulo m, element-wise
      % STACK: [1 2 3 0]
1>    % Greater than 1, element-wise.
      % STACK: [0 1 1 0]
&*    % Matrix of pair-wise products
      % STACK: [0 0 0 0;
                0 1 1 0;
                0 1 1 0;
                0 0 0 0]
f     % Column vector of linear indices of nonzeros. Implicit display
      % STACK: [ 6;
                 7;
                10;
                11]

APL (Dyalog Classic), 14 bytes
1+⊢⊥¨∘⍳2⍴0⌈-∘2

Try it online!

Japt, 14 bytes
²õ òU ÅkJ ®ÅkJ

Takes m as input
Explanation
 ²õ òU ÅkJ ®ÅkJ
                // U = input                         | 3
U²              // U squared                         | 9
  õ             // Range [1...U²]                    | [1,2,3,4,5,6,7,8,9]
    òU          // Cut into slices of U              | [[1,2,3],[4,5,6],[7,8,9]]
       Å        // Remove the first item             | [[4,5,6],[7,8,9]]
        kJ      // Remove the last item              | [[4,5,6]]
           ®    // Map:                              |
            ÅkJ //   Remove the first and last items | 5

Try it online!

The solution that takes n is also 14 bytes:
õ òU¬ ÅkJ ®ÅkJ

Try it online!

Batch, 85 bytes
@for /l %%i in (3,1,%1)do @for /l %%j in (3,1,%1)do @cmd/cset/a(%%i-2)*%1+%%j-1&echo(

I can't easily loop from 2 to m-1 so I loop from 3 to m and adjust in the calculation.

Pari/GP, 26 bytes
n->[x|x<-[n..n^2-n],x%n>1]

Try it online!

Japt, 12 bytes
I spent so long golfing the extraction of elements that I ran out of time to golf the array generation. I'm also only now noticing that we can take n as input instead so I may be able to save something there. To be revisited
...
òUnU²)òU m¤c

Try it

Explanation
                 :Implicit input of integer U=m     :e.g., 4
   U²            :U squared                         :16
 Un              :Minus U                           :12
ò                :Range [U,U**2-U]                  :[4,5,6,7,8,9,10,11,12]
      òU         :Partitions of length U            :[[4,5,6,7],[8,9,10,11],[12]]
         m       :Map
          ¤      :  Remove first 2 elements         :[[6,7],[10,11],[]]
           c     :Flatten                           :[6,7,10,11]

Husk, 9 bytes
‼ȯTthS↑CN

Try it online!
Explanation
‼ȯTthS↑CN  Implicit input, say m=4.
       CN  Cut the natural numbers by m: [[1,2,3,4],[5,6,7,8],[9,10,11,12],..
     S↑    Take first m lists: [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
‼ȯ         Do this twice:
    h       Remove last row,
   t        remove first row,
  T         transpose.
           Result is [[6,7],[10,11]]; print it implicitly.

05AB1E, 9 bytes
LItä¦¨ε¦¨

Try it online!

LItä¦¨ε¦¨ is fine, the output can be a 2D array.

Oh, I should have read the spec better. Thanks for the heads-up!

Bash + GNU utilities, 35
seq $1 $[$1*$1-$1]|sed 1~$1d\;2~$1d

Try it online.

J, 23 19 bytes
-4 bytes thanks to FrownyFrog!
1 1}:@}.-@%:}:\1+i.

Try it online!
My original olution:
J, 23 bytes
[:|:@}:@}.^:2-@%:]\1+i.

Takes n as input, returns a matrix
How it works
1+i. - generates a list 1..n
-@%: - finds the square root of n and negates it (m)
]\ - makes a table (matrix) m x m from the list
^:2 - do the following twice:
|:@}:@}. - drop the first row, then drop the last row, then transpose
[: - cap the fork
Try it online!

1}:@}.-@%:}.@}:\1+i.

No, 1 1}:@}.-@%:}:\1+i.

@FrownyFrog - Cool, thanks! I didn't know about the list left argument of }.

Python 2, 44 bytes
lambda t:[k for k in range(t,~-t*t)if k%t>1]

Try it online!
I promise this is my last answer (to this challenge) today. Takes m as input.

Julia 0.6, 36 bytes
m->reshape(1:m*m,(m,m))[2:m-1,2:m-1]

Try it online!

Ruby, 32 bytes
->m{(m..m*m-m).reject{|e|e%m<2}}

Takes m, returns a one-dimensional array.
Try it online!

TI-BASIC, 44 43 bytes (tokenized)
DC 4D 3F CE 4D 6D 32 3F CF 3F DE 2A 08 09 3F D0 3F 4D 71 32 3F 23 4D 70 32 70 58 70 32 B1 58 83 72 11 2B 58 2B 30 2B 72 0D 71 31

Readable version:
:Input M
:If M≤2
:Then
:Disp "{}
:Else
:M-2
:seq(M+2+X+2int(X/Ans),X,0,Ans²-1

It was unfortunately necessary to print empty lists manually since TI-BASIC does not normally allow that. If m were given greater than two, the code could be reduced to just 29 bytes.

Javascript (63 55 bytes)
m=>[...Array((m-2)*m)].map((x,i)=>i+m).filter(x=>x%m>1)

Explanation
m =>                    // function signature is m
    [...Array((m-2)*m)] // create an array of size m^2 - 2m,
                        // m^2 is the full array size, taking out 2m removes the top and bottom edges
                        // filled with undefined
    .map((x,i)=>i+m)    // fill with values m to n-m
                        // (skips the top and bottom edges of the square)
    .filter(x=>x%m>1)   // filter out x%m < 2, the left and right sides of the square

You only use n once, so you can just use m*m directly. Also, the JavaScript (ES6) tips page has a tip for getting rid of fill.

You're right n=m*m is a holdover from a previous iteration when I had multiple references to n. And thanks for the tip on .fill, I figured there was a way to golf it, but I hadn't considered [...Array(x)].

Pyt, 13 bytes
ĐĐ⁻⁻ř*⇹⁻⁻ř⁺ɐ+

Port of Jonathan Allan's Jelly answer
Explanation:
                    Implicit input (takes m)
ĐĐ                  Triplicate the input (push it on the stack two more times)
  ⁻⁻                Decrement top of stack twice
    ř               Push [1,2,...,m-2]
     *              Multiplies by m
      ⇹             Swaps top two items on stack
       ⁻⁻           Decrement (m-2 is now on top)
         ř          Push [1,2,...,m-2]
          ⁺         Increment each element by 1
           ɐ+       Add [2,3,...,m-1] to each element of [m,2m,...,m(m-2)]
                    Implicit print

Try it online!

Perl, 30 29 bytes
perl -E 'say$_+=@a+2for(@a=2..~-<>)x@a' <<< 4

JavaScript, 47 bytes

  m=>{for(i=m;++i<m*m-m;)if(i%m>1)console.log(i)} // here's the 47-byte script

Also, 49 bytes:

  m=>{for(i=m;(i%m>1&&console.log(i))|++i<m*m-m;);} // here's the 49-byte script

Your solution presumes the input is assigned to a predefined variable, which we don't permit.

Not only that, but this solution isn't a function or a full program and relies on other variables and values. For this to be considered valid, either rewrite this as a function or a full program (asking for input with prompt()). Here's a sub-optimal 55 bytes long solution for you: (m,a=[])=>{for(i=m;++i<m*m-m;)if(i%m>1)a[i]=i;return a}

Fixed in accordance with rules.

You can golf it further by switching to an arrow function: m=>{for(i=m;++i<m*m-m;)if(i%m>1)console.log(i)}, 47 bytes.

alert is shorter than console.log. Welcome to PPCG, by the way.

Clean, 45 bytes
import StdEnv
$m=[i\\i<-[m..m*m-m]|i rem m>1]

Try it online!
This is just totallyhuman's Haskell answer but in Clean.

Python, 111 bytes
def f(s):
 r=[]
 for i in[i[1:-1]for i in[[(j*s)+i+1 for i in range(s)]for j in range(s)][1:-1]]:r+=i
 return r

Pyth, 10 bytes
mtPdtPcQS*

Try it here!
Takes m as input.

Alternative

Java 8, 241 183 170 162 160 132 122 bytes
j->{if(j<3)return new int[1];int e[]=new int[j*j-4*j+4],x=0,i=0;for(;++i<=j*j;)if(!(i<j|i>j*j-j|i%j<2))e[x++]=i;return e;}

Try it online!
Java makes it very tough(lots of bytes) when you have to create an array of somewhat "unknown" size.

-8 bytes thanks to Magic Octopus Urn
-28 bytes thanks to Mr. Xcoder
-10 bytes thanks to Kevin Cruijssen

Also, yes, Java is rough for code-golf. But you're obviously good at it. Man, you need to check out this language called Groovy it's basically shorthand Java.

132 bytes by removing an extra condition from the if statement, and various tricks.

122 bytes continuing @Mr.Xcoder's 132-byte version above by combining the int, changing the || to |, and removing the brackets of the single-line if-body.

101 bytes

Red, 63 62 bytes
f: func[n][repeat i(n - 2 * n)[if(a: n + i)// n > 1[print a]]]

Try it online!
This is a Red port of totallyhuman's Haskell / Mr. Xcoder's Python 2 solution

APL, 28 Bytes
Will run given value for m
1 1↓¯1 ¯1↓m m⍴⍳m*2

Try it...
Explanation
m*2 squares m
⍳m*2 gets list from 1 to m*2
m m⍴⍳m*2 wraps list to m by m matrix
¯1 ¯1↓m m⍴⍳m*2 drops -last row an column
1 1↓¯1 ¯1↓m m⍴⍳m*2 drops first row and column

Welcome to the site! Could you provide some way to test the submission, such as a link to an online interpreter so that others can tell that it is a working solution?


text:
Program Sequence Generator
Your challenge is to implement a cyclic Program Sequence Generator (PSG) in a language of your choice.
Given a language, L, a PSG in L is a program in L that outputs a PSG in L. Some properties of a PSG are:

Repeated execution of a PSG in L generates a sequence of programs in L.
A PSG is said to be cyclic if the sequence it generates is cyclic.
The period of a cyclic PSG, P, is written T(P) and is the period of the cycle in the sequence it generates. The period of a non-cyclic PSG is written the same way and is infinite.

A trivial example of a PSG is a quine; any quine is a cyclic PSG with period 1.
To make this challenge interesting, the period of your PSG must be at least 5.
Scoring is a bit different than typical code golf. Informally, your score is the sum of the length of all programs in one cycle of the sequence generated by your PSG divided by the period of your PSG. Formally: let P be your PSG, pₙ be the nth term in your PSG's sequence, and l(pₙ) be the length in bytes of pₙ. Then your score is:

For a non-cyclic PSG, since the limit of l(pₙ) as n goes to infinity is infinity, the score of any non-cyclic PSGs diverges to infinity.
The PSG with the lowest score wins

Oh, you never said, are we trying to get a HIGH score or a LOW score? I'm assuming high.

Golfers beware: there is an error in my formal score formula because it assumes a sequence cycles back to p¹, when in reality it could only start being cyclic for some larger value of n. Unfortunately I don't have time to fix it immediately, but use the intuition. from the informal definition for now.

The correct formula would have m go to infinity instead of T(P)

@Vaelus the limit is the same in either case, one is just easier to compute.

It's the same for non-cyclic PSGs but not, for instance, for a program that outputs a quine but isn't one itself.

JavaScript (ES6), score 50 49 48 47 37
Saved 10 points thanks to @alephalpha
(f=x=>alert(`(f=${f})(${++x%5})`))(0)

Period is 5, each program is 37 bytes long. The 0 is changed to 1, 2, 3, 4, then back to 0.

(f=x=>alert(`(f=${f})(${++x%5})`))(0)

@alephalpha D'oh, I should've known there was a better alternative to .replace()... Thanks!

JavaScript (ES6), score 77 74 66
The period of this PSG is 5.  Each iteration of the sequence removes one asterisk in the block comment until it reaches 2, then goes back to 6.
f=_=>/**/`f=${f}`.replace('**/','*/').replace('/*\/','/******/')

Let's look at some partial sums to see what the limit approaches.
m     1     2     3     4     5
score 64    66    66.33 66.25 66

Edit: thanks to @ETHproductions for pointing out that I should put the comment first.  Not only is the code much shorter, it appears neater!

I like the clever use of otherwise unnecessary string escapes.

Would the backslashes be necessary if you moved the comment to the front?

The length of your PSG seems to be 75, meaning the score comes out to 77. Am I missing something?

@Vaelus Sorry, when I looked at the length of the code (I didn't count manually), it was ignoring the \\s. I counted them correctly this time though.

I believe you can actually remove the braces and the return and it will still work :-)

@ETHproductions I tried that before when I had the comment at the end, but it didn't work.  However with it at the front, now it does!  Thanks :D

Python 2, score 119 89
s='s=%r;c=0;s=s[:7]+`c+1-c/4*5`+s[8:];print s%%s';c=0;s=s[:7]+`c+1-c/4*5`+s[8:];print s%s

Try it online!
The period of my PSG is 5. Each program is 89 bytes in length. Therefore, my score is 89.
-30 bytes thanks to ovs.

Pari/GP, score 38
(f=(x)->print1("(f="f")("x++%5")"))(0)

Period is 5.
Try it online!

I didn’t notice the trailing newlines. Interestingly, your first version actually had a score of 38 too, since it settles into a cycle where each program has a trailing newline.


text:
Fill in the Bracks
Normal brackets ((),[],<> and {}) are nice and unambiguous, however someone thought it would be a good idea to use non bracket characters as brackets.  These characters, | and ", are ambiguous.  For example does
""""

correspond to
(())

or
()()

It is impossible to tell.
Things start to get interesting when you mix types of ambiguous brackets, for example
"|""||""|"

Could be any of the following
([(([]))]),([()[]()]),([()][()])

Task
Your task is to take a string made of ambiguous characters and output all the possible balanced strings the author could have intended.
More concretely you output all balanced strings that can be made replacing | with either [ or ] and " with either ( or ).  You should not output any balanced string twice.
IO
As input you should take a string consisting of | and ".  If you would like to select two distinct characters other than | and " to serve as replacements you may do so.  You should output a container of balanced strings. You may choose to replace [] and () in the output with any other two bracket pairs ((),[],<> or {}) you wish.  Your output format should be consistent across runs.
Scoring
This is code-golf so answers will be scored in bytes with fewer bytes being better.
Test cases
"" -> ["()"]
"|"| -> []
||| -> []
"""" -> ["(())","()()"]
""|| -> ["()[]"]
"|"||"|" -> ["([([])])"]
"|""||""|" -> ["([(([]))])","([()[]()])","([()][()])"]

waits for a BrainFlak answer

Can we use integers instead of strings? What about lists of digits or integers?

@Zgarb Sure that's fine

Python 2, 135 bytes
s=input()
for k in range(2**len(s)):
 try:c=''.join("[]() , ,"[int(c)|k>>i&1::4]for i,c in enumerate(s));eval(c);print c[::2]
 except:0

Try it online!
Expects input like 2002 instead of "||", and wrapped in quotes.
Iterates over all 2N possible assignments of "open" and "close" to the string, creating strings c like:
"( [ ( ),],[ ( ),],),( ),"

If eval-ing this string throws an exception, it is unmatched. If not, we print  c[::2], giving:
([()][()])()

Retina, 59 56 55 bytes
0`"
<$%">
}0`'
{$%"}
.+
$&_$&
+m`^_|(<>|{})(?=.*_)

A`_

Try it online! Unfortunately testing for two sets of matched brackets exceeds the golfiness of a single .NET regex, so it saves 15 bytes to check manually. Edit: Saved 3 4 bytes thanks to @H.PWiz. Explanation:
0`"
<$%">

Find a " and make two copies of the line, one with a < and one with a >. Do this one " at a time, so that each " doubles the number of lines.
}0`'
{$%"}

Similarly with ', { and }. Then, keep replacing until all "s and 's on all copies have been replaced.
.+
$&_$&

Make a duplicate of the brackets, separated by a _.
+m`^_|(<>|{})(?=.*_)

In the duplicate, repeatedly delete matched brackets, until none are left, in which case delete the _ as well.
A`_

Delete all lines that still have a _.
Retina, 74 71 70 bytes
0`"
<$%">
}0`'
{$%"}
Lm`^(.(?<=(?=\3)(<.*>|{.*}))(?<-3>)|(.))+(?(3)_)$

Try it online! Explanation: The first two stages are as above. The third stage directly prints the result of matching two sets of matched brackets. This uses .NET's balancing groups. At each stage in the match, the regex tries to match a character, then look back for a pair of matching brackets, then check that the top of the stack matches the open bracket. If it can do this, it means that the bracket balances, and the open bracket gets popped from the stack. Otherwise, the assumption is that we're at an open bracket that needs to be pushed to the stack. If these assumptions don't hold then the stack will not be empty at the end and the match will fail.
Alternative approach, also 74 71 bytes:
Lm`^((?=(<.*>|{.*})(?<=(.))).|\3(?<-3>))+(?(3)_)$

Here, we look ahead for either <...> or {...}, then look behind to push the closing bracket on to the stack. Otherwise, we need to match and pop the closing bracket that we captured earlier. In this version the regex might not even make it to the end of the string, but some strings such as <<<> would slip through the net if we didn't check for an empty stack.

You can save some bytes on escaping by using different characters

@H.PWiz Ah, I must have overlooked that bit about using alternative bracket pairs, thanks!

You can also change | in the input

Perl, 56 55 53 bytes
Includes +1 for n
uses [ for [] and { for {}
perl -nE 's%.%"#1$&,+\\$&}"^Xm.v6%eg;eval&&y/+//d+say for< $_>' <<< "[{[[{{[[{["

Generates all 2^N possibilities, then uses perl eval to check if a string like '+[+{}]' is valid code and if so removes the + and prints the result

Husk, 19 bytes
fo¬ω`ḞoΣx½¨÷₂¨ΠmSe→

Try it online!
Uses the characters ds in the input, and the corresponding bracket pairs de and st in the output.
Explanation
The idea is to generate all possible bracketings of the input and keep those that reduce to the empty string when we repeatedly remove adjacent brackets.
The ¨÷₂¨ is a compressed string that expands into "dest", which was chosen because it has a short compressed form and consists of character pairs with adjacent codepoints.
Thus the program is equivalent to the following.
fo¬ω`ḞoΣx½"dest"ΠmSe→  Implicit input, say "ddssdd".
                 m     Map over the string:
                  Se    pair character with
                    →   its successor.
                       Result: ["de","de","st","st","de","de"]
                Π      Cartesian product: ["ddssdd","ddssde",..,"eettee"]
f                      Keep those strings that satisfy this:
                        Consider argument x = "ddsted".
   ω                    Iterate on x until fixed:
         ½"dest"         Split "dest" into two: ["de","st"]
    `Ḟ                   Thread through this list (call the element y):
        x                 Split x on occurrences of y,
      oΣ                  then concatenate.
                          This is done for both "de" and "st" in order.
                        Result is "dd".
 o¬                    Is it empty? No, so "ddsted" is not kept.
                      Result is ["destde","ddstee"], print implicitly on separate lines.

APL (Dyalog Classic), 55 53 bytes
{a/⍨~×≢¨'\(\)|\[]'⎕r''⍣≡a←⊃∘'()[]'¨¨(⊂'".'⍳⍵)+,⍳2⊣¨⍵}

Try it online!

Clean, 203 186 179 bytes
?['(':l][')':t]= ?l t
?['[':l][']':t]= ?l t
?l[h:t]= ?[h:l]t
?[][]=True
?_ _=False
@['"']=[['('],[')']]
@['|']=[['['],[']']]
@[h:t]=[[p:s]\\[p]<- @[h],s<- @t]
$s=[k\\k<- @s| ?[]k]

Try it online!
Uses only pattern-matching and comprehensions.

Perl, 56 bytes
Includes + for n
Uses input [ for output [ or ]
Uses input { for output { or }
perl -nE '/^((.)(?{$^R.$2})(?1)*\2(?{$^R.=$2^v6}))*$(?{say$^R})^/' <<< "[{[[{{[[{["

Uses a perl extended regex to match braces while keeping track of the choices made during backtracking. This can be much more efficient than generating all 2^N candidates since it already rejects many impossible assignments while partway through the input string

Kotlin, 240 236 234 bytes
fold(listOf("")){r,c->r.flatMap{i->when(c){'"'->"()".map{i+it}
else->"[]".map{i+it}}}}.filter{val d=ArrayList<Char>()
it.all{fun f(c:Any)=d.size>1&&d.removeAt(0)==c
when(it){')'->f('(')
']'->f('[')
else->{d.add(0,it);1>0}}}&&d.size<1}

Beautified
    fold(listOf("")) {r,c ->
        r.flatMap {i-> when(c) {
            '"'-> "()".map {i+it}
            else -> "[]".map {i+it}
        }}
    }.filter {
        val d = ArrayList<Char>()
        it.all {
            fun f(c:Any)=d.size>1&&d.removeAt(0)==c
            when(it) {
                ')' -> f('(')
                ']' -> f('[')
                else -> {d.add(0,it);1>0}
            }
        } && d.size<1
    }

Test
private fun String.f(): List<String> =
fold(listOf("")){r,c->r.flatMap{i->when(c){'"'->"()".map{i+it}
else->"[]".map{i+it}}}}.filter{val d=ArrayList<Char>()
it.all{fun f(c:Any)=d.size>1&&d.removeAt(0)==c
when(it){')'->f('(')
']'->f('[')
else->{d.add(0,it);1>0}}}&&d.size<1}

data class Test(val input: String, val outputs: List<String>)

val tests = listOf(
    Test("""""""", listOf("()")),
    Test(""""|"|""", listOf()),
    Test("""|||""", listOf()),
    Test("""""""""", listOf("(())","()()")),
    Test("""""||""", listOf("()[]")),
    Test(""""|"||"|"""", listOf("([([])])")),
    Test(""""|""||""|"""", listOf("([(([]))])","([()[]()])","([()][()])"))
)

fun main(args: Array<String>) {
    for ((input, output) in tests) {
        val actual = input.f().sorted()
        val expected = output.sorted()
        if (actual != expected) {
            throw AssertionError("Wrong answer: $input -> $actual | $expected")
        }
    }

Edits

-4 jrtapsell - Reworked checking predicate
-2 jrtapsell - true -> 1>0 and == 0 -> < 1

C (gcc), 315 bytes

Thanks to ceilingcat for 19 bytes.

j,b;B(char*S){char*s=calloc(strlen(S)+2,b=1)+1;for(j=0;S[j];b*=(S[j]<62||*--s==60)*(S[j++]-41||*--s==40))S[j]==60?*s++=60:0,S[j]<41?*s++=40:0;return*s>0&*--s<1&b;}f(S,n,k)char*S;{if(n<strlen(S))for(k=2;k--;)S[n]==46-k-k?S[n]=40+k*20,f(S,n+1),S[n]=41+k*21,f(S,-~n),S[n]=46-k-k:0;else B(S)&&puts(S);}F(int*S){f(S,0);}

Try it online!

C (gcc), 334 bytes (old version)
j,b;B(char*S){char*s=calloc(strlen(S)+2,1)+1;for(b=1,j=0;S[j];j++){if(S[j]==60)*s++=60;if(S[j]<41)*s++=40;b*=!(S[j]>61&&*--s!=60)*!(S[j]==41&&*--s!=40);}return*s>0&*--s<1&b;}f(S,n,k)char*S;{if(n>=strlen(S))return B(S)&&puts(S);for(k=0;k<2;k++)S[n]==46-k-k&&(S[n]=40+k*20,f(S,n+1),S[n]=41+k*21,f(S,-~n),S[n]=46-k-k);}F(char*S){f(S,0);}

Try it online!

Explanation (old version)
j,b;B(char*S){                   // determine if string is balanced
 char*s=calloc(strlen(S)+2,1)+1; // array to store matching brackets
 for(b=1,j=0;S[j];j++){          // loop through string (character array)
  if(S[j]==60)*s++=60;           // 60 == '<', opening bracket
  if(S[j]<41)*s++=40;            // 40 == '(', opening bracket
  b*=!(S[j]>61&&*--s!=60)*       // 62 == '>', closing bracket
   !(S[j]==41&&*--s!=40);}       // 41 == ')', closing bracket
 return*s>0&*--s<1&b;}           // no unmatched brackets and no brackets left to match
f(S,n,k)char*S;{                 // helper function, recursively guesses brackets
 if(n>=strlen(S))                // string replaced by possible bracket layout
  return B(S)&&puts(S);          // print if balanced, return in all cases
 for(k=0;k<2;k++)                // 46 == '.', guess 40 == '(',
  S[n]==46-k-k&&(S[n]=40+k*20,   //  guess 41 == '(', restore
   f(S,n+1),S[n]=41+k*21,        // 44 == ',', guess 60 == '<',
   f(S,-~n),S[n]=46-k-k);}       //  guess 62 == '>', restore
F(char*S){f(S,0);}               // main function, call helper function

Try it online!

Can't you use GCC variable length arrays to get rid of the calloc ?

@TonHospel I would then, however, either need to convert the array to a pointer or introduce another index variable, which I do not know if it is worth it, since I am using *s++ at a few places.

char S[n],*s=S is still shorter than chars*s=calloc(n,1)

@TonHospel I do not really know why, though it does not seem to work.

@ceilingcat Thank you.


text:
Cops and Robbers: Redacted Primality (Cops' Thread)
This challenge was originally sandboxed by Magic Octopus Urn; I adopted and posted it with his permission.
This is the cops' thread. The robbers' thread is here.
The challenge

Step One: Write a piece of code (function or full program) which checks for primality.
Step Two: Remove pieces of your code by replacing characters with the symbol █.
Step Three: Post the redacted code on the cops thread.
Step Four: Wait for your code to be cracked and try to crack other's code.

For example, the Groovy code {it.isPrime()} could become {██.is█████()}.
 (This one would be stupidly easy to crack; also, I know, .isPrime() is not a Groovy method.)

Scoring
You must include your program's score in its submission. The score is defined as the ratio of redacted characters to characters. So if your program had 20 characters and 5 were redacted, your score would be 0.25. The Groovy code above would have a score of 0.5.

Rules

Your program only needs to handle positive integers. It should output a truthy value if the number is prime and a falsy value otherwise. Please specify in your answer what it outputs.
Your code may not contain any comments or unnecessary whitespace.
No hashing or cryptographic obfuscation.
Your code may be no more than 50% redacted (at least 1/2 the characters must be shown). This means that the highest possible score is 0.5.
If your answer is not cracked within a week you may mark it safe and edit in the intended crack.

Winning
The winner will be the lowest-scoring uncracked answer within two weeks of posting. In the case of a tie, whichever has the most votes will win. This thread is always open to more submissions, but the winner chosen after two weeks will be permanent.

What is the domain of the input? (i.e. is it all n >= 1 or all integers?)

@FryAmTheEggman [tag:status-completed]

It may be a good idea, given a conversation that has already happened in the comments of an answer, to discuss the spirit of your rule about comments. Generally, the code should be "golfed," in that it should not contain arbitrarily long variable names, etc, to achieve lower scores. This can't really be a rule (at least afaik) but I think it will be alright since the community can discourage obviously lame answers. I'm not certain, and definitely thought that this might make the challenge unclear, but I think that is the best way to go.

Again, if a scoring method is easily exploitable, it's broken.

Related :)

You should had characters at prime number positions are redacted. This would have encouraged shorter solutions because primes get less common as the numbers get larger

Snippet please?

Define "unnecessary whitespace"

Functoid, score = 14 / 223 ≈ 0.062780  [safe]
Y(yG(BK██)(B(S(BS(C(BC(C(BB(B(v
S(CB█)(█C█B>vK  BSBB())█K(BS(S?
>(KZ)(C(C(Bv>██        >   v██<
█)Sg3I)$; @>B(BS(b(C(BBI)Iv>(█g
())I)))I)IBB(C(b(CB(C())))<v)█C
I))I))0)))(C(BC(B(BB)(C(BBv>)))
]I))))I))>    >)█   $;@   >I)(B

Takes input as command-line argument and outputs True (prime) or False, try it online!
Hint (added 4 days after posting):

 The first and 4th █ are a red herring: The intended (and most likely every) solution's IP will follow the first line and reach the ? character.

Solution
Y(yG(BKL2)(B(S(BS(C(BC(C(BB(B(v
S(CBO)( C B>vK  BSBB())OK(BS(S?
>(KZ)(C(C(Bv>O)        >   vY <
^)Sg3I)$; @>B(BS(b(C(BBI)Iv>(yg
())I)))I)IBB(C(b(CB(C())))<v)-C
I))I))0)))(C(BC(B(BB)(C(BBv>)))
]I))))I))>    >)2   $;@   >I)(B

Try it online!
Explanation
Due to the randomness that comes from ? it's not possible to flatten the program. Here's the flat program with a question mark where a random expression will be:
Y(yG(BKL2)(B(S(BS(C(BC(C(BB(B(?(yg(KZ)(C(C(BB(BS(b(C(BBI)I))))(C(BC(b(C(BBI)I)))I))(C-))))I))I))0)))(C(BC(B(BB)(C(BBI)(B]I))))I)))2$;@

Full program:
Y{trial_division}      --  fix-point of {trial_division}
                 2     --  apply 2 (begin division with 2)
                  $    --  apply argument (work with the supplied input)
                   ;   --  print result as boolean
                    @  --  terminate program

The {trial_division}:
y                         -- recursive function with two arguments x,y
 G                        -- | base predicate: x >= y
  (BKL2)                  -- | base function:  BKL2 x y
                             |  ->             K(L2) x y
                             |  ->             L2 y
                             |  ->             2 <= y
        {recursive_call}  -- | recursive call

{recursive_call}, taking arguments f (self-reference), x and y (note 0 is the same as False)
  B (S(BS(C(BC(C(BB(B{divides}I))I))0))) (C(BC(B(BB)(C(BBI)(B]I))))I) f x y
->       (C(BC(C(BB(B{divides}I))I))0) x y (BC(B(BB)(C(BBI)(B]I)))) f I x y)
->       (C(BC(C(BB(B{divides}I))I))0) x y (BC(B(BB)(C(BBI)(B]I)))) f I x y)
->            (C(BB(B{divides}I))I) x y 0  (BC(B(BB)(C(BBI)(B]I)))) f I x y)
->            (C(BB(B{divides}I))I) x y 0  (   B(BB)(C(BBI)(B]I))   f x I y)
->                   {divides}      x y 0  (         C(BBI)(B]I)    f x y  )
->              if x `divides` y then 0 else         C(BBI)(B]I)    f x y
->                                                    f (B]I x)  y
->                                                    f (] x) y
->                                                    f (x+1) y

{divides} is ?(yg(KZ)(C(C(BB(BS(b(C(BBI)I))))(C(BC(b(C(BBI)I)))I))(C-))) where ? is randomly chosen (depending on the random direction) from:

Y
S(CBO)(CBO)
S(SB(KO))(BBSBKO)

These are all equivalent to each other, so {divides} becomes the fix-point of:
y                       -- recursive function with two arguments x,y
 g                      -- | base predicate: x > y
  (KZ)                  -- | base function:  KZ x y
                        -- |  ->              0 == y
      {recursive_call}  -- | recursive call

{recursive_call} is a pretty obfuscated expression that basically just does f x (y-x)

8086 DOS COM, 87 bytes, score 19/87 ~= 0.2183
Cracked by NieDzejkob
1└╣██1█╛ü ¼<█t<< u≈¼<█t█,0|/<██+ô≈ßô☺├δδâ√█|█╞█S█Y╣██9┘t█ë╪1╥≈±○╥t█Aδ∩╞█S█N┤█║S█═!├A
$

This is a COM program; expects number as a command line argument, outputs Y or N. Limit: 65535 because 16 bit processor (sizeof(int) would be 2). Newline is 0x0D 0x0A on this platform. Yes you count 20 █ instead of 19 █. One of them's a real █ and has not been substituted. Muhahaha.
The space in position 10 is actually a NUL byte. The symbol for NUL is the same as space in the old VGA font.

Will take forever to crack because there are about 0 relation between assembly (opcode) and machine code. / Is this Code page 437?

@user202729: Correct code page. DOS is CP437 unless stated otherwise.

Are you using an obscure DOS quirk to read the commandline parameters from $5881 instead of $0081, or is it a mistake? Do I need a true DOS installation?

@NieDzejkob: Wait what? I'm pretty sure it reads its command line from DS:0081. I'll double-check the hexdump when I get home but I don't expect to find anything.

@Joshua well, the ╛üX at the very beginning is mov si, 0x5881.

@NieDzejkob: Ah. Upload problem. I added a note to it.

Well, I don't even need these bytes. Cracked!

Swift 4, score 26 / 170 ≈ 0.153, safe
func p(n:Int)->Bool{func █(_ █:Int,_ █:Int)->Int{var h=(1...l).map{$0██m██
while(m=h.count,m██).1{h=[Int](h[█...])};return m}
return █>██&(█.███).index█j█n██0)>=█0}█=██l}

Try it online!
Intended Crack
func p(n:Int)->Bool{func j(_ l:Int,_ k:Int)->Int{var h=(1...l).map{$0},m=l
while(m=h.count,m>k).1{h=[Int](h[k...])};return m}
return n>1&&(2..<n).index{j(n,$0)>=$0}==nil}

Ungolfed
func p(n:Int)->Bool{
  func j(_ l:Int,_ k:Int)->Int{    // Modulus function (l mod k)
    var h=(1...l).map{$0},m=l      //  Create an array h of size l
    while(m=h.count,m>k).1{        //  While h has more than k elements:
      h=[Int](h[k...])             //   Remove k elements from h
    }
    return m                       //  Return the length of h (equal to k if l divides k)
  }
  return n>1&&                     // Test if n > 1
  (2..<n).index{j(n, $0)>=$0}==nil //  and no number from 2 to n-1 divides n
}

brainfuck, 37/540 bytes (score: 0.06851) (Cracked by Nitrodon)
>>>>>+>,[>++++++[-<-------->]<+>,]<[-[█<█<]++++++++++<]>[-]>>██[>█>>█>]+[<]<<[<]>█<<+>>[>]█>[>]█+[<]<<[<]>-█>]>>[->]<[-[[<]<]++++++++++<]>[-]>[<█]>]>[>]<[[█]<]<<<<<[<]<<██>>[>]<█[->+<]<█>>[>]<[-[[<]<]++++++++++<]>███>[<<]>[[[>]>████[<]<[-[[<]<]++++++++++<]>[-]>[█<]>]>[>]<[[-]>+[>]<-<[<]<]+<<<<<[<]>[[>]+[[>]>]>[>]>[-<+>]<[<]<[>+[<]>>-<<<<<[[<]<]>>███████>[[█]>]<]<[[<]<]<[█]>]>>>[[>]<->>]]>[[>]>]<<[[[█]<]<]<<<[█]<<█>>>[>]█[-[[<]<]++++++++++<]>>[[>]+[------->++<]>.+.+++++.[---->+<]>+++.>>]>[>]+[------->++<]>++.++.---------.++++.--------.

Try it online!
Prints "prime" if prime, "not prime" if composite. Technically works for arbitrary integers but times out on TIO for numbers above 6000

Cracked after working on this for several days.

Python 3, 388 bytes, .155, Cracked
Last-minute crack. Yes, this is the Miller-Rabin test.
I suppose probabilistic tests are allowed, uncertainty 2^-100
Well, a great hint in the previous sentence though
Made return value 0 as COMPOSITE and 1 as PROBABLY PRIME
*368 > 388 : Fixed the problem when z<4
import ██████
def f(z):
 if z<4:return z>>1
 d,s,n,e,c=██z,0,z,0,50
 while not ██1:d//=2;s+=1
 while n>0:n//=2;e+=1
 ███████████()
 while c>0:
  a=0
  while a<2or a>z-█:
   a,b=0,e
   while b>0:a=a*2+██████████████(0,1);b-=█
  x,r=███(█,█,z),██s
  if ██x and x!=██z:
   while r>0:
    x,r=███(█,█,z),██r
    if not ██x:return 0
    elif x==██z:break
   else:return 0
  c-=█
 else:return 1

Solution:
import random
def f(z):
 if z<4:return z>>1
 d,s,n,e,c=~-z,0,z,0,50
 while not d&1:d//=2;s+=1
 while n>0:n//=2;e+=1
 random.seed()
 while c>0:
  a=0
  while a<2or a>z-1:
   a,b=0,e
   while b>0:a=a*2+random.randint(0,1);b-=1
  x,r=pow(a,d,z),~-s
  if ~-x and x!=~-z:
   while r>0:
    x,r=pow(x,2,z),~-r
    if not ~-x:return 0
    elif x==~-z:break
   else:return 0
  c-=1
 else:return 1

I think having long strings like "COMPOSITE" violates the spirit of the rule "Your code may not contain any comments or unnecessary whitespace."

@Pavel Edited. Well I don't think the return values are comments or unnecessary whitespace though

It was technically valid. It was just cheap.

I don't think this terminates when z=2.

@Nitrodon Oops, it didn't terminate when z=3 either. Fixed

Cracked.  I didn't realize earlier that Miller-Rabin has a 3/4 probability of detecting composite numbers.

Mathematica, 97 bytes, score 0.2989690722 (Cracked)
f[x_]:=(██ToString███████████████;StringMatchQ[████Infinity,RegularExpression@"█\█\█{█\█+, ███"])

Strings! Regex! Primes?
There is such a thing as a primality checking regex, but that's not whats happening here.
This has been cracked, but the way I intended was quite different, so I won't reveal the intended solution yet.

Cracked.

Jelly, score 0.(142857) (cracked)
25██26█966836897364918299█0█1█65849159233270█02█837903312854349029387313█ị██v

Try it online!
Repost of my other answer, this time with a few more bytes revealed to avoid unintended cheats.

I can character-wise OR your two answers to get some bytes... probably I won't.

@user202729 Uh, something weird happened, I didn't intend to cover more chars...

Cracked.

095, score 0.20512820512 [Safe]
1id#█#=(DD#█#█{d_█%(█D0█]D}██s]D1.=[1s]

Prints 1 if prime, 0 if composite
Solution:
1id#2#=(DD#2#-{d_.%(rD0R]D}drs]D1.=[1s]

Octave, Score: 0.15 (86 bytes)
I revealed several more characters. I thought the winning criterion was highest score, not lowest.
@(x)eval([(str2num(cell2mat([cellstr(reshape('0█1███1█0█0█00',████))])')█'█')','(x)'])

Try it online!
Good luck =)

Cracked! This was a fun one.

Node JavaScript, score: 0.4
Here's where it works. Full program that takes input from first command line argument, and outputs to stdout.
Hopefully, a not-so-difficult solution to start this off.
Using this snippet to calculate score.
require███████████2<<2██>n█████rin█(b████████x)█████(9211█6830)██(a,c)=>a[c[0]██████████(c)]███████);d=███+n;q=████27775██9564,[502█59,█6])[█]);a=██q>0████r(n=q█a█&█-q-██)a██n%q?██0██(137152█8270,22288)(a)

Japt, 19 bytes, 0.315789... score, Safe
I don't know if I obscured more of this than I needed to, costing myself a better score.
█h8575¥█
█UâÊ█Ê█ █2

View solution (Explanation coming soon)

Jelly, score 0.(142857)
25██26█9668368973649182992051██5849159233270202█837903312854349029387313█████

Try it online!
Takes a command-line argument.
False = 0
True = 1

Certainly unintended crack.

@user202729 Eh, I should've revealed more, I'll repost. But I can't add that it was cracked until you post on the robbers thread. :P

JavaScript, 103 bytes, score 0.1923
x=>{if(x<4)return(!0);for(y=x>>>Math.log10(p=████;--y-1;(p=x/y%1)████if(██&&(███))break████return(███)}
Returns a boolean.
Unintended crack

Cracked!

Brain-Flak, Score: 35/134 = 0.2612 (cracked!)
(({████){██[████)█>(({}))<>}<>{}███{}((██({}))█████{}]██)({}(<>))<>{(({})){({}[()])<>}{}}{}<>([{}()]{})██[██()██(()█[()]██{}██}{}<>{})
Returns 1 for prime, 0 for composite.
This is a very hard language to try this challenge in, as the formatting is so restricted that it takes effort not to make it obvious what the missing character is.
This is a very hard language to solve this challenge in, as it is ridiculously hard to read.

Cracked

Java 1.4+, 24/145 (0.16551724137)
class X{public static void main(String[]args){System.out.println(new String(████████[Integer.parseInt(args[0])]).matches("█████████████")?███);}}

Try it online!

Weirdest way I've seen to prime check in Java by far lol.

cracked

Javascript, score 0.1894093686354379
let t=[2,3,3,3,3,3,3,5,7,5,7,5,7,7,11,12,13,11,13,13,1,2,17,13,2,3,17,19,23,29,19,19,41,23,23,29,23,"","",29,7,31,31,524,31,37,33,34,41]; function r(a, b) {█████████████████████████████████████████████████████████████};function l(t){let a=0;let b=[];while(true){b.push(t[a]);█████████████;if(!t[a]){return█████};function p(v) {let i=0;let a=r(2,v██);for (i in a){if(v%(█████████a█i██)==0){return false;}};return true;};function f(v){if(l(t).indexOf(v)!=-1){return true;}else{return p(v)};};

Good luck. :p
call f with the prime you want to check.

Unintended crack within less than 30 minutes. Not even use the array t.

Hum. I guess i didn't think about that one. This is just a preliminary warmup anyways :p
Nice job.

><>, score 0.096, cracked by Jo King
:1@v>~~:?1n;█$-1<█?=2:}*{█@:$@:

Intended crack:

:1@v>~~:?1n;
$-1<^?=2:}*{%@:$@:

I don't know ><> really well, but isn't the first v an unconditional infinite loop?

@NieDzejkob If you run the program as it is, yes, it will loop forever.

oh, I see it now...

Cracked

C, 34/76 = 0.447368, Safe
int p(int n){int r███████2;██r███r++)███+███n;████&███r));return███████n██;}

Having this many blanks means that I will be much more likely to get an unintended crack than the intended one.
Solution:

 int p(int n){int r=1,e=n%2;for(;(r++)*(r++)<n;e=e&&(n%r));return e?n>1:n<3;}

explanation:

 e holds a boolean value of whether or not the number is not prime (with a few special case exceptions). r iterates through the odd numbers less than or equal to the square root of n. return e?n>1:n<3; handles the special cases when n is 1 or 2.

M, score: 4/22 = .1818..., cracked by Dennis
███“;;█»VOḣ2S⁵++3Ọ;”Pv

This may end up with an unintended crack, we'll have to see. It did.
Dennis' solutions is
ÆPø“;;“»VOḣ2S⁵++3Ọ;”Pv

Try it online!
I will leave my solution hidden for someone to crack. My hint to Dennis on his robber submission was the word "zoo".

@user202729 I think you may be able to crack this

Cracked.

Pyth, score: ~0.(461538) (13 bytes) (Cracked)
█]█Q ██Q{█M█P

Try to crack it here!

Cracked.

I knew it was easily brute forceable...

Pyt, score: 0.288288... [Safe]
Đ2⇹█ŘĐĐŁ███⇹ʀĐ↔Đ5Ș↔⇹██=█ŕĐ↔Đ5Ș↔Đř█⇹█████↔Đ4Ș5Ș⇹██⇹3Ș°04Ș↔█3ȘĐŁ█3Ș05Ș↔█⇹04Ș0↔⇹██=█ŕ↔ŕĐĐŁ██↔██↔ŕŕŕŕ█↔████↔ŕŕŕ██¬¬

Outputs "True" if prime, "False" if not
Forgot to mention that it is a probabilistic test.
Solution:
Đ2⇹⁻ŘĐĐŁ₂`⁻⇹ʀĐ↔Đ5Ș↔⇹Ǥ1=?ŕĐ↔Đ5Ș↔Đř²⇹%∈2*⁻↔Đ4Ș5Ș⇹⁻₂⇹3Ș°04Ș↔+3ȘĐŁ⁺3Ș05Ș↔+⇹04Ș0↔⇹%+=?ŕ↔ŕĐĐŁ⁺⁺↔ł:↔ŕŕŕŕ;↔⁺⁻±?↔ŕŕŕ:;¬¬

This implements the Solovay-Strassen primality test.
Try it online here!

C, 66 bytes, 29 redacted, score 0.439
i;p(n){█████2███████ 0███████2;███;███)if(████)return 0;return 1;}

Just a simple C submission; I'll see how long this one takes before I post a really evil one.

Are you sure that the last block is supposed to be 4 characters long?

@NieDzejkob Yes.

sh + coreutils, score 19 / 143 ~= 0.1328
cracked
e█ec█s█ █c "██████WyAkKHNoIC1jICJg█WNobyBabUZqZEc5eWZIUnlJQ2█2SnlBblhHNG5m██JoYVd3Z0t6SjhkMk1nTFhjSyB8YmFzZTY0IC1kYCIpIC1lcSAxIF0K█b█se6███d`"

TIO

@MDXF: Base64 is encoding, not encryption. There's no key to crack.

Can you include a TIO link? (probably bash)

Cracked (3 hours ago).

Brain-Flak, score 29 / 140 = 0.207
({}██()██<>){██({}[()])██{}{}███({<({}[()])><>({})<>}{}██████{}██){(({})){({}[()])<>}{}}<>([{}()]{}<>{})<>}(<>██{}({}████)((){[()]██{}██}{})
Try it online!
Outputs 1 for prime and 0 for non-prime.

Tampio (imperative), score: 24/51 = 0.5
Luku on alkuluku,jos ████████████e███████ on █████.

This is an obvious solution, I hope no one here understands Finnish.

Tampio (imperative), score: 26/223 = 0.11659...
Luvun kokonaislukuarvot ovat riippuen siitä,onko se yksi,joko listan,jonka alkioita ovat yksi █████████████████████,alkiot tai █████ liitettynä sen alkutekijöihin.Luku on alkuluku,jos sen kokonaislukuarvojen summa on nolla.

Python 3, score: 0.386363, cracked
p=lambda x,i=2:█████or(x%i and ████████)████

Going for the really low hanging fruit at first. I'll come up with a cheeky answer soon.
user71546 made it "work" with
p=lambda x,i=2:i>=x or(x%i and p(x,i+1))or 0

...but that was unintended. Original code was
p=lambda x,i=2:i>x/2or(x%i and p(x,i+1))or 0

Neither work for x<2, turns out. Oops.

Cracked? Not working when x<2 though.

Ruby, 27/73 = 0.369863
def p n;███████(██n.times████a[2..-1].map{|s|█.██n████s}██.█*█|██})█);end

This should be fun.

JavaScript (ES7), 297 bytes, 103 redacted, .347
M=(N,X=N,F=(n,a=█████)=>a>1e-20?█████+F(n,█████████):1,G=(n,a=█████)=>a>1e-20?█████+G(n,███████):n==2?0:G(n-1),H=(n,a=█████)=>a>1e-20?█████-H(n,███████):0,I=n=>████████I(████),J=n=>I(n)*████+H(█████████-1),K=(n,l=n|0)=>(n-l>=.5)+l,L=(a,b)=>██████████(a)+█(b)████,Z=L(--N,N)██)=>L(Z,████M(N,X)██)██

My previous Python answer was too straightforward, so here's an evil one ;)
The logic behind is straightforward though.

Python 3, 48 bytes, 24 redacted, .5
def p(x):
  return ███(██████████████████(█,██))

Just a simple answer, probably gonna be solved in under 24 hours.