Bruhfunk

From Esolang
(Redirected from UnholyC)
Jump to navigation Jump to search

Bruhfunk (previously known as "UnholyC") is an esoteric programming language made by User:Nurdle. It shares a lot in common Brainfuck and ABFC (Another BrainFuck Clone) (also by Nurdle). It was also inspired heavily by malbolge, however it strives to be ridiculously tedious rather than just impossible to use.

Language Overview

Similarly to brainfuck, Bruhfunk uses a pointer to access an Array containing exactly 65536 numbers. It prefers ABFC's way of handling flow control, using labels + goto instead of while loops.

Queueing

Bruhfunk holds operations in a queue, it only has two operations it can preform: multiplying and subtracting. lowercase letters do multiplication, while uppercase letters do subtraction. table showing multiplication and subtraction values:

-  low  UPR
q  0    -49
w  2     6
e  3     8
r  4     5
t  5     7
y  6     17
u  7     14
i  8     26
o  9     13
p  10    10
a  11    11
s  12    15
d  13    19
f  14    28
g  15    99
h  16    50
j  17    78
k  18    45
l  19    87
z  20    97
x  21    23
c  22    16
v  23    77
b  24    55
n  26    35
m  27    25

(Note: Negative numbers turn into their positive counterpart rather than underflowing) Also, every time a 13 (d and O) is used in a program, it changes to a random number between 0 and 13 after its first use.

Commands

Bruhfunk uses numbers 0-4 to do different things. They all change values based off of the queue (excluding 1 which is used to mark positions that can be jumped to in code)

Caption text
Command Description
0 Applies the operations stored in the queue to the pointer's position.
1 Marks a place that can be jumped to.
2 Change the pointer's value by applying the queue to it.
3 Take the pointer's value, apply the queue to it (but don't store it), and find the corresponding label. (if result refers to a non-existent goto-label then the program terminates)
4 Change the mode of the pointer using the queue.

Modes

There are 2 "modes" in Bruhfunk, the default value is 0, which is used for reading and writing the tape, While mode 1 is used for reading and writing to the console (yes you have to get input before the program starts). The 4 command can change the current mode value, the mode value is automatically bounded to the numbers 1 and 0, if you underflow or overflow it will just loop back over.

Pointer

The "tape" as it is called, is accessed using the pointer on mode 0, the tape goes from 0 to 65536, going over 65536 or under 0 will just cause the pointer to loop back over. The same is true about the input/output, but it only goes from 0 to 1024.

Examples

"HELLO" Program

This is the code for outputting the word "HELLO", separated at each number to enhance readability. Written by Nurdle himself.

Q4
Wyw2
QH0
Xe2
w0
Dr2
qQHe0
Dr2
qQHr0
YtW2

Count Down Program

This code outputs the numbers 10 to 0 separated by line breaks. Again, written by Nurdle himself.

Q4
Tu2
QH0
Ey2
qQHw0
P2
qQHe0
De2
qQHr0
P2
qQHt0
Ti2
qQHy0
P2
qQHu0
At2
qQHi0
P2
qQHo0
Wo2
qQHp0
P2
qQHa0
WpT2
qQHs0
P2
qTW0
Or2
qTw0
P2
qRe0
Ye2
qEw0
P2
qY0
Pt2
qQHow0
P2
qD0
Tu2
qRr0
P2
qTe0
Ey2

See Also

External Resources