Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Forever... Windows Style #124

Open
tkellehe opened this issue May 12, 2017 · 4 comments
Open

Loading Forever... Windows Style #124

tkellehe opened this issue May 12, 2017 · 4 comments

Comments

@tkellehe
Copy link
Owner

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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

tkellehe commented May 12, 2017

14 bytes

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

Try it:)

Another 14 byte solution...

@tkellehe
Copy link
Owner Author

tkellehe commented Nov 3, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant