diggings -- prospect gopherspace ================================= ------------------------------------------------------------ What it is & how to start ------------------------------------------------------------ Howdy, partner -- welcome to the frontier of gopherspace. diggings turns gopherspace into an expedition. Gopher is a vast, quiet, half-forgotten frontier: thousands of small servers, most never linked to, never indexed, never visited. diggings rewards you for going out there anyway. Every selector you reach is treated as unclaimed ground, and the first time you set foot on one you strike gold (+1). Be the first person ever to reach it and you strike a bonus (+5), and your name is carved in as its discoverer -- on the Klondike the creek you struck first took your name and kept it, and a selector here does the same. You are a prospector, a frontiersman, a gopherspace cowboy out past the edge of the map -- and the map fills in behind you as you go. The point is the going. It is easy -- on gopher as much as anywhere -- to wear a groove between the same few holes and call it a day. But a rut and a trail are both worn grooves; the difference is a rut goes nowhere and the Oregon Trail went two thousand miles. diggings exists to pry you out of the one and start you down the other: the whole protocol is out there, and most of it nobody has bothered to walk. It is also a textboard laid over the whole protocol: every selector, anywhere, is a thread. Wherever you land you can read what other diggers left and pin up a verified post of your own, 4chan-tripcode style -- so the gold rush leaves a trail of conversation behind it, not just a leaderboard. You never leave the game to do any of this. diggings is a proxy: it fetches remote menus and pages and rewrites their links so a click carries you deeper without dropping out. An "exit" row is always there if you want to step back onto the open protocol -- the proxy is something you pass through, never a trap. It is the spiritual successor to the old `grpg`: same soul -- surf, discover, get rewarded, leave a mark -- with none of the battle/stats/death machinery. To do anything social you stake a name first. That is free, and the secret half of it is never stored, only hashed: printf '/applets/diggings/diggings.lhs/login\tyourname#yoursecret\r\n' \ | nc gopher.someodd.zip 70 That returns a one-row menu linking to your session selector, /applets/diggings/diggings.lhs/s/. Bookmark it -- it is your login, and anyone holding it acts as you. Lose it and you just re-stake the same name#secret: same verified name!trip identity, fresh token. From your session menu you surf -- type a gopher location into the surf box and you are off, earning gold for new ground as you go. The bare URL /applets/diggings/diggings.lhs is the landing menu, and you can surf anonymously with no name at all; you simply earn no gold and cannot post. ------------------------------------------------------------ Endpoints ------------------------------------------------------------ below is a base64url-encoded gopher location; is a 32-hex-digit session token. You never type these by hand -- they are produced for you and travel inside the menu links. /applets/diggings/diggings.lhs landing menu (gophermap) /applets/diggings/diggings.lhs/loginname#secret stake a name; returns a link to your session menu. /applets/diggings/diggings.lhs/diggers gold leaderboard, most recent first-ever discoveries, and the latest posts across all threads. /applets/diggings/diggings.lhs/s//diggers the same leaderboard, but its links carry your token so a look never drops your session. /applets/diggings/diggings.lhs/s//logout kill this session link --- the durable name!trip and gold survive; re-stake name#secret for a fresh link. /applets/diggings/diggings.lhs/s//logout-all kill *every* session link for this name!trip --- useful when a token of yours is loose somewhere you no longer control. The durable identity (name!trip, gold) survives. /applets/diggings/diggings.lhs/s/ your session menu: who you are, your gold, a surf box, a "resume" link, the leaderboard. /applets/diggings/diggings.lhs/s/host[:port][/sel] surf box: type a gopher location, jump straight into it as your session (this is how you earn gold). /applets/diggings/diggings.lhs/s//go/ surf as you -- awards gold for new ground, touches presence, renders the proxied page under the overlay. /applets/diggings/diggings.lhs/s//thread/ the thread page for : discoverer, who is here, a post box, the posts oldest-first. /applets/diggings/diggings.lhs/s//post/text leave `text` as a post on 's thread. /applets/diggings/diggings.lhs/gohost[:port][/sel] anonymous surf box: type a gopher location and jump into it with no name (earns no gold). /applets/diggings/diggings.lhs/go/ /applets/diggings/diggings.lhs/thread/ anonymous surf and anonymous (read-only) thread view -- no gold, no posting, but you can still look around. ------------------------------------------------------------ From the command line ------------------------------------------------------------ Stake a name (the # splits display-name from the secret): printf '/applets/diggings/diggings.lhs/login\tsomeodd#hunter2\r\n' \ | nc gopher.someodd.zip 70 Surf a hole anonymously (no name needed, earns nothing): printf '/applets/diggings/diggings.lhs/go\tgopher.floodgap.com\r\n' \ | nc gopher.someodd.zip 70 Read the leaderboard: curl gopher://gopher.someodd.zip/1/applets/diggings/diggings.lhs/diggers Everything else -- surfing as a session, reading threads, posting -- is reachable by following the links inside those pages; the encoded and segments are filled in for you. ------------------------------------------------------------ How this works ------------------------------------------------------------ State lives in one SQLite file, .diggings.db, opened in WAL mode with a busy_timeout. Every gopher request spawns a fresh short-lived process, so the many concurrent readers and the occasional writer cannot share process memory -- WAL plus the atomicity of INSERT OR IGNORE is the entire concurrency story. Two players racing to be a selector's first discoverer both run the same insert; exactly one wins the bonus. No lock files. A tripcode is the classic stateless identity: name#secret yields name!trip, where trip is a salted hash of the secret. Same secret always yields the same trip; nobody without the secret can forge it; the secret itself is never written down. The session token is a convenience layer on top -- a random bearer credential mapped to your (name, trip) so you do not retype the secret every action. The proxy fetches remote menus with curl. A remote row of an enterable type (1 menu, 0 text) is rewritten to point back through diggings carrying your token; every other type -- searches, binaries, images, URL: rows -- is left pointing at the origin server, because proxying those is either broken or pointless. Every surfed page, and every thread page, also carries one row that points straight back out -- "exit diggings, open this page on its own server" -- so the proxy is something you step through, never something you are stuck in. The surf overlay also carries a "strike out" box --- type a gopher location and jump straight to a fresh hole --- plus a row home to your session menu. And every page a player has reached shows a "first found by name!trip" credit: on its thread page, and in the overlay each time anyone surfs it. ------------------------------------------------------------ Limits ------------------------------------------------------------ Gold is a leaderboard score; it does not buy anything yet. There is no quality signal anywhere in diggings -- no votes, no likes, no ranking of selectors or posts. It rewards reaching new ground, not endorsing good ground: gamified discovery, not gamified taste. The posts are a trail you leave, not a score you chase. (Adding upvotes would quietly turn it back into an engagement contest -- which is exactly what it is not.) Personal gold never depletes -- you earn +1 for any selector *you* have not visited, forever. The +5 first-discovery bonus is the scarce part: once a selector has any discoverer, that is settled. Gold is only awarded for a selector that actually resolves to something -- a fetch that fails, comes back empty, or is just a "not found" error row earns nothing and records no discovery, so dead selectors cannot be farmed. Type-7 boxes accept either a name#secret stake or a typed gopher location depending on the box; malformed input comes back as a type-3 error row plus a link back. Names are capped at 24 characters ([A-Za-z0-9_-]); posts at 2 KiB. Anonymous surfing renders the proxy and overlay but earns no gold and cannot post -- everything social needs a staked name. Disconnecting mid-request just unwinds the process; there is no long-lived stream here, every response is a finite gophermap.