Skip to main content
added 68 characters in body
Source Link
Sp3000
  • 62.3k
  • 13
  • 117
  • 292

><>, 7 bytes

i2%:n:, 

This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).

Just for reference, exiting cleanly without errors is an extra byte:

i2%:n?!; 

><>, 7 bytes

i2%:n:, 

This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).

><>, 7 bytes

i2%:n:, 

This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).

Just for reference, exiting cleanly without errors is an extra byte:

i2%:n?!; 
Source Link
Sp3000
  • 62.3k
  • 13
  • 117
  • 292

><>, 7 bytes

i2%:n:, 

This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).