tkellehe / noodel

A programming language designed around supporting ASCII animation based code golfing challenges.
10 stars 0 forks source link

Loading Forever... Windows Style #124

Open tkellehe opened 7 years ago

tkellehe commented 7 years ago

Loading Forever... Windows Style

My answer

16 bytes

[ CỤ‘Ṁ~ððÐ]ʠḷẸḍt

Try it:)


How it works

[ CỤ‘Ṁ~ððÐ]ʠḷẸḍt

[ CỤ‘Ṁ~ððÐ]ʠ     # Set up for the animation.
[                # Pushes the literal string "[" onto the stack.
                 # NOOP command to separate the compressed string and "[".
  CỤ‘Ṁ~ðð        # Decompresses to the string "....¤¤¤¤¤¤" where the "¤" represents a space.
         Ð       # Pushes the stack as an array to the screen which in Noodel means by reference.
          ]      # Pushes on the literal string "]" onto the stack.
           ʠ     # Move the top of the stack down by one such that the top of the stack is the decompressed string.

            ḷẸḍt # The main animation loop.
            ḷ    # Loop endlessly the following code.
             Ẹ   # Take the last character of the string and move it to the front.
              ḍt # Delay for a tenth of a second.
                 # Implicit end of loop.
tkellehe commented 7 years ago

15 bytes

]ʠ[Ð.×4¤×6⁺ḷẸḍt

Try it:)


How it works

]ʠ[Ð.×4¤×6⁺ḷẸḍt

]ʠ[Ð.×4¤×6⁺     # Set up for the animation.
]               # Pushes the literal string "]" onto the stack.
 ʠ              # Move the top of the stack down by one such that the "]" will remain on top.
  [             # Pushes the literal string "]" onto the stack.
   Ð            # Pushes the stack to the screen which in Noodel means by reference.
    .           # Push the literal string ".".
     ×4         # Repeat the top of the stack string 4 times to produce "....".
       ¤        # Push the literal string "¤" representing a space.
        ×6      # Repeat the top of the stack string 6 times to produce "¤¤¤¤¤¤".
          ⁺     # Lastly, concatenate the two strings.
           ḷẸḍt # The main animation loop.
           ḷ    # Loop endlessly the following code.
            Ẹ   # Take the last character of the string and move it to the front.
             ḍt # Delay for a tenth of a second.
                # Implicit end of loop.
tkellehe commented 7 years ago

14 bytes

]ʠ⁶¤⁴.ȧ[ėÐḷẸḍt

Try it:)


How it works

]ʠ⁶¤⁴.ȧ[ėÐḷẸḍt

]ʠ⁶¤⁴.ȧ[ėÐ     # Set up for the animation.
]              # Pushes the literal string "]" onto the stack.
 ʠ             # Move the top of the stack down by one such that the "]" will remain on top.
  ⁶¤           # Pushes the string "¤" six times onto the stack where "¤" represents a space.
    ⁴.         # Pushes the string "." four times onto the stack.
      ȧ        # Take everything on the stack and create an array.
       [       # Pushes on the string literal "[".
        ė      # Take what is on the top of the stack and place it at the bottom (moves the "[" to the bottom).
         Ð     # Pushes the stack to the screen which in Noodel means by reference.

           ḷẸḍt # The main animation loop.
           ḷ    # Loop endlessly the following code.
            Ẹ   # Take the last character of the array and move it to the front.
             ḍt # Delay for a tenth of a second.
                # Implicit end of loop.
tkellehe commented 7 years ago

14 bytes

[Ð]ʠ¤ı⁵¤⁴.ḷėḍt

Try it:)

Another 14 byte solution...

tkellehe commented 5 years ago

13 bytes

[Ð]ıʠ⁶¤⁴.ḷėḍt

Try it:)

Don’t know why this took me a while to think of considering that the last post was actually wrong. But, this places it at 13 bytes.

[Ð]ıʠ⁶¤⁴.ḷėḍt

[Ð]ıʠ⁶¤⁴.     # Sets up the animation.
[             # Push on the character "["
 Ð            # Push the stack as an array (which is by reference) to the screen.
  ]           # Push on the character "]"
   ı          # Jump into a new stack placing the "[" on top.
    ʠ         # Move the top of the stack down one.
     ⁶¤       # Push on six spaces.
       ⁴.     # Push on four dots.

         ḷėḍt # The main loop that does the animation.
         ḷ    # Loop the following code endlessly.
          ė   # Take the top of the stack and put it at the bottom.
           ḍt # Delay for a tenth of a second.