Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!newsserver.jvnc.net!newsserver2.jvnc.net!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Fast lexers/slow hardware/better environments (Re: Questionable ...)
Message-ID: <erkyrathE3CGtC.Gn2@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <59g6p8$grj@bartlet.df.lth.se> <59k5a6$597@life.ai.mit.edu> <n40CB352E@wildebst.demon.co.uk> <59obcq$t2j@life.ai.mit.edu> <59qffk$eei@news.spies.com>  <ant282208bc8M+4%@gnelson.demon.co.uk>
Date: Wed, 1 Jan 1997 19:29:36 GMT
Lines: 73
Sender: erkyrath@netcom2.netcom.com

Graham Nelson (graham@gnelson.demon.co.uk) wrote:
> > >In other words, the Z-Machine as target architecture is
> > >both the coolest and the worst choice Graham made for Inform. It makes the
> > >language design much ickier than it might otherwise be.)

> I don't think it necessarily does make the language design
> "ickier", but it has resulted in some historical accidents,
> and I think I probably would prefer run-time data typing
> and a couple of other tweaks.  Otherwise, I continue to
> think the Z-machine is an excellent design, and the recent
> proliferation of Z-machine games (which are being played
> on machines where other design systems have never reached:
> people _do_ play on hand-held computers, for instance)
> bears this out.

> Have any Inform authors had to seriously compromise their
> games because of restrictions brought on by the Z-machine?
> I haven't, except when working some years ago for restricted
> subsets of the Z-machine.

_So Far_ uses over 60% of the V8 Z-machine for what is really a
medium-small game. If I had written _Jigsaw_, it would have gone past 512K
in size. (And past _Avalon_ in release date, I'm sure.) 

_Lists_ uses about 10K of RAM for its symbol and cons-pair heaps. For the
toy domain of seven programming exercises, you still use up quite a bit of
that -- enough that it garbage-collects more than once. I have no idea how
big an Scheme IF system would be, but if it's only ten times as large, it
will run headlong into the Z-machine's 64K RAM space limit. 

Therefore, anyone who wants to use that kind of dynamic programming, via 
my library or another, is probably fatally compromised right from the 
start. I wanted to create the core of a serious IF tool for the 
Z-machine, but I don't think I succeeded.

> > Oh wow, are you hypothesizing different backends for the same front-end 
> > Inform compiler?  That is, the same source language compiling into Zcode or
> > TADS code or some other virtual machine [such as Java.. dunno if that would
> > make any sense at all]?

I hypothesize this, sure. I want to do it. Preferably before the 
increasing desire for more memory, more flexibility -- even more graphics 
and sound -- produces yet another slightly hacked Z-machine version.

The Java VM seems like a fine virtual machine, and I don't have to write 
the interpreters for it. (It won't run on TRS-80's, but any game that 
will fit on a TRS-80 should be compiled to Z-code anyway, not Java, since 
it *won't* be straining the Z-machine's capacity.)

> As for Java, surely better to wait for the completion of the
> Java Z-machine interpreter?

No, no. I want to add a lot of features which the Z-machine doesn't 
support at all, but are entirely orthogonal to Inform as a language -- 
they would be available as new opcodes, or rather as a library of 
functions which are implemented using new "opcodes" (actually toolbox 
traps for the IF runtime system, which is written in Java -- never mind, 
this paragraph has gotten way off-track. The point is, Inform as a 
language is not limited to 64K of writable memory, or its current inadequate 
set of file operations, or any number of other Z-machine limitations that 
I have notes on How To Do Better As Soon As I Have Time. Java VM output 
coupled with an IF runtime class solves all of that, with no change to 
existing Inform source code.)

> The aim is certainly not to worship the Z-machine!

Oops, gotta run. The incense burners are getting low.

--Z
-- 

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