| |||||
The Ruby BrainFuck InterpreterCopyright © Stephen Sykes, 2001. This is an implementation of the BrainFuck language in Ruby. In case you haven't come across Ruby before, it is an extremely well designed object oriented programming language, which has a number of interesting features - to learn more visit the Ruby home page. Personally, I prefer ETA to BrainFuck, but I was wondering if you could translate between the two. In fact, I think it would be possible to write a BrainFuck to ETA converter without too much trouble, but going the other way would be enormously difficult - the divide instruction would be particularly tricky I think.A converter from to ETA would need to represent the array on the stack - meaning that at the start of the program you would need to place 30,000 zeros there, so your program would begin with 60k of I wrote this interpreter as a step to inventing a translation program, and it's here in case anyone needs it for anything, unlikely as that may seem. Source CodeYou can download the program here.
S.D.Sykes May 2001 |