Skip to content

Fill out the technical index, and let each object answer for its own entry - #55

Merged
gitosaurus merged 5 commits into
mainfrom
feat/tech-index-entries
Aug 13, 2026
Merged

Fill out the technical index, and let each object answer for its own entry#55
gitosaurus merged 5 commits into
mainfrom
feat/tech-index-entries

Conversation

@gitosaurus

@gitosaurus gitosaurus commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Takes up More entries for the technical index from the roadmap.

How lookup works now

The entries were a case over main.subj — a dispatch table written by hand,
which is the one thing an object language shouldn't need — and it could only
ever yield text, so an entry had no way to give a conditional hint or to have
any effect at all.

Objects answer 'TechnicalIndexLookup' for themselves now. Whether the library
covers a subject is the subject's own business, and an unhandled message comes
back ABSENT, which is the whole of "not covered": the bicycle repair kit and
the quarter are left out by having nothing written about them anywhere, rather
than by being named in a default branch. Same test the parser already uses on
'look' in gorreven_lex.arch:46.

Sending is also the asking, so an entry has printed itself by the time the
answer arrives. The announcement therefore names the subject and promises
nothing about what follows — true either way, and it shows which object a word
landed on:

> look up quarter
I look up the quarter in the index.
The screen prints NO SUCH ENTRY.  It is, after all, a technical library.

Entries are >> text rather than concatenated string literals, so they read as
prose in the source as well as on the screen.

Verified, not assumed: several types define a default that forwards a
message on rather than letting it fall off the end (hollow_object forwards to
room, large_structure forwards to hollow_object), so "no handler" is not
automatically ABSENT for every type. A sweep of every IsAobject in the game
found exactly one non-ABSENT responder — the object class prototype itself,
which is not a thing a player can name. Also confirmed that a method ending in
an if that doesn't fire returns UNDEFINED and not ABSENT, so a conditional
entry can't print itself and then be denied in the same breath.

The entries

Eighteen added to the five that were there — power, EVA kit, radiation, ship
systems, and a few odds and ends. Several carry a clue the game otherwise
leaves to be found by dying:

  • the Geiger counter reads the room and not the wearer, so the coveralls don't
    turn the light green;
  • welding light blinds at once rather than by degrees;
  • the airlock doesn't check whether anybody is ready before it cycles.

The rest are flavour, which the roadmap explicitly allows: "Most items! They
don't all have to have clues."

Two entries now depend on the state of what they describe, which is the point
of the restructure: the Geiger counter adds a note when it's switched off, and
the calculator stops hinting at its back cover once the back cover is off.

The corrupted message survives, moved to the one place a damaged entry says
something: the captain's ID card.

Also in this PR

  • The vending machine prints its terms on its front. The quarter opens the
    calculator and buys the drink, and the machine keeps whatever it's given,
    so spending it first is unrecoverable and nothing said so beforehand. The
    trap stays as designed; what it lacked was the notice any machine of this
    kind would have printed on it. (This rode along in c5355b1, whose message
    doesn't mention it.)
  • The cartridges are an object. They were the first noun in the room
    description and the only one that couldn't be looked at.
  • never_read was never cleared, so the index introduced itself as if for
    the first time however often it was read.
  • Three typos in text the player sees: "the walls are lines with", "artifical",
    "physican".

Testing

--test: 18 suites, 0 failures. Every entry verified reachable by the name a
player would type, from a scratch harness that starts in the library, including
both branches of each conditional entry.

The index answered every lookup the same way: it announced that an entry
had appeared on the screen, and then either printed one or said the entry
was corrupted.  Looking up the quarter therefore produced an entry that
had come up on the screen and been damaged, when what the library really
had to say about a quarter was nothing at all.

Entries now hand their text back instead of printing it, which is what
lets 'look up' find out whether there is one before announcing that
anything has appeared.  A subject with no branch falls out as UNDEFINED,
and that is the whole of "the library doesn't cover it" -- so the
bicycle repair kit and the quarter need no branch apiece saying so.

Eighteen entries join the five that were there.  Several carry a clue
that the game otherwise leaves to be discovered by dying: that the
counter reads the room and not the wearer, so coveralls do not turn the
light green; that welding light blinds at once rather than by degrees;
that the airlock does not check whether anyone is ready.  The rest are
there because a library with five entries is not a library.

Also here, all in the room being worked on:

- The cartridges are an object now.  They were the first noun in the
  room description and the only one that could not be looked at.
- never_read was set TRUE and never cleared, so the index introduced
  itself as if for the first time however often it was read.
- "the walls are lines with", "artifical", "physican".
@gitosaurus gitosaurus changed the title Fill out the technical index, and let it admit what it lacks Fill out the technical index, and let each object answer for its own entry Aug 12, 2026
gitosaurus and others added 3 commits August 12, 2026 12:32
The entries were a case statement over main.subj: a dispatch table written
by hand, which is the one thing an object language should not need.  It
could also only ever yield text, so an entry had no way to give a hint
that depended on anything, or to have any effect at all.

Objects answer 'TechnicalIndexLookup' for themselves now.  Whether the
library covers a subject is the subject's own business, and an unhandled
message comes back ABSENT, which is the whole of "not covered" -- the
bicycle repair kit and the quarter are left out by having nothing written
about them anywhere, rather than by being named in a default branch.  The
same test the parser already uses on 'look' in gorreven_lex.

Sending is also the asking, so an entry has printed itself by the time
the answer arrives.  The announcement therefore names the subject and
promises nothing about what follows, which is true either way and has the
side benefit of showing which object a word landed on.

Two entries now say different things depending on the state of the thing
they describe, which is the point of the change: the Geiger counter adds
a note when it is switched off, and the calculator stops hinting at its
back cover once the back cover is off.

The entries themselves are >> text rather than concatenated string
literals, so they read as prose in the source as well as on the screen.

Examining the vending machine now prints its terms.  The coin goes in and
does not come out, and there is exactly one coin aboard; the trap stays,
but a player standing in front of the machine can read NO REFUNDS, NO
CHANGE GIVEN, ALL SALES FINAL before deciding.  That is the difference
between a mean puzzle and an unfair one.
Also a stylistic change to model "wall of text" wiki-style
expressions as single statements, usually aligned against the
left edge of the editor.  These are text more than they are
code, and I like them to read that way in those contexts.

Also made a change throughout starship.arch to use `---` as
my em dash instead of ` -- ` and especially more than ` - `,
in anticipation of markdown work.  I haven't checked how
that impacts word-wrap.
Two spellings: the Geiger counter reported "radation", and the spent fuel
block compared itself to "unspect" fuel.

The spacesuit entry began "This standard out-of-ship equipment is
comprised primarily of this rubber and vinyl spacesuit", the second
"this" left over from promoting the first word.  It is "a" spacesuit now.

Braces came off two entries that the pass had left behind: lead_waste and
the index's own INDEX: see INDEX.  Both are a single chained >> statement
like the rest, so the block was doing nothing.  The Geiger counter keeps
its braces, the trailing conditional making it genuinely two statements.

The reactor entry had a source line one column past eighty; rewrapped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Ui8UMgev1U8LW5iyQdSsJ
@gitosaurus
gitosaurus force-pushed the feat/tech-index-entries branch from c5355b1 to df1bed9 Compare August 13, 2026 02:19
The note about ">>" chaining into a single statement is three more lines
of prose inside a method, and prose inside a method is 157 bytes of the
binary.  Nothing about the format moved.

The .ttl is unchanged, byte for byte, which is the whole story: the RDF
dump describes the world -- objects, attributes, who is inside what --
and a string literal in a method body is none of those things.  The
reviewable half of this diff being empty is the evidence that only the
opaque half should have changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Ui8UMgev1U8LW5iyQdSsJ
@gitosaurus
gitosaurus merged commit 8e999cc into main Aug 13, 2026
2 checks passed
@gitosaurus
gitosaurus deleted the feat/tech-index-entries branch August 13, 2026 02:25
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