BF interpreter

acme on 2002-05-30T15:25:58

"Start small, young grasshopper" the small old man with the white hair and the cane used to tell me. I want to do interpreters and compilers in Parrot. So rather than starting with a huge language like, well, BASIC, I've started with BF. BF is turing complete in eight instructions, but I feel the language designer may have shot himself in the foot by actually calling it Brainf**k. So I tappitty tap on the key board and look what comes out.

Never complain that Perl is hard to read. Here is a sample BF program:

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

So, what language next?


And Befunge ?

rafael on 2002-05-30T16:15:33

IIRC, someone (Sean O'Rourke? I'm not sure) had the idea to port Befunge to Parrot.

Action Script

2shortplanks on 2002-05-30T22:29:02

Didn't we decide you were going to do this next?

Of course we were in the pub when this idea was voiced, and we've never been good at remembering things we've decided down the pub...

Re:Action Script

acme on 2002-05-31T09:07:33

To be honest, this seems like a lot of work for very little gain, (apart from silly licensing issues) seeing that Ming already contains an ActionScript compiler. Oh, and flasm looks quite interesting too. The ActionScript virtual machine is actually a little like Parrot.

Get really META

boog on 2002-05-30T23:29:16

If you're going to write interpreters for an as-yet unfinished VM, my opinion is that you need to get kinda silly about it, and start getting 'meta'.

So, my suggestions would be:

* A Parrot compatible virtual machine written in Parrot. It could run itself.

* A Parrot assembler interpreter. :-D