A Quine in Piet: A GIF That Prints Itself

A quine in Piet – a GIF image that prints itself [video]

A Quine in Piet: A GIF That Prints Itself

In the esoteric programming language Piet, programs are images. Yusuke Endoh created a 252x189 GIF that, when run, outputs its own bytes—a quine. The video breaks down the process: loading data, drawing the GIF header and palette, then the data and code parts, ending with a trailer and halt. Code and generator are on GitHub.

In Piet, a program is an image.
  1. jamesaross

    If you like quines with a visual output like this, I recently taped out an self-reproducing ASIC which displays it's own Verilog source over VGA.

    https://github.com/jar/ttsky26a_prime_quine

    You may view the simulated output:

    https://vga-playground.com/?repo=https://github.com/jar/ttsk...

  2. laxisOp

    Naive question:what it actually is .and what is usecase

  3. chao-

    Every time I peek at the code from something by Mr. Endoh, I end up down a rabbit hole and learn something. I look forward to what this one brings. Probably looking into this Piet language: https://www.dangermouse.net/esoteric/piet.html

    Another awe-inspiring quine of his, from about a decade ago, is the 128-language ouroboros quine:

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

More from this day

2026-08-07