Author Topic: Brainf*ck  (Read 14592 times)

0 Members and 2 Guests are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #15 on: December 08, 2010, 02:10:52 pm »
This actually wouldn't be hard to make a compiler in axe :)

A ON-CALC Compiler... Hum! That would be cool.

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 #16 on: December 08, 2010, 02:44:22 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
ASM looks easier to read than this. O.O

This actually wouldn't be hard to make a compiler in axe :)

A ON-CALC Compiler... Hum! That would be cool.
Also I thought BrainFuck was interpreted, not compiled? ???
« Last Edit: December 08, 2010, 02:44:43 pm by DJ Omnimaga »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #17 on: December 08, 2010, 02:46:05 pm »
Even HEX looks simpler than that to me :)

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Brainf*ck
« Reply #18 on: December 08, 2010, 02:52:15 pm »
It is interpreted, though that doesn't mean that it couldn't be compiled. I made a .NET interpreter recently: http://myserverathome.com/BFI.exe.
Shaun

Offline TravisE

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 182
  • Rating: +33/-0
    • View Profile
    • ticalc.org
Re: Brainf*ck
« Reply #19 on: December 08, 2010, 02:54:16 pm »
In case you don't find that challenging enough, there's always this programming language... :devil:
ticalc.org staff member—http://www.ticalc.org/

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #20 on: December 08, 2010, 02:58:40 pm »
In case you don't find that challenging enough, there's always this programming language... :devil:

No... I just saw Wiki Page, omG that's impossible!

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Brainf*ck
« Reply #21 on: December 08, 2010, 03:18:41 pm »
I went to the languages linked. OMG LOLCODE!!!!

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 thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Brainf*ck
« Reply #22 on: December 08, 2010, 03:20:31 pm »
Actually it is very easy to compile. My compiler mentioned in the second post does just that. It almost directly translates to assembly in fact. > is inc hl, < is dec hl, + is inc (hl), and - is dec (hl). The other four commands are a little more complex, but not much bigger than 10 bytes a piece.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #23 on: December 08, 2010, 03:21:15 pm »
Actually it is very easy to compile. My compiler mentioned in the second post does just that. It almost directly translates to assembly in fact. > is inc hl, < is dec hl, + is inc (hl), and - is dec (hl). The other four commands are a little more complex, but not much bigger than 10 bytes a piece.
A compiler with 8 commands xD There are only8 commands so making a compiler must be easy.

Offline TravisE

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 182
  • Rating: +33/-0
    • View Profile
    • ticalc.org
Re: Brainf*ck
« Reply #24 on: December 08, 2010, 03:21:55 pm »
I went to the languages linked. OMG LOLCODE!!!!

Yeah, I found LOLCODE hilarious.  ;D
ticalc.org staff member—http://www.ticalc.org/

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #25 on: December 08, 2010, 03:22:43 pm »

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 #26 on: December 08, 2010, 03:26:51 pm »
It is interpreted, though that doesn't mean that it couldn't be compiled. I made a .NET interpreter recently: http://myserverathome.com/BFI.exe.
lol nice. Now I wish I knew that language X.x

And yeah I remember about Whitespace and Lolcode. About the latter, Miotatsu wrote a tutorial for it a while ago: http://ourl.ca/4689

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Brainf*ck
« Reply #27 on: December 08, 2010, 05:56:42 pm »
If you're a fan of esoteric programming languages, you should check out the esolang wiki!:
http://esoteric.voxelperfect.net/wiki/Main_Page
Shaun

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Brainf*ck
« Reply #28 on: December 08, 2010, 06:15:10 pm »

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Brainf*ck
« Reply #29 on: December 08, 2010, 07:56:50 pm »
Loooooooooooooooooooool!
I especially liked the Text language.