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

Animate the text in your terminal #107

Open
tkellehe opened this issue Feb 13, 2017 · 0 comments
Open

Animate the text in your terminal #107

tkellehe opened this issue Feb 13, 2017 · 0 comments

Comments

@tkellehe
Copy link
Owner

tkellehe commented Feb 13, 2017

Animate the text in your terminal

22 bytes

”<8@\|DḶ|\6þıHḶƥɲSḍsɲS

My answer

Try it:)


”<8@\|DḶ|\6þ           # Displays the string "hello¤world".
”<8@\|DḶ|\6            # Decompresses to the array ["h", "e", "l", "l", "o", "¤", "w", "o", "r", "l", "d"] and pushes it on top of the stack.
           þ           # Pushes a copy of the array to the screen which since is an array is done by reference.

            ı          # Makes the array on the top of the stack the new stack.

             HḶƥɲSḍsɲS # Loops eleven times creating the animation.
             H         # Pushes the string "H" on to the top of the stack.
              Ḷ        # Consumes the "H" that gets evaluated as a base 98 number which comes out to eleven.
               ƥ       # Move the stack pointer up one.
                ɲS     # Switch the case of the top of the stack which will show up on the screen because the array is done by reference.
                  ḍs   # Delay for one second.
                    ɲS # Switch the case back.
                       # Implicit end of the loop.
@tkellehe tkellehe changed the title temp Animate the text in your terminal Feb 13, 2017
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