Message-ID: <3B4E0718.E50BA325@csi.com>
Date: Thu, 12 Jul 2001 16:22:48 -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: [ANN] Hunt The Wumpus, for the Z-machine
References: <3tjei9.7a3.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 994969037 208.34.37.104 (12 Jul 2001 16:17:17 EST)
Lines: 110
X-Authenticated-User: jnc
X-Original-NNTP-Posting-Host: 127.0.0.1
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!news-reader.ntrnet.net!uunet!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:89704

David Given wrote:

> *twitch*
>
> Hi. My name is David Given, and I am insane.

Congratulations!  Join the club.


> *twitch*
>
> I'm announcing a new port of Hunt the Wumpus to the Z-machine. This one's
> a bit different from previous versions.
>
> *twitch*
>
> Because it's written in Basic.

Now THIS is new and interesting.  I believe I'm actually on the "impressed" side of
the revulsion fence.  But, then again, I've got ten pages of notes for when I start
my C->Z compiler (probably next week).


> *twitch*
>
> What I have here is an interpreter for a simple dialogue of Basic,
> implemented in the Z-machine. Fire up baZic.z5 in your favourite terp, and
> you get a Basic command prompt at which you can write programs. Hunt the
> Wumpus is supplied with the program.
>
> http://wired.st-and.ac.uk/~dg/cgi-bin/getpage.cgi?/IF
>
> Look for baZic, at the bottom of the page.

This is simply too amazing a feat for words.


> Please note that this is unfinished. While enough exists to run a decent
> game of Hunt the Wumpus, there are big chunks of functionality missing;
> roughly 50% of the Basic language. Notably, unimplemented features are:
>
> * String operators (the hooks are there, I just need to write the code)

That should be reasonably painless.


> * Subroutines (GOSUB & friends)

This should similarly be rather painless.  I've simulated them in BASIC, itself.
The 8-bit sort, where everything was line-numbered, no less.


> * Procedures (SUB & friends)

Bah!  We don't need none a'this stinkin' modernist stuff...


> * Proper arrays (although you do get pseudoarrays).

I'll have to look into this.  This might be "close enough."


> I am unlikely ever to finish this; the Basic language is just too annoying
> for words. It's even more annoying to implement than to write in. (It uses
> the Parser from Hell.) If you wish to continue it, be my guest.

Next free time, I may have to take a closer look at this. I (and I shudder as I type
this) actually kind of like BASIC.  It's just demented enough to be amusing, beneath
all of the hassle.


> What you *do* get, however, is:
>
> * Dynamic memory allocation, complete with block coalescing
> * A full mark/sweep garbage collector
> * Dynamic typing
> * Full tokenisation for fast(!) execution of programs
> * Full detokenisation when listing them again
> * An interactive Basic development environment (cough, cough)
> * State-of-the-art implementations of Hunt the Wumpus and Guess the Number
>   built in to the very interpreter

Well, that's all anyone could really ask for, I suppose...


> The memory allocator is nicely modular if you feel like ripping it out.
> Ditto the garbage collector.
>
> Speed isn't great; on the 486 I wrote it on it's noticeably sluggish. On
> my PIII 650MHz work machine it zips along nicely. You get 32kB of heap,
> which is shared by your program and data; SAVE and LOAD work as expected
> for a piece of IF. Full --- well, full*er* --- instructions are supplied
> with the program. The program is licensed under the MIT public license.

Probably a good choice of license.  Now BaZic can be as nonstandardized as old 8-bit
BASIC was!


> Does this count as an abuse of the Z-machine? Or just abuse?

Possibly a measure of both, but I'm too busy trying to balance "weirded out" with
"highly impressed."


> --
> +- David Given --------McQ-+ "There is nothing in the world so dangerous ---
> |  Work: dg@tao-group.com  | and I mean *nothing* --- as a children's story that
> |  Play: dg@cowlark.com    | happens to be true." --- Master Li Kao, _The Bridge
> +- http://www.cowlark.com -+ of Birds_

