[Stack][1], 142 bytes:
'' input num `n set 2 `i set { n i % 0 = n 1 = or { 0 print } { i n 2 - gt { 1 print } { i 1 + `i set p } ifelse } ifelse } `p def p Your basic test every number from 2 to n primality test. [1]: https://github.com/StackLanguge/stack-language