26.6. What was new in build 5J39 (December 2007)

| Chapter 26: What's New in Inform? |

| 26.6. What was new in build 5J39 (December 2007)

As this release was being prepared, the American footballer Antonio Cromartie scored a touchdown with a continuous run of 109.88 yards, a league record unlikely ever to be broken on a pitch 110 yards long; the UK government burned two CDs with unencrypted bank details for every family with children, put them into the unregistered post, and then panicked when they never arrived; a pilot project in Fairfield, Texas, began converting carbon emissions from a power station into (edible) baking soda; there were wildfires in Malibu, floods in Tabasco and Rift Valley Fever in the Rift Valley; and a cruise liner struck an iceberg in the Antarctic and sank, but everyone was saved.

In the world of Inform, build 5J39 introduced lists as first-class values. For any kind of value K, "list of K" was now also a kind of value, and rich support was provided for building and iterating over lists, dynamically resized as necessary.

See Lists and entries for the introduction of a new chapter on lists

423
| Example Circle of Misery Retrieving items from an airport luggage carousel is such fun, how can we resist simulating it, using a list as a ring buffer? |
RB

421
| Example Eyes, Fingers, Toes A safe with a multi-number combination, meant to be dialed over multiple turns, is implemented using a log of the last three numbers dialed. The log can then be compared to the safe's correct combination. |
RB

424
| Example The Fibonacci Sequence The modest Leonardo Fibonacci of Pisa will be only too happy to construct his sequence on request, using an array. |
RB

422
| Example I Didn't Come All The Way From Great Portland Street In this fiendishly difficult puzzle, which may perhaps owe some inspiration to a certain BBC Radio panel game (1967-), a list is used as a set of actions to help enforce the rule that the player must keep going for ten turns without hesitation, repetition, or deviating from the subject on the card. |
RB

419
| Example Leopard-skin A maze that the player can escape if he performs an exact sequence of actions. |
RB

426
| Example Lugubrious Pete's Delicatessen In this evocation of supermarket deli counter life, a list is used as a queue to keep track of who is waiting to be served. |
RB

415
| Example Robo 1 A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode. |
RB

418
| Example Robo 2 A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode. |
RB

427
| Example Sieve of Eratosthenes The haughty Eratosthenes of Cyrene will nevertheless consent to sieve prime numbers on request. |
RB

416
| Example What Makes You Tick Building a fishing pole from several component parts that the player might put together in any order. |
RB

425
| Example Your Mother Doesn't Work Here Your hard-working mother uses a list as a stack: urgent tasks are added to the end of the list, interrupting longer-term plans. |
RB

    5J39 (1 December 2007)

    This build introduces lists as first-class values. For any kind of value K,
    "list of K" is now also a kind of value, and rich support is provided for
    building and iterating over lists, which are dynamically resized as
    necessary. Otherwise little is new, but once again all known bugs have
    been fixed.

    For any kind of value K, "list of K" is now also a kind of value. Lists
    	resize automatically, can be iterated through, sorted, searched,
    	reversed or rotated, and they have a notation enabling constant lists
    	to be written down concisely: for instance,
    		let L be {2, 3, 5, 7, 11};
    	gives the temporary variable L the kind of value "list of numbers",
    	and sets it initially to this sequence of five values, whereas
    		let M be the list of open doors;
    	gives M the kind of value "list of objects", and sets its initial
    	contents to be all the doors which are currently open. (Lists can also
    	be used in global variables, in properties, or table entries, and can
    	include each other: "list of lists of numbers", say, is a kind of value.)
    	Values can be added or removed at any point in a list; lists can be merged,
    	or compared for differences; and examples are presented to show the
    	use of lists as queues, stacks, rings, sets, arrays, and so forth.
    	(All memory management is automatic and all bounds are automatically
    	checked.) See the new Chapter 20 ("Lists").
    Examples:
    	"Eyes, Fingers, Toes" added to demonstrate a multi-number safe using
    		lists to create a log of dialed numbers.
    	"Robo 1" added to demonstrate a programmable robot that will replay the
    		player's behavior.
    	"Robo 2" added to demonstrate a robot that can learn multiple stored
    		action scripts with command names determined by the player.
    	"Rock Garden" reformatted to give the general material at the top.
    	"The Fibonacci Sequence" added to demonstrate using lists as arrays.
    	"I Didn't Come All The Way From Great Portland Street" added to
    		demonstrate using lists as sets.
    	"Lugubrious Pete's Delicatessen" added to demonstrate using lists as
    		queues.
    	"Sieve of Eratosthenes" added to demonstrate using lists as sieves.
    	"Circle of Misery" added to demonstrate using lists as ring buffers.
    	"Lanista 1" corrected to fix a truncated sentence in the commentary.
    	"Leopard-skin" added to demonstrate a log of stored actions.
    	"What Makes You Tick" added to demonstrate building a fishing rod from
    		component parts.
    	"Your Mother Doesn't Work Here" added to demonstrate using a list as a
    		stack to plan character behavior.
    The previous restriction whereby TEST scripts could not exceed 255 characters
    	in length has been withdrawn. The new maximum is 9999 (a cap intended
    	only to catch accidental runaway cases where the closing quote has been
    	forgotten).
    Problem message added to prevent the UNDO command being used in a TEST
    	script (which can't safely be done since it undoes progress in the test
    	itself), and also to prevent individual commands in TEST scripts from
    	exceeding 100 characters (since the I6 library would choke on those).
    Problem message improved for namespace clashes between variable names and
    	descriptions.
    Problem message added (in place of previous I6 errors) when a
    	description of an action, used as a condition, refers both to the past
    	and to values in the present (by means of "called").
    Problem message improved for an ambiguity in rule premisses as between
    	a description of an actor followed by an action, and an action name
    	with no actor attached. (This arose in the case of "standing using ...",
    	where "standing" had also been defined so as to describe certain people:
    	was the action here "standing using", done by nobody in particular, or
    	"using", done by a person matching "standing"?)
    Bug fixed whereby pastes of Example text for examples including backslashes
    	(such as those arising from the introduction of regular expression
    	matching) and, in some cases, other unusual characters would cause
    	the text to be pasted incomplete - so that it did not work as it
    	was claimed to do.
    Bug fixed whereby two or more consecutive double-quoted texts in a single
    	table entry would lead to an internal error rather than a problem
    	message; something which can happen easily if pasted text converts
    	tabs to spaces, when two adjacent table columns are both supposed to
    	contain text.
    Bug fixed whereby a rule whose premiss involved clauses of several different
    	sorts, one of them "when", could sometimes produce an internal error.
    Bug fixed - or, really, feature added, but the lack of it was regarded as
    	peculiar - whereby an action description used in a rule was not allowed
    	to give the name of a kind of value to mean "any value of this kind":
    	for instance, "Instead of dialing something to a code symbol", where
    	"code symbol" is a kind of value and "dialing it to" is an action
    	applying to one thing and one code symbol.
    Bug fixed whereby "[']" for apostrophe wasn't being allowed in titles given
    	as the opening text of a bibliographic heading.
    Bug fixed whereby indexed text and stored action variables were not working
    	properly if they belonged to rulebooks, activities or actions.
    Bug fixed whereby "if there is a [table-reference]" was not working in the
    	case of columns holding indexed text.
    Bug fixed whereby spurious "no such entry" run-time problems would occur if
    	a table with a column holding indexed text was created with blank rows.
    Bug fixed whereby ambiguous phrases requiring run-time checking on some
    	arguments would sometimes go wrong if other arguments were stored
    	actions or indexed text.
    Bug fixed whereby if several "let" variables in a single phrase needed to
    	be indexed text or stored actions, they would sometimes have their kinds
    	of value rearranged between them, with occasionally bizarre results.
    Bug fixed whereby the dynamic memory allocator would print up debugging
    	information such as "1+128+256+512+1024+2048+4096+8192+16384+65536"
    	after successfully allocating memory via Glulx's @malloc mechanism.
    	Apologies for this.
    Bug fixed whereby a compound phrase which looks as if it might be in the
    	form "total ...", counting the total of some property - but which isn't -
    	would generate an internal error rather than being rejected in favour
    	of some other interpretation.
    Bug fixed whereby a rule predicated on a condition about something being
    	listed (or not) in a table would cause I6 errors.
    Bug fixed whereby an internal error rather than a problem message would
    	sometimes be issued when a condition was used which had no active verb
    	but could be taken as a description of things (typically arising if
    	"is" had been mistyped as "in").
    Infelicity fixed whereby the problem message about minus signs being
    	wrongly used in unit constants could be repeated (sometimes quite a
    	few times) for the same mistake.
    Problem message added (rather than I6 error or mysteriously incorrect
    	behaviour) for the case of a phrase so ambiguous that at compile-time
    	it is not possible to tell how many values it takes as arguments.
    	The problem explains this, shows the phrases it cannot choose between,
    	and invites the author to reword one of them.
    Bug fixed whereby the old I6 debugging commands CHANGES and ROUTINES, which
    	are no longer implemented in I7, still had their grammar visible in
    	I7-compiled games, so that it was possible (but usually quickly fatal)
    	to try using these commands.

Previous | Contents | Next