artifactpublishedmdai-assisted
Self-Printing Code Block
A code block that contains the code that drew it, with an explanation of the trick.
- Path
/artifacts/self-printing-code-block- Published
- Nov 17, 2026
- Revised
- —
- Project
- jaygriff-v4
- Tags
- —
Body
markdownbody.md
A code block that contains itself: everything in it is the code that drew it, including the line that put it there. The page explains how it copies its own markup and writes that copy into the empty block.Raw row
jsonself-printing-code-block.json
{
"id": "bfbb537c-0cb8-4d22-ae76-11c54944f855",
"parentId": "6ba9ef70-d36c-4760-875f-7322137a2cc1",
"slug": "self-printing-code-block",
"path": "/artifacts/self-printing-code-block",
"type": "artifact",
"status": "published",
"title": "Self-Printing Code Block",
"description": "A code block that contains the code that drew it, with an explanation of the trick.",
"intro": null,
"body": "A code block that contains itself: everything in it is the code that drew it, including the line that put it there. The page explains how it copies its own markup and writes that copy into the empty block.",
"toc": null,
"format": "md",
"componentKey": null,
"contentHash": null,
"authors": null,
"authorship": "ai-assisted",
"authorshipNote": null,
"tags": null,
"projectId": "c6db81df-4f3a-4093-a24c-c2b5219df013",
"sectionId": null,
"publishedAt": "2026-11-17T06:30:08.956Z",
"revisedAt": null,
"sortOrder": 0,
"source": "db",
"file": null,
"missingSince": null,
"createdAt": "2026-11-17T06:30:09.105Z",
"updatedAt": "2026-11-17T06:30:09.105Z",
"link": null,
"project": {
"slug": "jaygriff-v4",
"title": "jaygriff-v4"
},
"section": null,
"assets": [
{
"id": 19,
"projectId": null,
"contentId": "bfbb537c-0cb8-4d22-ae76-11c54944f855",
"url": "https://artifacts.jaygriff.com/self-printing-code-block",
"kind": "html",
"role": "hero",
"alt": "Self-Printing Code Block",
"width": null,
"height": 942,
"sortOrder": 0,
"createdAt": "2026-11-17T06:30:09.326Z"
},
{
"id": 38,
"projectId": null,
"contentId": "bfbb537c-0cb8-4d22-ae76-11c54944f855",
"url": "https://assets.jaygriff.com/artifacts/self-printing-code-block/thumbnail.jpg",
"kind": "image",
"role": "thumbnail",
"alt": "Self-Printing Code Block",
"width": 1280,
"height": 720,
"sortOrder": 0,
"createdAt": "2026-11-17T07:41:29.036Z"
}
]
}