A reckoner seed: the Earth as arithmetic — machines/seeds/seedgeo.shoddy
seedgeo is a reckoner seed: a small file that bridges
one machine's words into the reckoner calculator. It brings nineteen of
geo's words to a calculator keyboard: distance,
bearing, destination and midpoint; route length, cross-track and bounds;
area and simplification; the written forms; the sun; and the horizon.
A point at a prompt is a two-element LIST,
{ 53.72 -1.86 }, latitude first, and a route is a
LIST of them. A record does not fit a Cell
— the single-value container everything on the stack is. And a
resource binding would be absurd for a value with no lifetime. So this
is the shape seedmatrix and
seedstats already use for a structured
argument, and it is the one a person can type.
Two coordinates and a question is exactly the shape of a calculator line. It is also the kind of question people ask standing up: how far is that, which way is it, what time does it get dark. The whole domain arrives with no engine change at all — the promise a seed exists to keep.
Nothing here aborts. geo refuses a latitude outside
−90..90 by calling Error, which ends a program. At a
keyboard that would end the session, and the reckoner's
load-bearing contract is that no line you can type does that. So every
guard geo performs is asked first and answered as a refusal. A refused
line leaves the stack exactly as it was. GeoTryAt —
the total twin geo publishes beside its aborting builder, a version that
always answers instead of dying — is what makes that possible
without writing the domain rules twice.
An Option — a value that may be present or
absent — arrives as a one-cell LIST:
{ } for None, { x } for
Some. GEOSUNRISE inside a polar day answers
{ }. That is the honest stack spelling of “it does
not”, and LENGTH is how the keyboard asks. This is
the encoding seedbool's LOWBIT
uses, and for the same reason. A word pushing a variable number of cells
would break UNDO's accounting, so the answer is always
exactly one cell.
The names are GEO-prefixed, all of them.
Bare DISTANCE, AREA and BEARING
are exactly the names the next domain seed will want too. And a name
registered twice does not collide: it silently replaces the
first, which is a fault nothing in the engine will report.
{ 53.72 -1.86 } { 51.5074 -0.1278 } GEODIST
x: 249747.3 ' metres, the Heavy Woollen District to London
{ 51.5074 -0.1278 } { 48.8566 2.3522 } GEOBEARING
x: 148.1156169 ' degrees clockwise from north
148.1156169 GEOCOMPASS
x: "SSE"
{ { 51.5074 -0.1278 } { 48.8566 2.3522 } { 45.764 4.8357 } } GEOROUTELEN
x: 735056.0073 ' London, Paris, Lyon
The box comes back as five cells — south, north, west, east, and whether it wraps. The flag is there because a box crossing the antimeridian — the 180-degree line on the far side of the planet from Greenwich — has west greater than east. So does a box of one point sitting on it:
{ { 0 179 } { 0 -179 } } GEOBOUNDS
x: { 0 0 179 -179 True }
The sun takes a Julian date — astronomy's plain running count
of days — because geo never reads a clock. GEOJULIAN
is the bridge, and it is bridged here for that reason alone. Without it
the three sun words could not be reached from a keyboard at all:
2026 6 21 GEOJULIAN
x: 2461212.5
{ 53.72 -1.86 } 2461212.5 GEOSUNRISE
x: { 3.613168696 } ' 03:37 UTC, in a one-item LIST
{ 70 0 } 2461212.5 GEOSUNRISE
x: { } ' above the Arctic circle in June it never set
{ 70 0 } 2461212.5 GEODAYLENGTH
x: 24 ' still a number, which is why this word is separate
And a bad argument refuses, rather than ending the session:
{ 91 0 } { 0 0 } GEODIST
?: GEODIST: GEOTRYAT: LATITUDE '91' IS OUTSIDE -90..90
{ } GEOBOUNDS
?: GEOBOUNDS needs at least one point, the LIST is empty
| Word | Description |
|---|---|
| GEODIST ( a b -- m ) | The great-circle distance in metres between two points, each a LIST of a latitude and a longitude in degrees. |
| GEOBEARING ( a b -- deg ) | The initial bearing from a to b, degrees clockwise from north. It changes along the way; this is the one you leave on. |
| GEODEST ( a brg m -- b ) | Where you arrive steering brg degrees from a for m metres, as a LIST of a latitude and a longitude. |
| GEOMID ( a b -- c ) | The great-circle midpoint, which is NOT the average of the two coordinates — across the date line the average is on the far side of the planet. |
| GEOROUTELEN ( pts -- m ) | The total length in metres of a route given as a LIST of points. An empty or one-point route is 0, not a refusal. |
| GEOCROSSTRACK ( p a b -- m ) | How far p lies off the great circle through a and b, in metres, SIGNED — positive to the right of the track a to b. |
| GEOBOUNDS ( pts -- box ) | The enclosing box of a LIST of points as { south north west east wraps }. It is antimeridian-aware, so west may be greater than east and the flag says when. |
| GEOAREA ( pts -- m2 ) | The area in square metres of the spherical polygon through a LIST of points, by spherical excess. The ring closes itself and winding does not matter. |
| GEOSIMPLIFY ( pts m -- pts ) | Douglas–Peucker: the route with every point closer than m metres to the line it sits on dropped. Both ends are kept and it never grows a route. |
| GEODMS ( d n -- s ) | An angle in degrees written as degrees, minutes and seconds, with the seconds to n places. |
| GEOPARSE ( s -- p ) | A written coordinate as a point: a decimal pair, or degrees and minutes and seconds, with N S E W before or after and in either order. |
| GEOHASH ( p n -- s ) | The geohash of a point to n characters. A geohash names a BOX, not a point: six characters is about 1.2 km by 0.6 km. |
| GEOLOCATOR ( p n -- s ) | The Maidenhead locator of a point to n characters, IO91wm and the like. n must be 2, 4, 6 or 8. |
| GEOCOMPASS ( brg -- s ) | A bearing as one of the sixteen compass points, NNE and the rest. The half-winds are not offered. |
| GEOJULIAN ( y m d -- jd ) | The Julian date at midnight UT on a calendar date. The sun words take one of these, because geo never reads a clock. |
| GEOSUNRISE ( p jd -- list ) | Sunrise as UTC hours in a one-item LIST, or an empty LIST inside a polar day or night. LENGTH asks whether the sun rose at all. |
| GEOSUNSET ( p jd -- list ) | Sunset as UTC hours in a one-item LIST, or an empty LIST where there is none. The same shape as GEOSUNRISE and for the same reason. |
| GEODAYLENGTH ( p jd -- h ) | The hours of daylight, 0 through 24. Always a number, even where there is no sunrise to have. |
| GEOHORIZON ( h -- m ) | How far you can see from a height of h metres, in metres. Geometric, with no allowance for refraction. |
Some of geo is not bridged, and these are boundaries rather than a
to-do list: the intersection and along-track family, resample,
waypoints, centroid, the box words other than GEOBOUNDS,
the geohash and locator readers, twilight, solar position, and the
rhumb family. They want either two structured arguments and a fraction,
or a record answer with no stack spelling. Three list arguments at a
prompt is where a bridge stops helping.
| User | How | |
|---|---|---|
| halifax | Folded last, so its words land under a -- seed-geo -- heading at the end of WORDS. | |
| sparky | The same fold, and the same nineteen words at a Sparky prompt. |
A mill claims this seed by folding RckSeedGeo over its
reckoner state. Both mills append it at the end of the fold rather than
placing it by subject. That order is the order WORDS prints
its group headings in, and both mills' golden suites assert it from a
list.
| Machine | Why | |
|---|---|---|
| geo | Every answer. The bridge computes nothing of its own — it reads cells, calls a geo word, and writes cells back. | |
| cuttle | The Cell type a point is carried in: CutList of two CutNum. | |
| reckoner | RckReg and RckSeeding for registration, and RckNumArg, RckListArg, RckTextArg and RckWholeArg for reading an argument without ever aborting on one. |