Skip to main content
added 872 characters in body
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

Brain-Flak -r, 296 bytes

((((((((((((((((((((((((((()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())())())())())())())())())())())())())())())())())())())())())())())())())())

Try it online!

Explanation

This works like the last one except we start at a and count up. This is cheaper since a has a smaller code point and adding one is cheaper than subtracting one. It saves exactly 100 bytes because there are 26 letters in the alphabet, going down to 'a' from 'z' saves 2 bytes per letter down which is 50 and changing minus one to plus one saves 2 bytes per letter, which is another 50.

The one issue is that this method does put things in the reverse order so we need -r to correct it, which is a flag that just reverses the order that things are output.

Brain-Flak -r, 296 bytes

((((((((((((((((((((((((((()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())())())())())())())())())())())())())())())())())())())())())())())())())())

Try it online!

Explanation

This works like the last one except we start at a and count up. This is cheaper since a has a smaller code point and adding one is cheaper than subtracting one. It saves exactly 100 bytes because there are 26 letters in the alphabet, going down to 'a' from 'z' saves 2 bytes per letter down which is 50 and changing minus one to plus one saves 2 bytes per letter, which is another 50.

The one issue is that this method does put things in the reverse order so we need -r to correct it, which is a flag that just reverses the order that things are output.

Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

Brain-Flak, 396 bytes

((((((((((((((((((((((((((()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])[()])

Try it online!

Explanation

This answer is pretty simple. We push z by doing a bunch of ()s

( () × 122 )

Then we use that as a starting place to count down each letter subtracting one each time.

( ... [()])

Where the ... is the code that pushed all the letters prior.

The unfortunate thing is that the structure of the goal string actually makes it a lot harder to do anything fancy. [] is basically useless since by the time we have anything on the stack we just want to count down. And as if that weren't enough all of the fun operations {...}, {} and <> are unusable.

This answer is likely optimal for brain-flak (without using -r).