What is ArnoldC ?
ArnoldC is a programming language based on the one-liners of Arnold Schwarzenegger.
ArnoldC is an imperative programming language where the basic keywords are replaced with quotes from different Schwarzenegger movies. Parsing is done with Parboiled and ASM is used to generate the Java bytecode.
How to code in ArnoldC ?
First, we need to download it :
wget http://lhartikk.github.io/ArnoldC.jar
Create a new file, hello.arnoldc :
echo -e "IT'S SHOWTIME\nTALK TO THE HAND \"hello world\"\nYOU HAVE BEEN TERMINATED" > hello.arnoldc
Compiling & Running :
java -jar ArnoldC.jar hello.arnoldc
java hello
Every ArnoldC program must have a main method. The form is:
IT'S SHOWTIME
[statements]
YOU HAVE BEEN TERMINATED
The simplest possible ArnoldC program that does nothing :
IT'S SHOWTIME
YOU HAVE BEEN TERMINATED
Examples
a = (b + 5) > c
GET TO THE CHOPPER a HERE IS MY INVITATION b GET UP 5 LET OFF SOME STEAM BENNET c ENOUGH TALK
if (value) [statements] else [statements]
BECAUSE I'M GOING TO SAY PLEASE value [statements] BULLSHIT [statements] YOU HAVE NO RESPECT FOR LOGIC
Other examples : FizzBuzz Implementation , examples from the test package.
Brief overview of the keywords
False => I LIED
True => NO PROBLEMO
If => BECAUSE I'M GOING TO SAY PLEASE
Else => BULLSHIT
EndIf => YOU HAVE NO RESPECT FOR LOGI
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
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/pre>
EndMethodDeclaration => HASTA LA VISTA, BAIT
CallMethod => DO IT NOW
AssignVariableFromMethodCall => GET YOUR ASS TO MARS
DeclareInt => HEY CHRISTMAS TREE
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