BrainFuck part 8 - JS/C#/BF Multi quine

DPAmar
9,363 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Next: Structure

Welcome!

Welcome to this new playground about the BF language. Make sure you already read

playgrounds if you didn't already !

The goal of this playground is to create our own multi quine using BF, and other languages.

Previous playground is mandatory in order to understand this one...

So, multiquine ?

A multiquine over a set S of Turing-complete languages is set of programs, one for each language in S, that

  • prints itself when called without any parameter
  • prints the version of language X when called with parameter X

Wow.

So, this means we are going to write a BF quine, that will, let's say

  • prints itself when called without any parameter (a regular quine)
  • prints a C# source code when called with parameter CS
  • prints a JS source code when called with parameter JS

The C# source code

  • prints itself when called without any parameter (a regular quine)
  • prints previous JS source code when called with parameter JS
  • prints previous BF source code when called with parameter BF

The JS source code

  • prints itself when called without any parameter (a regular quine)
  • prints previous BF source code when called with parameter BF
  • prints previous C# source code when called with parameter CS

Easy, right ?

Note: having the same parameter values for all languages is not mandatory (but more fun ^^)

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content