Message-ID: <3B7D1EE9.9921EEDE@csi.com>
Date: Fri, 17 Aug 2001 09:40:57 -0400
From: John Colagioia <JColagioia@csi.com>
Organization: No Conspiracy Here...
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en,fr,ru,es,it,ga,de,ja,gd,eu
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: Other languages
References: <B794B374.B13%edutec@idirect.com> <3B73D0DA.319A3167@csi.com>
	    <6nc8l9.0ab.ln@127.0.0.1> <3B791D94.C0B392CD@csi.com>
	    <qhjbl9.vv8.ln@127.0.0.1> <3B7BE3F7.D9C6BAC8@csi.com>
	    <3B7C07E2.B4A94A80@csi.com> <5oril9.q9e.ln@127.0.0.1>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.34.37.104
X-Original-NNTP-Posting-Host: 208.34.37.104
X-Trace: excalibur.gbmtech.net 998055211 208.34.37.104 (17 Aug 2001 09:33:31 EST)
Lines: 63
X-Authenticated-User: jnc
X-Original-NNTP-Posting-Host: 127.0.0.1
Path: news.duke.edu!newsgate.duke.edu!zombie.ncsc.mil!alnews.ncsc.mil!feed.news.qwest.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!news-reader.ntrnet.net!uunet!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:91262

David Given wrote:

> In article <3B7C07E2.B4A94A80@csi.com>,
>         John Colagioia <JColagioia@csi.com> writes:
> [...]
> > Turns out I'm not a complete idiot.  Your patch and mine were identical.  The problem
> > (for anyone else reading along at the moment) was that I'm on a Windows machine and
> > PDST's files need UNIX-like end-of-line markers (i.e., just the LF, rather than the
> > LF/CR pair).  Otherwise, it can't read anything past the first line, which obviously
> > makes for a bad system image.
> ...and the moral of that story is obvious.

Heh...Yeah, "write your [various expletives deleted] code independant of whitespace
conventions."


> [...]
> > But, yes.  For an hour's worth of work, I'd say that's pretty impressive progress.  Now,
> > we just need a parser.  I'm working on it...
> I've been thinking about that, and I reckon that pure Smalltalk's probably
> a really lousy language to use as a *raw* IF system. One problem is that
> IF tends to make a lot of use of singleton classes, and Smalltalk's not
> really much good at that. For example, in my game I had to create all the
> rooms before I initialised them.

The way I might be inclined to handle something like this (assuming I knew enough Smalltalk to
do so, which I don't quite, at the moment) would be to dynamically instantiate the objects as
necessary, wrapping the constructor to handle the initialization.

Obviously, a more generic version of this would need to be provided by the standard library,
if such a facility doesn't already exist (like it does in C++ et al, with parameterized
constructors).


> I think what we need is a preprocessor. Something that reads in a script
> file and generates all the appropriate objects. We could do a lot worse
> than copy Inform's syntax...

That's another way of handling it, yes.  Of course, by then, you're not quite using Smalltalk,
anymore, except as a virtual machine.  Not that this is a necessarily bad thing (after all,
many compilers compile to C, after all), but it does strike me as being little more
"sophisticated" than just using Inform to begin with.

[...]

> This would also allow some extra error reporting, which pdst is currently
> very bad at. I had a lot of trouble finding some trivial syntax errors
> that would prevent compilation.

This is true.  The implementation, as it stands, needs much more work on the error-handling
front.


> Another problem is saving the program once we're done. An empty pdst image
> with the standard classes and nothing else is 700kB... but that does
> include all the source for those classes. Considering that there will be
> no difference between a game file and a save file in this putative system,
> it would be really nice to slim it down a bit.

Well, in a special-purpose image (a game), it would probably be much smarter to rewrite the
library in its entirety, really, anyway, just to make sure it provides the services needed.


