Hello all,

Here's my Befunge interpreter, my first submission for a Ruby-Quiz. I'm 
a relative Ruby novice, so I doubt it's as elegant or clever as some of 
the other solutions, but it does work, and runs even relatively 
complicated Befunge programs such as befbef.bf and life.bf. The one 
exception I've found so far is mandel.bf - because I chose to store 
Befunge-space values as single-character Strings, and because Ruby 
Strings will not hold negative (signed) bytes, and finally because 
mandel.bf relies on storing negative values in the Befunge-space grid, 
it cannot run correctly. I may go back and fix this later.

I intentionally avoided looking at anyone else's solutions while I was 
working on this, as I wanted to keep it a challenge for myself. This may 
mean that there are some boneheaded choices in the code, but I did learn 
a lot doing this, which I think is the point.

Thanks,
- Adam Gardner

Attachments:
http://www.ruby-forum.com/attachment/2990/Befunge.zip

-- 
Posted via http://www.ruby-forum.com/.