Asciimation Jumping Jacks

28

4

This is my first challenge, so I'm keeping it fairly simple.

If you've ever typed telnet towel.blinkenlights.nl on your command line and pressed enter, you will have experienced the joy of asciimation. Asciimation is, quite simply, doing an animation with ascii art. Today we will be doing a very basic asciimation of a person doing jumping jacks.

There will be two ascii pictures that we will put together into one asciimation. Number 1:

_o_
 0
/ \

Number 2:

\o/
_0_
<blank line>

Note that the second one has a blank line at the end.

So your program should do these steps:

  1. Clear the console screen.
  2. Print the correct ascii art image.
  3. Set a flag or something so you know to do the other image next time.
  4. Wait a moment (about a second).
  5. Continue at 1.

Rules

  • Your program must be a (theoretically) infinite loop.
  • The programming language you use must have been created before this challange was posted.
  • This is , so shortest code in bytes wins.
  • Standard loopholes apply.

Enjoy!

bitsnbites

Posted 2015-09-06T01:44:36.253

Reputation: 621

Can there be some spaces on the <blank line>? – Jakube – 2015-09-06T05:44:04.623

1Does this have to be platform independent because the Linux clear command (clear) is different to the Windows one (cls) – Beta Decay – 2015-09-06T08:13:21.930

1Is the blank line just to explain the positioning? If printing from the top of the screen so that the blank line makes no visible difference, can it be omitted? – trichoplax – 2015-09-06T11:40:55.843

@Jakube yes there can be spaces. – bitsnbites – 2015-09-06T12:32:07.597

@BetaDecay no it does not have to work on all platforms as long as you specify which platform(s) it will work on. – bitsnbites – 2015-09-06T12:32:46.290

1@trichoplax yes. The blank line is just to point out that the head must stay in the same position. – bitsnbites – 2015-09-06T12:33:43.593

Thanks for clarifying. I think quite a few answers can now be made shorter by omitting the blank line. – trichoplax – 2015-09-06T12:50:41.790

Nice question bitsnbites ; ) – Pulga – 2015-09-07T12:16:27.953

@CanadianLuke yes. I'll edit it to change that. – bitsnbites – 2015-09-07T13:14:07.727

I think you should've added an additional stick figure (The straight up position): o |0| | | – Luminous – 2015-09-08T17:59:15.327

You've got another Good Question badge. – wizzwizz4 – 2016-03-20T19:25:31.267

Answers

29

CJam, 51 45 42 38 36 bytes

"c\o/
_0_""^[c_o_
 0
/ \^["{_o\6e4m!}g

The above uses caret notation; the sequence ^[ is actually the ASCII character with code point 27.

I've borrowed the escape sequence (^[c) from @DomHastings' answer (with his permission) to save 4 bytes.

Verification

You can recreate the file like this:

base64 -d > jj.cjam <<< ImNcby8KXzBfIiIbY19vXwogMAovIFwbIntfb1w2ZTRtIX1n

To run the code, download the CJam interpreter and execute this:

java -jar cjam-0.6.5.jar jj.cjam

This will work on any terminal that supports console_codes or an appropriate subset.1

How it works

e# Push both jumping jacks on the stack.

"c\o/
_0_"

"^[c_o_
 0
/ \^["

e# When chained together, they contain two occurrences of the string "\ec",
e# which resets the terminal. Encoding the ESC byte in the second string
e# eliminates the need two escape a backslash before the string terminator.

{         e# Do:
  _o      e#   Copy the jumping jack on top of the stack and print the copy.
  \       e#   Swap the order of the jumping jacks.
  6e4m!   e#   Calculate the factorial of 60,000 and discard the result.
          e#   This takes "about a second".
}g        e# Since the discarded factorial was non-zero, repeat the loop.

1 The jumping jacks will look better if you hide the terminal's cursor before running the program. In Konsole, e.g., you can set the cursor's color to match the background color. This has to be done via your terminal's settings, since ^[c resets the terminal.

Dennis

Posted 2015-09-06T01:44:36.253

Reputation: 196 637

36+1 just for Calculate the factorial of 60,000 and discard the result. This takes "about a second". ;) – ETHproductions – 2015-09-06T02:39:37.473

Maybe 2Fm* is a good one-byte-shorter alternative to 6e4m! for "senseless operation that returns a truthy value and takes about a second to compute". – Lynn – 2015-10-17T20:42:55.820

@Mauris I had tried something similar with e!, but they seem to get memoized. After the first iteration, poor Jack gets a heart attack... – Dennis – 2015-10-17T20:56:11.257

10

Pyth - 41 40 39 bytes

.VZ"\x1b[H\x1b[J"@c"_o_
 0
/ \\\o/
_0_"Tb .p9

(I'm counting the \x1b's as one byte since SO destroys special characters).

Clearly doesn't work online since its a) an infinite loop and b) uses terminal escape codes.

#                Infinite loop
 "..."           Print escape sequences to clear screen
 @               Modular indexing
  c     T        Chop at index ten into the constituent frames
   "..."         Frames 1 & 2 concatenated (Pyth allows literal newlines in strings)
  ~              Post assign. This is an assign that returns the old value.
   h             Increment function. Putting it after an assign makes it augmented assign.
   Z             Variable auto-initialized to zero.
 .p9             Permutations(range(9), 9). Takes about a second on my machine.

I was surprised to find out that augmented-assign worked with post-assign. Pyth is awesome.

Maltysen

Posted 2015-09-06T01:44:36.253

Reputation: 25 023

use .V0 as infinite loop – Jakube – 2015-09-06T06:11:13.810

You may be able to save a byte now that the OP has confirmed that the blank line doesn't need to be explicitly printed – trichoplax – 2015-09-06T14:05:51.730

@Jakube that does not seem to save anything. – Maltysen – 2015-09-06T17:01:20.823

You explanation doesn't correspond to your code :P – Beta Decay – 2015-09-07T07:18:00.577

9

QBasic, 58 bytes

Tested on QB64.

CLS
?"_o_"
?0
?"/ \"
SLEEP 1
CLS
?"\o/"
?"_0_"
SLEEP 1
RUN

The right language for the problem can be surprisingly competitive, even if it is usually verbose. The ? shortcut for PRINT helps too, of course. CLS is clear screen; RUN without arguments restarts the program, which is the shortest way to get an infinite loop.

The only other trick here is printing 0 for the midsection of the first picture. QBasic puts a space in front of (and after) nonnegative numeric values when it prints them, resulting in 0 . Saved 3 characters over " 0".

I may also point out that the delay in this code is literally a second, and is not machine-dependent. ;^P

DLosc

Posted 2015-09-06T01:44:36.253

Reputation: 21 213

2I remember being annoyed by the surrounding spaces when printing numbers in various versions of BASIC. Nice to see there is a good use for it... – trichoplax – 2015-09-06T11:43:10.237

7

Perl (*nix), 54 bytes

sleep print"\x1bc",$-++%2?'\o/
_0_
':'_o_
 0
/ \
'while 1

(\x1b is counted as 1 byte but escaped for easier testing.) The above has been tested with Bash and shortened by another byte thanks to @Dennis!

Perl (Windows), 56 bytes

sleep print"\x1b[2J",$-++%2?'\o/
_0_
':'_o_
 0
/ \
'while 1

Thanks to @Jarmex for his testing and advice!

Dom Hastings

Posted 2015-09-06T01:44:36.253

Reputation: 16 415

2Afraid that doesn't work on Windows, but you can get away only 1 byte more with: print"@[2J", replacing the @ inside the quotes with ASCII 27 (for testing purposes, print"\033[2J" might be easier). – Jarmex – 2015-09-06T21:21:06.910

You can replace \e with a literal ESC byte. -- Would you mind if I use the \ec trick in my answer? – Dennis – 2015-09-08T06:35:55.783

@Dennis of course, because "\e" is just a shortcut for that anyway. Please, go ahead! – Dom Hastings – 2015-09-08T08:19:32.460

6

Javascript (ES6), 109 93 79 70 bytes + HTML, 12 10 bytes = 120 106 91 80 bytes

Fairly straightforward. Uses template strings to store the images, and toggles a boolean value to determine which to use.

NOTE: This solution may not be valid, as it does not actually use a console. However, I don't believe it's possible to clear a browser console using JS, at least not while using Firefox.

a=!1,setInterval(_=>O.innerHTML=(a=!a)?`_o_ 
 0
/ \\`:`\\o/ 
_0_`,1e3)
<pre id=O>

ETHproductions

Posted 2015-09-06T01:44:36.253

Reputation: 47 880

Code snippet does nothing (Chrome @ Windows). – orlp – 2015-09-06T02:46:44.143

Please, use proper language identification. – Ismael Miguel – 2015-09-06T02:59:18.040

1@orlp Code creates the animated man. (Chrome @ Windows). This is GUI based rather than console based however. Might not be considered valid as such. – Justin – 2015-09-06T03:12:40.083

3>

  • On my computer, this works fine in Firefox but not in Chrome, so I guess you should label it as ECMAScript 6 to avoid confusion. 2. If you put <pre id="a"/> in the HTML part, you don't need the <pre> tags in the code.
  • < – Dennis – 2015-09-06T03:12:54.213

    1Or, better yet, get rid of the HTML and replace document.getElementById`a` with document.body. – NinjaBearMonkey – 2015-09-06T03:29:37.590

    You can use 1e3 instead of 999 and be precise without using any extra bytes. – adroitwhiz – 2015-09-06T04:03:48.507

    You can also use document.children[0] instead of document.getElementById\a`` and remove the id from the <p> tag. – adroitwhiz – 2015-09-06T04:12:58.863

    document.all[0] might also work. – Downgoat – 2015-09-06T04:32:39.610

    May I ask what a!=a does? – Beta Decay – 2015-09-06T08:17:49.540

    @BetaDecay It's a=!a. Toggling it changes which stickman is printed. – undergroundmonorail – 2015-09-06T09:50:49.733

    @undergroundmonorail Oh I see. That's clever :D – Beta Decay – 2015-09-06T09:52:44.207

    @darkness3560 but you are not requested to be precise: about a second – edc65 – 2015-09-06T10:25:53.230

    To add to all the contributions, using a.a as your flag instead of a, and using that implicit reference to the element with id=a you should be able to save more bytes too! – Dom Hastings – 2015-09-06T11:56:53.253

    Wow, thanks for all the tips, guys! Sorry for not labeling as ES6; I was tired and on my way to bed. – ETHproductions – 2015-09-06T12:22:21.610

    You may be able to save a byte now that the OP has confirmed that the blank line doesn't need to be explicitly printed (as long as you can make the head stay in the same place) – trichoplax – 2015-09-06T14:07:47.200

    1I got 87 bytes by making the HTML <pre> and doing document.all[4]. This lets you get rid of the wrapper string and just make it innerHTML=a?`...`:`...`}. – NinjaBearMonkey – 2015-09-06T14:56:25.353

    Then output in the html also doesn't contain a trailing newline – Downgoat – 2015-09-06T15:50:32.790

    1This has stopped working for me on Chrome – Beta Decay – 2015-09-06T17:03:09.807

    @BetaDecay It was working for me right before I posted it, but for some reason it stopped. Fixed now. – ETHproductions – 2015-09-07T04:07:51.930

    @NinjaBearMonkey Thanks for the document.all[4] suggestion! Removing the id reference from the <pre> tag seems to make it quit working for me, running Firefox 33. – ETHproductions – 2015-09-07T04:17:33.800

    @Justin I guess it's not entirely possible in a web browser then, at least not Firefox. EDIT: It's possible in Chrome; I'll see about posting another solution. – ETHproductions – 2015-09-08T17:35:46.573

    5

    Bash, 86 84 bytes

    while sleep 1;do printf "\e[2J_o_\n 0\n/ \\";sleep 1;printf "\r\e[2J\o/\n_0_\n";done
    

    sheß

    Posted 2015-09-06T01:44:36.253

    Reputation: 241

    3

    awk - 95 92 86 84 83

    END{
        for(;++j;)
            system("clear;printf '"(j%2?"_o_\n 0\n/ \\":"\\o/\n_0_")"';sleep 1")
    }
    

    Nice workout :D Just wondered if this was doable. No prices to gain though... ;)

    If someone wants to test this: after you run the program you have to press Ctrl+D (end of input) to actually start the END block. To terminate it I have to use Ctrl+Z.

    I also have this, which is only 74 bytes, but it starts with pausing a second which isn't the wanted behaviour I think

    END{
        for(;1;print++j%2?"_o_\n 0\n/ \\":"\\o/\n_0_")
            system("sleep 1;clear")
    }
    

    Cabbie407

    Posted 2015-09-06T01:44:36.253

    Reputation: 1 158

    1Does sleep measure intervals of three seconds? – trichoplax – 2015-09-06T11:51:51.957

    Oh my god. thanks for the hint :) Or if it wasn't a hint: No, this only slept 0.33 seconds. – Cabbie407 – 2015-09-06T12:20:43.810

    I don't know awk but it seemed likely it would measure in seconds. :) – trichoplax – 2015-09-06T12:23:03.570

    1It just looks so more funny if it's moving faster, that I forgot about the golfing there ;D – Cabbie407 – 2015-09-06T13:03:05.083

    the sleep command is not awk, it's bash, btw – Cabbie407 – 2015-09-06T13:28:22.210

    3

    Python 2, 99 bytes

    Runs on Windows

    import os,time
    g=0
    while 1:os.system("cls");print["\\o/\n_0_","_o_\n 0 \n/ \\"][g];time.sleep(1);g=~g
    

    For UNIX machines, add two bytes:

    import os,time
    g=0
    while 1:os.system("clear");print["\\o/\n_0_","_o_\n 0 \n/ \\"][g];time.sleep(1);g=~g
    

    Beta Decay

    Posted 2015-09-06T01:44:36.253

    Reputation: 21 478

    2

    JavaScript ES6, 100 95 bytes

    (f=_=>{console.log(_?`_o_
     0
    / \\`:`\\o/
    _0_`)
    (b=setTimeout)(q=>(clear(),b(b=>f(!_))),1e3)})()
    

    Logs to the console. Tested on Safari Nightly

    Downgoat

    Posted 2015-09-06T01:44:36.253

    Reputation: 27 116

    2

    Batch, 151 130 118 bytes

    cls
    @echo _o_
    @echo  0
    @echo / \
    @PING -n 2 127.0.0.1>NUL
    cls
    @echo \o/
    @echo _0_
    @PING -n 2 127.0.0.1>NUL
    %0
    

    Max

    Posted 2015-09-06T01:44:36.253

    Reputation: 501

    You may be able to save a few bytes now that the OP has confirmed that the blank line doesn't need to be explicitly printed – trichoplax – 2015-09-06T15:02:01.210

    You should be able to golf off 12 characters by using @PING 127.0.0.1 -n 2>NUL instead. Ping defaults to waiting about a second between attempts, so this is within a few milliseconds of being accurate, plenty close enough for this challenge. Reference

    – AdmBorkBork – 2015-09-08T18:14:49.940

    golfed off 12 bytes thanks to TimmyD – Max – 2015-09-10T20:08:45.770

    2

    CBM 64 BASIC V2, 121 119 112 117 bytes

    2?CHR$(147)+"\o/":?" 0":?"/ \"
    3GOSUB7
    4?CHR$(147)+"_o_":?"_0_"
    5GOSUB7
    6RUN
    7A=TI
    8IFTI-A<60THENGOTO8
    9RETURN
    

    Max

    Posted 2015-09-06T01:44:36.253

    Reputation: 501

    Does ?CHR$(147) clear the screen? If so you may be able to save 2 bytes now that the OP has confirmed that the blank line doesn't need to be explicitly printed – trichoplax – 2015-09-06T14:09:41.773

    This doesn't produce the first animation frame (i.e., where the arms are level). – Psychonaut – 2015-10-16T11:44:45.643

    you're right... I'm going to fix it! – Max – 2015-10-16T12:21:47.107

    2

    Batch - 82 bytes

    Edit: Muted the timeout command and removed the extra newline.

    cls&echo _o_&echo  0&echo / \&timeout>nul 1&cls&echo \o/&echo _0_&timeout>nul 1&%0
    

    I've seen 2 other similar batch answers so I didn't really want to post this, but this is my first ever golf.

    Peter Lenkefi

    Posted 2015-09-06T01:44:36.253

    Reputation: 1 577

    1But a bare timeout 1 will put a lot of unrequested output on the console – edc65 – 2015-09-06T13:47:17.787

    True, I had extra output. Edited. – Peter Lenkefi – 2015-09-06T15:17:23.267

    1

    maybe >mul it's type error, or maybe you don't know what nul is. https://en.wikipedia.org/wiki/Null_device

    – edc65 – 2015-09-06T16:58:28.423

    @edc65 The backdraws of copy-paste and not testing. Thank you! – Peter Lenkefi – 2015-09-06T17:06:59.913

    2

    BBC BASIC, 75 bytes

    Note that tokenisation pulls it down to 75 bytes. The whitespace is added in by the IDE.

          g=0
       10 IFg=0THENPRINT"\o/":PRINT"_0_"ELSEPRINT"_o_":PRINT" 0 ":PRINT"/ \"
          g=1-g:WAIT 100CLS:GOTO10
    

    Properties showing program size

    Beta Decay

    Posted 2015-09-06T01:44:36.253

    Reputation: 21 478

    1

    Julia, 70 bytes

    (on Windows, by replacing clear with cls, thanks to undergroundmonorail)

    n(i=1)=(sleep(1);run(`cls`);print(i>0?"_o_
     0
    / \\":"\\o/
    _0_");n(-i))
    

    On Linux, 72 bytes

    n(i=1)=(sleep(1);run(`clear`);print(i>0?"_o_
     0
    / \\":"\\o/
    _0_");n(-i))
    

    This uses actual newlines rather than \n to save a byte; otherwise, the i is either 1 or -1 as the "flag", and it uses recursion to achieve the infinite loop. Call it as either n(1) or just n().

    Also, run(`clear`)/run(`cls`) uses a shell command to clear the window, because Julia doesn't have a built-in window-clear command.

    Glen O

    Posted 2015-09-06T01:44:36.253

    Reputation: 2 548

    If you run this on windows you save two bytes by changing clear to cls (I'm assuming, I don't know anything about Julia). – undergroundmonorail – 2015-09-06T09:27:12.683

    @undergroundmonorail - Thanks, but I use Ubuntu, cls doesn't work. Hopefully Julia decides to implement a real terminal-clearing function. – Glen O – 2015-09-06T09:40:31.710

    @GlenO On Windows cls works (see my answer) – Beta Decay – 2015-09-06T10:05:37.650

    1

    Windows Batch, 83 89

    Edit removed the empty line after the clarification by OP

    @cls&echo _o_&echo  0&echo./ \&timeout>nul 1&cls&echo \o/&echo _0_&timeout>nul 1&%0
    

    If you get rid of the empty line in the jumping man (that cannot be seen anyway), the score is 83

    Note: timeout is not present in Windows XP. It works in Vista or newer versions. Moreover timeout is not precise to the second, so it's a perfect choice to implement step 4 (Wait a moment (about a second))

    edc65

    Posted 2015-09-06T01:44:36.253

    Reputation: 31 086

    1

    JavaScript, 92 91 89 bytes

    x=0;setInterval(function(){console.log("\033c"+["_o_\n 0\n/ \\","\\o/\n_0_"][x^=1])},1e3)
    
    • No ES6 features (but would be significantly shorter with them)
    • Works with Node.js on Linux (don't know about other environments)
    • Partially works in Chrome's console (c is shown instead of clearing the console, breaking the output)

    Removing "\033c"+ from the above code, the following works in the browser, but doesn't clear the console.

    x=0;setInterval(function(){console.log(["_o_\n 0\n/ \\","\\o/\n_0_"][x^=1])},1e3)

    Nateowami

    Posted 2015-09-06T01:44:36.253

    Reputation: 131

    Impressive work! Using ES6 features, I get 77: x=0;setInterval(_=>console.log("\033c"+[`_o_<line break> 0<line break>/ \\`,`\\o/<line break>_0_`][x^=1]),1e3) For some reason, JS won't let me pass console.log as the function and the ASCII man as an extra param. – ETHproductions – 2015-09-18T16:01:38.980

    @ETHproductions Thanks! I thought about doing it in ES6, but having never used it and not having io.js installed I decided not to. As far as not being able to pass console.log to setInterval, the reason is that we're not passing the function, but calling it. It would be evaluated before setInterval was called, and since console.log doesn't return, it would essentially be passing undefined to setInterval. Make sense? And thanks for shortening it! – Nateowami – 2015-09-19T13:35:14.327

    I understand what you're saying, but according to this page, this code should work: x=0;setInterval(console.log,1e3,"\033c"+[o<line break> 0<line break>/ \`,\\o/<line break>_0_][x^=1])In fact, it doesn't bring up an error if I replaceconsole.logwithalert`.

    – ETHproductions – 2015-09-20T17:31:08.240

    Ah, I get what you're saying. I think the problem though is that we need to log something different each time, but "\033c"+[\o<line break> 0<line break>/ `,\o/<line break>0`][x^=1]gets evaluated before the call tosetInterval`. – Nateowami – 2015-09-21T04:00:07.160

    1

    Javascript (ES6), 82 bytes

    A modification of my previous answer that uses the console. Works partially in Firefox, but only clears the console in Chrome, AFAIK.

    a=!0,c=console,setInterval(_=>c.log(c.clear(a=!a)|a?`_o_
     0
    / \\`:`\\o/
    _0_`),1e3)

    As always, suggestions welcome!

    ETHproductions

    Posted 2015-09-06T01:44:36.253

    Reputation: 47 880

    Love it! I notice via this that Chrome is executing ES6 for me now as well! – Dom Hastings – 2015-09-08T17:59:06.040

    @DomHastings I've never developed in Chrome before, but I'd heard it didn't support ES6 by default, so I was just as surprised as you! :) – ETHproductions – 2015-09-08T18:00:46.420

    0

    Noodel, noncompeting 24 bytes

    Noncompeting because Noodel was born after the challenge was created:)

    ”ṛ|ọBCḊCBCḣ“\o/¶_0_ḷėçḍs
    

    Try it:)

    How it works

    ”ṛ|ọBCḊCBCḣ              # Creates a string that gets decompressed into "_o_¶¤0¤¶/¤\" and places it into the pipe.
               “\o/¶_0_      # Creates a string and places it into the pipe.
                       ḷ     # Unconditionally loop the code up to a new line or end of program.
                        ė    # Takes what is in the front of the pipe and puts it into the back.
                         ç   # Clears the screen and prints.
                          ḍs # Delays for one second.
    

    There currently is not a version of Noodel that supports the syntax used in this challenge. Here is a version that does:

    24 bytes

    \o/¶_0_ _o_¶¤0¤¶/¤\ḷçėḍs
    

    <div id="noodel" code="\o/¶_0_ _o_¶¤0¤¶/¤\ḷçėḍs" input="" cols="5" rows="5"></div>
    
    <script src="https://tkellehe.github.io/noodel/noodel-latest.js"></script>
    <script src="https://tkellehe.github.io/noodel/ppcg.min.js"></script>

    tkellehe

    Posted 2015-09-06T01:44:36.253

    Reputation: 605

    0

    Deadfish, Non-Competing (658 bytes)

    iiisisdddddoiiiiiiiiiiiiiiiioddddddddddddddddodddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddoddddsddddoiiiiiiiiiiiiiiiioddddddddddddddddoddddddddddddddddddddddodddsddodddddddddddddddoddddddddddddddddddddddsddddddddoddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddoosddddddddoiiiiiiiiiiiiiiiiiiioddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddodddddddddddddddddddddddddddddddddddddosdddddodddddddddddddddddddddddddddddddddddddddddddddddoddddddddddddddddddddddddddddddddddddddsdddddodddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddoo
    

    This a non-competing solution, as it does not completely meet the challenge requirements. Deadfish is a very strange interpretted lanugage, which only has 4 commands and an accumulator. The accumulator is a single byte variable initialized at 0. The 4 commands are:

    • i = Increment the accumulator a = a + 1
    • d = Decrement the accumulator a = a - 1
    • s = Square the accumulator a = a * a
    • o = Output the accumulator print(a)

    As the language does not include repetition, clearing the screen, or delays, it does not meet the requirements. Expected output:

    _o_
     0 
    / \
    (Blank line, not from the program)
    \o/
    _0_
    (Blank line, not from the program)
    (Blank line, not from the program)
    

    Code explanation:

    _  iiisisdddddo
    o  iiiiiiiiiiiiiiiio
    _  ddddddddddddddddo
    \n dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddo
       ddddsddddo
    0  iiiiiiiiiiiiiiiio
       ddddddddddddddddo
    \n ddddddddddddddddddddddo
    /  dddsddo
       dddddddddddddddo
    \  ddddddddddddddddddddddsddddddddo
    \n ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddo
    \n o
    \  sddddddddo
    o  iiiiiiiiiiiiiiiiiiio
    /  ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddo
    \n dddddddddddddddddddddddddddddddddddddo
    _  sdddddo
    0  dddddddddddddddddddddddddddddddddddddddddddddddo
    _  ddddddddddddddddddddddddddddddddddddddsdddddo
    \n dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddo
    \n o
    

    Deadfish interpretter in Python 3:

    c=input()
    o=""
    a=0
    for p in range(0,len(c)):
        i=c[p]
        if i=="i":
            a += 1
        if i=="d":
            a+=-1
        if i=="s":
            a=a*a
        if i=="o":
            o+=chr(a)
    print(o)
    

    Julian Lachniet

    Posted 2015-09-06T01:44:36.253

    Reputation: 3 216

    0

    Ruby, 79 bytes

    k=!0;loop{puts((k)?"\e[H\e[2J_o_\n 0\n/ \\":"\e[H\e[2J\\o/\n_0_");k=!k;sleep 1}
    

    Requires escape codes.

    clap

    Posted 2015-09-06T01:44:36.253

    Reputation: 834

    0

    Forth, 86 bytes

    Requires GNU Forth for the escaped strings. To run in a non-GNU Forth, just change S\" to S", and the escaped characters won't print correctly.

    : P PAGE TYPE CR 999 MS ;
    : R BEGIN S\" \\o/\n_0_" P S\" _o_\n 0 \n/ \\" P 0 UNTIL ; R
    

    mbomb007

    Posted 2015-09-06T01:44:36.253

    Reputation: 21 944

    0

    CBM BASIC v2.0 (68 characters)

    0?"S_o_q||0q||N M":goS1:?"SMoN":?"_0_":goS1:gO
    1wA161,255,pE(161):reT
    

    The above requires some explanation, since Stack Exchange markup doesn't properly represent PETSCII characters:

    • The program is shown here for convenience in lowercase, but can and should be entered and run in uppercase mode on a Commodore 64.
    • The first and third "S" characters are actually in reverse video, and produced by pressing the CLR key (SHIFT+HOME).
    • The "q" characters are actually in reverse video, and produced by pressing the down cursor (CRSR ⇓).
    • The "|" characters are actually in reverse video, and produced by pressing the left cursor (SHIFT+CRSR ⇒).

    Psychonaut

    Posted 2015-09-06T01:44:36.253

    Reputation: 233

    0

    beeswax, 119 113 bytes

    ph0`J2[`}ghq'-<gh0N}`0`}gN`/o\`Ngh0`J`<
    >g}`o`}N` `0>'d`0 `N`/ \`0hg>-'phg}`[2`b
    dF1f+5~Zzf(.FP9f..F3_#     d   <
    

    Explanation of the important parts of the program:

    left to right  right to left
    
    3FBf   or       fBF3          27       ASCII code for (esc)
    3             [x,x,3]•        set lstack 1st to 3
     F            [3,3,3]•        set lstack to 1st
      B           [3,3,27]•       1st=1st^2nd
       f                          push lstack 1st on gstack
    ——————
    9PF.(f   or    f(.FP9         102400   counter to roughly match a wait time
                                           of 1 s on my i5 2410M Laptop
    9             [x,x,9]•        set lstack 1st to 9
     P            [x,x,10]•       increment 1st
      F           [10,10,10]•     set lstack to 1st
       .          [10,10,100]•    1st=1st*2nd
        (         [10,10,102400]• 1st=1st<<2nd (100<<10=102400, arithmetic shift left)
         f                        push lstack 1st on gstack
    ——————
    zZ~5+f   or    f+5~Zz         95       ASCII for '_'
    z             [0,0,0]•        initialize lstack to zero
     Z            [0,0,90]•       get value from relative coordinate (0,0),
                                  which is the location of `Z` itself, ASCII(Z)=90
      ~           [0,90,0]•       flip 1st and 2nd lstack values
       5          [0,90,5]•       set lstack 1st to 5 
        +         [0,90,95]•      1st = 1st+2nd
         f                        push lstack 1st on gstack
    

    The f’s push the values on the gstack (global stack) for later use. These values are accessed by the 0gh (or the mirrored hg0) and hg (gh) instructions. h rotates the gstack upwards, g reads the top value of gstack and pushes it onto the lstack (local stack) of the bee (instruction pointer).

    }`o`}N` 0 `N`/ \`                      sequence to print the standing man
    
    N`\o/`Ng}`0`}N                         sequence to print the jumping man
    
    }`[2J`                        equivalent to the ANSI escape sequence (esc)[2J
                                  to clear the screen
    >-'p  or >-'q  or >  p        loop for counting down (wait 1 s)
    d  <      b  <    d'-<
    

    In-depth explanation follows later, if needed. Maybe with animation.

    M L

    Posted 2015-09-06T01:44:36.253

    Reputation: 2 865