Author Topic: Brainf*ck  (Read 14737 times)

0 Members and 1 Guest are viewing this topic.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Brainf*ck
« on: December 07, 2010, 08:07:25 pm »
I found a brainfuck compiler on ticalc.org. Not knowing what it was, I googled it. Apparently, it is a super-minimalist language with only 8 operators. Anyone tried it yet?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Brainf*ck
« Reply #1 on: December 07, 2010, 08:10:21 pm »
Yep: http://ourl.ca/6692/110036 ;D

As for the compiler, any chance it's made by thepenguin77/juju2143?

EDIT: Here: http://ourl.ca/6692/110343
« Last Edit: December 07, 2010, 08:11:02 pm by Deep Thought »




Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Brainf*ck
« Reply #2 on: December 07, 2010, 11:51:11 pm »
I only made an über-slow interpreter.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Brainf*ck
« Reply #3 on: December 07, 2010, 11:52:57 pm »
I downloaded the stuff to develop in it, but I haven't had the time to try it out yet. ;_; I also need to find a good tutorial. :P

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Brainf*ck
« Reply #4 on: December 08, 2010, 01:04:11 am »
Oh wow I remember you posted that juju. I wonder what kind of game quality can be made in Brainfuck?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Brainf*ck
« Reply #5 on: December 08, 2010, 01:14:29 am »
Well its been proven Turring Complete, which means that you could make Portal if you were so inclined :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Brainf*ck
« Reply #6 on: December 08, 2010, 01:15:35 am »
O.O ?

I wonder how the code would look like...

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Brainf*ck
« Reply #7 on: December 08, 2010, 01:32:47 pm »
It's set up so you have 30kb of memory all set to zero, and a pointer at the zeroth byte.
There's only 8 commands:
< > increment or decrement the pointer by 1
+ - increment or decrement the value of the byte the pointer points to
. , print or store a character in the current cell
[ if the value of the current byte is zero, then go past the corresponding ]
] go back to the matching [
What I found really ... odd ... is someone wrote a brainf*ck ... in brainf*ck.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #8 on: December 08, 2010, 01:35:25 pm »
* ScoutDavid is amazed at how hard this programming language is

Oooh, I love BrainFuck :D  Try this one on for size (routine sucks probably >.>)
Code: [Select]
->[->+>+>+<<<]>>>
[-<<<+>>>]<<<<
[->>[-<+>]>[->+<<+>]>[-<+>]<<<<]>,
Multiplies the first number by the second number, and leaves the result in the... 2nd slot I think... Line breaks were added for readability :D

This is wow...

Ashbad

  • Guest
Re: Brainf*ck
« Reply #9 on: December 08, 2010, 01:37:07 pm »
+++++ +++++                  initialize counter (cell #0) to 10
[                               use loop to set the next four cells to 70/100/30/10
    > +++++ ++              add  7 to cell #1
    > +++++ +++++           add 10 to cell #2
    > +++                   add  3 to cell #3
    > +                        add  1 to cell #4
    <<<< -                  decrement counter (cell #0)
]                   
> ++ .                    print 'H'
> + .                      print 'e'
+++++ ++ .              print 'l'
.                          print 'l'
+++ .                   print 'o'
> ++ .                  print ' '
<< +++++ +++++ +++++ .  print 'W'
> .                     print 'o'
+++ .                   print 'r'
----- - .               print 'l'
----- --- .             print 'd'
> + .                   print '!'
> .                     print '\n'


This prints hello world
« Last Edit: December 08, 2010, 01:37:46 pm by Ashbad »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #10 on: December 08, 2010, 01:38:35 pm »
+++++ +++++             initialize counter (cell #0) to 10
[                       use loop to set the next four cells to 70/100/30/10
    > +++++ ++              add  7 to cell #1
    > +++++ +++++           add 10 to cell #2
    > +++                   add  3 to cell #3
    > +                     add  1 to cell #4
    <<<< -                  decrement counter (cell #0)
]                   
> ++ .                  print 'H'
> + .                   print 'e'
+++++ ++ .              print 'l'
.                       print 'l'
+++ .                   print 'o'
> ++ .                  print ' '
<< +++++ +++++ +++++ .  print 'W'
> .                     print 'o'
+++ .                   print 'r'
----- - .               print 'l'
----- --- .             print 'd'
> + .                   print '!'
> .                     print '\n'


Code: [Select]
+++++ +++++           
[                       
    > +++++ ++             
    > +++++ +++++           
    > +++                   
    > +                   
    <<<< -                 
]                   
> ++ .                 
> + .                   
+++++ ++ .           
.                       
+++ .                   
> ++ .                 
<< +++++ +++++ +++++ . 
> .                 
+++ .                 
----- - .           
----- --- .             
> + .                   
> .

Can this be done without entering lines?

Ashbad

  • Guest
Re: Brainf*ck
« Reply #11 on: December 08, 2010, 01:39:27 pm »
yeah

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #12 on: December 08, 2010, 01:43:18 pm »
Code: [Select]
+++++ +++++ [ > +++++ ++ > +++++ +++++ > +++ > + <<<< - ] > ++ .> + . +++++ ++ . . +++ .  > ++ . << +++++ +++++ +++++ . > . +++ . ----- - . ----- --- . > + . >
If I ever told a programming teacher at a University this was a Hello World program he would not believe it.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Brainf*ck
« Reply #13 on: December 08, 2010, 01:55:17 pm »
Code: [Select]
+++++ +++++ [ > +++++ ++ > +++++ +++++ > +++ > + <<<< - ] > ++ .> + . +++++ ++ . . +++ .  > ++ . << +++++ +++++ +++++ . > . +++ . ----- - . ----- --- . > + . >
If I ever told a programming teacher at a University this was a Hello World program he would not believe it.
No, you're doing it wrong. Remove the spaces :P
Code: [Select]
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>

Ashbad

  • Guest
Re: Brainf*ck
« Reply #14 on: December 08, 2010, 02:01:12 pm »
This actually wouldn't be hard to make a compiler in axe :)