Skip to main content
Bounty Ended with 300 reputation awarded by Giuseppe
deleted 3 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

R, 205 153 147 136 132 127126 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.
-5 further thanks to Dominic van Essen

function(s,n=nchar(s),x=-n:n,r=abs(x))for(y in x*2(x=-n:n)*2)cat(ifelse((i=(t=y-2*r*2*(r=abs(x))*!r<y)*t-t-2*(r<y)*x+x+1)>n," ",substring(s,i,i)),"
")

Try it online!Try it online!

R, 205 153 147 136 132 127 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.
-5 further thanks to Dominic van Essen

function(s,n=nchar(s),x=-n:n,r=abs(x))for(y in x*2)cat(ifelse((i=(t=y-2*r*!r<y)*t-t-2*(r<y)*x+x+1)>n," ",substring(s,i,i)),"
")

Try it online!

R, 205 153 147 136 132 126 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.
-5 further thanks to Dominic van Essen

function(s,n=nchar(s))for(y in(x=-n:n)*2)cat(ifelse((i=(t=y-2*(r=abs(x))*!r<y)*t-t-2*(r<y)*x+x+1)>n," ",substring(s,i,i)),"
")

Try it online!

added 42 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

R, 205 153 147 136 132132 127 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.
-5 further thanks to Dominic van Essen

function(s,n=nchar(s),f=ifelse,r=abs(x<-x=-n:n,r=abs(x))for(y in-n:n*2 x*2)cat(fifelse((i=(t=y-2*r*!r<y)*t-t-f2*(r<y,x,-x)+1*x+x+1)>n," ",substring(s,i,i)),"
")

Try it online!Try it online!

R, 205 153 147 136 132 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.

function(s,n=nchar(s),f=ifelse,r=abs(x<--n:n))for(y in-n:n*2)cat(f((i=(t=y-2*r*!r<y)*t-t-f(r<y,x,-x)+1)>n," ",substring(s,i,i)),"
")

Try it online!

R, 205 153 147 136 132 127 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.
-5 further thanks to Dominic van Essen

function(s,n=nchar(s),x=-n:n,r=abs(x))for(y in x*2)cat(ifelse((i=(t=y-2*r*!r<y)*t-t-2*(r<y)*x+x+1)>n," ",substring(s,i,i)),"
")

Try it online!

added 6 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

R, 205 153 147 136136 132 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.

function(s){,n=nchar(s)
 ,f=ifelse
 ,r=abs(x<--n:n))for(y in-n:n*2){r=abscat(x<--n:n)
f((i=(t=y-2*r*!r<y
i=t*t)*t-t-f(r<y,x,-x)+1
cat(f(i>n)>n," ",substring(s,i,i)),"
")}}

Try it online!Try it online!

R, 205 153 147 136 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.

function(s){n=nchar(s)
 f=ifelse
 for(y in-n:n*2){r=abs(x<--n:n)
t=y-2*r*!r<y
i=t*t-t-f(r<y,x,-x)+1
cat(f(i>n," ",substring(s,i,i)),"
")}}

Try it online!

R, 205 153 147 136 132 bytes

-52 from Dominic van Essen.
-4 from Giuseppe.
-4 again thanks to Giuseppe.

function(s,n=nchar(s),f=ifelse,r=abs(x<--n:n))for(y in-n:n*2)cat(f((i=(t=y-2*r*!r<y)*t-t-f(r<y,x,-x)+1)>n," ",substring(s,i,i)),"
")

Try it online!

deleted 72 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62
Loading
added 9 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62
Loading
Fixed spelling of my name
Source Link
Dominic van Essen
  • 36.4k
  • 2
  • 22
  • 60
Loading
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62
Loading