Skip to main content
craaaacked
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

???gs2, 3 bytes, cracked by feersum

e|h

(Posts must be at least 30 characters, so here's some padding.) In gs2:

  • e or \x65 is product on lists (such as the empty list of characters representing STDIN), so it pushes an int 1.

  • | or \x7c is power-of-2, which changes it into 21 = 2.

  • h or \x68 is hello, which is a ridiculous command. The story goes as follows: when designing gs2, I set out to beat every code golf language on shinh's golf server, but goruby has an easter egg command h that prints Hello, world! (note the lowercase w), allowing it to claim the #1 spot on the hello world challenge's leaderboards. I wanted to one-up goruby, so I added my own easter egg command h that pushes Hello, world! to the stack, but allows you to customize the capitalization and punctuation by pushing an integer before it:

          elif t == '\x68': #= hello
              x = 0
              if len(self.stack) >= 1 and is_num(self.stack[-1]):
                  x = self.stack.pop()
                  x = (range(0, 11) + [100, 1000, 16, 64, 256]).index(x)
              s1 = 'h' if x & 1 else 'H'
              s2 = 'W' if x & 2 else 'w'
              s3 = ['!', '', '.', '...'][((x & 4) >> 2) | ((x & 16) >> 3)]
              s4 = '' if x & 8 else ','
              f = '%sello%s %sorld%s' % (s1, s4, s2, s3)
              self.stack.append(to_gs(f))
    

    As you can see by looking at the s2 = line, if there's a number 2 at the top of the stack, it'll get replaced with the uppercase-W variation: Hello, World!.

???, 3 bytes

e|h

(Posts must be at least 30 characters, so here's some padding.)

gs2, 3 bytes, cracked by feersum

e|h

In gs2:

  • e or \x65 is product on lists (such as the empty list of characters representing STDIN), so it pushes an int 1.

  • | or \x7c is power-of-2, which changes it into 21 = 2.

  • h or \x68 is hello, which is a ridiculous command. The story goes as follows: when designing gs2, I set out to beat every code golf language on shinh's golf server, but goruby has an easter egg command h that prints Hello, world! (note the lowercase w), allowing it to claim the #1 spot on the hello world challenge's leaderboards. I wanted to one-up goruby, so I added my own easter egg command h that pushes Hello, world! to the stack, but allows you to customize the capitalization and punctuation by pushing an integer before it:

          elif t == '\x68': #= hello
              x = 0
              if len(self.stack) >= 1 and is_num(self.stack[-1]):
                  x = self.stack.pop()
                  x = (range(0, 11) + [100, 1000, 16, 64, 256]).index(x)
              s1 = 'h' if x & 1 else 'H'
              s2 = 'W' if x & 2 else 'w'
              s3 = ['!', '', '.', '...'][((x & 4) >> 2) | ((x & 16) >> 3)]
              s4 = '' if x & 8 else ','
              f = '%sello%s %sorld%s' % (s1, s4, s2, s3)
              self.stack.append(to_gs(f))
    

    As you can see by looking at the s2 = line, if there's a number 2 at the top of the stack, it'll get replaced with the uppercase-W variation: Hello, World!.

added 75 characters in body
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

???, 3 bytes⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢bytes

e|h

(Posts must be at least 30 characters, so here's some padding.)

???, 3 bytes⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢

e|h

???, 3 bytes

e|h

(Posts must be at least 30 characters, so here's some padding.)

Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

???, 3 bytes⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢

e|h