Skip to main content
added 370 characters in body
Source Link
Dominic van Essen
  • 36.4k
  • 2
  • 22
  • 60

R, 6363 59 bytes

function(s)forwrite(x in rep(utf8ToInt(s),e=5)cat(x%%/%3^(4:0)%%3,' '1,sep='',,"")

Try it online!Try it online!

Nothing cleverNothing clever, but a straightforward implementation in R is shorter than anything else that I can think of so far...
To avoid the penalty of defining a base-conversion function to use on each character, butwe repeat each character value 5 times, and then use vectorized integer division (%/%) and modulo (%%) to calculate all the base-3 digits. Then, by lucky co-incidence, the write function splits its output data into a straightforward implementation in R is shorter than anything else that I can thinkcolumn width of so far..5 by default.

R, 63 bytes

function(s)for(x in utf8ToInt(s))cat(x%/%3^(4:0)%%3,' ',sep='')

Try it online!

Nothing clever, but a straightforward implementation in R is shorter than anything else that I can think of so far...

R, 63 59 bytes

function(s)write(rep(utf8ToInt(s),e=5)%/%3^(4:0)%%3,1,,,"")

Try it online!

Nothing clever, but a straightforward implementation in R is shorter than anything else that I can think of so far...
To avoid the penalty of defining a base-conversion function to use on each character, we repeat each character value 5 times, and then use vectorized integer division (%/%) and modulo (%%) to calculate all the base-3 digits. Then, by lucky co-incidence, the write function splits its output data into a column width of 5 by default.

Source Link
Dominic van Essen
  • 36.4k
  • 2
  • 22
  • 60

R, 63 bytes

function(s)for(x in utf8ToInt(s))cat(x%/%3^(4:0)%%3,' ',sep='')

Try it online!

Nothing clever, but a straightforward implementation in R is shorter than anything else that I can think of so far...