Blog Jaune

Comments for article GWAAAAAAAH


Le 08/02/2009 à 22:39

O_o 

C'est quoi ce truc de dingue ??? :D

Le 09/02/2009 à 14:22

O_o 

non un truc de lapin .... crétin !

Le 09/02/2009 à 14:54

Haha 

Excellent ! x)

Le 09/02/2009 à 15:32

\o/ 

Enfin un langage de programmation que j'ai une chance de maitriser...

Le 09/02/2009 à 22:47

 

=') Je connaissais le Ook, mais le GWAAAAAAAH est une vraie révélation ! Fantastique.

Le 10/02/2009 à 11:18

trop cool 

A quand un framework? :)

Le 10/02/2009 à 13:50

 

A quand un moteur graphique codé en GWAAAAAAAH ? Pour le prochain volet des lapins crétins ?

Le 10/02/2009 à 14:39

GWAAAAAAAH 

J'ai pris 5 minutes pour faire un petit interpréteur javascript de GWAAAAAAAH ... Merci à Kit pour son javascript pour le brainfuck et à Ook pour l'hébergement ;o) http://bearnaise.net/~ook/GWAAAAAAAH.html

Le 10/02/2009 à 16:03

WOAAAAH 

Un interpréteur en javascript ! Je pensais pas que mon délire aurait eu autant du succès :-)

Par contre, pour le framework et le moteur graphique, c'est un peu plus de boulot. Mais si il y en a qui connaissent des lapins crétins dans le coin qui veulent se lancer (héhé©), c'est une bonne idée :P

Le 12/02/2009 à 10:02

ploplop 

pliplipplopplop@yopmail.comyopyop.yepyep.plopploplopploplopploplop

Le 12/02/2009 à 14:47

FLOOD ? 

Flood :P

Le 13/02/2009 à 09:27

plop 

Non même pas ^^ juste comme ça parce que j'ai bien apprécier l'article...

Le 18/05/2009 à 14:13

Bwaaaaaaaaa 

Owiiiiii je suis fan de brain fuck. Mais le réunir a mon autre passion les lapins crétins est la chose la plus sublime jamais réalisée !!! <3

Le 30/06/2009 à 18:00

Perl 

Parce que j'ai trop de temps, ou plutôt, pas assez mais pas l'envie de travailler à ce que je devrais faire par cette canicule, une petite version en perl... die "syntax: perl gwaaaaaaah.pl <file.gwa>" unless defined $ARGV[0] && -f $ARGV[0]; $/=undef; $|=1; open F, '<', $ARGV[0]; @CODE = split //, <F>; # read-only code segment $PC = 0; # program counter points to the byte after the last executed instruction in @CODE. @M = (); # heap $X = 0; # data register points to a byte in the heap. @S = (); # looping stack %inst = ( G => sub { $X++ }, W => sub { die '*___--- GAAAAAAA! ---___*' if --$X < 0 }, A => sub { $M[$X]++ }, O => sub { $M[$X]-- }, H => sub { print chr( $M[$X] ) }, Z => sub { $M[$X]=getc; exit 0 unless defined $M[$X] }, R => sub { if ( $M[$X] ) { push @S, $PC; } else { pop @S; $sb = 0; while ( $PC < @CODE ) { $mb = $CODE[ $PC++ ]; if ( $mb eq 'R' ) { ++$sb; } elsif ( $mb eq 'M' ) { last unless --$sb; } } } }, M => sub { $M[$X] ? $PC = $S[ $#S ] : pop @S }, ); while ( $PC < @CODE ) { $op = $CODE[$PC++]; next unless exists $inst{$op}; $inst{$op}(); } Et un petit fichier test en GWAAAAAAAH typique... GAAAAAAAAAARG ! AAAAAAAAW ! OMG ! We Are ARG, you are not. AAAH ! OOOOOOOOOOOOOOOOOOH !! AAAAAAAAAAAH !! AAAAAAAAAH !! D'OH ! 2 little bunnies are *wasting* my time. STILG'AAAAAA'AR ! Fremens can smell the water. WOOOOOOO ! GO MINI WOOOH !! STIIIIILGAAAAAAAAAAR WAAAAAGON, I'M WOO too... WOII IS F*CK, MAXI AAAAAAAAAARG'G ! AAA BBB CCC is not DDD EEE FFF, quite the opposite. ( Can you say rabbit ? ) WWII IS STILL F*CK. OMG !!!! GHWW is not even a word, and AAAAAAAAAAH... it's finally over.. Vivent les lapins crétins !

Le 30/06/2009 à 18:04

Perl 

(Un nouvel essai.. Je ne sais pas trop comment poster du code ici...) Parce que j'ai trop de temps, ou plutôt, pas assez mais pas l'envie de travailler à ce que je devrais faire par cette canicule, une petite version en perl...


die "syntax: perl gwaaaaaaah.pl <file.gwa>" unless defined $ARGV[0] && -f $ARGV[0];
$/=undef;
$|=1;
open F, '<', $ARGV[0];

@CODE = split //, <F>; # read-only code segment
$PC = 0; # program counter points to the byte after the last executed instruction in @CODE.
@M = (); # heap
$X = 0; # data register points to a byte in the heap.
@S = (); # looping stack

%inst = (
        G => sub { $X++ },
        W => sub { die '*___--- GAAAAAAA! ---___*' if --$X < 0 },
        A => sub { $M[$X]++ },
        O => sub { $M[$X]-- },
        H => sub { print chr( $M[$X] ) },
        Z => sub { $M[$X]=getc; exit 0 unless defined $M[$X] },
        R => sub { 
                if ( $M[$X] ) {
                        push @S, $PC;
                }
                else {
                        pop @S;
                        $sb = 0; 

                        while ( $PC < @CODE ) {
                                $mb = $CODE[ $PC++ ];
                                if ( $mb eq 'R' ) {
                                        ++$sb;
                                }
                                elsif ( $mb eq 'M' ) {
                                        last unless --$sb;
                                }
                        }
                }
        },
        M => sub { $M[$X] ? $PC = $S[ $#S ] : pop @S },
);

while ( $PC < @CODE ) {
        $op = $CODE[$PC++];
        next unless exists $inst{$op};
        $inst{$op}();
}

Et un petit fichier test en GWAAAAAAAH typique...


GAAAAAAAAAARG ! AAAAAAAAW ! OMG !  
We Are ARG, you are not.

AAAH ! OOOOOOOOOOOOOOOOOOH !! AAAAAAAAAAAH !! AAAAAAAAAH !! 
D'OH ! 2 little bunnies are *wasting* my time.

STILG'AAAAAA'AR ! Fremens can smell the water.

WOOOOOOO ! GO MINI WOOOH !!
STIIIIILGAAAAAAAAAAR WAAAAAGON, I'M WOO too...

WOII IS F*CK, MAXI AAAAAAAAAARG'G !
AAA BBB CCC is not DDD EEE FFF, quite the opposite. ( Can you say rabbit ? )
WWII IS STILL F*CK. OMG !!!! 

GHWW is not even a word, and AAAAAAAAAAH... it's finally over..

Vivent les lapins crétins !

Le 20/07/2009 à 22:57

Super 

C'est super, manque plus que le compilateur GWAAAAAAAH en GWAAAAAAAH :P

Sinon, on peut utiliser du html pour poster, c'est vrai que le deuxième essai est meilleur :D

Ajouter un commentaire







Image de confirmation