desu desu desu

"Hello, world!", Suiseiseki-Style

What?

Suiseiseki is a character from Rozen Maiden who ends her sentences with "desu" (roughly, "is") far more than normal.

We imagine what programming would be like if Suiseiseki had coined the "Hello, world!" program.

AppleScript

tell application "Terminal"
	activate
	run
	do script "yes desu | tr '
' ' '"
end tell
 
tell application "TextEdit"
    activate
    make new document
    repeat
        set text of the front document to (text of the front document) & "desu "
    end repeat
end tell
 
repeat
    say "[[inpt PHON]]dEH1sUH2"
end repeat
 

Arc

(while t (pr "desu "))
 

Assembly (Mac OS X, PowerPC, GCC)

    .cstring
DESU:
    .ascii "desu \0"
    .text
.globl _main
_main:
    li r0, 4
    li r3, 1
    lis r4, ha16(DESU)
    addi r4, r4, lo16(DESU)
    li r5, 5
    sc
    nop
    b _main
 

Assembly (Mac OS X, x86, GCC)

    .cstring
DESU:
    .ascii "desu \0"
    .text
.globl _main
_main:
    movl $1, 0(%esp)
    leal DESU, %eax
    movl %eax, 8(%esp)
    movl $5, 12(%esp)
loop:
    movl $4, %eax
    int $0x80
    jmp loop
 

AWK

BEGIN { while(1) { printf "desu " } }
Nayr
 

BASIC (Dartmouth)

10 PRINT "desu "
20 GOTO 10
Nayr
 

Befunge

v,,,,,"desu "<
>            ^
 

BF

+[-++++++++++[->++++++++++>+++<<]>.+.++++++++++++++.++.>++.[[-]<]+]
 
+>>++++++++++[<++++++++++>-]<<[>.+.++++++++++++++.++.>+++++++[<------------>-]
<-.>+++++++[<++++++++++>-]<--<]
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++[.+.++++++++++++++.++.----------------------------------
---------------------------------------------------.++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++]
 

Boo

while 1:
    System.Console.Write("desu ")
aarku
 

C

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    while (1)
    {
        printf("desu ");
    }
    
    return EXIT_SUCCESS;
}
 

C#

namespace desudesudesu
{
    class Program
    {
        static void Main(string[] args)
        {
            while(true)
            {
                System.Console.Write("desu ");
            }
        }
    }
}
JadenAlekis
 

Common LISP (SBCL)

(loop (princ "desu "))
 

D (Digital Mars)

import std.stdio;

void main() {
    while (true) {
        writef("desu ");
    }
}
O_4
 

DC

[desu ][rdPrx]x
bsmntbombdood
Crashes GNU DC

Dylan

module: desu

for ()
    "desu ".format-out
end
Bruce Hoult
 

Eiffel

class DESU

creation {ANY}
   main

feature {ANY}
   main is
       do
           from
           until
               False
           loop
               io.put_string("desu ")
           end
       end

end -- class DESU
SeventhHS
 

Erlang

-module(desu).
-export([main/1]).

desu() -> io:fwrite("desu ", []), desu().
main(_) -> desu().
 

FORTH (gforth)

: DESU 0 0 DO ." desu " LOOP ; DESU
Nayr
 

Haskell

main = putStr (cycle "desu ")
 

HP28/48

"desu " DO PR1 UNTIL 0 END
Bruce Hoult
 

HTML + JavaScript

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>desu with HTML/Javascript</title>
    </head>
    <body>
        <div id='desu_container'></div>
        <script type="text/javascript" charset="utf-8">
            var div = document.getElementById('desu_container');
            
            desu();
            
            function desu() {
                div.innerHTML += 'desu ';
                setTimeout(desu, 1);
            }
        </script>
    </body>
</html>

Io

desu := method(
    "desu " print;
    desu);
desu
O_4
 

Java

public class Desu {
    public static void main(String[] args) {
        while(true) {
            System.out.print("desu ");
        }
    }
}
 

Lua

while 1 do
    io.write("desu ")
end
 

Nu

(while YES (print "desu "))
 

Objective C

#import <Foundation/Foundation.h>

int main(int argc, const char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    
    unsigned i;
    while (TRUE)
    {
        if (i++ % 100 == 0)
        {
            [pool release];
            pool = [[NSAutoreleasePool alloc] init];
        }
        
        [(NSFileHandle *)[NSFileHandle fileHandleWithStandardOutput]
            writeData:[@"desu " dataUsingEncoding:NSUTF8StringEncoding]];
    }
    
    [pool release];
    return EXIT_SUCCESS;
}
 

Objective Caml

let rec desu s =
    print_string s;
    desu s;;
desu "desu ";;
 

Pascal (FPC)

begin
    while (true) do
        Write('desu ');
end.
aarku
 

Perl 5

{ print "desu "; redo }
 

Perl 6

loop { print "desu " }
Polyglot with Ruby

PHP

for(;;) { echo "desu "; }
 

Prolog (SWI)

repeat, write('desu '), fail.
 

Python

while 1: print "desu",
 

Ruby

loop { print "desu " }
Polyglot with Perl 6

Scheme (SISC)

((lambda (desu) (desu desu)) (lambda (desu) (display '|desu |) (desu desu)))
 

Standard ML (SMLNJ)

fun desu s = (print s; desu s);
val _ = desu "desu ";
 

TECO

<@^A/desu />``
 

TI-89

:ClrIO
:65->y
:0->x
:Loop
:Output(y,x,"desu")
:x+27->x
:64->y
:If x>162 Then
:0->x
:73->y
:EndIf
:EndLoop
JadenAlekis
 

Unix Shell

yes desu | tr '\n' ' '
 
while true; do echo -n 'desu '; done
 

Whitespace


   
   	     
   			 	 	
   			  		
   		  	 	
   		  	  
	
  	
  	
  	
  	
  
 
 
Download the source and look closely at the white-space characters

Contact: suiseiseki@desudesudesu.net