Inform 7 v10.1.0 is now open-source

Wow. It’s probably boring to read that version 10 just works, but it pretty much does. Thank you!

I built it yesterday and tried it on my medium-sized work in progress. I removed one old bug workaround, found and reported a new bug that was already fixed when I checked after work today, and tweaked Eric Eve’s Bulk Limiter as mentioned upthread.

Thanks to Andrew Plotkin’s regtest.py, I was able to confirm output is essentially the same as with 6M62 and I will (hopefully) finish this soon with the latest release.

3 Likes

I’m not sure if is an issue or not, but I suspect that there’s much (now collective) work to do on code generation.

compiling the generated I6 code with this:

inform/inform6/Tangled/inform6 -w -G -~D '$OMIT_UNUSED_ROUTINES=1' <WIP>.inform/Build/auto.inf -o <WIP>.inform/Build/<WIP>.ulx

I got this surprising return on unused routines & warnings:

108472 unused bytes stripped out (23.6%)

Compiled with 3532 suppressed warnings

for the record, the entire report is:

Inform 6.36 for Linux (24th January 2022)
In:  1 source code files             92501 syntactic lines
 81605 textual lines               2432037 characters (ISO 8859-1 Latin1)
Allocated:
  9681 symbols                     3451635 bytes of memory
Out:   Glulx story file 1.220519 (570K long):
    23 classes                          89 objects
   230 global vars                   92397 variable/array space
    84 verbs                           372 dictionary entries
   149 grammar lines (version 2)       226 grammar tokens (unlimited)
    82 actions                          40 attributes (maximum 56)
    39 common props (maximum 253)       30 individual props (unlimited)
458673 bytes of code                108472 unused bytes stripped out (23.6%)
127097 characters used in text       99485 bytes compressed (rate 0.782)
     0 abbreviations (maximum 64)     3306 routines (unlimited)
 79528 instructions of code          44971 sequence points
133376 bytes writable memory used   449792 bytes read-only memory used
583168 bytes used in machine    1073158656 bytes free in machine

Offsets in story file:
16c85 Synonyms     1c8aa Defaults     16c89 Objects    177a9 Properties
00000 Variables    1e7a2 Parse table  1f008 Actions    1f154 Preactions
1f154 Adjectives   1f154 Dictionary   0003c Code       55835 Strings
Compiled with 3532 suppressed warnings
Completed in 0.000 seconds

I can only surmise that there’s many thing to polish in the “pass 1” (inform7, formerly ni) code generation.

Any comments ? (I guess that this is a difficult question even for Lord Inform itself and Uncle Zarf…)

Best regards from Italy,
dott. Piergiorgio.

That’s not code generation, that’s low-level support for features not used in every game. You’d have to do an inventory to see exactly what’s involved.

Quite possibly the right answer is to let I7 do what it does and then use OMIT_UNUSED_ROUTINES.

thanks, Zarf !

I’m surprised it took me this long to go look for them, but we finally have a complete list of invocation labels with documentation.

2 Likes

Just had a whole lot of mysterious trouble (see here: Beta release of Inform App for Linux - #26 by neroden ) because of an undocumented dependency on rsync when doing make forceintegration. Rsync is not necessarily installed on an average Linux system.

The problem is buried quite deep, inside inweb/foundation_module/Chapter 1, which assumes the presence of rsync without checking.

There’s nothing wrong with depending on rsync (it’s easy enough to install on any Linux system), but it should be documented. Please add a description of the rsync dependency to the documentation for inweb, and to the build documentation for inform7.

1 Like

OK, one more “extremely painful” issue updating to the new (- Include -) mechanism.

There are a certain number of extensions which hack the Parser. By replacing “Parser Letter H”, for example. These now apparently have to replace the entire parser to operate as extensions? That’s going to be messy. I made a list:

Andrew Plotkin/Unified Glulx Input.i7x
Andrew Plotkin/Unicode Parser.i7x [I’m not sure if this is still needed or functional]
Daniel Stelzer/Multiple Actors.i7x
Jon Ingold/Disambiguation Control.i7x
Matt Weiner/Responsive Disambiguation for 6M62.i7x
Nathanael Nerode/Compliant Characters.i7x

I’m going to try to go through these one at a time and see whether a case should be made for integrating these changes into the standard release, so that these extensions don’t have to replace the whole parser.

(1) My miniscule change made in Compliant Characters does only one thing: it tries to not lose track of the location of the last word the parser could make sense of, so that it’s possible to do better error production later in the “answer” code:

Include (-
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Compliant Characters replacement for Parser.i6t: Parser Letter H
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
  .GiveError;
  etype = best_etype;
  if (actor ~= player) {
    if (usual_grammar_after ~= 0) {
      verb_wordnum = usual_grammar_after;
      jump AlmostReParse;
    }
    m = wn; ! Save wn (change made by Compliant Characters.i7x), using existing temporary variable
    wn = verb_wordnum;
    special_word = NextWord();
    if (special_word == comma_word) {
      special_word = NextWord();
      verb_wordnum++;
    }
    wn = m; ! Restore wn (change made by Compliant Characters.i7x), using existing temporary variable
    parser_results-->ACTION_PRES = ##Answer;
    parser_results-->NO_INPS_PRES = 2;
    parser_results-->INP1_PRES = actor;
    parser_results-->INP2_PRES = 1; special_number1 = special_word;
    actor = player;
    consult_from = verb_wordnum; consult_words = num_words-consult_from+1;
    rtrue;
  }

-) instead of "Parser Letter H" in "Parser.i6t".

This makes it possible for this code from Neutral Standard Responses, designed to find the last word which the parser understood, to work on commands with actors:

To decide which snippet is the extraneous word:
  (- (((wn - 1) * 100) + 1) -).

Because with the unpatched parser, this doesn’t work on commands with actors, and in fact there’s no good way to find the last word understood by the parser in a command with an actor.

This then makes it possible for Compliant Characters to do this:

Check an actor answering something (called the commandee) that when the latest parser error is the can't see any such thing error and the misunderstood word is in the dictionary (this is the command to actor includes word not in scope rule):
  say "[The commandee] [can't] see anything called '[the misunderstood word]' right [now].  [as the parser]Or I misunderstood you.[no line break][as normal][line break]" (A);
  restore the oops target;
  rule fails;

and this:

    -- only understood as far as error: [UPTO_PE]
      say "[as the parser]I can't understand your entire instruction to [the commandee].  The first part looked like the command '[the command understood so far]', but I didn't expect the word '[the extraneous word]' next.[as normal][line break]" (B);
    -- didn't understand that number error: [NUMBER_PE]
      say "[as the parser]I can't understand your entire instruction to [the commandee].  The first part looked like the command '[the command understood so far]', which I expected to include a number, but I didn't expect the word '[the extraneous word]' next.[as normal][line break]" (D);

This change to the I6T parser code doesn’t change behavior for anyone who isn’t poking at wn inside an Answer action. It looks after a cursory search like nobody else in the Friends of I7 Extensions repository touches this.

Rather than replacing the entire parser in my extension in order to add two lines, I would appreciate consideration of adding the necessary change in the I6T parser file – the hook – into the core Inform release.

It only affects code parsed into an “Answer” actions, and only if that code is hooking in and looking at wn, which should only be happening when reporting parsing errors to the player. It does nothing more than save wn (giving us the location of the last successfully parsed word) and restore it before returning an “Answer” action, rather than losing track of it and leaving wn in a state which is uninteresting and redundant to other information, which is what currently happens.

This change doesn’t change behavior for anyone unless they are poking at wn inside an Answer action, which nobody else in the Extensions library does. But for anyone trying to code better error responses to things like john, put the box sdfdsfds, the change is essential.

Almost all the extensions which poke at wn are doing so to deal with “I only understood as far as…” type errors or to do disambiguation, so this arguably should make it easier to adapt all of them to do their job on commands with actors.


I have finished a patch. I have rebuilt Inform, I have tested, and my Compliant Characters extension works once this patch is committed to Inform.
parser-hook.diff.txt (1.4 KB)


OK, I got my act together, cloned the repo, and submitted a pull request properly (after fixing some whitespace issues)

2 Likes

So, while working on more extension updates, I stumbled across a technical oddity, and I’m not sure if there’s a better place to ask about it. The Inform 7 WorldModelKit routines for quitting the game (QUIT_THE_GAME_R) are different in Glulx and Z-Machine, and almost certainly shouldn’t be different. I would submit a patch to synchronize them – but I’m not sure which one is correct.

Glulx:

[ QUIT_THE_GAME_R;
  if (actor ~= player) rfalse;
  if ((actor == player) && (untouchable_silence == false))
    QUIT_THE_GAME_RM('A');
  if (YesOrNo()~=0) quit;
];

Z-machine:

[ QUIT_THE_GAME_R;
  if (actor ~= player) rfalse;
  QUIT_THE_GAME_RM('A');
  if (YesOrNo()~=0) quit;
];

I’m not sure why untouchable_silence is being checked in the Glulx case – the history of this seems to be lost in the mists of time, as I haven’t been able to trace it through ‘git blame’. If I get a consensus on which version is correct I’ll submit a patch to synchronize the two versions.

It certainly looks like an incorrect intrusion into the template code. First appeared in 6L02 – at least it’s not in 6G60. There might be a fix mentioned in the 6L02 release notes, but I’ve lost track of where those are.

1 Like

Change logs in general; 6L02’s change log.

I’m not readily seeing anything related to this, but it’s not hard to imagine the issue being described in a way that doesn’t hit any of the keywords I tried.

1 Like

While I’m submitting patches, I’m noticing that three separate extensions have been written to deal with the same bug in the core Inform library:

Article Bug Fix by Daniel Stelzer
Indefinite Article Substitution Fix by Matt Weiner (for Glulx only)
Print Stage Detection by Taryn Michelle

The bug is still present in the current version of the WorldModelKit. I am inclined to submit a permanent patch to fix this once and for all. The most flexible and least invasive patch is Print Stage Detection by Taryn Michelle, though I’m not sure where to move the extensive and excellent associated documentation by Taryn Michelle. However, I would welcome comments.

3 Likes

I must have been the author of this confusion, but can’t remember it at all. Looking at the code now, though, “untouchable_silence” simply suppresses response messages explaining that the player can’t reach through some barrier. The variable is set only temporarily and only when checking scope. I can’t imagine circumstances where QUIT_THE_GAME_R could sensibly run when this is set, and therefore the condition (untouchable_silence == false) just looks redundant to me, and should be taken out.

Maybe this was an accident with cut and paste? Anyway, the Z version looks right to me.

4 Likes

That was my guess.

Thank you Mr. Nelson. Pull request made.

1 Like

I think it’s worth checking through the “6M62 Patches.i7x” file and seeing which ones are still needed, to try to get them into v10.1 before release. On a quick check of the current Inform source code, it looks like most of them are still needed, but I haven’t gone through them all in detail (and I don’t fully understand the errors being fixed by some of them, so I’m not quite sure how to test). Any assistance would be appreciated.

3 Likes

Of the contents of 6M62 patches, I was unable to reproduce

and

in v10. They seemed to have already been fixed before the initial release.

The following had already been an old mantis bug: I7-1746 and has been fixed. (I tried it.)

The following have not yet been reported.

3 Likes

I’m feeling pretty good. I fixed the presentation of extension documentation, which has been broken since 6M62. When-and-if Graham Nelson merges it (now done), it should be all spiffy again, like it was before 6M62.

Also fixed the ability of examples in extensions to have a “by Somebody” phrase.

This is one of the great advantages of being open source: other people can (and will) fix your bugs. These could have been fixed years ago had Inform been open-source earlier, but better late than never. Hooray for open source!

7 Likes

Just to note that I’ve pushed a change to the inform repository to incorporate everything from the “6M62 Patches” extension - a collection of useful fixes to misbehaving functions in (what is now) BasicInformKit. Several of these issues had already been addressed, but others had not.

Note in particular that although a different solution had already been found for the issue with rulebooks returning lists, I agreed with “6M62 Patches” that it was correct to use the strong kind ID and not the weak kind ID in the implementation of “rule succeeds”.

I’m hoping that this change will cause no problems for anybody; “6M62 Patches” should now no longer be needed.

14 Likes

…And I’ve now made a small fix having missed out one change; thanks to otistdog for finding this and pointing this out.

8 Likes

Absolutely astounding. Reading your announcement was like standing in the path of some avalanche.

Thanks Mr. Nelson!

4 Likes