• Brainfuck language
    26 replies, posted
I need some help please, I am trying to know just the basics in Brainfuck. I need the translations of what a is, b is, etc... Much thanks for the help. PS: I need from a-z, 0-9, and the . Thanks
[url]http://en.wikipedia.org/wiki/Brainfuck[/url], this is your first point of call.
[url]http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters[/url] For example: [code] # First a simple loop +++++ +++++ # Initializes cell 0 to 10 [ > +++++ # Increases cell 1 by 5 < - # Decreases cell 0 by one ] # Cell 1 is now 50, two over the ASCII character "0", so... > -- # Decrease cell 1 by two # Cell 1 is now 48 (0 in ASCII), start looping through 0-10 < +++++ +++++ # 10 iterations [ > . + < - ][/code] Since whitespace doesn't matter, that can be written as [code]++++++++++[>+++++<-]>--<++++++++++[>.+<-][/code] Outputs [code]0123456789[/code]
tried there but not enough info
[QUOTE=CountNoobula;25481436]I need some help please, I am trying to know just the basics in Brainfuck. I need the translations of what a is, b is, etc... Much thanks for the help. PS: I need from a-z, 0-9, and the . Thanks[/QUOTE] Translations? You mean the ASCII value?
[QUOTE=Matthew0505;25481625]There's no point in learning this unless you are going to write a proper programming language that compiles to brainfuck. It doesn't even have binary addition[/QUOTE] Of course there's no point. Who said there was a point to it? It's just fun to mess around with.
Brainfuck has to be one of the simplest languages ever.
Arghh Brainkfuck. What was that language made up of only spaces and indents? That was some serious mind fuck.
No, what you're thinking of is whitespace.
Tried my hand a Brainfuck [code] +++++ +++++ [ > +++++++ > +++++ +++++ ++ > +++++ +++++ > +++++ +++++ ++ > +++ > +++++ ++ > +++++ +++++ + > +++++ +++ > +++++ +++++ > +++++ +++++ + > +++++ +++++ > +++++ +++++ ++ > +++++ +++++ > +++++ +++++ + <<<<<<<<<<<<<<- ] >.>---.>-.>---.>++.>----.>++++.>---.>+++++.>.>++.>---.>-.>---. [/code] [b]Output:[/b] Fucu BrMinfuck Well shit.
[QUOTE=Matthew0505;25481625]There's no point in learning this unless you are going to write a proper programming language that compiles to brainfuck. It doesn't even have binary addition[/QUOTE] Somebody should write a program that compiles x86 ASM to brainfuck, then compiles the brainfuck to 6502 ASM and runs it in [url=http://www.6502asm.com/]a Javascript 6502 emulator[/url].
Brainfuck could actually be bearable if it had some basic inline function support. But then again it was never meant to be bearable:v:
[QUOTE=Matthew0505;25481625]There's no point in learning this unless you are going to write a proper programming language that compiles to brainfuck. It doesn't even have binary addition[/QUOTE] It's an Esoteric Language, it doesn't need a point.
If you're getting bored with brainfuck, try "subleq". It's an assembly language for a theoretical processor that only has one instruction. That's right. One instruction. [url]http://esolangs.org/wiki/Subleq[/url] [url]http://en.wikipedia.org/wiki/One_instruction_set_computer[/url] 99 Bottles of Beer: [url]http://www.99-bottles-of-beer.net/language-oisc-1395.html[/url] [editline]18th October 2010[/editline] [QUOTE=raBBish;25481530]Since whitespace doesn't matter, that can be written as [code]++++++++++[>+++++<-]>--<++++++++++[>.+<-][/code] Outputs [code]0123456789[/code][/QUOTE] I ported your program to [url=http://vivin.net/projects/cherryblossom]CherryBlossom[/url]: [code]beautiful blossom sweet pretty blooming sunray fattening fire fields dreaming mulling bird getting warm rosy sun smiles landing, fog returns heavenly autumn desolate raining daybreak flowering jasmine! fire rose sweetly grows remembering sunlit love what sky paints lush snow? alone; home.[/code] Not strict CherryBlossom though, since there is a trailing stanza not belonging to a haiku.
back to topic please, could someone with some xp please give me teh values of the following: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, thanks
[QUOTE=CountNoobula;25504228]back to topic please, could someone with some xp please give me teh values of the following: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, thanks[/QUOTE] What? If you mean their ASCII values, [url]http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters[/url]
no, their brainfuck value... Eg. H = > ++ .
You seriously don't know how that language works. + increments the current location by one and . outputs the character represented by the ASCII value in the current location. > ++ . is not H in brainfuck. It just moves the location pointer to the right, increases the value of it by 2 and outputs the char represented by that ASCII value. (^B apparently) Why you thought it represented H is because the wikipedia example first fills four locations with the numbers 70/100/30/10 to make it easier to output the letter later. (And location probably isn't the correct term, whatever you want to use)
Why don't you read the entire wikipedia article jesus christ. It's like you looked at the hello world program and saw > ++ and though oh so that is H. If you'd just taken the time to read the god damn article you'd know what's what.
:psyduck: my mind is full of fuck
[QUOTE=tehperzon;25507293]:psyduck: my mind is full of fuck[/QUOTE] You mean your brain?:smug:
[QUOTE=ralle105;25507802]You mean your brain?:smug:[/QUOTE] I'm pretty sure he means his mind. 'Cuz having your [B]brain[/B] full of anything wouldn't be really nice.
[QUOTE=ralle105;25507802]You mean your brain?:smug:[/QUOTE] your avatar fills my mind with more fuck :psyduck:
Here's a brainfuck program that will print out the numbers and their corresponding "+" values. [code] ++++++++++ >+++++++++++++++++++++++++++++++++++++++++++ >++++++++++++++++++++++++++++++++ >++++++++++ [ >++++ >++++ >+++++ >+++++ >+++++ >+++++ >+++++ >+++++ >+++++ >+++++ <<<<<<<<<<- ] >++++++++. <<.>>[<<<.>>>-] <<<<.>>>> >+++++++++. <<<.>>>[<<<<.>>>>-] <<<<<.>>>>> >. <<<<.>>>>[<<<<<.>>>>>-] <<<<<<.>>>>>> >+. <<<<<.>>>>>[<<<<<<.>>>>>>-] <<<<<<<.>>>>>>> >++. <<<<<<.>>>>>>[<<<<<<<.>>>>>>>-] <<<<<<<<.>>>>>>>> >+++. <<<<<<<.>>>>>>> [<<<<<<<<.>>>>>>>>-] <<<<<<<<<.>>>>>>>>> >++++. <<<<<<<<.>>>>>>>> [<<<<<<<<<.>>>>>>>>>-] <<<<<<<<<<.>>>>>>>>>> >+++++. <<<<<<<<<.>>>>>>>>> [<<<<<<<<<<.>>>>>>>>>>-] <<<<<<<<<<<.>>>>>>>>>>> >++++++. <<<<<<<<<<.>>>>>>>>>> [<<<<<<<<<<<.>>>>>>>>>>>-] <<<<<<<<<<<<.>>>>>>>>>>>> >+++++++. <<<<<<<<<<<.>>>>>>>>>>> [<<<<<<<<<<<<.>>>>>>>>>>>>-] <<<<<<<<<<<<<.>>>>>>>>>>>>> [/code] Enjoy :v:
thank you :)
Sorry, you need to Log In to post a reply to this thread.