BreakingExpress

Create an app with this Arnold Schwarzenegger-themed programming language

Have you ever wished programming have been extra like an motion film? If you answered sure, then I’ve the language for you.

While wandering the web to seek out essentially the most obscure and enjoyable open supply languages, I got here throughout ArnoldC. ArnoldC is an crucial programming language the place the essential key phrases are changed with quotes from varied Arnold Schwarzenegger motion pictures.

For this tutorial, I’ll be utilizing a Debian-based working system with Terminator and the Vim editor. While you observe this tutorial, I might extremely advocate rewatching some older Schwarzenegger movies only for enjoyable!

Install ArnoldC

ArnoldC is hosted in GitHub. Before beginning, I counsel making a listing to carry your new challenge so it will not get misplaced. Below are my instructions to get ArnoldC in your pc.

$ mkdir arnoldc
$ cd arnoldc/
/arnoldc$ wget http://lhartikk.github.io/ArnoldC.jar
--2022-01-16 14:11:18--  http://lhartikk.github.io/ArnoldC.jar
Resolving lhartikk.github.io (lhartikk.github.io)...
185.199.108.153, 185.199.109.153, 185.199.110.153, ...
Connecting to lhartikk.github.io (lhartikk.github.io)
|185.199.108.153|:80... linked.
HTTP request despatched, awaiting response... 200 OK
Length: 12958233 (12M) [application/java-archive]
Saving to: ‘ArnoldC.jar’

ArnoldC.jar                             100%

Short key phrase overview

First, I’ll clarify among the key phrases you may have to construct an app. Keep in thoughts that every one of those key phrases have to be in all caps when writing your software.

Printing strings or variables: TALK TO THE HAND
Example: TALK TO THE HAND "hello there"

Creating a variable: GET TO THE CHOPPER
Example: GET TO THE CHOPPER var1

Setting the variable: HERE IS MY INVITATION
Example (in sample format):

GET TO THE CHOPPER var1
HERE IS MY INVITATION value1

Once you’ve got completed with the assigned variable, the following line is ENOUGH TALK.

False: I LIED
True: NO PROBLEMO
Return: I'LL BE BACK

These are a few of my favourite key phrases from the whole listing, however you may all the time seek the advice of the ArnoldC wiki for extra.

Hello world

I’ll begin with a small “hello world” app to point out the ArnoldC language in use.

First, use the echo command to output the string “hello world” right into a hey file:

$echo -e "IT'S SHOWTIMEnTALK TO THE HAND "hey world
"
nYOU HAVE BEEN TERMINATED" > hey.arnoldc

Next, use java -jar to create the app utilizing ArnoldC: $java -jar ArnoldC.jar hey.arnoldc

Then use the java command to run this system: $java hey

Here’s the output:

hey world

If you adopted these directions, congratulations in your first under-3-minute app in a very frivolous language.

Let’s rely

In this subsequent instance, I’ll have my app rely to twenty. The odd patterning makes this program fairly attention-grabbing.

First, create the file utilizing Vim so you may simply begin writing the app: arnoldc$ vi rely.arnoldc

Create the start major with IT'S SHOWTIME.

Next, arrange the declared variable: HEY CHRISTMAS TREE isLessThan20

Then, set the preliminary worth of the variable to true, making that required: YOU SET US UP @NO PROBLEMO

Repeat these steps with the variable n and make the primary set worth 0:

HEY CHRISTMAS TREE n
YOU SET US UP 0

From right here, transfer into some time loop with the primary variable: STICK AROUND isLessThan20

Assign the variable to have a look at: GET TO THE CHOPPER n

Then set the worth to plus one:

HERE IS MY INVITATION n
GET UP 1

Moving on to ending the assigned variable: ENOUGH TALK

Print the quantity: TALK TO THE HAND n

Look on the assigned variable once more, then set the variable to twenty:

GET TO THE CHOPPER isLessThan20
HERE IS MY INVITATION 20

Check to see if the quantity is lower than 20: LET OFF SOME STEAM BENNET n

Moving on to ending the assigned variable, finish the whereas loop, then terminate this system:

ENOUGH TALK
CHILL
YOU HAVE BEEN TERMINATED

In the top, you need to have this:

IT'S SHOWTIME
HEY CHRISTMAS TREE isLessThan20
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE n
YOU SET US UP 0
STICK AROUND isLessThan20
GET TO THE CHOPPER n
HERE IS MY INVITATION n
GET UP 1
ENOUGH TALK
TALK TO THE HAND n
GET TO THE CHOPPER isLessThan20
HERE IS MY INVITATION 20
LET OFF SOME STEAM BENNET n
ENOUGH TALK
CHILL
YOU HAVE BEEN TERMINATED

Now you simply have to set the jar bundle as much as run: /arnoldc$ java -jar ArnoldC.jar rely.arnoldc

Then run your code:

/arnoldc$ java rely
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

If you tried this tutorial, congratulations once more! You now have a small counter.

Afterthoughts

This just-for-fun open supply language is nice for normal hilarity, however it helps if you understand a small quantity of Java-based languages. I do not, so it took a bit extra time for me to determine how you can use the language. At least I discovered one thing whereas having enjoyable! I hope you get pleasure from experimenting with ArnoldC and making one thing that is amusing to you.

Exit mobile version