Bussin X

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Bussin and Bussin X are both programming languages made by FaceDev/face-hh. Bussin is a normal programming language and Bussin X is an esoteric weirdlang. It can be seen in the video "I made my own Programming Language".

Bussin, Bussin X
Paradigm(s) imperative, procedural, declarative
Designed by FaceDev (@FaceDevStuff)
Appeared in 2023
Type system dynamic, gradual, weak (types do literally nothing)
Memory system variable-based
Computational class Turing complete
Reference implementation Bussin
Influenced by Brainfuck, DreamBerd
File extension(s) .bs, .bsx

Bussin

Bussin is a normal, JavaScript-like programming language.

Bussin
Paradigm(s) imperative, procedural, declarative
Designed by FaceDev (@FaceDevStuff)
Appeared in 2023
Type system dynamic, gradual, weak (types do literally nothing)
Memory system variable-based
Computational class Turing complete
Reference implementation Bussin
Influenced by Brainfuck, DreamBerd
File extension(s) .bs

Features

Output

Output in Bussin is done through println.

println("Hello World!");

Variables

In Bussin, variables are declared with let and constants are declared with const.

let x = 0;
let y = 2;
const hello = "Hello";

Logical and Relational Operators

This section showcases logical (Boolean) and relational (comparison) operators.


a && b // Logical AND
a | b // Logical OR

a == b // Equal
a != b // Not equal
a > b // Greater than
a < b // Less than
a >= b // Greater than or equals
a <= b // Less than or equals

Conditionals

In Bussin, conditionals are practically the same as in JavaScript.

let x = 12345;
let y = 87655;
let z = 1;

let sum = x + y + z;

if (sum < 10) {
    println("Sum is less than 10.");
} else if (sum >= 10 && sum < 100) {
    println("Sum is in range 10-100.");
} else if (sum >= 100 && sum < 1000) {
    println("Sum is in range 100-1000.");
} else if (sum >= 1000 && sum < 10000) {
    println("Sum is in range 1000-10000.");
} else if (sum >= 10000 && sum < 100000) {
    println("Sum is in range 10000-100000");
} else {
    println("Sum is greater than or equal to 100000.");
}

Loops

Loops in Bussin are the same as in JavaScript.

// While loops
while (cond) {
    body
}

// For loops
for (let i = start; i < end; i++) {
    body
}

Functions

Functions in Bussin are declared with the fn keyword.

fn add(a, b) {
    a + b
}

In Bussin, return statements don't exist. Instead, functions return the last-evaluated expression, similar to functional programming languages like Rust.

// Taken from the README of the GitHub repo, modified
fn perform(x, y) {
    x + y // will do nothing
    x - y
}

Error Handling

Bussin has a simple try/catch system.

try {
    println(a + b);
} catch {
    println("Where's a and b?");
}

Strings

This section is dedicated to strings.

String Formatting

In Bussin, there are two functions for string formatting.

To include a format in a string, add a ${} in a literal.

"Hello, ${}!"

There are two ways to format a string.

// Using strcon
let x = 6969;
let string1 = strcon("X is ${}", x);

// Using format
let hello_world = format("Hello, ${}", "World!");

String functions

Bussin has some more string functions.

trim

trim removes leading and trailing whitespace from a string.

// Taken from the README of the GitHub repo (modified)
let x = trim(" hello "); // "hello"

splitstr

splitstr splits a string with a separator character.

// Taken from README (modified)
lit y be splitstr("Hello,World", ",") rn // ["Hello", "World"]

parseNumber

parseNumber parses a number from a string.

let a = parseNumber("5"); // 5

Bussin X

Bussin X is an esoteric programming language. It supports normal Bussin syntax, however it also supports cool Gen Z syntax. It is transpiled into Bussin before being run.

Bussin X
Paradigm(s) imperative, procedural, declarative
Designed by FaceDev (@FaceDevStuff)
Appeared in 2023
Type system dynamic, gradual, weak (types do literally nothing)
Memory system variable-based
Computational class Turing complete
Reference implementation Bussin X
Influenced by Brainfuck, DreamBerd
File extension(s) .bsx

Features

Syntax from Bussin can be used in Bussin X.

Variables

In Bussin X, variables can be declared with lit x be value rn and constants can be declared with mf x be value rn.

lit i be 12 rn
mf x be "Hello" rn

Objects

In Bussin and Bussin X, objects are made like this

{key1: val1, key2: val2}

And values can be accessed like this.

obj.key

The global objects variable can do a lot of stuff but [Creator of the page]'m too lazy to put it here.

Types

Types in Bussin X don't do anything, they're removed before the lexer kicks in.

// All of these are valid
lit num: number be 0 rn

lit x: number: number: object: string be 3 rn

yall: number(lit: object i: number be 0: object rn i smol 10 rn i plusplus){
    waffle(strcon("Currently at ", i): object)
}: object: object: string

Ternary Operator

Bussin X has a ternary operator with the form

condition then truthy_value ornot falsy_value

Example:

// Taken from README
lit x be 10 rn
lit y be 5 rn
lit z be x thicc y then "thicc" ornot "smol" rn // "thicc"

Statements

Type Bussin Bussin X
Control Flow if (cond) {} else if (cond) {} else {} sus (cond) {} impostor sus (cond) {} impostor {}
for (let counter = start; counter < end; counter++) {} yall (lit counter be start rn counter smol end rn counter plusplus) {}
try {} catch fuck_around {} find_out {}
Function fn bruh

Functions

Bussin Bussin X println(args) waffle(args)
input(text) yap(text)
exec(command) clapback(command)

Operators

Bussin Bussin X
x + y x plus y
x - y x minus y
x * y x times y
x / y [Creator of page] don't know
x += y x beplus y
x -= y x beminus y
x *= y x betimes y
x /= y [Creator of page] don't know
x++ x plusplus
x-- x minusminus
x == y x fr y
x != y x nah y
x > y x thicc y
x < y x smol y
y x carenot y
x && y x btw y

Data Structures

Type Bussin Bussin X
Null null fake
Boolean true nocap
false cap

Misc

"${}" {} prefixed or postfixed by any currency symbol Bussin X supports using currency symbols other than the US Dollar


External Resources