Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: mdr1 on December 27, 2012, 11:56:22 am

Title: Interpretor of BrainFuck
Post by: mdr1 on December 27, 2012, 11:56:22 am
Hi there !

This is my first public project on ndless. As you may have bet, it runs BrainFuck programs. It works with ndless 3.1.
Read the readme.txt to know how you can use it. Enjoy !

Last update : BrainFuck 1.2 (http://ourl.ca/18020/331539)

=============================================================================================

Bonjour à tous !

C'est mon premier projet publique pour ndless. Comme vous l'avez sans doute deviné, il exécute les programmes codés en BrainFuck (http://fr.wikipedia.org/wiki/Brainfuck) et tourne sous ndless 3.1.
Lisez le lisezmoi.txt pour savoir comment l'utiliser. Enjoy !

Dernière mise à jour : BrainFuck 1.2 (http://ourl.ca/18020/331539)
Title: Re: BrainFuck
Post by: Sorunome on December 27, 2012, 01:25:19 pm
What brainfucking did I start.....lol
And nice :P
Title: Re: BrainFuck
Post by: Keoni29 on December 27, 2012, 01:27:06 pm
We all heard of it before, but you reminded us :)
Title: Re: BrainFuck
Post by: ElementCoder on December 27, 2012, 01:27:50 pm
Lol nice :) there should be a program for this in nspire BASIC too somewhere. Sorunome what did you start D:
Title: Re: BrainFuck
Post by: Keoni29 on December 27, 2012, 01:39:45 pm
The brainfuck craze
Title: Re: BrainFuck
Post by: Sorunome on December 27, 2012, 01:40:34 pm
Lol, I only looked into it for a afternoon.
And made a IRC bot for it
And suddenly people started makeing brainfuck in axe.
Title: Re: BrainFuck
Post by: mdr1 on December 27, 2012, 02:11:56 pm
Lol, since I posted this application, the chatbox is filled of Brainfuck programs. :P

Sorunome, I tested the code of your signature with my program :

Quote
++++++[>++++++++++<-]>++++++++.<+++[>+++++++++++<-]>.+++++++++++++.--.<+++[>+++<-]>.<+++[>>++++++++++<<-]>>++.<<+++++++[>-------<-]>.<+++[>+++++++++++++<-]>..+++++++.<+++[>-----<-]>--.<++[>++++++<-]>++.

The result is :

(http://img836.imageshack.us/img836/7994/capture7p.png)

 :P
Title: Re: BrainFuck
Post by: epic7 on December 27, 2012, 05:29:20 pm
So it's no longer the game? :P

I should download this and then find a way to make an interpreter for yet another platform :P
Title: Re: BrainFuck
Post by: Sorunome on December 27, 2012, 05:30:05 pm
My sig has two brainfuck codes, and the output was correct :D
Title: Re: BrainFuck
Post by: mdr1 on December 27, 2012, 06:27:21 pm
I updated the interpretor :
Now, you can use a BrainFuck program without having to rename everytime.
Title: Re: BrainFuck
Post by: mdr1 on December 28, 2012, 10:04:17 am
New update :
 * correction of an error appearing when the condition for a '[' is false at the first turn
 * added a little red scare at the top rigth of the screen to show when the program waits for a key to be pressed
 * added a vertical automatic scrolling
 * added the change of color when the program finishes
 * added the showing of an error when the opening of the file failed
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 28, 2012, 02:59:14 pm
brainfuck has no errors :P
if it false on first turn it is supposed to skip the [] block, that's how you do if conditions :P
Title: Re: Interpretor of BrainFuck
Post by: zero44 on December 28, 2012, 04:51:32 pm
Sorunome, now I have more stuff to do for you :

•BF compiler to Axe source on z80
•BF interpertor in basic z80
•BF interpretor in basic nspire
•BF interpretor in BF :)
Title: Re: Interpretor of BrainFuck
Post by: lkj on December 28, 2012, 05:04:59 pm
There's already a BF interpreter in nspire basic on ticalc http://www.ticalc.org/archives/files/fileinfo/433/43365.html (http://www.ticalc.org/archives/files/fileinfo/433/43365.html) ;)

I'll have to learn Brainfuck :D
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 28, 2012, 06:09:33 pm
Learning brainfuck is easy, mastering takes a lifetime :P
Title: Re: Interpretor of BrainFuck
Post by: Jim Bauwens on December 28, 2012, 06:15:01 pm
Don't forget that Homer made a BF interpreter in Lua ^^

Anyways, looks fun :)
Title: Re: Interpretor of BrainFuck
Post by: DJ Omnimaga on December 28, 2012, 10:36:53 pm
It would be funny if all of a sudden, Brainfuck took over Lua and Axe as most popular Omnimaga languages for calcs. I hope not, though, considering how hard it is to read. :P
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 29, 2012, 12:17:50 pm
Then we would be Omnimaga: The brain fuckers of tomorrow.
Title: Re: Interpretor of BrainFuck
Post by: Nick on December 29, 2012, 01:27:35 pm
Then we would be Omnimaga: The brain fuckers of tomorrow.
lol, make it brainf*ckers then, because google doesn't like f*ckers without *
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 29, 2012, 01:28:33 pm
how about we go innovative and do the brainfu*kers, lol
Title: Re: Interpretor of BrainFuck
Post by: mdr1 on December 29, 2012, 02:01:56 pm
I'll respect the one who'll do the game "More or Less" to bet a number between 0 and 999 in Brainfuck. :P
Title: Re: Interpretor of BrainFuck
Post by: Nick on December 29, 2012, 02:03:57 pm
Can you even store values with that language? otherwise it's not really possible i guess..
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 29, 2012, 02:04:29 pm
yes, you can store values, but it is a pain, lol, but no long-term storage :P
Title: Re: Interpretor of BrainFuck
Post by: Nick on December 29, 2012, 02:05:09 pm
Then I think the challenge is set. Sorunome, make us 'more or less' in brainf*ck, NOW!
Title: Re: Interpretor of BrainFuck
Post by: mdr1 on December 29, 2012, 02:14:30 pm
Can you even store values with that language? otherwise it's not really possible i guess..
That's nearly the only thing we can do. :P
In fact, you can do all what you want to do in theorie with Brainf*ck.
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 29, 2012, 02:23:14 pm
Then I think the challenge is set. Sorunome, make us 'more or less' in brainf*ck, NOW!
lol, but you have no random numbers, dat's ze problem :P
Title: Re: Interpretor of BrainFuck
Post by: mdr1 on December 29, 2012, 02:26:17 pm
I don't think it's the major problem. :P
Just ask a number to a first player without displaying it.
Title: Re: Interpretor of BrainFuck
Post by: jacobly on December 29, 2012, 04:45:01 pm
I'll respect the one who'll do the game "More or Less" to bet a number between 0 and 999 in Brainfuck. :P

Someone challenged me to make this program in bf a couple days ago

Spoiler For BF Guessing Game:
First 4 characters input are used as a seed, after that everything ignored but numbers.

>>++++[->++++++>++++>+<<<]>>[->>++>++++++>+++++++<<<<]>>>+++++++>++++>++++++++++
<<<<[-<<<,<<[->>+<<]>[-]>[-<+<+>>]>[->+<<<[->+<<+>]>[-<+>]>]>[-<++>]>]<<[-]<++[-
>+++++<]<[-]>+[>[->+<<[<<[>]+>-[+<->>-]]<[->+<]<->>>]>[-<+>]<<]>[-<<<+>>>]<,[>>+
+++++[->++++++++<]+>[-<[<<[>]+>-[+<->>-]]<[->+<]<->>>]<[<<<<[->+>>>[<<[>]+>-[+<-
>>->>>>.-----..<<.>>---.+++.++++++++.--->.<<<<<]]<[->+<]<-<<]>[-<+>]>[>>[++[-<++
+>]+<<<<[->+>>-<<<]>[-<+>]>>[-<<+>>]<<[->->>[<<[>]+>-[+<->>->>>>.-----..<<.>+.+.
--.+.->>.<+++++<<<<]]<[->+<]<<]>>>[-]]<<[-]]>>[-<<<+>>>>>>----.>-----.+++..++<++
.--.++++>.>.<<<<<]]<<<-[+>,<]>]

So you want the same thing, but with larger numbers?
Title: Re: Interpretor of BrainFuck
Post by: Nick on December 29, 2012, 05:40:35 pm
wow, and it actually works too.. well, I guess you've earned our respect now :)
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on December 30, 2012, 02:59:15 am
wow, awesome, and, was that me who challenged you? I don't remember, I just remember a talk about such stuff...
Title: Re: Interpretor of BrainFuck
Post by: zero44 on January 06, 2013, 03:12:09 pm
I take the More or Less challenge.
Will ask 3 times to enter a 0-9 char, each time, and will display ... "More" or "Less" because I decided to not be lazy.
But it will take time, for sure.

And I've done Nspire BASIC BF interpretor, with 30 000 cells like original BF, but it makes in 6'20" what my 84+ does in 4'' with Axe
And BF interpretor in BF is about to be finished, I just have to add [] support.

Spoiler For something which has nothing to do with this:
I announce here, and here only, my two biggest Axe projects :
•exA : oldly Axe UnParser, guess what it is
•Kinfe : actually "Knife IDE α 0.0.0 Starter" ► an Axe IDE
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on January 06, 2013, 03:15:41 pm
This is pretty insane :crazy:
Title: Re: Interpretor of BrainFuck
Post by: Nick on January 08, 2013, 03:40:35 pm
I had this incredible idea today, maybe someone could setup a website like
learn.bf or something, or brainfuck.bf (although i'm afraid that one wouldn't be allowed)

I saw the extension .bf, and thought of brainf*ck immediatly xp
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on January 08, 2013, 08:27:53 pm
I had this incredible idea today, maybe someone could setup a website like
learn.bf or something, or brainfuck.bf (although i'm afraid that one wouldn't be allowed)

I saw the extension .bf, and thought of brainf*ck immediatly xp
I could help you! :D
And .bf is also used for file ending of brainf*ck files >.>
End i don't see any reason why brainfuck.bf wouldn't work as it is just another url, i mean, such bad language websites already exist ;)
Title: Re: Interpretor of BrainFuck
Post by: Nick on January 09, 2013, 02:13:18 am
I know, but have you read the terms and conditions of the .bf extension? It's Burkina Faso, and they seem to have very strict rules about what is allowed and what not.

And .bf is also used for file ending of brainf*ck files >.>
That's the reason why it would be so cool :) I wouldn't know what the url should be then though.
I won't do it, I don't have brainf*ck knowledge, and I don't have website programming knowledge...
Title: Re: Interpretor of BrainFuck
Post by: Spyro543 on January 09, 2013, 09:12:18 am
and I don't have website programming knowledge...
You can't go wrong with WordPress!

This should actually be a website, that we make. With bf tutorial(s), sample programs, and maybe an online interpreter :D
Title: Re: Interpretor of BrainFuck
Post by: Sorunome on January 09, 2013, 07:22:22 pm
I know, but have you read the terms and conditions of the .bf extension? It's Burkina Faso, and they seem to have very strict rules about what is allowed and what not.
Wow, that are some strickt rules O.o
But I didn't find anything about language...