Skip to content

Chip: a hidden style that draws any city as a circuit board - #7

Merged
Fengzdadi merged 9 commits into
mainfrom
style/chip
Nov 3, 2026
Merged

Fengzdadi merged 9 commits into
mainfrom
style/chip

Conversation

@Fengzdadi

@Fengzdadi Fengzdadi commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

A hidden easter egg: one plain visit in 100,000 draws the repo as a circuit board. It's a render style, not a city type: ARCHETYPES, STATES and the classify scoring are untouched, and scans don't change (no SCANNER bump).

What you get with --style chip / ?style=chip

  • One plan for every repo, whatever its city type. A new board planner lays out a square board on a dark bench. Each directory is a rectangular block, cut into an even grid of cells with channels between them for the traces. Each cell takes an even share of what's left of the block's parts, so no cell ends up crammed with the leftovers. It isn't a city type: it's not in CITY_KINDS or --city. The still's caption reads "built like a circuit board".
  • Every file is a chip package, low and flat (a bigger file is a thicker package, never a tower). Each has a dark body, a pin-1 dimple and an etched part number. Leads run along both long sides of a long package and all four sides of a squarish one. The hub gets a gold lid.
  • Green solder mask for the board and its blocks.
  • Copper traces: each import is routed between the two chips on a grid (A*, 45° and 90° turns), with a via wherever a route turns square. Edges go shortest first within a 900 ms budget (flask: 152 of 171 routed in about 190 ms; axum about 440 ms). Leads fan out a short way to vias. Focusing a chip lights its own traces.
  • Passives: a capacitor beside every chip and a resistor beside every third, each with tinned end caps.
  • Silkscreen: an outline round each package with its pin-1 corner cut, reference designators (U1…, C1…, R1…, numbered in reading order), and the district names in white mono caps.
  • Seen from straight above, square to the frame, in the live view, the default still (--shot hero) and films. --shot aerial and --shot street keep their angles, so --shot still means something. The live view doesn't spin, and dragging still tilts it.
  • Hover, focus, the timeline, growth and demolition all work as in the other lit styles. Traces open with their blocks. --still works too.

Hidden

  • oneOf accepts chip, but it isn't listed in --help or the README.
  • web/chip.js is fetched with a dynamic import only when the style is asked for. It isn't in the preload list.

How you find it

  • A page visit that names no style rolls chip with probability 1e-5 and puts ?style=chip in the URL (history.replaceState), also when the visit had an empty ?style=, so the lucky board can be shared.
  • ?style=chip and --style chip always work. Visits that name a style, and every --still, film or card, never roll.
  • The CLI's live view no longer passes style=pixel unless --style was given, so a local look rolls too.
  • No hint anywhere: the earlier psst line (CLI) and psst link (page) for hardware repos are removed. identity.chip is still in the scan but nothing reads it.

The hosted site needs no change: the Worker only reads style for badges, and /chip.js is served as a static asset.

Checked

  • In the browser preview: a plain visit stays pixel with no psst link; with Math.random forced to 0 it rolls chip and the URL becomes ?style=chip, no console errors. YosysHQ/picorv32 (Factory Town) and pallets/flask (Paris), both with ?style=chip. Also checked hover, a mid-timeline scrub, and ?city=classic. No console errors.
  • --still --style chip on picorv32, flask and terraform-aws-eks (port city, water ground).
  • npm test passes. test/layout.mjs runs the board plan as well, also merged together with An old walled city: twenty years on, its founding quarter behind a wall #6.
  • Cell packing: the fullest cell held 46 files on gson and 36 on gallery before (a corner of specks); now 6 and 8. A synthetic directory of 5,000 files went from 1,228 in one cell to 12. No file in gson, gallery or axum is below a quarter of the median lot.
  • Merged with Page: who built what #8 (who built what): on flask with ?style=chip&by=… the builder lights with the usual focus dimming, no console errors.
  • With An old walled city: twenty years on, its founding quarter behind a wall #6: a walled city (git) draws no wall on the board. Whichever of the two merges second skips the wall for style=chip.

🤖 Generated with Claude Code

Fengzdadi and others added 9 commits October 26, 2026 21:13
- --style chip and ?style=chip: the city's own plan, every file a low chip
  package (dark body, a row of leads, pin-1 dimple, etched part number) on
  green solder mask, a copper trace round every block with a via at each
  turn, silkscreen outlines and district names, imports as a ratsnest
- web/chip.js holds the parts and is fetched only for this style
- not in --help or the README: the easter egg for hardware repos
- the CLI's psst line is back for repos with Verilog/VHDL sources, and the
  page offers a quiet "psst: chip" link beside the others

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A circuit board has one arrangement whatever the city would be: the chip
style now always uses a new `board` planner. It lays out a square board on
a dark bench, with each directory a rectangular block cut into an even
grid of cells and channels between them for the traces. It isn't a city
type: it's not in CITY_KINDS or --city, and classify is untouched. The
still's caption reads "built like a circuit board". test/layout.mjs runs
the board plan too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Boards are photographed and drawn from above: the chip style's live view,
stills and films now face the board square on. The live view doesn't spin
(dragging still tilts it), and a film pushes in on the hub without
turning. Names keep full strength, and the bench under the board is matte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each import edge is routed between the two chips on a grid (A*, 45° and
90° turns, vias at square corners), shortest edges first within a 900 ms
budget. Every chip gets a decoupling capacitor and every third a
resistor; chips, Cs and Rs carry U/C/R reference designators in
silkscreen. Leads fan out to vias. The ring traces round each block are
gone, and the board slab sits flush with its blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A visit that names no style rolls chip one time in 100,000 and keeps
?style=chip in the URL, so a lucky board can be shared. The CLI's psst
line and the page's psst link for hardware repos are gone, and the live
view leaves the style to the page unless --style was given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A card URL names no style, so it could have rolled chip one time in
100,000; cards and recordings are made, not visited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in who built what (#8) and the scanner bump (#5) before the chip fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each cell of a directory's block took parts until the next one would go
over a share fixed up front. Most cells stopped a little short of it, and
the last cell took everything left: in gson 46 files ended up crammed into
one cell at a fiftieth of their size, and a directory of 5,000 files left
over 1,200 in its corner. Now each cell's share is what's left divided by
the cells left, and a part goes in when at least half of it fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An empty ?style= names no style, so the page could roll chip, but the
address was only rewritten when there was no style key at all: a reload
of the lucky board came back pixel and it couldn't be shared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Fengzdadi
Fengzdadi merged commit 29dd9fd into main Nov 3, 2026
6 checks passed
Fengzdadi added a commit that referenced this pull request Nov 3, 2026
Main now has the chip style (#7). Both changes pass a new value to the
studio, so it takes both, chip and wall. The circuit board isn't a city
and has no old town, so a walled city's wall is planned for every style
but chip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant