Skip to content

Instantly share code, notes, and snippets.

@mtth
Created September 12, 2015 17:20
Show Gist options
  • Save mtth/0bfd8e6548682699a41a to your computer and use it in GitHub Desktop.
Save mtth/0bfd8e6548682699a41a to your computer and use it in GitHub Desktop.
Quine Python to JavaScript to Python
s = "s = %j; t = %j; print t % (t, s)"; t = "var util = require('util'); var s = %r; var t = %r; console.log(util.format(t, t, s));"; print t % (t, s)
@mtth
Copy link
Author

mtth commented Sep 12, 2015

To check:

$ diff js.py <(node <(python js.py))

Inspired by https://github.com/mame/quine-relay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment