- the reader gives an address's region (the first subdivision) and city
where the database has them: GeoLite2/GeoIP2 City and DB-IP's City
Lite as MaxMind DBs; DB-IP's city CSV and IP2Location LITE DB3 and up
as CSVs (now read with encoding/csv, quoted fields and all)
- CSVs stream in (gzipped or not) and are kept small: each place once,
each range by its start, IPv4 apart in 4 bytes; DB-IP's city list,
7.8 million ranges, in 135 MB
- geoip.File reads the first time at once and later changes in the
background, the old reader answering meanwhile; the server reads the
database when it starts; the image boards share the BBS's when the
file is the same
- bbs.Place has the city; the log and the sysop's node list show
"Mountain View, California, United States"; who's online, the API and
the forum's flags still show only the country
- checked against MaxMind's reader on DB-IP's city database of October
2026 in both formats: the same country, region and city for 200,000
addresses
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A board with ids gives each poster an ID in each thread, as 4chan's: a
keyed hash of their address, the board and the thread, the same all
through a thread, another in the next. Each has its colour; hovering
counts its posts, clicking marks them.
A board with flags shows each poster's country's flag (an emoji, its
name on hovering), from [chan] geoip: a country database read by the
new internal/geoip, which reads MaxMind DB files (GeoLite2, DB-IP
Lite, IPinfo's...; tested on files made by MaxMind's own writer in
each record size, and broken ones) and CSVs of ranges (DB-IP's,
IP2Location LITE's), plain or gzipped, read again when the file
changes. Country names from ISO 3166.
Both are kept with each post, shown on the terminals by the name, and
given in the JSON as 4chan's id, country and country_name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr