Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Brain Fuck Programming language...
Reply
Posted 2002-04-06, 11:58 AM
I bet a lot of you would be surprised that there are tons of programming languages out there which were created solely for fun, and to be as complicated as possible.

Enter Brain F u c k (or commonly refered to as BrainF lol).

What does it consist of?
+-<>,.[]

*counts* Yep. That's all 8 of them. That is the whole language. 8 lousy characters.

If it's confusing now, here's some sample code:
Code:
>
+++++++++[<+++++++>-]<++++.---------.>>
++++++++++[<+++++++++>-]<++.<++++.,
>>>++++++++++.>>+++++++++[<+++++++>
-]<+++.>>+++++++++++[<+++++++++>-]<--
.+++.>>++++++[<+++++>-]<++.>>++++++++
+++[<+++++++++>-]<.>>+++++++++++[<++
++++++++>-]<+.--..>>+++++++++++[<+++++
++++>-]<--.>>+++++++++++[<++++++++++>-]
<.>>+++++++++++[<+++++++++>-]<+.>>++++
++[<+++++>-]<++.>>+++++++++++[<+++++++
+++>-]<+.+++.>>++++++[<+++++>-]<++.>>++
+++++++++[<+++++++++>-]<+++.>>+++++++
++++++++[<+++++++>-]<.+++.-------.>>+++++
+[<+++++>-]<++.>>+++++++++++[<+++++++
+++>-]<.>>+++++++++++[<+++++++++>-]<--
.>>+++++++++++[<++++++++++>-]<-.>>++++
+++++++++++[<+++++++>-]<----.>>++++++++
++.
(I added carriage returns for the benefit of all of you :P BF code usually can't contain any.)

I wrote that myself by the way ;D Now I'd tell you exactly what's going on in it, but I can't entirely remember! All I can say is that it *looked* like a C:\> prompt, but didn't do much, just took some input, didn't even look at it, and did some output.

I'm gonna try to remember this from memory, so it may be a bit off.
+: Increases current register
-: Decreases current register
.: Outputs current register
,: Gets input (into current register??? I can't remember)
>: Moves to next register
<: Moves to previous register
[: Start bracket (very odd)
]: End bracket (very odd)

Now the [ ] characters are quite odd to say the least....using them you can multiply registers..I have no idea how it works, but I used it in my code to increase the number in the current register using less characters...

There are lots of sites on BrainF, I'm sure if you're interested you can find one
Old
Profile PM WWW Search
spa is neither ape nor machine; has so far settled for the in-betweenspa is neither ape nor machine; has so far settled for the in-between
 
spa
 



 
Reply
Posted 2002-04-06, 12:09 PM in reply to spa's post "Brain Fuck Programming language..."
I wish I understood the whole programming languages/stuff/yeah... My dad knows C++ and PASCAL tho... I guess I should ask him...
Old
Profile PM WWW Search
Wiccan][V][asta enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzWiccan][V][asta enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
Wiccan][V][asta
 



 
Reply
Posted 2002-04-06, 01:01 PM in reply to spa's post "Brain Fuck Programming language..."
My dad's a web deisgner though he did do c++ for a little while
Old
Profile PM WWW Search
ZERONX is neither ape nor machine; has so far settled for the in-betweenZERONX is neither ape nor machine; has so far settled for the in-between
 
ZERONX
 



 
Reply
Posted 2009-12-24, 04:05 PM in reply to spa's post "Brain Fuck Programming language..."
I'm currently learning BF (though there's not much to learn). the "," command put single-character input into the current register. The "]" command loops back to the corresponding "[" command if the value at the current register is not equal to 0. If it is equal to 0, then the "]" is ignored.
Old
Profile PM WWW Search
floppy_gunk is neither ape nor machine; has so far settled for the in-betweenfloppy_gunk is neither ape nor machine; has so far settled for the in-between
 
floppy_gunk
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:01 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.