Mango
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
| Paradigm(s) | imperative, procedural |
|---|---|
| Designed by | User:RaiseAfloppaFan3925 |
| Appeared in | 2025 |
| Computational class | Turing-complete |
| Reference implementation | Mango (incomplete, only lexer) |
| Influenced by | Bussin X, LOLCODE, Rust |
| File extension(s) | .mango, .tuff |
Mango is an unimplemented programming language by User:RaiseAfloppaFan3925 inspired by modern 2010-20s slang.
Keywords
Here is a list of all of the keywords so far and what they do.
| Keyword | Action | Note |
|---|---|---|
21
|
Not a keyword, however if a 2 and a 1 are adjacent then the compiler prints 9 + 10 == 21
|
Example:
vro x = 67; vro y = "67"; vro z = 6741; vro var67 = 21; Compiler output: 1:9: SIX SEVEN 2:10: SIX SEVEN 3:9: SIX SEVEN 3:11: 41 4:8: SIX SEVEN 4:13: 9 + 10 == 21 |
41
|
Not a keyword, however if a 4 and a 1 are adjacent then the compiler prints 41
| |
67
|
Not a keyword, however if a 6 and a 7 are adjacent then the compiler prints SIX SEVEN
| |
aight bet
|
try, must be paired with a bro tweaking fr
|
Unstable, may change soon |
be
|
Equals sign in variable declaration and assignment
Examples: vro x be 0; vro y be x + 1; x be y + 1; y be x - 1; | |
bro
|
Private class/structure member/property | |
bro tweaking fr
|
catch, must be paired with a aight bet
|
Unstable, may change soon |
cap
|
false
| |
clapback
|
Return statement | |
crash out
|
Throws an error/exception | Unstable, may change soon. Exceptions are not planned and may be scrapped in favor of things like Rust's Result<T, E> or something
|
diva
|
Declares a class/structure | |
eeffoc
|
continue statement in loops
| |
It's giving
|
Comment. | Unstable, may change soon |
mogged
|
Checks if the expression to the left is greater than the expression to the right, literally >
Example: 7 mogged 3 sus {
cap => yap("Skill issue"),
no cap => yap("MOGGED"),
}
| |
mogged by
|
Opposite of mogged, so <
Example: 7 mogged by 3 sus {
cap => yap("cap"),
no cap => yap("MOGGED"),
}
| |
moot
|
Defines a public class/structure member/property | |
moots
|
Checks if the two values are equal, like a moots b.
| |
no cap
|
true
| |
nt tuff
|
Same as so kevin
|
Raises a compile error if it's not followed by as much wilted rose (🥀) emojis as the column number that the nt tuff keyword starts at
Example: It's giving the "nt tuff" keyword is at column 3 (1:3), so it has to be followed by 3 wilted rose emojis
x nt tuff🥀🥀🥀 sus {
no cap => yap("x is sus"),
cap => yap("x is not sus"),
}
|
so kevin
|
Append to the end of an expression to check if it's falsey
Example: x so kevin sus {
nocap => yap("x is false"),
cap => yap("x is true"),
}
| |
so owen
|
Append to the end of an expression to check if it's truthy
Example: x so owen sus {
nocap => yap("x is true"),
cap => yap("x is false"),
}
| |
so tuff
|
Append to an expression to check if it's truthy | Raises a compile error if it's not followed by as much of these emojis (❤️🩹 or 🌹))
Example: x so tuff❤️🩹❤️🩹❤️🩹 {
nocap => yap("x is true"),
cap => yap("x is false"),
}
|
sus
|
Rust match expression
| |
ts
|
self or this in "normal" programming languages
|
Unstable, may change soon |
vro
|
Declares a variable or function | Unstable, may change soon |
Example Programs
Hello World
vro main() {
yap("Hello world");
}
Deadfish interpreter
vro main() {
vro source be input("> ");
vro acc be 0;
for char in source {
char sus {
'i' => acc be acc + 1,
'd' => acc be acc - 1,
's' => acc be acc * acc,
'o' => yap(acc),
_ => eeffoc,
}
}
}
Stack
Note: Borrowed from the LOLCODE example
diva Stack {
bro length be 0;
bro capacity be 0;
bro array be [];
moot size {
get => ts length,
};
moot top {
get => clapback ts length moots 0 sus {
no cap => crash out "Sussy baka", It's giving no stack top
cap => ts array[ts length - 1],
},
};
vro push(ts, value) {
ts length + 1 mogged ts capacity sus {
no cap => {
It's giving idk if the language is low-level yet so we fake it
vro old_capacity be ts capacity;
vro new_capacity be ts capacity mogged 8 sus {
no cap => ts capacity * 2,
cap => 8,
};
array resize(new_capacity);
ts capacity be new_capacity;
}
}
ts array[ts length] be value;
ts length be ts length + 1;
}
vro pop(ts) {
ts length mogged 0 sus {
cap {
It's giving THE STACK IS EMPTY YOU CANNOT POP IT
crash out "Sussy baka";
}
}
ts length be ts length - 1;
clapback ts array[ts length];
}
vro peek(ts) {
ts length mogged 0 sus {
cap => crash out "Sussy baka";
}
clapback ts array[ts length - 1];
}
}
vro main() {
vro pile giving Stack vibes;
pile push("skibidi");
pile push("toilet");
yap(pile size); It's giving 2
yap(pile peek());
yap(pile top);
yap(pile pop());
yap(pile pop());
yap(pile size); It's giving 0
aight bet {
yap(pile pop());
} bro tweaking fr {
yap("Nahh bro tweaking fr");
}
}