Commit | Line | Data |
---|---|---|
49f13b5d C |
1 | This file contains information on what's changed since the |
2 | DDL document people have seen. | |
3 | ||
4 | Date: 25 Apr 1980 1546-PST (Friday) | |
5 | From: mike at UCLA Computer Science VAX (Mike Urban) | |
6 | Subject: ATTN: DDL Implementors | |
7 | To: cc (UCLA Computer Club) | |
8 | ||
9 | I would like the following changes made in DDL: | |
10 | ||
11 | 1) Friendlier Parsing. You should be able to say | |
12 | give troll the knife | |
13 | and get away with it (with "knife" as Dobj and "troll" as Iobj). You | |
14 | should get messages like "I don't know how to tke" in the event | |
15 | of a bad verb, and "I think 'north' is a verb" in the event | |
16 | of a weird parse like "push north wall". You should be able | |
17 | to say things like "e.s.s.take thing. eat thing. look" and have | |
18 | the parser treat the "." as equivalent to and end-of-line. | |
19 | /* ACCOMPLISHED 6/13/80. Syntax errors are now | |
20 | of the form "I don't know how to xxx" if an unknown | |
21 | word is encountered (the whole word, not just 5 letters | |
22 | is printed); "I don't know the word 'xxxxxx'" for other | |
23 | unknown words; and "I don't understand, because I | |
24 | think 'xxxxxx' is a [noun/verb/adjective/etc]" for | |
25 | other syntax errors. The separator was already | |
26 | built into the lexer, but it's a comma, not a period. | |
27 | And VERB IOBJ DOBJ is a legal syntax now, but | |
28 | VERB PREP IOBJ DOBJ isn't (tho it's easy to add) */ | |
29 | MAYBE | |
30 | (if it isn't hard), you should be able to say "take this, that, the other" | |
31 | and have a more sophisticated control loop which causes it to act | |
32 | like "take this. take that. take the other" with the EXCEPTION that | |
33 | no daemon/fuse processing is performed (no turn increment) and that | |
34 | the whole thing can be short-circuited by an appropriate Exit code. | |
35 | ||
36 | 2) Generalized routine and object handling. The routines associated with | |
37 | objects should be properties of that object just like the others. The | |
38 | constants that tell WHICH property is, say, the Action property should | |
39 | be predefined. So ($setp room1 LDESC Rubbl) would set the long | |
40 | description of room1 to the routine Rubbl (which describes the rubble | |
41 | left by the explosion you just triggered...). | |
42 | ||
43 | /*** ACCOMPLISHED 6/6/80 ***/ | |
44 | ||
45 | 3) Improved global handling. The programmer shouldn't have to know the | |
46 | "address" of his globals. Instead, a construct like | |
47 | VAR score | |
48 | would be the equivalent of saying "score = xxx" where xxx is one less | |
49 | than the last VAR done. | |
50 | ||
51 | /*** ACCOMPLISHED 5/29/80 ***/ | |
52 | ||
53 | ||
54 | 4) Improved grammeme access. There should be predefined VARs which | |
55 | contain the values of ($verb) ($dobj) and ($iobj). You should | |
56 | be able to re-assign these. SO, you should be able to say | |
57 | turn off lamp | |
58 | and the PreVerb routine for "turn" might contain something like | |
59 | (($eq @Iobj off): | |
60 | ($setg Verb douse) | |
61 | ($setg Iobj 0) | |
62 | ) | |
63 | /*** Accomplished 6/12/80; Only change in | |
64 | ddlrun is #defines for verbtodo, etc */ | |
65 | ||
66 | /*** 6/81 added Prep global to ddlcomp and | |
67 | ddlrun to give access to preposition ***/ | |
68 | Because verbs don't have properties, we may wish for functions | |
69 | to access their preverb and action routines as well. | |
70 | ||
71 | 5) String handling: It'd sure be nice to have someone type | |
72 | incant "abra ca dabra" | |
73 | and be able to talk about ($subs Dobj @var 1) or ($indx @Dobj "abra") | |
74 | or whatever. I don't know exactly how to implement it yet. | |
75 | /*** Accomplished 7/28/80; STRINGs are negative-valued | |
76 | objects. If the lexer gets a string, it puts it into | |
77 | a temporary string area (that is flushed every turn) and | |
78 | returns an index (not pointer) into that are as a negative | |
79 | number. The parser knows about these and can handle | |
80 | verb string and verb string prep iobj sentences. | |
81 | (the latter being for "Incant "rise" over seed".) | |
82 | ||
83 | If the dobj or iobj of an input is a string, the dobj | |
84 | and iobj routines called are the ones associated with | |
85 | the object STRING (if such is defined by the DDL | |
86 | programmer). At present, the functions $substr, $length | |
87 | and $eqst are defined. $substr returns a negative | |
88 | pointer into the temp string area; this can be stored | |
89 | in a global, for example. A permanent string area | |
90 | is available, but I haven't written the function | |
91 | ($sets glbl string) which would move the string to the | |
92 | permanent area and put its index therein into glbl. | |
93 | Mike ***/ | |
94 | /*** On 8/20/80, I added a new function (which, mirable dictu, | |
95 | will allow coding of the "echo" room!), ($read), which | |
96 | pauses, gets a line of input, and returns the line as | |
97 | a string! Gee, if we code up ($pars str verb dobj iobj)... | |
98 | The implementation is kludgy and nonintuitive. But then, so's a lot | |
99 | of DDL | |
100 | ||
101 | 6) Ctrl-D should terminate the program. Ctrl-C should interrupt whatever | |
102 | is happening and begin a new turn. | |
103 | Note that this may leave things in a bad state. | |
104 | ||
105 | 7) New language construct: (WHILE condexp : formlist) is essentially | |
106 | equivalent to (condexp : formlist ($____ formlist+condexp)) where | |
107 | "($____ formlist+condexp)" is a new operator, JUMPB (jump back), | |
108 | which is just like the current $.... jump forward instruction, but | |
109 | (obviously) negative, and unconditional. It goes back exactly to | |
110 | the beginning of the test. | |
111 | /*** ACCOMPLISHED 8/18/80 --Mike ***/ | |
112 | ||
113 | 8) New routine ($rand n) produces a somewhat random number in the range | |
114 | 1..n . /*** ACCOMPLISHED 8/18/80 ***/ | |
115 | ||
116 | 9) DDLRUN sources should be reorganized so as to enable recompilation | |
117 | of less than the entire program if some less global change (such | |
118 | as the addition of a new routine, or a bug fix in the parser) is | |
119 | made. | |
120 | /*** Somewhat accomplished 10/80. Still needs | |
121 | work. In particular, changes in extvars.c must | |
122 | be reflected in extvars.h ***/ | |
123 | ||
124 | 10) The symbol table, and the hash routine, are simple-minded. The | |
125 | 5-character limitation on names is a real pain for some people. | |
126 | For example, you can't even fake the Zork puzzle room by allowing | |
127 | someone to say "push northern wall". | |
128 | These changes don't have to go together. | |
129 | ||
130 | /*** ACCOMPLISHED(!!) 11/80. Identifiers are pretty | |
131 | much as long as you like. The symbol table, | |
132 | now alphabetized, contains indices (not pointers) | |
133 | into a pool of identifiers that starts at | |
134 | sbrk(0). A binary search algorithm is used. | |
135 | This will enable a future version to respond | |
136 | correctly to unambiguous abbreviations for | |
137 | things at runtime (like news for the aard | |
138 | newspaper, for a cogent example). This | |
139 | hasn't been tested for portability to a | |
140 | PDP-11 under V7, so beware. As of 11/18, | |
141 | the symbol table is still unencrypted ***/ | |
142 | /*** The runtime parser recognizes unambiguous | |
143 | abbreviations. The symbol table is still | |
144 | unencrypted. 1/81 ***/ | |
145 | The building of the symbol table is simple-minded. | |
146 | Oh well. | |
147 | ||
148 | 11) It should be available on a micro. | |
149 | /* Not yet. But the thinking has begun! */ | |
150 | /* This will necessitate some rearchitecture | |
151 | especially wrt buffering of routines/strings */ | |
152 | /* Object table caching required */ | |
153 | ||
154 | 12) The ACTION routine for verbs should execute AFTER the action | |
155 | routine for your room; this enables east(ACTION) to correctly | |
156 | default to ($say "Can't go that way.") and allow one to generally | |
157 | live without $hit and $miss, crocky routines that they are. | |
158 | See ../sample (espec. transit.ddl) for a specimen of how this works. | |
159 | ||
160 | /* 11/80 */ | |
161 | ||
162 | 13) Routines that get the action and preaction routines for verbs | |
163 | should be made available. | |
164 | ||
165 | 14) Fuses and daemons aren't QUITE right (fuses go off after your daemon | |
166 | has typed a prompt, for a real-world example). Maybe they | |
167 | shd be on a homogenized priority queue? | |
168 | ||
169 | 15) It should be frozen real soon. | |
170 | /* As of 1/81, we're STILL thinking in terms | |
171 | of "just this ONE more feature..." Damn. */ | |
172 | ||
173 | 16) 3/82: Modern versions of Unix permit various forms of interprocess | |
174 | communication and commutators of some variety or another. Mpx | |
175 | channels in 32/V and 4.1bsd, UCB's future IPC mechanism for 4.2bsd, | |
176 | named pipes (?) in 3.0, etc, etc. One wonders how much work it | |
177 | would be to turn DDL into MUD-DL (multi-user dungeon definition | |
178 | language)! Example of changes: The single variable .ME now | |
179 | has some cousins, .ME1 thru .ME8. The parser sees not only the | |
180 | input, but who's responsible, and sets .ME to the appropriate | |
181 | .ME[n]. Then you just go through the turn normally. Routines | |
182 | like "$say" implicitly go to the .ME[x] currently associated | |
183 | with .ME (thus, to talk to someone else, temporarily reassign .ME; | |
184 | since .ME is an object, not a global, this means that you | |
185 | add $setme and $whoami. Also, a string-valued function for | |
186 | $myname) Globals 1-100 are as always, but globals 101-125 are | |
187 | implicitly local to the current .ME who's doing something. This | |
188 | is the easy part. The hard part is figuring out how to say | |
189 | "Tell everyone in the room that a Troll has entered", or | |
190 | "Tell everyone in the room but .ME that .ME got fried by the | |
191 | dragon". Worse, how do you handle it when two or more people | |
192 | are required to push on a door to open it? How do daemons, fuses | |
193 | and turn counters work? It's nice do have names for the various | |
194 | .MEs; but this requires dynamically fudging their SDESCs. Chris | |
195 | Kostanick has thought about multiplayer games in general; Mike | |
196 | Urban has played Essex MUD. We've both matured since DDL was | |
197 | written, so maybe now's the time! | |
198 | Mike | |
199 |