RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Brainfuck - the little bit "different" programming language.

0 Members and 1 Guest are viewing this topic.

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
This is a very interesting programming language, having ONLY 8 commands. It basically works that way that it takes up an array of data (you can set up how much, I think about 32768 was default). Everything can be made by moving around in the array and processing data. Here is an example of a "Hello World." program in Brainfuck.

Quote
++++++++++
[>+++++++>++++++++++>+++>+<<<<-] The initial loop to set up useful values in the array
>++.                             Print 'H'
>+.                              Print 'e'
+++++++.                         Print 'l'
.                                Print 'l'
+++.                             Print 'o'
>++.                             Print ' '
<<+++++++++++++++.               Print 'W'
>.                               Print 'o'
+++.                             Print 'r'
------.                          Print 'l'
--------.                        Print 'd'
>+.                              Print '!'
>.                               Print newline

The commands are:

Quote
>   increment the pointer (to point to the next cell to the right).
<   decrement the pointer (to point to the next cell to the left).
+   increment (increase by one) the byte at the pointer.
-   decrement (decrease by one) the byte at the pointer.
.   output the value of the byte at the pointer.
,   accept one byte of input, storing its value in the byte at the pointer.
[   jump forward to the command after the corresponding ] if the byte at the pointer is zero.
]   jump back to the command after the corresponding [ if the byte at the pointer is nonzero.

Any other characters are considered comments. Basically the C/C++ equivalents are:

Quote
>   ++ptr;
<   --ptr;
+   ++*ptr;
-   --*ptr;
.   putchar(*ptr);
,   *ptr=getchar();
[   while (*ptr) {
]   }

More info:

http://en.wikipedia.org/wiki/Brainfuck
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Lolz @ this language :tpg:
Wonder why they call it Brainfuck  ::)

I am definitely not going to use this, but it gave a good laugh  ;8

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Totally. I also check what "Obfuscated coding" is. Totally lolage. xD

http://en.wikipedia.org/wiki/Obfuscated_code
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
It really is :tpg:

*****
<3
Rep:
Level 90
Holy mother of lord! What the hell? This is the most weirdest language, but I understand it a lot better than any other language...wait till my IT teacher hears about this  ;D

~Winged



***
Rep:
Level 87
Hey guys I use this more then lisp, c#, and liberty basic combined! (i don't know any of them...)

***
Rep:
Level 88
...
That thing is just plain weird. o.O I really haven't seen anything less efficient than that.

Brainfuck indeed.
« Last Edit: March 17, 2007, 09:55:01 AM by .:Pyroken Serafoculus:. »
...

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Well, as stated in wiki it isn't supposed to be efficient, but to be a little challenge for programmers.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
A blessing
Rep:
Level 91
<3 Back.
LMAO! I will have to try this someday, when I am more experienced in programming. XD