There's no magic going on here, just obfuscation. Let's take a high-level view. The first thing to notice is that later on, every character in strings is interpreted as if it were the previous character:

[1] map{chr(ord()-1)} ...

Thus, a string like "6qD" will result in "5rC" (the characters before '6', 'q', and 'D', respectively). The main point of interest is the array of strings near the beginning:

[2] ">>>E!)",">>>E)",">>>E",">>>",">>",">",""

This defines a sequence of "masks" that we will substitute later on, into this string:

[3] "9$_*\x{0e}"

They'll get inserted at the $_ point. The string \x{0e} represents a hex control character; notice that \x{0d} , the character just before it, is a carriage return. That's what'll get substituted into [3] when we do [1].

Before the [3] string is assembled, we prepend a number of ! equal to i to each element in [2]. Each successive element gets one more ! than the element before it. Notice that the character whose value is just before ! is a space .

The rest of the script iterates over each of the assembled array elements, which now look more like this:

[4] "!!!!!9>>>E!)\x{0e}", ---> " 8===D (" "!!!!!!9>>>E)\x{0e}", ---> " 8===D(" "!!!!!!!9>>>E\x{0e}", ---> " 8===D" "!!!!!!!!9>>>\x{0e}", ---> " 8===" "!!!!!!!!!9>>\x{0e}", ---> " 8==" "!!!!!!!!!!9>\x{0e}", ---> " 8=" "!!!!!!!!!!!9\x{0e}", ---> " 8"

Then the reverse operation appends the same elements in reverse, creating a loop.

At this point you should be able to see the pattern emerge that produces the animation. Now it's just a matter of moving through each step in the animation and back again, which is accomplished by the rest of the script. The timestep delay of each step is governed by the select statement:

[5] select undef, undef, undef, 0.25

which tells us to wait 250 milliseconds between each iteration. You can change this if you want to see it speed up or slow down.