I'm trying to work with the latest Inform -- what is the status of version 10.2 (or beyond)?

It may not be worth the effort just to keep support for z8, but Zil, for example, converts globals 240+ to values in an array. Accessing the value in the array is more costly but games of this size and in Inform7 won’t target retro machines anyway.

EDIT: Note to self. I should read all post before I post (sorry @Draconis).

2 Likes

<ifMUD>Timing!</ifMUD>

2 Likes

Here are the 216 globals I found in a quick search of Inform 10.1’s Inter code.

activities_sp = 0;
inhibit_flag = 0;
saved_debug_rules = 0;
caps_mode = false;
short_name_case;
unicode_gestalt_ok; ! Set if interpreter supports Unicode
formal_rv;
formal_par0;
formal_par1;
formal_par2;
formal_par3;
formal_par4;
formal_par5;
formal_par6;
formal_par7;
unicode_temp;
LIST_OF_TY_Sort_cf;
MStack_Top = 0; ! Topmost word currently used
MStack_Frame_Extent = 0;
TEXT_TY_RE_Trace = false; ! Change to true for (a lot of) debugging data in use
TEXT_TY_RE_RewindCount;
process_rulebook_count; ! Depth of processing recursion
debugging_rules = false; ! Are we tracing rule invocations?
I7S_Tab; ! The array to be sorted, which can have almost any format
I7S_Col; ! The "column number" in the array, if any
I7S_Dir; ! The direction of sorting: ascending (1) or descending (-1)
I7S_Swap; ! The current routine for swapping two fields
I7S_Comp; ! The current routine for comparing two fields
RawBufferAddress = TEXT_TY_Buffers;
RawBufferSize = TEXT_TY_BufferSize;
TEXT_TY_CastPrimitiveNesting = 0;
I7SFRAME;
TEXT_TY_RE_Err = 0;
prior_named_noun; ! for adaptive text generation
prior_named_list; ! ditto: length of list of items
prior_named_list_gender; ! ditto: common gender of list of items, or -1
story_tense = 1; ! ditto: present tense
story_viewpoint = 2; ! ditto: second person singular
say__p = 1; Global say__pc = 0; Global say__pc_save = 0;
say__n; Global say__comp;
los_rv = false;
parameter_object; ! = I7 "parameter-object" = I7 "container in question"
parameter_value; ! not typesafe in I7
property_to_be_totalled; ! used to implement "total P of..."
property_loop_sign; ! $+1$ for increasing order, $-1$ for decreasing
suppress_scope_loops;
temporary_value; ! can be used anywhere side-effects can't occur
clr_fg = 1; ! foreground colour
clr_bg = 1; ! background colour
clr_fgstatus = 1; ! foreground colour of statusline
clr_bgstatus = 1; ! background colour of statusline
clr_on; ! has colour been enabled by the player?
statuswin_current; ! if writing to top window
suppress_text_substitution = false;
deadflag = 0;
statuswin_cursize = 0;
statuswin_size = 1;
debug_rules = 0;
debug_rule_nesting;
reason_the_action_failed; ! = I7 "reason the action failed"
indef_mode;                  ! "Indefinite" mode - ie, "take a brick"
standard_interpreter = 0;
xcommsdir; ! true if command recording is on
transcript_mode; ! true if game scripting is on
dict_start;
dict_entry_size;
dict_end;
etype;                       ! parser error number if command not recognised
best_etype;                  ! Preferred error number so far
nextbest_etype;              ! Preferred one, if ASKSCOPE_PE disallowed
parser_inflection;           ! A property (usually "name") to find object names in
indirect_parser_inflection;  ! Set this to have parser_inflection called
pcount;                      ! and a marker within it
pcount2;                     ! so far
nsns;                        ! Number of special_numbers entered so far
params_wanted;               ! Number of parameters needed (which may change in parsing)
inferfrom;                   ! The point from which the rest of the command must be inferred
inferword;                   ! And the preposition inferred
dont_infer_pronoun;          ! Do not infer an "it"
dont_infer;                  ! Another dull flag
cobj_flag = 0;
oops_from;                   ! The "first mistake" word number
saved_oops;                  ! Used in working this out
held_back_mode;              ! Flag: is there some input from last time
hb_wn;                       ! left over?  (And a save value for wn.)
usual_grammar_after;         ! Point from which usual grammar is parsed (it may vary from
found_ttype;                 ! Used to break up tokens into type
found_tdata;                 ! and data (by AnalyseToken)
token_filter;                ! For noun filtering by user routines
length_of_noun;              ! Set by NounDomain to no of words in noun
lookahead;                   ! The token after the one now being matched
multi_mode;                  ! Multiple mode
multi_wanted;                ! Number of things needed in multitude
multi_had;                   ! Number of things actually found
multi_context;               ! What token the multi-obj was accepted for
indef_type;                  ! Bit-map holding types of specification
indef_wanted;                ! Number of items wanted (INDEF_ALL_WANTED for all)
indef_guess_p;               ! Plural-guessing flag
indef_owner;                 ! Object which must hold these items
indef_cases;                 ! Possible gender and numbers of them
indef_possambig;             ! Has a possibly dangerous assumption
indef_nspec_at;              ! Word at which a number like "two" was parsed
allow_plurals;               ! Whether plurals presently allowed or not
take_all_rule;               ! Slightly different rules apply to "take all" than other uses
dict_flags_of_noun;          ! Of the noun currently being parsed
pronoun__word;               ! Saved value
pronoun__obj;                ! Saved value
number_matched;              ! How many items in it?  (0 means none)
number_of_classes;           ! How many equivalence classes?
match_length;                ! How many words long are these matches?
match_from;                  ! At what word of the input do they begin?
parsetoken_nesting = 0;
converted_action_outcome = -1;
activities_sp = 0;
inhibit_flag = 0;
saved_debug_rules = 0;
lightflag = false;
requisition_stack_pointer = 0;
MarkedObjectArray = 0;
MarkedObjectLength = 0;
list_filter_routine;
DBLW_no_classes; Global DBLW_no_objs;
map_has_changed = true;
last_filter; Global last_use_doors;
location = 0; ! does not = I7 "location": see below
sline1; Global sline2;
undo_flag;
story_complete = 0;
resurrect_please = false;
not_yet_in_play = true; ! set false when first command received
turns = 1; ! = I7 "turn count"
the_time = NULL; ! = I7 "time of day"
time_rate = 1;
score; ! = I7 "score"
last_score; ! = I7 "last notified score"
notify_mode = 1; ! score notification on or off
left_hand_status_line = T_SL_Location; ! = I7 "left hand status line"
right_hand_status_line = T_SL_Score_Moves; ! = I7 "right hand status line"
player; ! = I7 "player"
real_location; ! = I7 "location"
visibility_ceiling; ! highest object in tree visible to player
visibility_levels; ! distance in tree to that
SACK_OBJECT; ! current player's holdall item in use
act_requester;
actor; ! = I7 "person asked" = I7 "person reaching"
actors_location; ! like real_location, but for the actor
actor_location; ! = I7 "actor-location"
action;
meta; ! action is out of world
inp1;
inp2;
toomany_flag; ! multiple-object list overflowed
multiflag; ! multiple-object being processed
multiple_object_item; ! item currently being processed in multiple-object list
noun; ! = I7 "noun"
second; ! = I7 "second noun"
keep_silent; ! true if current action is being tried silently
trace_actions = 0;
untouchable_object;
untouchable_silence;
touch_persona;
special_word; ! dictionary address of first word in "[text]" token
consult_from; ! word number of start of "[text]" token
consult_words; ! number of words in "[text]" token
parsed_number; ! value from any token not an object
special_number1; ! first value, if token not an object
special_number2; ! second value, if token not an object
parser_trace = 0; ! normally 0, but 1 to 5 traces parser workings
pronoun_word; ! records which pronoun ("it", "them", ...) caused an error
pronoun_obj; ! and what object it was thought to refer to
players_command = 100; ! = I7 "player's command"
matched_text; ! = I7 "matched text"
understand_as_mistake_number; ! which form of "Understand... as a mistake"
particular_possession; ! = I7 "particular possession"
parser_action; ! written by the parser for the benefit of GPRs
parser_one;
parser_two;
parameters; ! number of I7 tokens parsed on the current line
action_to_be; ! (if the current line were accepted)
action_reversed; ! (parameters would be reversed in order)
wn; ! word number within "parse" buffer (from 1)
num_words; ! number of words in buffer
verb_word; ! dictionary address of command verb
verb_wordnum; ! word number of command verb
scope_reason = PARSING_REASON; ! current reason for searching scope
scope_token; ! for "scope=Routine" grammar tokens
scope_error;
scope_stage; ! 1, 2 then 3
advance_warning; ! what a later-named thing will be
reason_code = NULL; ! for the I6 veneer
ats_flag = 0; ! for AddToScope routines
ats_hls;
move_pushing;
move_from;
move_to;
move_by;
move_through;
lookmode = KIT_CONFIGURATION_LOOKMODE; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF
c_style; ! current list-writer style
c_depth; ! current recursion depth
c_iterator; ! current iteration function
lt_value = EMPTY_TEXT_VALUE; ! common value of list_together
listing_together; ! object number of one member of a group being listed together
listing_size; ! size of such a group
c_margin; ! current level of indentation printed by WriteListFrom()
inventory_stage = 1; ! 1 or 2 according to the context in which list_together uses
debug_scenes = 0;
MAX_SCORE = INITIAL_MAX_SCORE;
EarlyInTurnSequence;
IterationsOfTurnSequence;
time_step;
pending_boxed_quotation; ! a routine to overlay the quotation on screen
caps_mode = false;
short_name_case;
x_scope_count;
test_sp = 0;

Plus ten more only for Glulx:

gg_mainwin = 0;
gg_statuswin = 0;
gg_quotewin = 0;
gg_scriptfref = 0;
gg_scriptstr = 0;
gg_savestr = 0;
gg_commandstr = 0;
gg_command_reading = 0;      ! true if gg_commandstr is being replayed
gg_foregroundchan = 0;
gg_backgroundchan = 0;

And one in the built-in extensions (Basic Screen Effects):

right_alignment_depth = 14;

(Found via grep "^Global " */*/*.i6t and grep "Global " */*.i7x followed by a regex to remove the filenames.)

I understand from the Github history that a handful of these have been removed in 10.2, but a handful more have been added as well.

Hey there … sorry to divert attention from the current discussion for just a moment, interesting as it is … but regarding my initial query, in particular …

I … wanted to be able to play around with Tara McGrew’s Dynamic Object Creation. There is a version compatible with 10.1, but that version breaks in the current 10.2 development branch. More specifically, parts of the Dynamic Tables extension on which it depends fail to compile – and while I worked out a way to get around that, too, thus far, the behavior just isn’t right.

I believe I’ve got things working now in 10.2. I need to do some more thorough testing with it, but at least the documented examples seem to be working okay.

The gist of the fixes were:

(1) Four functions seem to have disappeared from the Basic Inform / architecture kit. Copying them from the 10.1 source and pasting them directly into the extension, sans changes, APPEARS to be working fine, but as it’s unclear why those bits were removed in the first place, that’s something that needs a closer look to make sure it isn’t going to introduce other problems.

(2) The other chief issue seems to have been the underlying change to use 32-bit characters by default in glulx ($DICT_CHAR_SIZE = 4, as opposed to 1), so code that depended on testing the contents of an array buffer character by character broke and needed to be adjusted.

By the way, I couldn’t seem to find a programmatic way to test for $DICT_CHAR_SIZE at runtime. (The compiler doesn’t recognize DICT_CHAR_SIZE and throws an error if I try to test $DICT_CHAR_SIZE, so it’s obviously not a run-of-the-mill global value.) Ideally, particularly for backward compatibility, the extension should adapt based on that setting, so if anyone knows the answer to that one, please do let me know.

In any case, my next question is, assuming further testing looks good on this end, what’s the process for getting a change like this reviewed and checked in to the repository? No rush … just let me know when you have a chance. And if I should move any further discussion specific to those extensions to another thread, let me know that as well.

Thanks!

You should be able to just check $DICT_CHAR_SIZE as an I6 constant. I’m not sure why that wouldn’t be working, but it very well could be a bug.

The problem with releasing extensions for 10.2 is that they might get invalidated next week—there’s no guarantee of stability like there is for 10.1. But the extension repository has an “11.0” branch for this purpose; you can upload your new extension there, and anyone else using the bleeding-edge compiler can take advantage.

No dollar sign.

The compiler doesn’t recognize DICT_CHAR_SIZE

DICT_CHAR_SIZE is a valid constant in regular Inform 6. The Inter pipeline in I7 seems to have trouble with it:

Something went wrong late in compilation, when working through the ‘pipeline’ of code-generation steps.
[…]
7. shorten-wiring
Problem: unable to find definitions for the following name(s): DICT_CHAR_SIZE

1 Like

Hmmm … it’s $DICT_CHAR_SIZE that I need to test. Looking at the generated I6 code now, I see that both $DICT_WORD_SIZE and $DICT_CHAR_SIZE appear at the top of file in a special format (compiler flags, perhaps?) as:

!% $DICT_CHAR_SIZE=4

!% $DICT_WORD_SIZE=14

Later on, the generated code includes the following, allowing DICT_WORD_SIZE to be tested at runtime:

#ifndef DICT_WORD_SIZE;
Constant DICT_WORD_SIZE = 14;
#endif;

But I don’t see any similar lines to define DICT_CHAR_SIZE, so as you say, that may be an oversight. Would you consider that worth writing up in the Jira database?

Regarding the 11.0 branch, I’ll go ahead and have a look at that. Does the project have any kind of preliminary review process? Or guidelines?

Again, thanks!

This is all tangled up with special cases inside the I7 compiler, I’m afraid.

I don’t know what the status is of trying to support a low-level extension that compiles in both 10.1 and 10.2. It may be easier to just have two separate versions.

Definitely do two versions for 10.1 and 11. They are too divergent now.

1 Like

That makes sense … There’s already a working 10.1 version, so I’ll see about uploading the fixes for 10.2 to 11, once I’ve done a bit more local testing.

Thanks for the advice!

I submitted a PR that removes seven globals. At time of submission that would leave 213 in use on the Z-machine, provided Dialogue (which uses a further 10) wasn’t in use.

Hi there … one more question if you don’t mind. It’s been ages since I touched the repository – I only ever published one extension a good while back, and that was for Inform 9.

I pretty much recall the mechanics – fork the extensions repository (done, and synced), commit changes (in this case addition of the two updated extensions), and then issue a pull request. BUT before I even attempt to commit the updates, I noticed that the extensions submitted to the 11.0 branch appear to all follow a directory format I’m not familiar with. I know it’s not what the current Inform IDE (Windows version) I’m using recognizes or writes to.

Is the old format (single .i7x file) still ok? If as it seems, a new format is preferred, I certainly don’t mind structuring things differently and editing outside of the IDE as necessary, but I didn’t see any obvious guidelines anywhere on how to go about that, or what the expected conventions are for 11.0

Can you point me in the right direction? I’m sure there must be documentation on it and I’m probably just not looking in the right places yet.

Oh, also, one other quick question, but I think I already know the answer there. I wouldn’t want to put the updates under my name, as the work really remains Tara McGrew’s. I’ve just tweaked a few things to get them to work in 10.2+ So my intention would be to commit the updates to Tara’s directory, with just a small note in the documentation that the some minor updates for compatability with 10.2/11.0 were done by me – I assume that’s fine?

Let me know …

Thanks!

1 Like

The convention with Inform extensions is that the name on the file is who’s currently maintaining it and can fix problems when it breaks. There’s a separate place to credit who originally wrote the extension.

If that’s the case, it probably should’ve had someone else’s name already. I haven’t touched it myself in years.

Okay then … I’ll do that. I feel like the part about who can fix problems the next time it breaks might be a tad overstated . :wink: But I figured this much out, so why not.

Ah … nice work, there on the original code, though. It actually didn’t take that much to get it working again on the latest version, either. Once I managed to work out exactly where to look, which as I imagine you can guess, is what usually takes the most time.

1 Like

Yeah, I think the goal is that if three different people take Tara’s extension and tweak and update it, they shouldn’t all end up being “Dynamic Objects by Tara McGrew” with different version numbers. Instead, they should be “Dynamic Objects by Alice”, “Dynamic Objects by Bob”, and “Dynamic Objects by Claire”, all with credit to Tara inside them.

It’s not a perfect system, because if any other extensions depend on Dynamic Objects by Tara McGrew, they won’t accept Dynamic Objects by Anyone Else as a substitute. But as far as I know, it’s the best we’ve got. (Source)

2 Likes

I think that the best handling of the authorial statements in forking should be something like “the extension by original_author and forker”, but the devil in the detail is that use authorial modesty which (or whose) will make a mess of the building of the authorial statement…

Best regards from Italy,
dott. Piergiorgio.

That’s not really true - we generally keep the original author’s name. You should only put it under your name if you’re forking it to make bigger changes.

1 Like

Ah, scratch that advice then—what’s the usual dividing line for putting a new name on it? I’ve generally put any updates under my own name so they won’t conflict with the original author continuing their own development.