Author Topic: BrainFuck83 1.0  (Read 9047 times)

0 Members and 1 Guest are viewing this topic.

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
BrainFuck83 1.0
« on: March 19, 2010, 05:01:22 pm »
A year ago, I wrote a fully functionnal brainfuck interpreter in TI-BASIC, but at the time I was too lazy to show it up on the Internets... Now that I'm in a community I decided to show it up to you, Omnimaga members.

For the guys who don't know what is Brainfuck, see this link: http://en.wikipedia.org/wiki/Brainfuck

Usage:

"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.":prgmBRAINFCK
*Some minutes later, after looping though the string...*
Hello World!

You can also store your brainfuck program in Str0 ane use it as Str0:prgmBRAINFCK.

Features:

Memory of 256 bytes (using LBFUCK) (configurable)
Character set of 256 characters
Up to 16 recursive [] loops (ex.: [[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]])
Debug mode
Lots of other features! :P

Latest version available in download right in this post! Of course, this TI-BASIC program is very slow, so you need some patience. Have fun!

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.

SirCmpwn

  • Guest
Re: BrainFuck83 1.0
« Reply #1 on: March 19, 2010, 05:02:37 pm »
Lol, brainfuck seems to get a lot of attention in the calcualtor world.  There's like 12 interpreters out there, and a couple compilers.

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: BrainFuck83 1.0
« Reply #2 on: March 19, 2010, 05:04:34 pm »
Yeah, esoteric programming languages are always interesting :P

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 Gale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +1/-0
  • Ti-84+ Silver Edition
    • View Profile
Re: BrainFuck83 1.0
« Reply #3 on: March 19, 2010, 05:11:51 pm »
wait.. so what exactly does this do? xD the whole Usage section seemed like pure gibberish >.<
remember me as a time of day...

SirCmpwn

  • Guest
Re: BrainFuck83 1.0
« Reply #4 on: March 19, 2010, 05:12:52 pm »
The whole language is gibberish

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: BrainFuck83 1.0
« Reply #5 on: March 19, 2010, 05:19:11 pm »
The name says it: Brain. Fuck. Programming in brainfuck gives you headaches.

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 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: BrainFuck83 1.0
« Reply #6 on: March 19, 2010, 05:21:42 pm »
Yeah I noticed many people wants to make a BF compiler/interpreter XD

Interesting, though, I would like to see some examples of it in action ^^

Also I wonder if the speed is an issue, if this program could easily be ported to Axe Parser?

Offline Gale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +1/-0
  • Ti-84+ Silver Edition
    • View Profile
Re: BrainFuck83 1.0
« Reply #7 on: March 19, 2010, 05:23:58 pm »
xD so it IS a joke language... right?
remember me as a time of day...

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: BrainFuck83 1.0
« Reply #8 on: March 19, 2010, 05:25:32 pm »
Yeah, I have to look at this Axe Parser, this thing looks awesome.
And I'll make a screenshot soon. :P

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 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: BrainFuck83 1.0
« Reply #9 on: March 19, 2010, 05:34:09 pm »
I think it is indeed a joke language. I'm not sure, but just by its name I would be surprised if it wasn't

Offline miotatsu

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 332
  • Rating: +11/-1
    • View Profile
Re: BrainFuck83 1.0
« Reply #10 on: March 19, 2010, 05:35:08 pm »
does Brainfuck83 1.0 support implied type casting?
(that is to say if you were to store a fraction into one of the cells, would the cell retain the decimal places and would they be retrievable via multiplication by 10?) this proves to be very useful for doing a lot of things in brainfuck, for instance one can subtract a number x amount of times (division) and then break from the division loop by use of a comparison within the division loop itself. that might seem pointless but it is important because it allows you to divide without ever hitting a perfect 0 (this allows for much more flexibility when dividing) this is also good to have because it lets you deal with floating point numbers without having to use floating point math in a very simple manner compared to the other ways it can be done

and you could say that BF is a joke language, it is not meant to seriously program in
personally i think it is a beautiful language and i have honestly considered making some BF headers for casual C++ programming

also how does this handle i/o? does it convert to ascii or getkey codes or a custom code layout?
« Last Edit: March 19, 2010, 05:38:58 pm by miotatsu »

Offline Gale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +1/-0
  • Ti-84+ Silver Edition
    • View Profile
Re: BrainFuck83 1.0
« Reply #11 on: March 19, 2010, 05:43:56 pm »
x.x now i wanna learn how to speak brainfuck
remember me as a time of day...

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: BrainFuck83 1.0
« Reply #12 on: March 19, 2010, 05:44:01 pm »
miotatsu, it's written in TI-BASIC, so it calculates numbers in the same manner as you type the numbers yourself on the main screen, so, yes. Me too I love this language, I made an IRC client involving running a BF program and some bash scripts once. And it's always fun to say, "hey I could write X in brainfuck hahaha", hence the status of joke language :P

And, of course, it supports I/O input, I think the , function is made w/ prompts. For the . command, it stores the current letter in a string, then shows it at the end of the program or before a , command.
« Last Edit: March 19, 2010, 05:46:22 pm by juju2143 »

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 miotatsu

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 332
  • Rating: +11/-1
    • View Profile
Re: BrainFuck83 1.0
« Reply #13 on: March 19, 2010, 05:47:45 pm »
sweet, how about the i/o? in BF if you enter "A" it stores 65 in the current cell and if you output said cell it will display "A", 65 is the ascii number for A (i think it is, i dont have an ascii chart up atm), does this implementation also use the ascii codes or does it use something else?

EDIT: nevermind, i got Ninja'd :D
« Last Edit: March 19, 2010, 05:48:19 pm by miotatsu »

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: BrainFuck83 1.0
« Reply #14 on: March 19, 2010, 05:50:22 pm »
And btw it's ascii, you can see the character set at the beginning of the source code.

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.