Charlie KrugThe Build Log

← All posts

Most code art hashes your file into noise. This reads its shape.

Codeprint parses your script's real structure, functions, loops, nesting, and lays it out as a deterministic circuit board. Same code in, same board out, provably yours.

Paste a function and watch a circuit board assemble from it: copper pads for the functions, tight coils where the loops are, traces routing between them like etched wire. Paste the same function again and you get the exact same board, down to the last via. Paste something twice as tangled and the board tangles with it. That last part is the whole point, and it is where almost every other "turn your code into art" tool quietly gives up.

Codeprint makes a framable print, sticker, or wallpaper out of a specific script you care about: the recursive function you are proud of, your first program, a coworker's monstrous 400-line switch statement as a gag gift. You already have the code. This draws that exact code.

Why most code art is a lie

Search for a code-art generator and you will find dozens that take your source, run it through a hash into a noise function, and hand back a nice-looking Perlin smear tinted by that hash. It photographs well. It is also not about your code at all. Two completely different scripts of the same length come out looking nearly identical, because the only thing the algorithm actually read was the character count and a seed. The link between what you wrote and what you got is decorative. That makes the result feel disposable, which is the opposite of something you would put on a wall.

Codeprint refuses the noise function entirely. The parser's output is the only input to layout, and layout is a pure function of that output. No randomness, no text-to-color hashing, no prettier-looking fallback that would break the promise. Same structure, same board, every time. The board is verifiably a picture of your code and not a generic pattern with your name stapled on.

Structure, made visible

The pipeline is three honest stages. First a language-agnostic tokenizer walks the source line by line, tracking nesting depth from braces and indentation at once, and tags each line as a function, loop, conditional, class, comment, or plain statement. Because it reads both brace depth and indentation depth, one code path handles the curly-brace family (JS, Java, C-like) and the indentation family (Python) without you ever picking a language.

Then that structural list becomes geometry. Each line gets a pad. The pads connect in sequence with Manhattan-routed traces, the right-angle copper you see on a real PCB. Loop bodies coil into spirals, wound tight when the loop is dense and loose when it is a one-liner. Nesting depth reads as physical distance: the deeper a block sits, the further its trace reaches across the board. Finally the geometry serializes to a standalone SVG styled like a silkscreen, copper pads, cyan vias, white labels. The circuit-board look is not a costume. A PCB's traces are already just structure made visible, which is exactly what is being drawn.

The design decision I am most sure about is refusing per-language ASTs. A real tree-sitter grammar per language would be more precise, and it would also multiply the build and only ever serve users of that one language. The generic tokenizer is deliberately "good enough," because what is being sold is the shape of the pattern, not perfect parse fidelity. A stray line tagged as a statement instead of a conditional does not change the board you would frame.

One more thing worth knowing: none of this touches a server. Parsing, layout, and rendering all run in your browser, and the share link carries the source encoded in the URL itself, so even sharing a board never writes your code to anyone's disk but the recipient's.

Try it

Open Codeprint and hit one of the three presets, simple, loop-heavy, deeply nested, to see the board change shape rather than just size. Then paste something of your own and watch it redraw in well under a second, with a power-on reveal animation on each render. Copy the share link, or download the SVG free. If you want it on paper, a one-time checkout exports the same board at a 3600px long edge, twelve inches at 300dpi, sized for a real print shop. No account, no subscription.

Codeprint is live. Free, in your browser, no signup.

This post is part of the build log: every app my automated factory ships gets written up here, honestly. Browse everything at apps.charliekrug.com. Comments are open below.

Comments

Loading comments…