Discussion:
ZILF: a ZIL compiler
(too old to reply)
vaporware
2009-07-22 05:44:00 UTC
Permalink
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.

Download: http://hansprestige.com/zil/zilf-0.2.zip

(Includes .NET/Mono binaries for the ZILF compiler, an updated version
of the ZAPF assembler and manual, and a sample game, "Cloak of
Darkness". If no serious issues are found, I'll upload this to the IF
Archive this week.)

The dialect of ZIL that this program understands was pieced together
and inferred from many sources, including MDL manuals that predate
Infocom as well as Infocom-era documents that have been released
since. The result is a language that incorporates a subset of MDL --
though not enough to run the mainframe Zork -- as well as features
specific to the Z-machine, which I believe is a fair description of
the original ZIL as well. I've tried to make this retro experience as
authentic as possible, and I believe anyone who can master ZILF would
have felt right at home with the original ZILCH.

A sample game is included, but there is no language documentation yet.
You might want to read the older documents about MDL and ZIL that
apply to varying extents:

The MDL Programming Language (if-archive/infocom/info)
Learning ZIL (http://www.xlisper.com/zil.pdf)
ZIP: Z-language Interpreter Program (http://www.xlisper.com/zip.pdf)

... but note that many MDL features are not implemented, and many of
the high-level "library" features in Learning ZIL would need to be
reimplemented in a new library for ZILF.

Usage notes:

* This is a command line application. After extracting the zip file,
cd to the sample directory and type "..\zilf cloak.zil" followed by "..
\zapf cloak.zap" to produce cloak.z3.

* If you start ZILF with no parameters, you'll enter interactive mode,
which evaluates MDL expressions as you type them. Type <QUIT> to exit.
Run "zilf /?" for a list of options.

* V3 is the default and has gotten the most testing, but Cloak can be
compiled to V4 and V5 as well: edit the <VERSION ZIP> line in
cloak.zil to read <VERSION EZIP> or <VERSION XZIP>. V1 and V2 are
unsupported. V6 and V7 don't work at this point, but V8 might be
close.

Possibilities for future development:

* More complete parser and "standard library"

* Port a larger sample game (like Advent)

* Compile to Glulx

vw
S. John Ross
2009-07-22 05:55:31 UTC
Permalink
Man, that's so cool it hurts!
dott.Piergiorgio
2009-07-22 07:51:18 UTC
Permalink
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download: http://hansprestige.com/zil/zilf-0.2.zip
Magnifico !

Now, if someone has contact with some of the Implementors, can point
Them to ZILF ? they're the only people whose can say about the
compatibility level between ZILF and the original ZIL....

only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)

Best regards from Italy, and my congrats !

(Now what remains to be recovered from the earliest days of IF ? we have
now a working MDL 'terp, a reinplementation of the lost ZIL and ZAP, and
even Adventure 0 .....)

Best regards from Italy,
Dott. Piergiorgio.
Jesse McGrew
2009-07-22 11:29:17 UTC
Permalink
On Jul 22, 12:51 am, "dott.Piergiorgio"
Post by dott.Piergiorgio
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download:http://hansprestige.com/zil/zilf-0.2.zip
Magnifico !
Now, if someone has contact with some of the Implementors, can point
Them to ZILF ? they're the only people whose can say about the
compatibility level between ZILF and the original ZIL....
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
Well, in theory it runs on many platforms already:
http://mono-project.com/Supported_Platforms

I've only tested it on Windows, Linux (x86), and OS X (PowerPC)
myself.

For true historical accuracy, it'd be fun to get this running on a
DECsystem-20... but I think the effort would be better spent porting
Mono to that platform than rewriting ZILF. ;)

vw
Jayson Smith
2009-07-22 12:06:20 UTC
Permalink
Hey! You stole my idea! Let's get Mono ported to TOPS-20, then we've really
got something!
Jayson

"Jesse McGrew" <***@gmail.com> wrote in message news:edd5bbfc-e9b8-4db3-bfbe-***@g1g2000pra.googlegroups.com...
On Jul 22, 12:51 am, "dott.Piergiorgio"
Post by dott.Piergiorgio
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download:http://hansprestige.com/zil/zilf-0.2.zip
Magnifico !
Now, if someone has contact with some of the Implementors, can point
Them to ZILF ? they're the only people whose can say about the
compatibility level between ZILF and the original ZIL....
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
Well, in theory it runs on many platforms already:
http://mono-project.com/Supported_Platforms

I've only tested it on Windows, Linux (x86), and OS X (PowerPC)
myself.

For true historical accuracy, it'd be fun to get this running on a
DECsystem-20... but I think the effort would be better spent porting
Mono to that platform than rewriting ZILF. ;)

vw
dott.Piergiorgio
2009-07-22 18:01:18 UTC
Permalink
Post by Jayson Smith
On Jul 22, 12:51 am, "dott.Piergiorgio"
Post by dott.Piergiorgio
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download:http://hansprestige.com/zil/zilf-0.2.zip
Magnifico !
Now, if someone has contact with some of the Implementors, can point
Them to ZILF ? they're the only people whose can say about the
compatibility level between ZILF and the original ZIL....
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
http://mono-project.com/Supported_Platforms
I've only tested it on Windows, Linux (x86), and OS X (PowerPC)
myself.
yea, but I the .zip has two windoze console .exe whose under
wineconsole, ask for the installation of m$ .net (no way !!) someone can
give me some suggestions ?

Best regards from Italy,
Dott. Piergiorgio.
tgies
2009-07-22 18:55:27 UTC
Permalink
On Jul 22, 1:01 pm, "dott.Piergiorgio"
Post by dott.Piergiorgio
yea, but I the .zip has two windoze console .exe whose under
wineconsole, ask for the installation of m$ .net (no way !!) someone can
give me some suggestions ?
You need Mono. http://mono-project.com/

tgies
Jesse McGrew
2009-07-22 21:45:52 UTC
Permalink
Post by tgies
On Jul 22, 1:01 pm, "dott.Piergiorgio"
Post by dott.Piergiorgio
yea, but I the .zip has two windoze console .exe whose under
wineconsole, ask for the installation of m$ .net (no way !!) someone can
give me some suggestions ?
You need Mono.http://mono-project.com/
On Ubuntu/Debian, you might be able to just type "sudo apt-get install
mono" and then "mono zilf.exe".

vw
dott.Piergiorgio
2009-07-23 09:30:19 UTC
Permalink
Post by Jesse McGrew
Post by tgies
Post by dott.Piergiorgio
yea, but I the .zip has two windoze console .exe whose under
wineconsole, ask for the installation of m$ .net (no way !!) someone can
give me some suggestions ?
You need Mono.http://mono-project.com/
On Ubuntu/Debian, you might be able to just type "sudo apt-get install
mono" and then "mono zilf.exe".
I have already mono installed... let's see....

hoe.... WORKS !!!!!

Many thanks !!!! :))))))

Best regards from Italy,
Dott. Piergiorgio.
dott.Piergiorgio
2009-07-23 10:15:05 UTC
Permalink
dott.Piergiorgio ha scritto:

I have now read the documentation <blushing>, and now I must give my
much embarassed apologies for not having checked the doc prior of
asking.... :#)

Also I must thank everyone to not having given me a RTFM, whose I have
much more than deserved... <blushing again>

Best regards from Italy by a deeply embarassed
Dott. Piergiorgio.
Matthew Russotto
2009-07-22 20:12:37 UTC
Permalink
Post by dott.Piergiorgio
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
Is MDL portable enough for you? I have recently finished a ZIL
compiler, tentatively named Zipher, sufficient for version 3 games,
written in that language. (no assembler, though; it currently requires ZAPF)
--
It's times like these which make me glad my bank is Dial-a-Mattress
Jesse McGrew
2009-07-22 21:53:49 UTC
Permalink
Post by dott.Piergiorgio
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
Is MDL portable enough for you?  I have recently finished a ZIL
compiler, tentatively named Zipher, sufficient for version 3 games,
written in that language. (no assembler, though; it currently requires ZAPF)
You are a madman, sir. Congratulations.

vw
dott.Piergiorgio
2009-07-23 09:32:11 UTC
Permalink
Post by Matthew Russotto
Post by dott.Piergiorgio
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
Is MDL portable enough for you? I have recently finished a ZIL
compiler, tentatively named Zipher, sufficient for version 3 games,
written in that language. (no assembler, though; it currently requires ZAPF)
Release, release !!!!

Don't worry for lingering bugs: the collective r.a.i-f mind will dispose
of these ;)

Best regards from Italy,
Dott. Piergiorgio.
greg
2009-07-25 04:16:58 UTC
Permalink
Post by dott.Piergiorgio
only note, I can suggest to try that perhaps isn't a bad idea porting
ZILF in a more portable language, like C ? ;)
No, no, ZILF should be written in ZIL, so that we can
have a truly self-hosting IF authoring system.
--
Greg
S. John Ross
2009-07-22 14:22:07 UTC
Permalink
Post by vaporware
ZIP: Z-language Interpreter Program (http://www.xlisper.com/zip.pdf)
If anyone's interested, I've re-built a copy of this document in
simple 1-bit form, so the PDF is just under 3 megabytes instead of
more than 70 (!!!) (it's also a bit friendlier to most printers, since
the printer doesn't have to work with slightly-faded RGB tones for
'black' ink).

Email ***@io.com and I'll be happy to send a copy.
Erik Max Francis
2009-07-22 20:54:40 UTC
Permalink
Post by S. John Ross
Post by vaporware
ZIP: Z-language Interpreter Program (http://www.xlisper.com/zip.pdf)
If anyone's interested, I've re-built a copy of this document in
simple 1-bit form, so the PDF is just under 3 megabytes instead of
more than 70 (!!!) (it's also a bit friendlier to most printers, since
the printer doesn't have to work with slightly-faded RGB tones for
'black' ink).
I'd definitely like a copy. 73 MB is a bit much for a bunch of scanned
images :-).
--
Erik Max Francis && ***@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
I'll have to get over this sooner or later. Why not now?
-- Louis Wu
Daryl McCullough
2009-07-22 14:45:13 UTC
Permalink
vaporware says...
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download: http://hansprestige.com/zil/zilf-0.2.zip
Challenge for Adam Thornton: change one letter in the name "ZILF"
to get a new name for a compiler, and explain the special features
of said compiler.

--
Daryl McCullough
Ithaca, NY
S. John Ross
2009-07-22 14:55:02 UTC
Permalink
Not _much_ of a challenge, really :)
Daryl McCullough
2009-07-22 16:10:55 UTC
Permalink
In article <76b4549f-1a77-43d5-af4c-***@p36g2000prn.googlegroups.com>,
S. John Ross says...
Post by S. John Ross
Not _much_ of a challenge, really :)
It's a two-part challenge! I'm guessing you only solved the first part.

--
Daryl McCullough
Ithaca, NY
Adam Thornton
2009-07-22 18:11:53 UTC
Permalink
Post by Daryl McCullough
vaporware says...
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download: http://hansprestige.com/zil/zilf-0.2.zip
Challenge for Adam Thornton: change one letter in the name "ZILF"
to get a new name for a compiler, and explain the special features
of said compiler.
Timing! See elsewhere in the thread....

Adam
Adam Thornton
2009-07-22 18:05:27 UTC
Permalink
This post might be inappropriate. Click to display it.
JJ Sonick
2009-07-22 20:42:09 UTC
Permalink
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download:http://hansprestige.com/zil/zilf-0.2.zip
Great news! I'll definitely be giving this a spin.

Josh
JJ Sonick
2009-07-23 14:26:28 UTC
Permalink
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Download:http://hansprestige.com/zil/zilf-0.2.zip
Great news!  I'll definitely be giving this a spin.
Josh
Jesse, could you give a quick summary of which Zil library functions/
flags aren't implemented yet?

Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]". The same cloak.z3 file runs fine
in Spatterlight.

Thanks,
Josh
dott.Piergiorgio
2009-07-23 15:15:40 UTC
Permalink
Post by JJ Sonick
Jesse, could you give a quick summary of which Zil library functions/
flags aren't implemented yet?
From the source of the parser, there are somewhat more than enough to
make a working CoD; take, drop, look, examine, directions, don, doff,
inventory, put on; the only non CoD needed verb is the meta version.

On the flags, there are: PERSONBIT TOUCHBIT TAKEBIT WEARBIT WORNBIT
LIGHTBIT SURFACEBIT CONTBIT NDESCBIT for a grand total of 9....

As global vars, there are : here, score and turns

Another plus re. CoD, is the Max object constant, set to 10 (much more
than needed for CoD, I guess I'm not spoiling...)
Post by JJ Sonick
Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]". The same cloak.z3 file runs fine
in Spatterlight.
Works fine in Frotz (under Linux) for me. There are a Mac version of Frotz ?
Jesse McGrew
2009-07-23 20:46:48 UTC
Permalink
On Jul 23, 8:15 am, "dott.Piergiorgio"
Post by JJ Sonick
Jesse, could you give a quick summary of which Zil library functions/
flags aren't implemented yet?
 From the source of the parser, there are somewhat more than enough to
make a working CoD; take, drop, look, examine, directions, don, doff,
inventory, put on; the only non CoD needed verb is the meta version.
On the flags, there are: PERSONBIT TOUCHBIT TAKEBIT WEARBIT WORNBIT
LIGHTBIT SURFACEBIT CONTBIT NDESCBIT for a grand total of 9....
As global vars, there are : here, score and turns
Other useful globals are WINNER (the player) and PRSA/PRSO/PRSI
(action, direct object, indirect object). There are also some internal
globals for the parser that won't be much use to game code.
Another plus re. CoD, is the Max object constant, set to 10 (much more
than needed for CoD, I guess I'm not spoiling...)
That's the size of the parser's multiple object tables, but the parser
doesn't really support multiples at all yet.
Post by JJ Sonick
Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]".  The same cloak.z3 file runs fine
in Spatterlight.
Works fine in Frotz (under Linux) for me. There are a Mac version of Frotz ?
I believe we've also tested it under Nitfol and Rezrov. Can any Mac
developer types figure out what Zoom is choking on?

Also, do you get the same error if you compile it as V4 or V5? (Change
"VERSION ZIP" to "VERSION EZIP" or "VERSION XZIP".)

vw
JJ Sonick
2009-07-24 02:46:40 UTC
Permalink
Post by Jesse McGrew
Post by JJ Sonick
Jesse, could you give a quick summary of which Zil library functions/
flags aren't implemented yet?
 From the source of the parser, there are somewhat more than enough to
make a working CoD; take, drop, look, examine, directions, don, doff,
inventory, put on; the only non CoD needed verb is the meta version.
On the flags, there are: PERSONBIT TOUCHBIT TAKEBIT WEARBIT WORNBIT
LIGHTBIT SURFACEBIT CONTBIT NDESCBIT for a grand total of 9....
As global vars, there are : here, score and turns
Other useful globals are WINNER (the player) and PRSA/PRSO/PRSI
(action, direct object, indirect object). There are also some internal
globals for the parser that won't be much use to game code.
Ah, cool. I see CLOCKER exists in the cloak example -- does this mean
the event (interrupt) queue is already implemented?
Post by Jesse McGrew
Post by JJ Sonick
Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]".  The same cloak.z3 file runs fine
in Spatterlight.
Works fine in Frotz (under Linux) for me. There are a Mac version of Frotz ?
I believe we've also tested it under Nitfol and Rezrov. Can any Mac
developer types figure out what Zoom is choking on?
Also, do you get the same error if you compile it as V4 or V5? (Change
"VERSION ZIP" to "VERSION EZIP" or "VERSION XZIP".)
OK, just tried that, but unfortunately the V4 and V5 versions still
give the same error in Zoom.

JJ
Jesse McGrew
2009-07-24 04:49:18 UTC
Permalink
Post by Jesse McGrew
Post by JJ Sonick
Jesse, could you give a quick summary of which Zil library functions/
flags aren't implemented yet?
 From the source of the parser, there are somewhat more than enough to
make a working CoD; take, drop, look, examine, directions, don, doff,
inventory, put on; the only non CoD needed verb is the meta version.
On the flags, there are: PERSONBIT TOUCHBIT TAKEBIT WEARBIT WORNBIT
LIGHTBIT SURFACEBIT CONTBIT NDESCBIT for a grand total of 9....
As global vars, there are : here, score and turns
Other useful globals are WINNER (the player) and PRSA/PRSO/PRSI
(action, direct object, indirect object). There are also some internal
globals for the parser that won't be much use to game code.
Ah, cool.  I see CLOCKER exists in the cloak example -- does this mean
the event (interrupt) queue is already implemented?
Nope. What you see in cloak.zil and parser.zil is what there is. ZILF
doesn't add a veneer or anything like that; every routine in the
compiled game has to be written in the source code. To make interrupts
work, you'd need to create a table to store them, some routines to add
and remove them from the table, and update CLOCKER to run events whose
time has come.
Post by Jesse McGrew
Post by JJ Sonick
Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]".  The same cloak.z3 file runs fine
in Spatterlight.
Works fine in Frotz (under Linux) for me. There are a Mac version of Frotz ?
I believe we've also tested it under Nitfol and Rezrov. Can any Mac
developer types figure out what Zoom is choking on?
Also, do you get the same error if you compile it as V4 or V5? (Change
"VERSION ZIP" to "VERSION EZIP" or "VERSION XZIP".)
OK, just tried that, but unfortunately the V4 and V5 versions still
give the same error in Zoom.
Hrm. Strange.

vw
JJ Sonick
2009-07-24 16:53:19 UTC
Permalink
Post by Jesse McGrew
Ah, cool.  I see CLOCKER exists in the cloak example -- does this mean
the event (interrupt) queue is already implemented?
Nope. What you see in cloak.zil and parser.zil is what there is. ZILF
doesn't add a veneer or anything like that; every routine in the
compiled game has to be written in the source code. To make interrupts
work, you'd need to create a table to store them, some routines to add
and remove them from the table, and update CLOCKER to run events whose
time has come.
Ah, gotcha. Ok, time for me to start studying the MDL manuals. :)
Post by Jesse McGrew
Post by Jesse McGrew
Post by dott.Piergiorgio
Post by JJ Sonick
Also, compiling the example with mono in OS X 10.5.7 works fine for
me, but the final cloak.z3 crashes Zoom 1.1.4 with "[The Zoom
interpreter has quit unexpectedly]".  The same cloak.z3 file runs fine
in Spatterlight.
Works fine in Frotz (under Linux) for me. There are a Mac version of Frotz ?
I believe we've also tested it under Nitfol and Rezrov. Can any Mac
developer types figure out what Zoom is choking on?
Also, do you get the same error if you compile it as V4 or V5? (Change
"VERSION ZIP" to "VERSION EZIP" or "VERSION XZIP".)
OK, just tried that, but unfortunately the V4 and V5 versions still
give the same error in Zoom.
Hrm. Strange.
Yeah, like you said, hopefully one of the Mac development gurus can
take a peek and see if they can puzzle it out...

JJ
Isxek
2009-07-23 19:40:16 UTC
Permalink
Post by vaporware
Some have tried, but none have succeeded... until now. I give you
ZILF. Not a toy or a high-level translator, but a compiler to turn the
language of the Implementors into Z-code, complete enough to write a
working game from the ground up.
Wow. Never thought it would be possible. Thanks!
Loading...