Know the Programming Languages: BRAINFUCK and BITCH

  3 mins read  

BRAINFUCK and BITCH

This day I was surfing the internet and looking for compiler test content and I found some rather different things, among them, I found some very strange programming languages.

Better known as ESOTERIC languages. 😱

Introduction

An esoteric (ess-oh-terr-ick) programming language, or esolang, is a computer programming language designed for experimenting with strange ideas, difficult to program or as a joke, not for practical use. .

There is a small but active Internet community of people who create esoteric programming languages ​​and write programs in them, and discuss their computational properties (for example, if those languages ​​are complete in Turing).

brainfuck

brainfuck, also known as brainfck or BF, is an esoteric programming language noted for its extreme minimalism, created by Urban Müller in 1993. It is a complete Turing language designed to challenge and confuse programmers, and is not useful for practical use.

Because of its simplicity, developing compilers and interpreters for this language is much easier than for other languages. The name of the language is generally not capitalized (starting with a lowercase letter), despite being a proper noun.

Writing a “Hello World!” at brainfuck

First, create a file with extension **. Bf **: vim hello-world.bf and insert the following contents into the file:

This is ** Hello World! ** (famous: Hello, World!) On brainfuck

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.++++++
+..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Now we need to have an interpreter to generate the output. I recommend you install bff on Gentoo You can install using Portage:

emerge bff

There are others such as: beef, for example. If I’m not mistaken, this is available for Debian, Ubuntu, Linux Mint and among other distros, to install would be: sudo apt install beef.

After installing use the interpreter command to run using bff:

bff hello-world.bf

The result will be as expected! 😀

brainfuck terminal output

For more information, see their website: http://aminet.net/package.php?package=dev/lang/brainfuck-2.lha

Bitch

The language Bitch was created by Helen 0903. The BITCHWISE name is a portmanteau between “bitch” and “bitwise”. It originates from the word “bitwise” as meaning “bitwise operations” - the only mathematical operations available in both languages.

The use of the dirty word “bitch” in “BITCHWISE” is to convey anger in a sudden and rude manner. They combine to help convey the combination of difficulty and esoteric design in the language.

Writing a “Hello World!” in Bitch

Bitch’s proposal is a bit different, it uses the Java compiler together with an interpreter. So to create and generate Hello World! create a .bitch file:

vim hello-world.bitch

And insert this content in:

#72/#101/#108/#108/#111/#44/#32/#119/#111/#114/#108/#100/#33/

Now let’s turn this . To use the compiler, follow these commands:

git clone https://github.com/Helen0903/bitch
cd bitch/
javac bitch.java
java bitch -c hello-world.bitch

See image below:

Of course you will need JDK and Git.

bitch terminal output

If you want to test online use tio.sh, and remember to add the -c parameter, like this:

  • Command-line options✚ add-c. Then just click on play ▶ ️ at the top.

Conclusion

This subject is really not for everyone, it is more for those who like to know “under the hood”. It’s way beyond a job to program in a famous programming language! ☺️ If you like these subjects, I recommend you visit the site: https://esoteric.codes/, there is a lot of cool stuff there! 😯

Hugs!

Join our Facebook group