Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Japt, 182 179 bytes

Japt is a shortened version of JavaScript. InterpreterInterpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"„\xA1⅋,'˙¿∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"g(Q+"!&',.?"+65o124 m@Xd)a)bX)||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: SpV-Xl)+ // Pad it with spaces, then concatenate it with Xw m@ // X reversed, with each character X mapped to: "..."g // The character at position N in the string, where N is: (Q+"!&',.?" // Build a string from a quote mark and these chars, 65o124 m@Xd)a) // and all chars from A..z. bX) // Return the index of X in this string. ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ@Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \xA1, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

#Japt, 182 179 bytes

Japt is a shortened version of JavaScript. Interpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"„\xA1⅋,'˙¿∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"g(Q+"!&',.?"+65o124 m@Xd)a)bX)||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: SpV-Xl)+ // Pad it with spaces, then concatenate it with Xw m@ // X reversed, with each character X mapped to: "..."g // The character at position N in the string, where N is: (Q+"!&',.?" // Build a string from a quote mark and these chars, 65o124 m@Xd)a) // and all chars from A..z. bX) // Return the index of X in this string. ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \xA1, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

#Japt, 182 179 bytes

Japt is a shortened version of JavaScript. Interpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"„\xA1⅋,'˙¿∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"g(Q+"!&',.?"+65o124 m@Xd)a)bX)||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: SpV-Xl)+ // Pad it with spaces, then concatenate it with Xw m@ // X reversed, with each character X mapped to: "..."g // The character at position N in the string, where N is: (Q+"!&',.?" // Build a string from a quote mark and these chars, 65o124 m@Xd)a) // and all chars from A..z. bX) // Return the index of X in this string. ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \xA1, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

added 328 characters in body
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

#Japt, 182182 179 bytes

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"\xA1„#$%⅋m@"„\xA1⅋,'˙¿∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"g()*+'-˙/0123456789:;<=>¿@∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"gXc -33Q+"!&',.?"+65o124 m@Xd)a)bX)||X +R:X+R 
 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: SpV-Xl)+ // Pad it with spaces, then concatenate it with Xw m@ // X reversed, with each character X mapped to: "..."gXc"g -33  // The character at position N in the string, where N is: (charcodeQ+"!&',.?" - 33// Build a string from a quote mark and these chars, 65o124 m@Xd)a) in// and all chars from A..z. bX)  // Return the index of X in this string,. ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

#Japt, 182 bytes

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"\xA1„#$%⅋,()*+'-˙/0123456789:;<=>¿@∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"gXc -33 ||X +R:X+R 
 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: "..."gXc -33 // The character at position (charcode - 33) in the string, ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

#Japt, 182 179 bytes

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"„\xA1⅋,'˙¿∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"g(Q+"!&',.?"+65o124 m@Xd)a)bX)||X +R:X+R 
 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: SpV-Xl)+ // Pad it with spaces, then concatenate it with Xw m@ // X reversed, with each character X mapped to: "..."g   // The character at position N in the string, where N is: (Q+"!&',.?" // Build a string from a quote mark and these chars, 65o124 m@Xd)a) // and all chars from A..z. bX)  // Return the index of X in this string. ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 
duh; edited body
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

#Japt, 182 bytes

Japt is a shortened version of JavaScript. Interpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"\xA1„#$%⅋,()*+'-˙/0123456789:;<=>¿@∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"gXc -33 ||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: "..."gXc -33 // The character at position (charcode - 33) in the string, ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \x0A\xA1, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

#Japt, 182 bytes

Japt is a shortened version of JavaScript. Interpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"\xA1„#$%⅋,()*+'-˙/0123456789:;<=>¿@∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"gXc -33 ||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: "..."gXc -33 // The character at position (charcode - 33) in the string, ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \x0A, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

#Japt, 182 bytes

Japt is a shortened version of JavaScript. Interpreter

Ur'.+".?"pV-1 ,@A++%2?SpV-Xl)+Xw m@"\xA1„#$%⅋,()*+'-˙/0123456789:;<=>¿@∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z[\\]^‾`ɐqɔpǝɟƃɥᴉɾʞlɯuodbɹsʇnʌʍxʎz"gXc -33 ||X +R:X+R 

###How it works

 // Implicit: U = input string, V = input number, A = 10 Ur // Take U and replace each group X of: '.+".?"pV-1 // at least one char, followed by up to V-1 other chars // literally: RegExp("." + ".?".repeat(V-1)) @ // with: (@ is compiled to (X,Y,Z)=>) A++%2? // If we're on an odd row: "..."gXc -33 // The character at position (charcode - 33) in the string, ||X // or if this number is outside the string, default to the original char. +R // Either way, add a newline. :X+R // Otherwise, return the original row text plus a newline. // Implicit: output last expression 

There are a couple of problems, but they shouldn't affect the validity of the program:

  1. User @Vɪʜᴀɴ has recently helped me implement Unicode Shortcuts, or single characters in the range 00A1-00FF that stand in for commonly-used several-char sequences. The problem with this is that it currently replaces inside strings, so we can't use ¡ directly in the string for now. The safe alternative, \xA1, is three bytes longer.
  2. It's currently impossible to input a double-quote character. This will be fixed shortly.

Perhaps there's a way to shorten the string. Suggestions are welcome!

Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading