{
  "id": 370216,
  "title": "Mind-bending self-replicating GIF code prints an exact copy of itself, is both a program and its own visual output — champion coder shows off 'Piet Quine' technique",
  "url": "https://urgent.news/2026/08/09/mind-bending-self-replicating-gif-code-prints-an-exact-copy-of-itself",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-09T11:40:00.000Z",
  "source": {
    "name": "Tom's Hardware",
    "slug": "tom-s-hardware",
    "url": "https://www.tomshardware.com/software/programming/mind-bending-self-replicating-gif-code-prints-an-exact-copy-of-itself-is-both-a-program-and-its-own-visual-output-champion-coder-shows-off-piet-quine-technique"
  },
  "original_language": "en",
  "account": "Champion programmer Yusuke Endoh has created a fascinating Piet Quine, a GIF that simultaneously acts as the source code and its visual output. This extraordinary feat merges the concepts of Piet, an esoteric programming language that generates colorful, tile-based artwork, and Quine, a program that independently reproduces its own code without external input.\n\nIn this unique composition, the GIF undergoes a 'load data' phase, followed by a thorough examination of the GIF file header and palette information. The main challenge lies in the incorporation of binary data, compression, and an intricate flow that must be carefully handled to achieve the desired result. Notably, the source image consists of two distinct parts: a data section compressed via adaptive run-length encoding, and a code segment.\n\nEndoh initially managed to accomplish this creation in 2009, but the resulting GIF was excessively tall, making it unsuitable for visual appreciation. To rectify this issue, Endoh enlisted the assistance of Claude Code, an AI system, to analyze and reconstruct the original script and craft a more compact 'landscape' Piet Quine. After extensive refining and optimization, the final product emerged, neatly fitting into a 4:3 landscape image with dimensions of 252 x 189 pixels.\n\nThis remarkable achievement is driven by Endoh's desire to raise awareness of the 2026 Obfuscated Programming Language Design Contest, which is currently ongoing. The contest invites participants to design an esoteric programming language and submit their creations, with Endoh serving as one of the esteemed judges. The submission deadline is October 1, and interested individuals are encouraged to participate in this intriguing challenge.",
  "summary": "A champion coder's latest confection is a Piet Quine – a GIF image that prints itself byte-for-byte.",
  "key_points": [
    "Yusuke Endoh creates Piet Quine, a GIF that acts as its own code and visual output",
    "Creation involves data section compressed via adaptive run-length encoding",
    "Final product fits into 4:3 landscape image, 252 x 189 pixels"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}