Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inform 6.21, library 6/9 and Infix

2 views
Skip to first unread message

Graham Nelson

unread,
Apr 29, 1999, 3:00:00 AM4/29/99
to

New releases: Inform compiler 6.21 and library 6/9
==================================================

The present Inform compiler, version 6.20, was a beta version which
introduced -S, a "strict checking" mode to print helpful diagnostic
messages if a story file does something that it shouldn't, such as
overrun the bounds of an array or tie the object tree up in a loop.
6.21 fixes all the bugs so far found in this system, and so is no
longer a "beta". It also provides a further debugging mode, -X,
which takes a little explaining.

-X stands for Infix. Skeptics will recall that for some years the
proposed, never-quite-written debugger for Inform was going to be
called "Infix": unfortunately choosing the name was as far as we
ever actually got. The new "Infix" is appropriately so called,
since it's internal to the story file: it fixes from the inside.
(It also evaluates infix expressions, as we shall see.)

In a game compiled with -X, a number of new debugging verbs, all
beginning with a semicolon ";", are made available. The most
important is simply written ";" and it evaluates any Inform
expression (or condition, or assignment) you type, making function
calls, updating variables or arrays, sending messages and so on
as needed. Thus:

> ; 45*2
; == 90
> ; score=400
; == 400
[Your score has just gone up by three hundred and sixty-four
points.]
> ; PlayerTo(In_Forest_2)
In Forest
You are in open forest near both a valley and a road.
; == 1
> ; lamp has light
; == true
> ; child(location)
; == "forest" (30)

(";" is pretty nearly an Inform interpreter). Because evaluation
isn't always too revealing, though, Infix also provides ";x" or
";examine", which works out what you're referring to and prints out
as much detail as it can about it. For instance,

> ;examine ##Consult
; Action Consult (numbered 89)
'consult' * noun 'about' topic -> Consult
'consult' * noun 'on' topic -> Consult
'l' * 'up' topic 'in' noun -> Consult
'look' * 'up' topic 'in' noun -> Consult
'read' * 'about' topic 'in' noun -> Consult
'read' * topic 'in' noun -> Consult

Here ";examine" has worked out that you want to know about an action
and has printed out all grammar lines from any verb which can
produce a Consult action. Similarly, ";examine" applied to an array
will print out the array's current contents and so on for dictionary
words, attributes, properties, numbers, characters, objects, classes
and routines.

Further verbs ";move", ";remove" and ";give" work much as the
corresponding Inform statements do, and allow for instance:

> ;move dwarf to Bedquilt
> ;remove axe
> ;give location light

The usefulness of this is that if you're testing a large region
of new game, but find that you've forgotten something pretty
basic (such as giving the rooms "light", or giving a door "door"),
you can just fix this and continue. (Also, note that you can
put ; commands into recorded scripts, which ought to make it
easier to write scripts testing variant paths through a game.)

Note that objects can either be called as they are in the game
("nasty little dwarf", for instance) or as they are in the source
code ("Y2_Rock_Room").

Finally ";watch" allows you to place a watch on any routine or
object:

> ;watch GoSub
; Watching routine GoSub.
> east
[ GoSub() ]
You can't go that way.
> ;watch silver
(silver bars (41))
; Watching object "silver bars" (41).
> get bars
[Moving silver bars to yourself]
Taken.
[Giving silver bars moved]

Typing simply ";" and pressing return produces a brief list of
commands and examples of how to use them, so that you don't
need to keep looking at a manual.

Four caveats need to be made at this point:

(a) Parsing these verbs is quite an effort for the Inform
parser, and means that on slower machines there is a
noticeable pause (perhaps up to five seconds) when
thinking about a complicated expression.
(b) Infix adds numerous data tables to a story file, which
adds to the consumption of "low memory". This means that
very large games will be unable to fit it in. ("Curses"
just narrowly fails to, by a handful of bytes.)
(c) -X is not compatible with linking modules in, as these
modules can't contain the information needed by Infix.
In particular, you can't have both -U and -X at once.
(d) This feature is new enough that people will find mistakes
in it for a while; probably quite embarrassing ones.

Note that the library distribution now contains a ninth file:
"infix.h", which is used only when -X is set.

Library 6/9 is essentially the same as 6/8 but with Infix support
added. There will be a further release to fix the few odd bug
reports from 6/8, but nothing is urgently amiss, and I wanted
to make an Infix release reasonably soon to allow people to test
it in the wild.

As usual, there will be a short delay before ports of 6.21
become available to play, while the porters attempt to compile
my sorry attempts to write C. The source for Inform 6.21 is
in the ftp.gmd.de/incoming/if-archive directory:

ftp://ftp.gmd.de/incoming/if-archive/ins621.zip

As usual it contains "header", which may need to be "header.h"
on most machines, and about twenty C files, which may need ".c"
appended on most machines.

Library 6/9 is at:

ftp://ftp.gmd.de/incoming/if-archive/ilib69.zip

On some machines, these files will also need ".h" attached.
Note that the file "infix" is new in this distribution.
(Volker and David normally expand this archive for the benefit
of those uncomfortable with zips when it is put into its
permanent position.) The corresponding new issue of the Inform
technical manual (from which the changes below were extracted)
is hiding on my Web page at

http://www.gnelson.demon.co.uk/techman.txt

Best of luck.


Graham Nelson
30 April 1999

Other changes made between patch "a" of v6.20 and v6.21
=======================================================

The maximum number of source files read from in compilation has been
raised from 64 to 256, at the request of a user. (No, really. She
knows who she is.) The filename storage has been reduced in size
by some 8K.
The "-g" switch for tracing function calls now has a third setting,
"-g3", which traces even veneer calls: the "-g2" setting now traces
game and library calls but not veneer calls.
New syntax: "Zcharacter terminating" specifies the terminating character
table for games in Z-machine versions >= 5. See section 12.3 for
details.

Bugs fixed:
Loops in the form "objectloop (X in Y) ..." causing stack underflow crashes
if compiled with -S checking off.
-S checking now guards against attempts to use properties of "nothing",
for instance rejecting something like "nothing.name = 'nobody';",
and error messages concerning nonexistent objects no longer print
garbled names for them.
Linking sometimes producing backpatching errors if arrays are already
created before the link occurs.
The -S (strict checking) and -X (Infix) switches are now disabled for files
being compiled as modules. (They wouldn't work, and would anyway make
the library modules too large.)
-S checking no longer tries to compile "pop" opcodes in Versions 5, 6, 8
to clear values off the stack in some cases of array-boundary checking.
(These Z-machine versions lack a "pop" opcode: instead, the same effect
is inelegantly produced by "@jz sp" with a null branch, taking up
three bytes rather than one. C'est la Z.)
A potential crash if the limit on the number of adjectives is exceeded in
a grammar version 1 game (which probably means a very big one using
library 6/2 or earlier) has been removed.
The readable-memory ceiling was incorrect for version 6 games.
The error message resulting from asking Inform to read an unopenable ICL
file is now coherent.
Assembly tracing at level 3 (which you don't want to read) now correctly
prints the size of a routine after branch optimization.
The checksum is now included in the header block attached to a debugging
information file. (Previously this slot contained 0000.)
A minor bug in the abbreviations optimizer, so obscure that I'm not even
sure what its consequence was, has been removed.

Source code cleaning:
The MAC_68K machine definition has been removed from the header: there
are no longer any specific lines of code for this system.

--
Graham Nelson | gra...@gnelson.demon.co.uk | Oxford, United Kingdom


David A. Cornelson

unread,
Apr 30, 1999, 3:00:00 AM4/30/99
to
Graham Nelson wrote in message ...

Stunned as usual - Graham is sort of like Santa Claus in the sense that he's
not around for most of the year, we talk about him in light conversation,
and make wistful references to a magical being that drops occasionally with
amazing gifts.

And here it is, Christmas in April. Miracles will never cease.

Jarb

Evin C Robertson

unread,
Apr 30, 1999, 3:00:00 AM4/30/99
to
If you try to run this on a modern operating system, you'll get a
segmentation fault. Add a comma to the end of line 252 in veneer.c

There's another bug which requires you to always compile with debug and
infix options set (-DX), and I'm too lazy to fix that one.


who...@my-dejanews.com

unread,
May 2, 1999, 3:00:00 AM5/2/99
to
In article <Ir_RQNK00...@andrew.cmu.edu>, Evin C Robertson
<ec...@andrew.cmu.edu> wrote: > If you try to run this on a modern operating

system, you'll get a > segmentation fault. Add a comma to the end of line
252 in veneer.c Hmmm...wonder if the Amiga is susceptible to segmentation
faults... > There's another bug which requires you to always compile with
debug and > infix options set (-DX), and I'm too lazy to fix that one. I'll
start working on an updated version of Inform for Amiga - I'll see what
happens when I hit the reported bugs... -- Richard H. Poser II (The Next
Generation) -- The Whomiga Times: http://www.missingpiece.com/whomiga Amiga
Inform Page: http://www.missingpiece.com/inform/amiga.html

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

0 new messages