Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
For some reason it looks really slow in the GIF but I can assure you on my computer it waits for 1/4 of a second. You may also notice that in the GIF, the code has an extra backslash; that's because I have Uiua 0.9.5 installed on my computer. In 0.10.0, the way $ strings work is a bit different, and the extra backslash isn't needed.
program running Explanation:
⍢(...)1$ |/-\
This starts with "|/-\" on the stack and does the rest of the program in a loop forever. A byte is saved by using the raw string syntax $ |/-\ instead of the normal "|/-\\".
↻1
Rotate this string one character to the left.
&pf⊂"\rLoading... "⊢.
Combine the first character of this with the loading text, and print it. The \r causes the text to be printed over whatever was already there.
&sl1/4
Sleep for a quarter of a second. Using a fraction literal like this is a byte shorter than 0.25.
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
For some reason it looks really slow in the GIF but I can assure you on my computer it waits for 1/4 of a second. You may notice that in the GIF, the code has an extra backslash; that's because I have Uiua 0.9.5 installed on my computer. In 0.10.0, the way $ strings work is a bit different, and the extra backslash isn't needed.
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
For some reason it looks really slow in the GIF but I can assure you on my computer it waits for 1/4 of a second. You may also notice that in the GIF, the code has an extra backslash; that's because I have Uiua 0.9.5 installed on my computer. In 0.10.0, the way $ strings work is a bit different, and the extra backslash isn't needed.
Explanation:
⍢(...)1$ |/-\
This starts with "|/-\" on the stack and does the rest of the program in a loop forever. A byte is saved by using the raw string syntax $ |/-\ instead of the normal "|/-\\".
↻1
Rotate this string one character to the left.
&pf⊂"\rLoading... "⊢.
Combine the first character of this with the loading text, and print it. The \r causes the text to be printed over whatever was already there.
&sl1/4
Sleep for a quarter of a second. Using a fraction literal like this is a byte shorter than 0.25.
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
For some reason it looks really slow in the GIF coming soonbut I can assure you on my computer it waits for 1/4 of a second. You may notice that in the GIF, the code has an extra backslash; that's because I have Uiua 0.9.5 installed on my computer. In 0.10.0, the way $ strings work is a bit different, and the extra backslash isn't needed.
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
GIF coming soon
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
For some reason it looks really slow in the GIF but I can assure you on my computer it waits for 1/4 of a second. You may notice that in the GIF, the code has an extra backslash; that's because I have Uiua 0.9.5 installed on my computer. In 0.10.0, the way $ strings work is a bit different, and the extra backslash isn't needed.
Uiua, 4339 bytes
⍢(&pf@\b&sl1&sl1/4&pf⊂"Loading4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
Doesn’t work in the online interpreter. I’ll add a GIF of it working on my computer latercoming soon
Uiua, 43 bytes
⍢(&pf@\b&sl1/4&pf⊂"Loading... "⊢.↻1)1$ |/-\
Doesn’t work in the online interpreter. I’ll add a GIF of it working on my computer later
Uiua, 39 bytes
⍢(&sl1/4&pf⊂"\rLoading... "⊢.↻1)1$ |/-\
GIF coming soon