Arnold Schwarzenegger’s Programming Language in Action

ArnoldC — imperative programming language in Arnold Schwarzenegger’s style and based on his one-liners. All basic keywords of this language used is Arnold’s films. This project tries to discover new meanings from the Arnold movies with the means of computer science. Parsing is done with Parboiled and ASM is used to generate the Java bytecode.

Table of general keywords

Keyword Description
I LIED False
BULLSHIT Else
NO PROBLEMO True
YOU HAVE NO RESPECT FOR LOGIC End If
STICK AROUND While
CHILL EndWhile
GET UP PlusOperator
GET DOWN MinusOperator
NO PROBLEMO True
YOU’RE FIRED MultiplicationOperator
HE HAD TO SPLIT DivisionOperator
YOU ARE NOT YOU YOU ARE ME EqualTo
LET OFF SOME STEAM BENNET GreaterThan
CONSIDER THAT A DIVORCE Or
KNOCK KNOCK And
I’LL BE BACK Return
IT’S SHOWTIME BeginMain
HASTA LA VISTA, BABY EndMethodDeclaration
DO IT NOW CallMethod
TALK TO THE HAND Print
HEY CHRISTMAS TREE DeclareInt
LISTEN TO ME VERY CAREFULLY DeclareMethod
GET TO THE CHOPPER AssignVariable
HERE IS MY INVITATION SetValue
ENOUGH TALK EndAssignVariable
GET YOUR ASS TO MARS AssignVariableFromMethodCall

Looks nice, right? But it’s not a joke, it really works! More keywords and details you can find here.

Hello world!

Try to coding the simple program. For beginning print “Hello from Terminator!”:

IT'S SHOWTIME
TALK TO THE HAND "Hello from Terminator!"
YOU HAVE BEEN TERMINATED

It’s easy: IT'S SHOWTIME and YOU HAVE BEEN TERMINATED – begin and end of main method, TALK TO THE HAND print our sentence. For compile and run this application you need the OpenJDK or Oracle Java on your machine:

$ java -version
openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

$ java -jar ArnoldC.jar hello.arnoldc
$ java hello
Hello from Terminator!

Variables

In this example we defined varFalse, varTrue, varA, varB and compute (4 + varB) * 2:

IT'S SHOWTIME
TALK TO THE HAND "Define True and False variables:"
HEY CHRISTMAS TREE varFalse
YOU SET US UP @I LIED
HEY CHRISTMAS TREE varTrue
YOU SET US UP @NO PROBLEMO

TALK TO THE HAND "Define two variables and compute sum:"
HEY CHRISTMAS TREE varA
YOU SET US UP 54
TALK TO THE HAND "varA="
TALK TO THE HAND varA

HEY CHRISTMAS TREE varB
YOU SET US UP 119
TALK TO THE HAND "varB="
TALK TO THE HAND varB

TALK TO THE HAND "varA = (4 + varB) * 2"
GET TO THE CHOPPER varA
HERE IS MY INVITATION 4
GET UP varB
YOU'RE FIRED 2
ENOUGH TALK
TALK TO THE HAND varA

YOU HAVE BEEN TERMINATED

Condition

Example:

define variable a
if(a) print "a is true"
else print "a is not true"
IT'S SHOWTIME
HEY CHRISTMAS TREE a
YOU SET US UP 3

TALK TO THE HAND "if(a) print `a is true`"
TALK TO THE HAND "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

Logical operation

Example:

define variables a, b, c, d
a = (b + 5) > c
a = (b || c) && d
IT'S SHOWTIME
HEY CHRISTMAS TREE a
YOU SET US UP 3
HEY CHRISTMAS TREE b
YOU SET US UP 7
HEY CHRISTMAS TREE c
YOU SET US UP 9
HEY CHRISTMAS TREE d
YOU SET US UP 11


TALK TO THE HAND "Example 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

TALK TO THE HAND "Example a = (b || c) && d"

GET TO THE CHOPPER a
HERE IS MY INVITATION b
CONSIDER THAT A DIVORCE c
KNOCK KNOCK d
ENOUGH TALK

YOU HAVE BEEN TERMINATED

More code you can find here. Have fun!

Read more:

Introduction to Tox — Free & Open Source messenger with audio/video calls as Skype Alternative

Top 25 Funny And Interesting Linux/*nix Terminal Commands

Pipe dream – Debian GNU/Hurd 8 Review

30 Years of Free Software Foundation: Best Quotes of Richard Stallman

Linux and Open Source Propaganda in “Mr. Robot” TV Show