• Brainfuck
    18 replies, posted
Post examples of your Brainfuck programs here! Here's my version of "Hello World": [code] >+++++++[<++++++++++>-]<.>+++++++[<+++++++>-]<.>++++++[<--->-]<.>++[<+++>-]<.[-]>++++++[<++++>-]<.>++++++++[<+++++++++++>-]<+.>++[<----->-]<.++++++.[-]>+++++++++++++[<++>-]<.[/code]Kudos if you can tell me what it says without compiling it. :v: Oh, and I never actually compiled it yet, but it [I]should[/I] work :P
It doesn't.
Here's a fixed one. [code] >+++++++[<++++++++++>-]<.>+++++++[<+++++++>-]<--.>++++++[<--->-]<.>++[<+++>-]<++.[-]>++++++[<+++++>-]<++.>++++++++[<+++++++++++>-]<+.>++[<----->-]<.++++++.[-]>++++++++++++[<++++>-]<--.[/code]I just got Brainfuck Developer. :iia:
[code] ++++ ++++[>++++++++ ++++++++ ++++++++ +++++++<-]>[>.+<-] [/code] Displays the ascii set
How does one learn brainfuck?
Go to the wiki article, there's not that much to learn. All you really need to know is that numbers represent letters and what a few symbols do.
There was a great site I found. I'll try to post it later.
Well, I got bored so I wrote a Brainfuck interpreter. Dunno why. I'm bored. Pretty cool though eh? [url]http://pastebin.com/0c1SbfUG[/url]
Christ, that's longer than mine :monocle: Not that that's a bad thing. :smile:
Thanks, I get that alot ;)
[QUOTE=RyanPridgeon;20940238]Well, I got bored so I wrote a Brainfuck interpreter. Dunno why. I'm bored. Pretty cool though eh? [url]http://pastebin.com/0c1SbfUG[/url][/QUOTE] Sorry, but i'm stupid and can't figure out how to use that. I know its brianfuck but i can't dissect your C. Could you explain?
[QUOTE=RyanPridgeon;20940238]Well, I got bored so I wrote a Brainfuck interpreter. Dunno why. I'm bored. Pretty cool though eh? [url]http://pastebin.com/0c1SbfUG[/url][/QUOTE] Very clean code :)
[QUOTE=RyanPridgeon;20940238]Well, I got bored so I wrote a Brainfuck interpreter. Dunno why. I'm bored. Pretty cool though eh? [url]http://pastebin.com/0c1SbfUG[/url][/QUOTE] From looking at the code, it doesn't seem to handle skipping nested loops.
It handles nested loops fine. [QUOTE=i300;20964118]Sorry, but i'm stupid and can't figure out how to use that. I know its brianfuck but i can't dissect your C. Could you explain?[/QUOTE] What part don't you understand? [QUOTE=shill le 2nd;20964536]Very clean code :)[/QUOTE] Thanks :)
[QUOTE=RyanPridgeon;20975334]It handles nested loops fine.[/QUOTE] No, it doesn't. Take for example this: [code][[]++++++++++++++++++++++++++++++++++.][/code] It should skip the whole loop and do nothing, but it only skips past the first ].
Damn. Cheers for noticing haha
I once wrote a Brainfuck interpreter. It was bloody awesome if you ask me :D It never occurred to me that I could recurse when I encountered a loop, so I implemented by own dynamically-sizing stack
Sorry, you need to Log In to post a reply to this thread.