Skip to main content
Commonmark migration
Source Link

#MATL, 22 21 bytes by Luis Mendo.

MATL, 22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 

#MATL, 22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 

MATL, 22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#MATL, 22 21 bytes by Luis Mendo.22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 

#MATL, 22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 

#MATL, 22 21 bytes by Luis Mendo.

Finally... MickyT cracked it while I was writing an explanation, so his answer is the "valid" one. I posted this anyway, in accordance with this meta post.


M and Y are unnecessary and are commented out. It's enough to add 4 whitespace characters, not 5.

t' @ *'dm1e5%M dw%Y ( 

This is equivalent to the more compact:

t' @ *'dm7dw( 

Partial explanation:

 % Implicit input t % Duplicate input ' @ *' % String with ASCII-values [32 64 32 42] d % diff, giving [32 -32 10], 32 is space, 10 is newline m % ismember, checking if the character is 32 or 10 1e5 % 10000, but could just as well be 7 d % Taking the diff of the scalar 1e5, returning an empty matrix [] w % Swap stack in order to use ( below ( % Equivalent to x(y)=[], where x is the input string, and y is the logical % vector found using ismember (m) % Implicit output 
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
added 120 characters in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 140
  • 304
Loading
added 1 character in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 140
  • 304
Loading
added 50 characters in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 140
  • 304
Loading
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 140
  • 304
Loading