Skip to main content
added 262 characters in body
Source Link
Jakque
  • 2.7k
  • 7
  • 13

Vyxal D, 7373 51 bytes

`#:tpq`#Ėß₂:⌈t+…ṘQ,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#…+ṘẎ7:tpqṘq`Ṙ:⌈t+…₂ßĖ#`
`#Ėß₂:ṘQ,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`…+ṘẎ7:Ṙq`Ṙ:₂ßĖ#`

Try it Online!Try it Online!

Explanation :

`#:tpq`#Ėß₂:⌈t+…ṘQ,Q ḢDD₂[ĖĖ|##`    …+ṘẎ7:Ṙq`        # push thethis string to the stack
            
                  Ṙ:      # removereverse the first char
                          DD       string and #push createa somecopy copies
                          ₂ßĖ  ₂[ĖĖ| # execute the #top if length%2the ,length executeis twiceeven

# EXECUTION at this point the stack is [ qṘ:7ẎṘ+…,QṘ:₂ßĖ# ]

               Ṙq        ##` # comment
  :tp   quote and revert => [ `#Ėß₂:ṘQ,…+ṘẎ7:Ṙq` ]
            Ẏ7:           # prependget the lat char
    7 qfirst char => [ `#Ėß₂:ṘQ,…+ṘẎ7:Ṙq` , `#Ėß₂:Ṙ ]
          +Ṙ              # quote
  revert and add => [`#Ėß₂:⌈t+    ṘQ,…+ṘẎ7:Ṙq`Ṙ:₂ßĖ#`]
       Q,…                # split and add theprint, lastreprint partand (ḢDD₂[ĖĖ|##`)quit
        #Ėß₂:Ṙ  …,Q                  # does nothing since the program ended

# print, re-printEND andOF quitEXECUTION
   
            ḢDD₂[ĖĖ|##            #` # do nothing herecomment

Whenever aWhen any char is removed fromof the string or is removed, its length is even anymore so the code goes to the second line which is unchanged (sice₂ß prevents the detetion already occured)execution

  • if a `` is removed, no code of the line will execute because the line will be either comented, either one single string either a mix of both and no execute fire

  • if is removed, the code will execute normally (as the deletion is not in the string)

  • if any of Ṙ:ßĖ is removed, the code will be either equal to 0, 1, a commented code or there will be no execution. This has no incidence and the code will executein the second line

If ``` is removed anywhere onIn any case the first line, no code will execute and the second line will execute normally

if any of ₂[ is removed,either have the first string is therefore untuched anduntouched or a string without incidence, in wich case, the code willsecond execute as intendedwill have the string untouched.

The doubled char DD, ĖĖ and ##are here to enureprogram ends at the function willfirst sucessful execute even if one of the charsince there is removeda quit instruction in the string

Vyxal D, 73 bytes

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`

Try it Online!

Explanation :

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`            # push the string to the stack
                                   # remove the first char
                          DD         # create some copies
                            ₂[ĖĖ|    # if length%2 , execute twice
                                 ##` # comment
  :tp                                # prepend the lat char
     q                               # quote
      :⌈t+                           # split and add the last part (ḢDD₂[ĖĖ|##`)
          …,Q                        # print, re-print and quit
              ḢDD₂[ĖĖ|##             # do nothing here

Whenever a char is removed from the string or is removed, its length is even anymore so the code goes to the second line which is unchanged (sice the detetion already occured)

If ``` is removed anywhere on the first line, no code will execute and the second line will execute normally

if any of ₂[ is removed, the first string is therefore untuched and the code will execute as intended.

The doubled char DD, ĖĖ and ##are here to enure the function will execute even if one of the char is removed

Vyxal D, 73 51 bytes

`#Ėß₂:ṘQ,…+ṘẎ7:Ṙq`Ṙ:₂ßĖ#`
`#Ėß₂:ṘQ,…+ṘẎ7:Ṙq`Ṙ:₂ßĖ#`

Try it Online!

`#Ėß₂:ṘQ,…+ṘẎ7:Ṙq`        # push this string to the stack  
                  Ṙ:      # reverse the string and push a copy 
                    ₂ßĖ   # execute the top if the length is even

# EXECUTION at this point the stack is [ qṘ:7ẎṘ+…,QṘ:₂ßĖ# ]

               Ṙq         # quote and revert => [ `#Ėß₂:ṘQ,…+ṘẎ7:Ṙq` ]
            Ẏ7:           # get the 7 first char => [ `#Ėß₂:ṘQ,…+ṘẎ7:Ṙq` , `#Ėß₂:Ṙ ]
          +Ṙ              # revert and add => [`#Ėß₂:ṘQ,…+ṘẎ7:Ṙq`Ṙ:₂ßĖ#`]
       Q,…                # print, reprint and quit
 #Ėß₂:Ṙ                   # does nothing since the program ended

# END OF EXECUTION
 
                       #` # comment

When any char of the string is removed ₂ß prevents the execution

  • if a `` is removed, no code of the line will execute because the line will be either comented, either one single string either a mix of both and no execute fire

  • if is removed, the code will execute normally (as the deletion is not in the string)

  • if any of Ṙ:ßĖ is removed, the code will be either equal to 0, 1, a commented code or there will be no execution. This has no incidence and the code will executein the second line

In any case the first execute will either have the string untouched or a string without incidence, in wich case, the second execute will have the string untouched.

The program ends at the first sucessful execute since there is a quit instruction in the string

added 1170 characters in body
Source Link
Jakque
  • 2.7k
  • 7
  • 13

Vyxal D, 73 bytes

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`

Try it Online!

Explanation :

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`            # push the string to the stack
                         Ḣ           # remove the first char
                          DD         # create some copies
                            ₂[ĖĖ|    # if length%2 , execute twice
                                 ##` # comment
  :tp                                # prepend the lat char
     q                               # quote
      :⌈t+                           # split and add the last part (ḢDD₂[ĖĖ|##`)
          …,Q                        # print, re-print and quit
              ḢDD₂[ĖĖ|##             # do nothing here

Whenever a char is removed from the string or is removed, its length is even anymore so the code goes to the second line which is unchanged (sice the detetion already occured)

If ``` is removed anywhere on the first line, no code will execute and the second line will execute normally

if any of ₂[ is removed, the first string is therefore untuched and the code will execute as intended.

The doubled char DD, ĖĖ and ##are here to enure the function will execute even if one of the char is removed

Vyxal D, 73 bytes

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`

Try it Online!

Vyxal D, 73 bytes

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`

Try it Online!

Explanation :

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`            # push the string to the stack
                         Ḣ           # remove the first char
                          DD         # create some copies
                            ₂[ĖĖ|    # if length%2 , execute twice
                                 ##` # comment
  :tp                                # prepend the lat char
     q                               # quote
      :⌈t+                           # split and add the last part (ḢDD₂[ĖĖ|##`)
          …,Q                        # print, re-print and quit
              ḢDD₂[ĖĖ|##             # do nothing here

Whenever a char is removed from the string or is removed, its length is even anymore so the code goes to the second line which is unchanged (sice the detetion already occured)

If ``` is removed anywhere on the first line, no code will execute and the second line will execute normally

if any of ₂[ is removed, the first string is therefore untuched and the code will execute as intended.

The doubled char DD, ĖĖ and ##are here to enure the function will execute even if one of the char is removed

Source Link
Jakque
  • 2.7k
  • 7
  • 13

Vyxal D, 73 bytes

`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`
`#:tpq:⌈t+…,Q ḢDD₂[ĖĖ|##`ḢDD₂[ĖĖ|##`

Try it Online!