I6 Constants in Standard Rules

The 2015 edition of the Handbook refers to a bunch of I6 constants in the Standard Rules, such as these:

Use ALLOC_CHUNK_SIZE of 32000.
Use MAX_ARRAYS of 10000.
Use MAX_CLASSES of 200.

I don’t know whether these are obsolete, or whether they have just been offshored into kits. Should I delete this section of the Handbook, or are there still constants that may need to be overridden in game code?

Some of these constants, like DICT_WORD_SIZE, will always be relevant (though I hope they’ll eventually get nicer names). Others, like MAX_CLASSES, only affect the workings of the I6 compiler and have no impact on the final game. They originated in the era where RAM was precious and the compiler wanted to use as little as possible; if you had a big game, you could change these settings to give the compiler permission to use a bit more. But nowadays RAM is plentiful and the I7 compiler will use far more of it than I6 ever will.

I thought the latter had been in Inform 10, now that it no longer uses factory-standard I6, but it seems not. Which means they can still be relevant if you’re compiling a sufficiently huge game. I wonder why they’re still in there?

1 Like

ALLOC_CHUNK_SIZE, MAX_ARRAYS, MAX_CLASSES, and the other I6 memory-limit constants are no longer meaningful. I7 accepts the “Use” declarations and passes them over to the I6 compiler, but the I6 compiler ignores them and allocates as much memory as it needs.

3 Likes

I got an error today in I7 saying I exceeded alloc_chunk_size and needed to make it bigger than 32000. This is the first time I’ve hit the barrier with this constant, although I’ve had to change the other MAX_ ones. The code compiled once I increased it.

From what you said it sounds like this shouldn’t happen. Any idea why something might go weird here? I’m still using I7, haven’t upgraded to I10. And my code compiled, I just was surprised.

1 Like

Are you still using I7 6M62? The I6 changes I’m talking about above landed in late 2021, early 2022. Old versions of I7 won’t have them yet.

You could download the current I7 IDE and set the I7 version to “9.3 (6M62)”. That would get you the latest I6 while still using the older I7 language.

2 Likes

Thanks! That’s a good explanation. I’m a bit Leary of updating in the middle of a big project but I’m glad to know a solution exists and that I didn’t break something important. Thanks!

This is a change that shouldn’t affect your project in any adverse ways; the new I6 updates are fully backward-compatible (unlike the I7 ones), in I believe every way that matters for I7.

(They did remove some things like module linkage, but I6-in-I7 never used those.)

1 Like