Translate

viernes, 20 de junio de 2014

The Arnold Schwarzenegger Programming Language


ArnoldC es un lenguaje de programación basado en frases de ... y de quien? de Arnold Schwarzenegger. Si señores parece un chiste y lo es, pero un chiste que se puede utilizar para hacer programas.

Entre las instrucciones más graciosas tenemos:
False I LIED
True NO PROBLEMO
If BECAUSE I'M GOING TO SAY PLEASE
Else BULLSHIT
EndIf YOU HAVE NO RESPECT FOR LOGIC
While STICK AROUND
EndWhile CHILL
PlusOperator GET UP
MinusOperator GET DOWN
MultiplicationOperator YOU'RE FIRED
DivisionOperator HE HAD TO SPLIT
ModuloOperator I LET HIM GO
EqualTo YOU ARE NOT YOU YOU ARE ME
GreaterThan LET OFF SOME STEAM BENNET
Or CONSIDER THAT A DIVORCE
And KNOCK KNOCK
DeclareMethod LISTEN TO ME VERY CAREFULLY
NonVoidMethod GIVE THESE PEOPLE AIR
MethodArguments I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE
Return I'LL BE BACK
EndMethodDeclaration HASTA LA VISTA, BABY
CallMethod DO IT NOW
AssignVariableFromMethodCall GET YOUR ASS TO MARS
DeclareInt HEY CHRISTMAS TREE
SetInitialValue YOU SET US UP
BeginMain IT'S SHOWTIME
EndMain YOU HAVE BEEN TERMINATED
Print TALK TO THE HAND
ReadInteger I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY
AssignVariable GET TO THE CHOPPER
SetValue HERE IS MY INVITATION
EndAssignVariable ENOUGH TALK
ParseError WHAT THE FUCK DID I DO WRONG

Entre otras características ArnoldC corre sobre la plataforma Java, veamos un "hola mundo" con este lenguaje:

IT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATED

Veamos un ejemplo de un condicional:

if(a) print "a is true"
else print "a is not true"

BECAUSE I'M GOING TO SAY PLEASE a
TALK TO THE HAND "a is true"
BULLSHIT
TALK TO THE HAND "a is not true"
YOU HAVE NO RESPECT FOR LOGIC

La verdad muy gracioso,

Dejo links:
https://github.com/lhartikk/ArnoldC
https://github.com/lhartikk/ArnoldC/wiki/ArnoldC