Skip to main content
deleted 4 characters in body
Source Link
Razetime
  • 27.4k
  • 3
  • 29
  • 72

APL(Dyalog Unicode), 118 114 90 88 83 8380 bytes SBCS

{⊃,/⍪⌿⍵{(' ',⍺)[⍵]'⍺[⍵]}¨1+(⍺ ⍺∘⍴¨o(⌽o←∘.=⍨⍳⍺)i(⌽⍺/⍺↑1)(⍉⍺ ⍺⍴i←(⌈⍺÷2)=⍳⍺)0)['\/|_- '⍳⍵]}

Try it on APLgolf!Try it on APLgolf!

A dfn submission which takes a char matrix on the right and a scale factor on the left.

Indexes each character into its specific pattern, and then uses the original matrix to index back into it.

More byte saves can be done by figuring out a formula for getting the boolean arrays.

APL(Dyalog Unicode), 118 114 90 88 83 bytes SBCS

{⊃,/⍪⌿⍵{(' ',⍺)[⍵]}¨1+(⍺ ⍺∘⍴¨o(⌽o←∘.=⍨⍳⍺)i(⌽⍺/⍺↑1)(⍉⍺ ⍺⍴i←(⌈⍺÷2)=⍳⍺)0)['\/|_- '⍳⍵]}

Try it on APLgolf!

A dfn submission which takes a char matrix on the right and a scale factor on the left.

Indexes each character into its specific pattern, and then uses the original matrix to index back into it.

More byte saves can be done by figuring out a formula for getting the boolean arrays.

APL(Dyalog Unicode), 118 114 90 88 83 80 bytes SBCS

{⊃,/⍪⌿⍵{' '⍺[⍵]}¨1+(⍺ ⍺∘⍴¨o(⌽o←∘.=⍨⍳⍺)i(⌽⍺/⍺↑1)(⍉⍺ ⍺⍴i←(⌈⍺÷2)=⍳⍺)0)['\/|_- '⍳⍵]}

Try it on APLgolf!

A dfn submission which takes a char matrix on the right and a scale factor on the left.

Indexes each character into its specific pattern, and then uses the original matrix to index back into it.

More byte saves can be done by figuring out a formula for getting the boolean arrays.

deleted 100 characters in body
Source Link
Razetime
  • 27.4k
  • 3
  • 29
  • 72

APL(Dyalog Unicode), 118 114 90 88110 83 bytes SBCS

{⊃,/⍪⌿⍺∘⍪⌿⍵{(' ',)[1+⍺[⍵]}¨1+(⍺ ⍺⍴⍺{⍵='\':∘.=⍨⍳⍺⋄⍵='/':⌽∘.=⍨⍳⍺⋄'|'=⍵:⍺∘⍴¨o(⌈⍺÷2⌽o←∘.=⍨⍳⍺)=⍳⍺⋄'_'=⍵:i(⌽⍺/⍺↑1⋄'-'=⍵:⍺↑1)(⍉⍺ ⍺⍴⍺⍴i←(⌈⍺÷2)=⍳⍺⋄0}⍵]}¨⍵=⍳⍺)0)['\/|_- '⍳⍵]}

Try it on APLgolf!Try it on APLgolf!

A dfn submission which takes a characterchar matrix on the right and thea scale factor on the left.

Just runs a huge conditional forIndexes each character ininto its specific pattern, and then uses the original matrix. A possible way to improve this wouldindex back into it.

More byte saves can be to figuredone by figuring out a formula to generatefor getting the binaryboolean arrays required for each character.

APL(Dyalog Unicode), 110 bytes SBCS

{⊃,/⍪⌿⍺∘{(' ',)[1+⍺ ⍺⍴⍺{⍵='\':∘.=⍨⍳⍺⋄⍵='/':⌽∘.=⍨⍳⍺⋄'|'=⍵:(⌈⍺÷2)=⍳⍺⋄'_'=⍵:⌽⍺/⍺↑1⋄'-'=⍵:⍉⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄0}⍵]}¨⍵}

Try it on APLgolf!

A dfn submission which takes a character matrix on the right and the scale on the left.

Just runs a huge conditional for each character in the matrix. A possible way to improve this would be to figure out a formula to generate the binary arrays required for each character.

APL(Dyalog Unicode), 118 114 90 88 83 bytes SBCS

{⊃,/⍪⌿⍵{(' ',)[⍵]}¨1+(⍺ ⍺∘⍴¨o(⌽o←∘.=⍨⍳⍺)i(⌽⍺/⍺↑1)(⍉⍺ ⍺⍴i←(⌈⍺÷2)=⍳⍺)0)['\/|_- '⍳⍵]}

Try it on APLgolf!

A dfn submission which takes a char matrix on the right and a scale factor on the left.

Indexes each character into its specific pattern, and then uses the original matrix to index back into it.

More byte saves can be done by figuring out a formula for getting the boolean arrays.

deleted 8 characters in body
Source Link
Razetime
  • 27.4k
  • 3
  • 29
  • 72

APL(Dyalog Unicode), 118110 bytes SBCS

{⊃,/⍪⌿⍺∘{(' ',⍵)[1+⍺ ⍺⍴⍺{⍵='\':∘.=⍨⍳⍺⋄⍵='/':⌽∘.=⍨⍳⍺⋄'|'=⍵:⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄'_'=⍵:⊖1@1⊢⍺ ⍺⍴0⋄'⌽⍺/⍺↑1⋄'-'=⍵:⍉⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄⍺ ⍺⍴0=⍳⍺⋄0}⍵]}¨⍵}

Try it on APLgolf!Try it on APLgolf!

A dfn submission which takes a character matrix on the right and the scale on the left.

Just runs a huge conditional for each character in the matrix. A possible way to improve this would be to figure out a formula to generate the binary arrays required for each character.

APL(Dyalog Unicode), 118 bytes SBCS

{⊃,/⍪⌿⍺∘{(' ',⍵)[1+⍺{⍵='\':∘.=⍨⍳⍺⋄⍵='/':⌽∘.=⍨⍳⍺⋄'|'=⍵:⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄'_'=⍵:⊖1@1⊢⍺ ⍺⍴0⋄'-'=⍵:⍉⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄⍺ ⍺⍴0}⍵]}¨⍵}

Try it on APLgolf!

A dfn submission which takes a character matrix on the right and the scale on the left.

Just runs a huge conditional for each character in the matrix. A possible way to improve this would be to figure out a formula to generate the binary arrays required for each character.

APL(Dyalog Unicode), 110 bytes SBCS

{⊃,/⍪⌿⍺∘{(' ',⍵)[1+⍺ ⍺⍴⍺{⍵='\':∘.=⍨⍳⍺⋄⍵='/':⌽∘.=⍨⍳⍺⋄'|'=⍵:(⌈⍺÷2)=⍳⍺⋄'_'=⍵:⌽⍺/⍺↑1⋄'-'=⍵:⍉⍺ ⍺⍴(⌈⍺÷2)=⍳⍺⋄0}⍵]}¨⍵}

Try it on APLgolf!

A dfn submission which takes a character matrix on the right and the scale on the left.

Just runs a huge conditional for each character in the matrix. A possible way to improve this would be to figure out a formula to generate the binary arrays required for each character.

Source Link
Razetime
  • 27.4k
  • 3
  • 29
  • 72
Loading