Skip to main content
added 1102 characters in body
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

05AB1E, 88 4 distinct bytes

žĆISk'>×€"žĆ0ÿè"J…J[„)\ìNú₅ö©g₅Qi®ƒ„.g}¤…B.VJ?q

Try it online. No TIO of the actual program, since the output would be way too big. It basically encodes the input-program into a program using the approach I've also used in the Fewest (distinct) characters for Turing Completeness challenge.

Try it online (with ƒ„.g}¤…B.V replaced with "D>gB.V" so we push the number instead of that many .g or try it online (with ® replaced with 9 as an example).

Explanation:

žĆ[                            # PushStart thean 05AB1Einfinite code-pageloop:
 „)\ì  IS                      # Push Prepend ")\" in front of the (implicit) input, 
 and convert it to a list of characters
    k     # Get the index of each character in   #  Pad it with the codepageloop-stringindex amount of leading spaces
     '>× '# Convert₅ö each index to a string of that many repeated ">"-characters
€          # For eachConvert ">"it from a base-255 string: to a number
 "žĆ0ÿè"        ©                   #  MapStore itthis tonumber thein stringvariable "žĆ0ÿè",`®` (without popping)
          g₅Qi               #  whereIf the `ÿ`length of this number is automatically255:
 filled with            ®ƒ„.g}         #   Push `®` + 1 amount of ".g" to the ">"-stringstack
J                    ¤        # Join these stringsTail together(without popping): pushes "g"
 …J                    …B.V    # And append "JPush "B.V" 
 at                        J   #   Join the endstack together
      ?   # After which we output the string           ?  #   Output it without trailing newline
                           q #   And stop the program

This will produce a program with the 84 distinct bytes žĆ0>èJ.VgBV in the following format:

MultipleLoads and loads of žĆ0>...g for each character of the program we input (where theto push a huge number. Then one additional >...>g are between potentially none up+g to a maximum of 256 amount ofpush 255, followed by >B.V):.

  • Loads of žĆ.g: Push the 05AB1E code-pageamount of items on the stack, which will become one larger every time, where only the last two are relevant
  • 0g: Push a 0
  • A certain amount of >Pop the top number, and push its length (potentially none, up to a maximum of 256which will always be 255), which each increases by 1
  • èB: Index this integer intoConvert the codelarge number to base-page string

And after that:

  • 255, resulting in the original input-program with prepended J)\: Join these indexed characters on, to clean the stack together without delimiterfrom all the numbers we've pushed with .g () wraps the entire stack into a list and \ discards it)
  • .V: And evaluate this stringExecute it as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for Try such a program for (with the many .g replaced with a huge number plus additional D>). will push the lowercase alphabet & palindromizepalindromizes it).

05AB1E, 8 distinct bytes

žĆISk'>×€"žĆ0ÿè"J…J.?

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>... for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

05AB1E, 8 4 distinct bytes

[„)\ìNú₅ö©g₅Qi®ƒ„.g}¤…B.VJ?q

No TIO of the actual program, since the output would be way too big. It basically encodes the input-program into a program using the approach I've also used in the Fewest (distinct) characters for Turing Completeness challenge.

Try it online (with ƒ„.g}¤…B.V replaced with "D>gB.V" so we push the number instead of that many .g or try it online (with ® replaced with 9 as an example).

Explanation:

[                            # Start an infinite loop:
 „)\ì                        #  Prepend ")\" in front of the (implicit) input 
                           #  Pad it with the loop-index amount of leading spaces
       ₅ö                    #  Convert it from a base-255 string to a number
         ©                   #  Store this number in variable `®` (without popping)
          g₅Qi               #  If the length of this number is 255:
              ®ƒ„.g}         #   Push `®` + 1 amount of ".g" to the stack
                    ¤        #   Tail (without popping): pushes "g"
                     …B.V    #   Push "B.V" 
                         J   #   Join the stack together
                          ?  #   Output it without trailing newline
                           q #   And stop the program

This will produce a program with the 4 distinct bytes .gBV in the following format:

Loads and loads of .g to push a huge number. Then one additional .g+g to push 255, followed by B.V.

  • Loads of .g: Push the amount of items on the stack, which will become one larger every time, where only the last two are relevant
  • g: Pop the top number, and push its length (which will always be 255)
  • B: Convert the large number to base-255, resulting in the original input-program with prepended )\, to clean the stack from all the numbers we've pushed with .g () wraps the entire stack into a list and \ discards it)
  • .V: Execute it as 05AB1E code

Try such a program for (with the many .g replaced with a huge number plus additional D>). will push the lowercase alphabet & palindromizes it.

deleted 179 characters in body
Source Link
The Fifth Marshal
  • 6.3k
  • 1
  • 25
  • 44

05AB1E, 8 distinct bytes (non-competing)

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Non-competing, because this version of 05AB1E was released mid-2018 (and the very first version of the 05AB1E legacy was released December 2015, although that version lacked the builtin žĆ anyway).

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

05AB1E, 8 distinct bytes (non-competing)

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Non-competing, because this version of 05AB1E was released mid-2018 (and the very first version of the 05AB1E legacy was released December 2015, although that version lacked the builtin žĆ anyway).

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

05AB1E, 8 distinct bytes

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

Commonmark migration
Source Link

#05AB1E, 8 distinct bytes (non-competing)

05AB1E, 8 distinct bytes (non-competing)

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Non-competing, because this version of 05AB1E was released mid-2018 (and the very first version of the 05AB1E legacy was released December 2015, although that version lacked the builtin žĆ anyway).

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

#05AB1E, 8 distinct bytes (non-competing)

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Non-competing, because this version of 05AB1E was released mid-2018 (and the very first version of the 05AB1E legacy was released December 2015, although that version lacked the builtin žĆ anyway).

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

05AB1E, 8 distinct bytes (non-competing)

žĆISk'>×€"žĆ0ÿè"J…J.V«?

Non-competing, because this version of 05AB1E was released mid-2018 (and the very first version of the 05AB1E legacy was released December 2015, although that version lacked the builtin žĆ anyway).

Try it online.

Explanation:

žĆ        # Push the 05AB1E code-page
  IS      # Push the input, and convert it to a list of characters
    k     # Get the index of each character in the codepage-string
     '>× '# Convert each index to a string of that many repeated ">"-characters
€         # For each ">"-string:
 "žĆ0ÿè"  #  Map it to the string "žĆ0ÿè",
          #  where the `ÿ` is automatically filled with the ">"-string
J         # Join these strings together
 …J.V«    # And append "J.V" at the end
      ?   # After which we output the string without trailing newline

This will produce a program with the 8 distinct bytes žĆ0>èJ.V in the following format:

Multiple žĆ0>...>è for each character of the program we input (where the >...> are between potentially none up to a maximum of 256 amount of >):

  • žĆ: Push the 05AB1E code-page
  • 0: Push a 0
  • A certain amount of > (potentially none, up to a maximum of 256), which each increases by 1
  • è: Index this integer into the code-page string

And after that:

  • J: Join these indexed characters on the stack together without delimiter
  • .V: And evaluate this string as 05AB1E code
  • (after which the result is output implicitly)

Try such a program for ( will push the lowercase alphabet & palindromize it).

Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384
Loading