Repository navigation
An old walled city: twenty years on, its founding quarter behind a wall - #6
Merged
Merged
Conversation
… an old walled city Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The walled state gets drawn: the round patch of the city where files from the first five years are thickest, snapped to whole blocks where the plan has small ones, is walled off down the middle of the streets (a nearest-lot distance field, so the wall never cuts a building). Towers along it, four gates at the widest streets, up when the founding years end. Works on every plan; walls.js is pure, the studio builds the meshes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wall now stands wherever the classifier says the city is walled, and never on a building: - Deleted buildings stand in its way. The files deleted lately stand for most of the timeline, so they're in the distance field like any other lot: they take no part in choosing the old town, they go on the side of the street their ground was on, and the wall goes down the street past them. Each lot also takes every cell it touches, not only the ones whose middle it covers, and a tower stands only where none of the ground under it touches a lot (towers are wider than the wall). - No old quarter, the whole city. When the founding files are spread evenly (every file founding, say) or the city is too small for a quarter of its own, the old town is the whole city: the wall follows the hull round all its buildings, deleted ones too, so a city on islands is one town, with a gate on each side. The wall stands from the ground up, so where it crosses water it stands in it, not over it. planWall returns null only for a city with no lots. - Long cities keep fine cells. The grid covers only the ground round the old town, and its cells are capped by area (three million), not by the longest side over 1,600, which made them wider than a lot on a long Manhattan or Mountain City of 10,000 files and lost the wall. - Fast on big cities: lots are counted in rings round each candidate centre instead of sorted, blocks and towers are filed on a coarse grid, and wall cells stack into boxes along the columns too. On a 30,000-file city, 120-220 ms for an old quarter and 50-75 ms for the whole city (was 1-1.7 s). - The studio skips an empty wall, as it does other merged meshes, and the pixel wall is #968a6e, palette stone that reads against grass and road. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The classifier now measures foundingShare and can set `walled`, so a city kept in R2 from before has neither. SCANNER goes to 9: each repo is scanned afresh the next time it's opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #4 (
scan/births-before-window), now merged intomain(b462ff1), andmainis merged into this branch. Without it the 20,000-commit cap dates every file from before the window to the window's start, so no big old repo would ever show its founding files. This PR no longer waits on anything, and its diff is only this change.What
A new state,
walled, that can sit on any city plan, likeruinsorghost. It is not an archetype.src/classify.mjs): the repo isageYears >= 20andfoundingShare >= 0.2.foundingShareis the share of the core files still alive that were born in the repo's first five years. It counts from the real founding day (city.firstCommitwhen truncated, elsecity.start) over the same core file set as the other metrics.Reason:
old walled city: 34% of files date from its first five years, 22 years ago.web/walls.js,web/studio.js): a wall around the quarter where the founding files cluster (or around the whole city when they're spread all through it), with towers and red roofs along it and four gates. It rises when the founding years end. The README's list of conditions mentions it.How the wall is placed
walls.jsis pure and runs on the finished layout, so it works the same on every plan. The studio builds the meshes.The distance field covers only the old town plus a margin, with cells sized by area (at most 3 million), so long thin plans like Manhattan get as fine a wall as square ones. At 30,000 files it takes 117–216 ms with an old quarter and 53–75 ms for a whole-city wall.
Who gets it
Young repos have high founding shares too, so age is what separates them. The share then stops a 20-year-old repo that has been rewritten from getting the state.
Snapshots: all 11 pinned repos move by one line, the new
metrics.foundingShare. None of them gains the state, since none is 20 years old.Hosted site
SCANNERgoes 8 → 9 (deploy/cloudflare/container/version.mjs): classify output changes, so cities cached under 8 must be scanned again to get the state. Still needsnpm run deployafter merging.Not in this PR
Checks
npm testpasses (preload, layout, history, snapshot), also merged together with Chip: a hidden style that draws any city as a circuit board #7.planWallon every snapshot city × all 18 plans, with deleted files, at four founding cut-offs (including all-founding and none): a wall in all 792 runs (was 584 with none), and no wall or tower on any lot, live or deleted (was 181 runs).--stillof vim, postgres, git and django draws the wall. Flask (no state) and vim in--style maquetterender without errors. The pixel wall colour is#968a6e, from the pixel palette.style=chip.🤖 Generated with Claude Code