Turing-Complete polyglot Write a polyglot (code that works in two or more languages) that has a "mid-section" that can be modified to do any computational task. This question is similar to https://stackoverflow.com/questions/1053931/code-golf-shortest-turing-complete-interpreter.

Rules:

The program must be able to preform a computation and print the results. Pseudorandom number capability is a plus but not necessary. The results must be the same in all languages, minor string-formatting differences are OK.

There is a section in the program that can be modified (in a straight-forward way) to do any computation (Turing complete). This is like the "comments section" in http://ideology.com.au/polyglot/polyglot.txt for which any comment can be inserted.

You must use at least 2 languages (this rule is here so you don't sue me).

Edit: Ideally you only need to write the "computation" part once. It is less interesting to use comment blocks, etc to knock out A so you have a block from B and then knockout B to write code from A. However, the one block solution is very difficult unless the languages have enough "overlap".

Also, using very similar languages (like C# and Java) isn't as interesting. It is still allowed but will probably earn less votes.

Grading

The winning is a popularity contest (Mar 1st).
C, Python, and Brainfuck

The Brainfuck program on the line starting with pgm= can be changed into any valid Brainfuck program (so it is Turing-complete). The program will then run in C, Python, and Brainfuck. The given program prints Hello World!.

The interpreters in both C and Python have the following characteristics:


8-bit cells
Infinite tape in both directions
-1 (255) on EOF


It runs like this:

$ gcc poly_bf.c; ./a.out
Hello World!
$ python poly_bf.c
Hello World!
$ bf poly_bf.c
Hello World!


And here's the program:

#define AA [
#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;string.h&gt;
#define BB ]
#define PGM char*\
pgm="++++++++[&gt;++++[&gt;++&gt;+++&gt;+++&gt;+&lt;&lt;&lt;&lt;-]&gt;+&gt;+&gt;-&gt;&gt;+[&lt;]&lt;-]&gt;&gt;.&gt;---.+++++++..+++.&gt;&gt;.&lt;-.&lt;.+++.------.--------.&gt;&gt;+.&gt;++.";
#define ZZ \
""" [-][";
struct cell { char val; struct cell *prev; struct cell *next; };
struct cell *prv(struct cell *c) { 
    if (!c-&gt;prev) {
        struct cell *z = malloc(sizeof(struct cell));
        z-&gt;next = c;
        z-&gt;prev = 0;
        z-&gt;val = 0;
        c-&gt;prev = z;
    }
    return c-&gt;prev;
}
struct cell *nxt(struct cell *c) {
    if (!c-&gt;next) {
        struct cell *z = malloc(sizeof(struct cell));
        z-&gt;prev = c;
        z-&gt;next = 0;
        z-&gt;val = 0;
        c-&gt;next = z;
    }
    return c-&gt;next;
}
int main() { 
    PGM
    int ip=0, t=0;
    struct cell *c = malloc(sizeof(struct cell));
    memset(c, 0, sizeof(struct cell));
    while (pgm[ip]) {
       switch(pgm[ip]) {
           case '+': c-&gt;val++;break;
           case '-': c-&gt;val--;break;
           case '&gt;': c=nxt(c);break;
           case '&lt;': c=prv(c);break;
           case '.': putchar(c-&gt;val);break;
           case ',': c-&gt;val=getchar();break;
           case '[':
               if (c-&gt;val) break;
               ip++;
               t=1;
               while (t) {
                  t += pgm[ip] == '[';
                  t -= pgm[ip] == ']';
                  ip++;
               }
               ip--;
               break;
           case ']':
               if (!c-&gt;val) break;
               ip--;
               t=1;
               while (t) {
                  t -= pgm[ip] == '[';
                  t += pgm[ip] == ']';
                  ip--;
               }
               ip++;
               break;
       }
       ip++;
    }
    return 0;
}
#define YY \
" """;
#define XX /*
import sys;
ip=t=0
class Cell:
  pv=None
  nx=None
  val=0

  def prev(self):
     if not self.pv:
        self.pv = Cell()
        self.pv.nx = self
     return self.pv
  def next(self):
     if not self.nx:
        self.nx = Cell()
        self.nx.pv = self
     return self.nx

cell=Cell()
while ip&lt;len(pgm):
  if pgm[ip]=='+': cell.val+=1;cell.val%=256
  elif pgm[ip]=='-': cell.val-=1;cell.val%=256
  elif pgm[ip]=='&gt;': cell=cell.next()
  elif pgm[ip]=='&lt;': cell=cell.prev()
  elif pgm[ip]=='.': sys.stdout.write(chr(cell.val))
  elif pgm[ip]==',':
      ch=sys.stdin.read(1)
      if ch:cell.val=ord(ch)
      else:cell.val=255
  elif pgm[ip]=='[' and not cell.val:
      t=1
      ip+=1
      while t:
        t += pgm[ip] == '['
        t -= pgm[ip] == ']'
        ip+=1
      ip-=1
  elif pgm[ip]==']' and cell.val:
      t=1
      ip-=1
      while t:
        t -= pgm[ip] == '['
        t += pgm[ip] == ']'
        ip-=1
      ip+=1
  ip+=1
#]*/