Aussie++

The programming language from down under.

Made by @zack_overflow, inspired by Reddit

🇦🇺

Aussie Syntax

Oi mate! All your strayan lingo is valid syntax!
🪃

Boomerangs > Curly braces

Curly braces are for daft buggers, wield dangerous boomerangs as your block delimiters.
🙃

True aussie mode
Some characters don't have upside-down counterparts so this may break identifiers.

Where uʍop ǝpᴉsdn characters become valid code

G'DAY MATE! HIT 'Run' TO GET GOING

Docs

aussie++ is a dynamically-typed and interpreted language inspired by this Reddit post.

General

All keywords are case-insensitive, meaning CHEERS C***! is equivalent to cheers c***!, but all caps is strongly recommended.

We use boomerangs (< >) instead of curly braces ({ })

// Programs must start with `G'DAY MATE!`
G'DAY MATE!

// Prints "crikey mate!" to console
GIMME "crikey mate!";

// Boomerangs for blocks/scopes
<
	I RECKON x = 5;
>

// Use this to indicate end of program
CHEERS C***!

Types / Variables

Booleans are any sequence of NAHs and YEAHs separated by whitespace, a comma, or \n and followed by a terminal ! denoting the end of the boolean. The last NAH or YEAH determines the truthiness of the boolean. The following are all valid booleans:

// Booleans
I RECKON thisIsFalse = YEAH, NAH!;
I RECKON thisIsTrue = NAH, YEAH!;
I RECKON alsoTrue = NAH YEAH YEAH YEAH YEAH YEAH NAH!
I RECKON wow = NAH YEAH NAH 
NAH YEAH NAH NAH YEAH NAH NAH YEAH NAH!

Numbers, strings and nil/null are like other languages:

// Numbers
I RECKON regularInteger = 42069;
I RECKON tinyNum = 0.00001;
I RECKON negativeNum = -1;

// Strings
I RECKON goodStr = "fair dinkum mate!";

// Nil/Null
I RECKON emptiness = BUGGER ALL;

Control flow

aussie++ supports if statements and basic pattern matching:

// If/else statemets
YA RECKON 1 == 2 ? <
	GIMME "fark we broke maths!";
> WHATABOUT NAH, YEAH! == YEAH, NAH! ? <
	GIMME "strewth we broke boolean logic!";
> WHATABOUT ? <
	GIMME "the universe is okay";
>

// Pattern matching
YA RECKON randomBeer() IS A <
	"Fosters"    ~ GIMME "Flamin' hell!";
	"Coopers"    ~ GIMME "You Beauty!";
	somethinElse ~ GIMME "Yeah, dunno that one: " + somethinElse;
>

Loops

aussie++ has for and while loops. With for loops the main thing to note is that the ranges are specified using interval notation ([ or ] is inclusive, and ( or ) is exclusive). You can mix and match. You can break out of a loop by saying MATE FUCK THIS:

// From 0-100
I RECKON x IS A WALKABOUT FROM [0 TO 100] <
	GIMME x;
>

// From 0-99
I RECKON x IS A WALKABOUT FROM [0 TO 100) <
	GIMME x;
>

// Breaking with `MATE FUCK THIS`
I RECKON x IS A WALKABOUT FROM [0 TO 999999] <
	YA RECKON x > 1000 ? MATE FUCK THIS;
>

While loops are similar to those you would find in other languages, except that the loop only executes if the condition is false.

// OI MATE, PAY ATTENTION! THIS LOOP STOPS WHEN I'VE WALKED OVER 3 KM!

I RECKON kmWalked = 0;
I RECKON I'LL HAVE A WALKABOUT UNTIL (kmWalked > 3) <
	GIMME "i walked 1 km!";
	kmWalked = kmWalked + 1;
>
GIMME "BLOODY OATH I'M TIRED!";

Functions

Define functions like so, using BAIL <somethin> to return values:

THE HARD YAKKA FOR greeting() IS <
	BAIL "G'day mate!";
>

GIMME greeting();

Standard library / Built-ins

Use IMPOHT ME FUNC <func> to import built-in functions. The language currently comes with two built-ins, ChuckSomeDice(start, end) and HitTheSack(ms):

IMPOHT ME FUNC ChuckSomeDice;
IMPOHT ME FUNC HitTheSack;

THE HARD YAKKA FOR goIntoAComa() IS <
	// Return a random integer from 0-99
	I RECKON duration = ChuckSomeDice(0, 100);

	// Sleep for `duration` seconds
	HitTheSack(duration * 1000);

	GIMME "strewth! i went into a coma!";
>

goIntoAComa();