C# Challenge : Write a Brainf*** Interpreter or Compiler!

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

34 Replies - 16758 Views - Last Post: 29 June 2011 - 07:42 AM

#1 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5103
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

C# Challenge : Write a Brainf*** Interpreter or Compiler!

Post icon  Posted 09 May 2011 - 12:08 PM

*
POPULAR

Ok, you probably haven't heard of brainf**k, the programming language. Wikipedia can describe it better than I can :

Quote

The brainfu** programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use.

...

The brain***k language uses a simple machine model consisting of the program and instruction pointer, as well as an array of at least 30,000 byte cells initialized to zero; a movable data pointer (initialized to point to the leftmost byte of the array); and two streams of bytes for input and output (most often connected to a keyboard and a monitor respectively, and using the ASCII character encoding).


Here's an example program: Hello World!

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


You might ask, why the heck would I want to use, or write a compiler for, such a useless language? Well, for one thing, it'll be fun! And surprisingly, when I wrote mine, I had to shift my thinking, and learn to think more like a computer rather than a programmer.

Now, on to the meat of the language. Brain**ck has only 8 valid symbols :

> : increment the data pointer (to point to the next cell to the right).
< : decrement the data pointer (to point to the next cell to the left).
+ : increment (increase by one) the byte at the data pointer.
- : decrement (decrease by one) the byte at the data pointer.
. : output a character, the ASCII value of which being the byte at the data pointer.
, : accept one byte of input, storing its value in the byte at the data pointer.
[ : if the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching ] command*.
] : if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching [ command*.

*[ and ] match as parentheses usually do: each [ matches exactly one ] and vice versa, the [ comes first, and there can be no unmatched [ or ] between the two.

If you're familiar with C, this might help:

> : ++ptr;
< : --ptr;
+ : ++*ptr;
- : --*ptr;
. : putchar(*ptr);
, : *ptr=getchar();
[ : while (*ptr) {
] : }

Now, what I want to see from you is an either:

A) An interpreter. A program that will take in a string, or possibly a file, and execute it as if it were a brain*uc* program.

B) A compiler. A program that will will take a text file containing brainf*c* code and output an executable (native or managed, doesn't matter).

Two gotchas: End of Line, and End of File (or Stream). Windows uses CRLF, while Unix uses LF. Since brain*u*k is so character-based, it would be best if you cleansed your inputs to remove CR (which is (char)13.)

As for End of File (or Stream), we'll use 0.

Speed is unimportant in this challenge, although if you want to try for efficiency, it'll certainly be interesting. Cleverness/novelty is highly appreciated. I want to see all the neat ways you come up with to solve this! Also, I've got a surprise already whipped up and published to a public site that goes right along with this challenge. Once we get a few submissions, I'll link it.

Good luck, and any questions are totally welcome! Also, I'd like to emphasize that this is a "challenge", and not a competition. No winners or losers. It could be argued that everyone that participates is a winner. Have fun!

EDIT: I forgot to mention. I'd prefer to see this in C#, but any language would be interesting. Super ultra mega bonus points to someone who implements a BF interpreter in BF.

This post has been edited by Curtis Rutland: 09 May 2011 - 12:53 PM


Is This A Good Question/Topic? 6
  • +

Replies To: C# Challenge : Write a Brainf*** Interpreter or Compiler!

#2 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5103
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 12:47 PM

I'll get us started. But I'd really like you to implement it yourself before you open these spoiler tags! Otherwise, what's the point?

BF Interpreter
Spoiler


I've also made a BF compiler (actually, more like a translator. The symbols are replaced by C# equivalents, then compiled as a .NET executable). I'll post that as well, once we get some participation.

BF "Compiler"
Spoiler

This post has been edited by Curtis Rutland: 09 May 2011 - 03:25 PM

Was This Post Helpful? 0
  • +
  • -

#3 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 03:17 PM

I did mine in Python, as I do all my algorithms, but will port it to C# when I can:
Spoiler


In order to run this code, you need to feed interpret() a String that contains the program. However, in my version, any "extra" characters are treated as comments.
Was This Post Helpful? 2
  • +
  • -

#4 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 04:33 PM

Here's my C# implementation (although it looks extremely similar to Curtis Rutland's implementation). Sorry about the similar looks - I translated the code from my Python version and used MSDN. One cool feature is that it checks the command line for a file location, and if it exists, it reads and executes that file. Otherwise, it executes a default Hello World program.

Spoiler

Was This Post Helpful? 0
  • +
  • -

#5 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5103
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 04:40 PM

One challenge I had to deal with is that when there's a newline, it's actually 2 bytes in the stream. What I did was discard the 13 and then read the 10. In your interpretation, you'll get 2 10s. Not really a big deal, but I wish windows would have gone with the same newline char that unix did. Although, apparently OS9 and lower actually used 13 without a following 10.
Was This Post Helpful? 0
  • +
  • -

#6 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 05:10 PM

Alright, I went the extra mile and wrote a BrainF**k to Python compiler. It "compiles" it to Python code, which then you run with the standard python interpreter.

Here is the compiler:
Spoiler


Here's in.b (the program to compile):
Spoiler


And here's the output:
Spoiler


While it is bad python code, it is totally functional code. Besides, if you're compiling it, it's bound to be "ugly" anyways. The thing you have to remember is that with Python, indentation matters. So I had to implement indent levels in the compiler.
Was This Post Helpful? 3
  • +
  • -

#7 ishkabible  Icon User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 05:15 PM

well i don't have a C# interpreter yet but i have a JIT BF compiler written in C :)

note: this is like 400 lines
Spoiler


im making a C# BF interpreter right now, having some issues for some reason. trying to figure them out :)
Was This Post Helpful? 1
  • +
  • -

#8 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5103
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 05:23 PM

For the record, ishkabible was the inspiration for this challenge.

Anyway, I think it's about time to put this out there:

http://vbf.curtisrutland.com/

It's a visual BF interpreter. It shows (100) memory cells, and the instructions, and will walk through each one, showing what happens in memory. You can tune the delay if you want. If you're at the end of the instructions, you can actually use the instruction buttons to add instructions to the list, and they'll be executed immediately. To add a bunch of instructions at once, right-click the source panel.

Two caveats.

1) I haven't set it up for multithreading yet, so if you turn the delay down to zero, the GUI thread WILL lock up until the execution is finished (and this is Silverlight, so the execution isn't exactly lightspeed).
2) The input has to be included before the program is executed. The way that silverlight works, I can't easily ask for input synchronously. I'll be working on that.

This program treats line breaks as if they were UNIX style linebreaks, and EOF as 0.

Edit: this is written in Silverlight. I've got a github repo for it, linked in my signature, incase anyone wants to see the source. It's not perfect, and it certainly doesn't follow the MVVM principles that Silverlight is supposed to, but it could probably be modified to do so.

This post has been edited by Curtis Rutland: 09 May 2011 - 05:27 PM

Was This Post Helpful? 0
  • +
  • -

#9 ishkabible  Icon User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 05:30 PM

also for some interesting scripts i have found..

a "quine" or a program that prints its source code
>+++++>+++>+++>+++++>+++>+++>+++++>++++++>+>++>+++>++++>++++>+++>+++>+++++>+>+
>++++>+++++++>+>+++++>+>+>+++++>++++++>+++>+++>++>+>+>++++>++++++>++++>++++>+++
>+++++>+++>+++>++++>++>+>+>+>+>++>++>++>+>+>++>+>+>++++++>++++++>+>+>++++++
>++++++>+>+>+>+++++>++++++>+>+++++>+++>+++>++++>++>+>+>++>+>+>++>++>+>+>++>++>+
>+>+>+>++>+>+>+>++++>++>++>+>+++++>++++++>+++>+++>+++>+++>+++>+++>++>+>+>+>+>++
>+>+>++++>+++>+++>+++>+++++>+>+++++>++++++>+>+>+>++>+++>+++>+++++++>+++>++++>+
>++>+>+++++++>++++++>+>+++++>++++++>+++>+++>++>++>++>++>++>++>+>++>++>++>++>++
>++>++>++>++>+>++++>++>++>++>++>++>++>++>+++++>++++++>++++>+++>+++++>++++++>++++
>+++>+++>++++>+>+>+>+>+++++>+++>+++++>++++++>+++>+++>+++>++>+>+>+>++++>++++
[[>>>+<<<-]<]>>>>[<<[-]<[-]+++++++[>+++++++++>++++++<<-]>-.>+>[<.<<+>>>-]>]
<<<[>>+>>>>+<<<<<<-]>++[>>>+>>>>++>>++>>+>>+[<<]>-]>>>-->>-->>+>>+++>>>>+[<<]
<[[-[>>+<<-]>>]>.[>>]<<[[<+>-]<<]<<]



99 bottles of bear on the wall
>+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>
[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<
-]<<-<-]+++++++++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<
[>>+>+<<<-]>>>[<<<+>>>-]>[<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<+++
+++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-
]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]<++.>+
++++[<+++++++++>-]<.><+++++..--------.-/>------.>>[>>+>+<<<-]>
>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<+++++++
+>-]<.>+++++++++[<+++++++++>-]<--.-/>--------.>+++++++[<------
---->-]<.>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++
++[<---------->-]<--.>+++++++++[<+++++++++>-]<--.-/>.>++++++++
[<---------->-]<++.>++++++++[<++++++++++>-]<++++.-----------
-.-/>--.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.
>++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<
-----.-/>--.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>+++
+[<++++++>-]<--.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.
><+++++..--------.-/>------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++
++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<++
+++++++>-]<--.-/>--------.>+++++++[<---------->-]<.>++++++[<++
+++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]<
-.-/>--.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.
------.>+++++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.
-.-/>--------.>+++++++[<---------->-]<+.>+++++++[<++++++++++>-
]<--.+++++++++++.++++++++.---------.>++++++++[<---------->-]
<++.>+++++[<+++++++++++++>-]<.+++++++++++++.----------.>++++
+++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<----->
-]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<
++++++++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++
.>+++++[<+++++++++++++>-]<.>+++[<++++++>-]<-.-/>--.++++++.----
---.-/>---------.>++++++++[<----------->-]<+.---.[-]<<<->[-]>[
-]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]
>[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-]>>+>[<[-]<
<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<
<-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+
<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>
-]<.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..---
-----.-/>------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++
.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<+++++++++>-]<-
-.-/>--------.>+++++++[<---------->-]<.>++++++[<+++++++++++>-]
<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[
<+++++++++>-]<--.-/>.>++++++++[<---------->-]<++.>++++++++[<++
++++++++>-]<++++.------------.-/>--.>+++++++[<---------->-]<+.
>++++++++[<+++++++++++>-]<-.>++[<----------->-]<.+++++++++++
..>+++++++++[<---------->-]<-----.-/>--.+++.---.[-]<<<]



this program prints all the primes upto the number you put in (however it's limited to going to 255 due to the limitations of 1 memory cell in BF). your compiler/interpreter will need to ignore non BF operators for this program to work as it has non-BF characters in it.
compute prime numbers
to use type the max number then push Alt 1 0
===================================================================
======================== OUTPUT STRING ============================
===================================================================
>++++++++[<++++++++>-]<++++++++++++++++.[-]
>++++++++++[<++++++++++>-]<++++++++++++++.[-]
>++++++++++[<++++++++++>-]<+++++.[-]
>++++++++++[<++++++++++>-]<+++++++++.[-]
>++++++++++[<++++++++++>-]<+.[-]
>++++++++++[<++++++++++>-]<+++++++++++++++.[-]
>+++++[<+++++>-]<+++++++.[-]
>++++++++++[<++++++++++>-]<+++++++++++++++++.[-]
>++++++++++[<++++++++++>-]<++++++++++++.[-]
>+++++[<+++++>-]<+++++++.[-]
>++++++++++[<++++++++++>-]<++++++++++++++++.[-]
>++++++++++[<++++++++++>-]<+++++++++++.[-]
>+++++++[<+++++++>-]<+++++++++.[-]
>+++++[<+++++>-]<+++++++.[-]

===================================================================
======================== INPUT NUMBER  ============================
===================================================================
+                          cont=1
[
 -                         cont=0
 >,
 ======SUB10======
 ----------
 
 [                         not 10
  <+>                      cont=1
  =====SUB38======
  ----------
  ----------
  ----------
  --------

  >
  =====MUL10=======
  [>+>+<<-]>>[<<+>>-]<     dup

  >>>+++++++++
  [
   <<<
   [>+>+<<-]>>[<<+>>-]<    dup
   [<<+>>-]
   >>-
  ]
  <<<[-]<
  ======RMOVE1======
  <
  [>+<-]
 ]
 <
]
>>[<<+>>-]<<

===================================================================
======================= PROCESS NUMBER  ===========================
===================================================================

==== ==== ==== ====
numd numu teid teiu
==== ==== ==== ====

>+<-
[
 >+
 ======DUP======
 [>+>+<<-]>>[<<+>>-]<

 >+<--

 >>>>>>>>+<<<<<<<<   isprime=1

 [
  >+

  <-

  =====DUP3=====
  <[>>>+>+<<<<-]>>>>[<<<<+>>>>-]<<<

  =====DUP2=====
  >[>>+>+<<<-]>>>[<<<+>>>-]<<< <


  >>>


  ====DIVIDES=======
  [>+>+<<-]>>[<<+>>-]<   DUP i=div
  
  <<
  [
    >>>>>+               bool=1
    <<<
    [>+>+<<-]>>[<<+>>-]< DUP
    [>>[-]<<-]           IF i THEN bool=0
    >>
    [                    IF i=0
      <<<<
      [>+>+<<-]>>[<<+>>-]< i=div
      >>>
      -                  bool=0
    ]
    <<<
    -                    DEC i
    <<
    -
  ]
  
  +>>[<<[-]>>-]<<          
  >[-]<                  CLR div
  =====END DIVIDES====


  [>>>>>>[-]<<<<<<-]     if divides then isprime=0


  <<

  >>[-]>[-]<<<
 ]

 >>>>>>>>
 [
  -
  <<<<<<<[-]<<

  [>>+>+<<<-]>>>[<<<+>>>-]<<<

  >>




  ===================================================================
  ======================== OUTPUT NUMBER  ===========================
  ===================================================================
  [>+<-]>
 
  [
   ======DUP======
   [>+>+<<-]>>[<<+>>-]<
  
  
   ======MOD10====
   >+++++++++<
   [
    >>>+<<              bool= 1
    [>+>[-]<<-]         bool= ten==0
    >[<+>-]             ten = tmp
    >[<<++++++++++>>-]  if ten=0 ten=10
    <<-                 dec ten     
    <-                  dec num
   ]
   +++++++++            num=9
   >[<->-]<             dec num by ten
  
   =======RROT======
      [>+<-]
   <  [>+<-]
   <  [>+<-]
   >>>[<<<+>>>-]
   <
  
   =======DIV10========
   >+++++++++<
   [
    >>>+<<                bool= 1
    [>+>[-]<<-]           bool= ten==0
    >[<+>-]               ten = tmp
    >[<<++++++++++>>>+<-] if ten=0 ten=10  inc div
    <<-                   dec ten     
    <-                    dec num
   ]
   >>>>[<<<<+>>>>-]<<<<   copy div to num
   >[-]<                  clear ten
  
   =======INC1=========
   <+>
  ]
  
  <
  [
   =======MOVER=========
   [>+<-]
  
   =======ADD48========
   +++++++[<+++++++>-]<->
  
   =======PUTC=======
   <.[-]>
  
   ======MOVEL2========
   >[<<+>>-]<
  
   <-
  ]
 
  >++++[<++++++++>-]<.[-]
 
  ===================================================================
  =========================== END FOR ===============================
  ===================================================================


  >>>>>>>
 ]
 <<<<<<<<



 >[-]<
  [-]
 <<-
]
 
======LF========
 
++++++++++.[-]
@


Was This Post Helpful? 0
  • +
  • -

#10 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon

Reputation: 2965
  • View blog
  • Posts: 11,222
  • Joined: 15-July 08

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 06:22 PM

Hmmm...I might have to check my compiler/interpreters because the third one doesn't work and the second one only works down to 91 bottles.
Was This Post Helpful? 0
  • +
  • -

#11 RevTorA  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 78
  • View blog
  • Posts: 255
  • Joined: 22-April 11

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 07:57 PM

View PostDogstopper, on 09 May 2011 - 06:22 PM, said:

Hmmm...I might have to check my compiler/interpreters because the third one doesn't work and the second one only works down to 91 bottles.


Same... I wrote an interpreter quickly, but it can only run the Hello World program, none of ishka's programs. Can we confirm those are valid programs?

Edit: I'm actually running them through Curtis' VisualBF interpreter. So far, the quine program tries to decrement the counter below 0, and the 99 bottles of beer on the wall uses more than 100 data cells... Trying prime numbers now :\

Edit 2: I left the prime numbers program running for roughly 40 minutes (on .1 delay however), and gave up. Never gave me output (and I put in the proper input, used 50◙) (Alt+1+0)

This post has been edited by RevTorA: 09 May 2011 - 08:51 PM

Was This Post Helpful? 0
  • +
  • -

#12 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5103
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 09 May 2011 - 08:09 PM

Yeah, my VBF program isn't perfect. I need to change it to automatically add cells once it needs them.
Was This Post Helpful? 0
  • +
  • -

#13 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 345
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 10 May 2011 - 01:01 AM

You lot are crazy! But I will join you :D not sure which language yet I shall do... there have already been two C# versions and I expect mine would look very similar so would like to try something different.

EDIT: Was going to try Haskell but I am not good enough, so doing Javascript instead :) Never learned about pointers and the like so it will probably not be the most efficient but it should work.

This post has been edited by Shane Hudson: 10 May 2011 - 01:59 AM

Was This Post Helpful? 0
  • +
  • -

#14 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1258
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 10 May 2011 - 04:19 AM

Writing a Brainfuck interpreter isn't normal. But on meth it is.

Not even once. :lol: +1 All around, you guys are smart!
Was This Post Helpful? 0
  • +
  • -

#15 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: C# Challenge : Write a Brainf*** Interpreter or Compiler!

Posted 10 May 2011 - 04:25 AM

Who spotted the error in the spec? The correct Brainfuck commands are + - < > [ ] . and ?
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3