Boner++

From Esolang
Jump to navigation Jump to search

Boner++ is a joke esolang based on various common phrases used in a Discord server. Its interpreter is written in Python, and the language itself is a simple translation of Python.

Overview

Boner++ simply replaces a number of Python's core functional keywords with various other words or characters, as defined in the below table:

Command Python Keyword or Operator
gamming for
economy while
shitpost in
@heretic if
wtf else
seOH elif
whiny try
shitbaby except
clong break
clobbong continue
cirno input
gebneralk class
meme def
jeff return
sex -
yang +
gec %
anim ==
boner =
unfunwaa <
funwaa >
strikesy <=
tero >=
xon and
detecotb or
fuck is
zenzi not
hpock import
tysob from
blorgia as
dick with
server_for_anime True
server_not_for_anime False
Ele_ None
ban del
shit print
zœœp yield
troll lambda
ADL raise
oil pass
zoomer nonlocal
boomer global
doge finally
sus await
amongus assert
chungus async
blacksheets dict
thumbnail str
xomc int
dicde double
soinenr float
touhou chr
osu map
reimu set
based max
cringe min
range
mips round
vig sum
privilege super
dino tuple
rshig zip
racism type
dong len
balls list
jeb open
femboy join
epyc file
skeet split
goof append
cock run
cumburger []
eburger empty string
shart message
sprite event

Hello World

shit('Hello, World!')

DogShit (FizzBuzz)

gamming dogshit shitpost ⑨(101):
    @heretic dogshit gec 3 anim 0 xon dogshit gec 5 anim 0:
        shit('DogShit')
        clobbong
    seOH dogshit gec 3 anim 0:
        shit('Dog')
        clobbong
    seOH dogshit gec 5 anim 0:
        shit('Shit')
        clobbong
    wtf: shit('DogShit')

Fibonacci Numbers

nterms boner xomc(cirno("How many terms? "))

n1, n2 boner 0, 1
count boner 0

@heretic nterms strikesy 0:
   shit("Please enter a positive integer")
seOH nterms anim 1:
   shit("Fibonacci sequence upto",nterms,":")
   shit(n1)
wtf:
   shit("Fibonacci sequence:")
   economy count unfunwaa nterms:
       shit(n1)
       nth boner n1 yang n2
       n1 boner n2
       n2 boner nth
       count boner count yang 1

Variables

As can be seen in the above examples, the variables used in Boner++ programs can really be named whatever one wants, so long as they don't conflict with the keywords laid out above. But optimal effect is achieved with the use of keywords in all caps, as can be seen in the following function which returns the sublists of list FIDGET_SPINNER:

meme SKYOINK(FIDGET_SPINNER): 
    clovisobong boner cumburger
    gamming SPLOINK shitpost ⑨(dong(FIDGET_SPINNER)):
      gamming SKYEET shitpost ⑨(1,dong(FIDGET_SPINNER) yang 1):
       @heretic zenzi FIDGET_SPINNER[SPLOINK:SKYEET] anim cumburger:
            clovisobong.goof(FIDGET_SPINNER[SPLOINK:SKYEET])
    jeff clovisobong

In the above code one can also see an interesting construct in the form of

... zenzi FIDGET_SPINNER[SPLOINK:SKYEET] anim cumburger:

This line is equivalent to the Python

... not FIDGET_SPINNER[SPLOINK:SKYEET] == []:

The reason this construct is used rather than the simple != is that it is more in line with the ideology behind Boner++, which essentially amounts to maximizing the amount of boners in the code. This can be interpreted as maximizing the amount of anim, as it is a known fact that watching anim leads to boner.

Interpreter

The interpreter is just one Python file, which contains a dictionary and a couple lines of code to swap the relevant keywords to turn the input file into valid Python before running. The interpreter can be run as follows:

python <interpreter filename>.py <input .me filename>

This will import the Boner++ file filename.me, convert it to Python, and then run it.

Caveats

The first caveat is of course that the interpreter uses the exec function to parse the input as Python after replacing the syntax with normal Python syntax using the above dictionary. This function may cause harm to your computer if malicious code is run unknowingly, so proceed with the usual caution.

The second caveat is that the implementation is extremely low-effort and, of course, can cause issues. The main issue is that output may be contaminated by conversions from the dictionary -- for instance, if the string "shit" is created in the original Boner++ file, the interpreter will convert it to "print" and it will then run with the string as "print" rather than "shit".

The third caveat is that Boner++ uses a special character as one of its symbols (namely, ⑨, which corresponds to Python's range function). This necessitates the inclusion of the line

# -*- coding: utf-8 -*-

at the beginning of the input file. (In the latest version, this is not required and in fact discouraged as the above line is included in the interpreter.)

Other things to be aware of are that certain operators, due to their occurrence within other various operators, have spaces around them. These include the assignment operator boner and comparison operators such as funwaa and unfunwaa.