Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news-koe1.dfn.de!news.k.shuttle.de!news.b.shuttle.de!news-ber1.dfn.de!fu-berlin.de!nntp.zit.th-darmstadt.de!voskovec.radio.cz!www.nntp.primenet.com!nntp.primenet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!newsfeed.internetmci.com!btnet!netcom.net.uk!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: MaxTADS & addword/delword
Message-ID: <erkyrathE0ptA2.345@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <erkyrathE0GK4C.Is8@netcom.com> <55r0gi$t05@newsgate.duke.edu> <564akq$bck@life.ai.mit.edu> <erkyrathE0nw89.Ar5@netcom.com> <565c3s$j2g@newsstand.cit.cornell.edu> <erkyrathE0oCqu.3M2@netcom.com> <565jvc$m0j@milo.vcn.bc.ca> <erkyrathE0oy2D.7py@netcom.com> <566gi3$o0c@milo.vcn.bc.ca>
Date: Mon, 11 Nov 1996 16:46:50 GMT
Lines: 50
Sender: erkyrath@netcom.netcom.com

Neil K. Guy (nkg@vcn.bc.ca) wrote:
> Andrew Plotkin (erkyrath@netcom.com) wrote:
> : >  A word added to the games vocabulary using addword() remains in the 
> : > vocabulary after an undo command. The undo command is supposed to undo 
> : > *everything*, including words added using addword().

> : Oh, happy bouncy joy. (Do you mean "addword" or "delword"?)

>  Sorry; I meant addword there, and I really just gave an example of a 
> bigger problem.

>  The problem is referred to as the delword() problem because, well,
> delword() doesn't seem to work at all. When you use TADS runtime for
> Macintosh you can't delete a word - whether it was added using addword(),
> whether you undo a move or whether it was a word set up as part of the
> original dictionary. I've just compiled the gold skull game with a few
> bits of code to call addword() and delword();  MaxTADS runs it without
> incident, but Mac runtime can't delete any word. 

Hm. Well, I still have a copy of Think C 5 lying around; maybe I'll build 
TR and see what the deal is.

> : (A little suggestion, 
> : boys and girls. If you ever want to design an undo system for a virtual 
> : machine, the Z-machine's is a *hell* of a lot easier to write and 
> : maintain than TADS's.)

>  Is that because of the complexity of TADS or because TADS supports 
> multi-level undos whereas the Z-machine doesn't?

The former. (I still hold that the Z-machine is compatible with multiple 
undo, if the interpreter wants to support it, which some do.)

TADS stores undo information for every change to the game state. Object 
changes, added words, deleted words, etc, etc, all these little packets 
of information.

The Z-machine doesn't even know what objects the game file *contains*. It
stores undo information by dumping its entire memory out into a spare
buffer. Cheap, stupid, takes a lot of memory *unless* you use a
differential scheme such as Zip2000 uses, in which case it's quite
efficient. And it's impossible to have "a delword bug"; either memory is
saved correctly, or it's trash and the interpreter crashes. 

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
